:root {
  --bg: #5f847c;
  --white: #f4f7f5;
  --orange: #e5460c;
  --blue: #446ddd;
  --brown: #4d3f27;
  --purple: #b360e5;
  --black: #0d0f0e;
  --font-pixel: "Press Start 2P", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --step-dot: 0.35rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-mono);
  font-size: clamp(0.9375rem, 2.5vw, 1rem);
  line-height: 1.6;
  color: var(--white);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(68, 109, 221, 0.25);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--orange);
}

code {
  font-size: 0.85em;
  background: rgba(13, 15, 14, 0.25);
  padding: 0.15em 0.4em;
  border: 1px solid rgba(244, 247, 245, 0.2);
}

.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.04) 0px,
    rgba(0, 0, 0, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.5;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9997;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-bottom: 0.75rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(13, 15, 14, 0.7), rgba(13, 15, 14, 0.35));
  border-bottom: 2px solid var(--brown);
  backdrop-filter: blur(8px);
}

.logo {
  font-family: var(--font-pixel);
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  color: var(--white);
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.6rem;
  font-size: clamp(0.65rem, 3.2vw, 0.8rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  max-width: 100%;
}

.nav a {
  color: var(--white);
  padding: 0.5rem 0.45rem;
  border: 2px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover {
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: 4px 4px 0 var(--black);
}

.nav-opensea {
  background: var(--orange);
  color: var(--white) !important;
  border: 2px solid var(--black) !important;
  box-shadow: 4px 4px 0 var(--black);
}

.nav-opensea:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--black) !important;
  color: var(--white) !important;
}

.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}

.glitch-text::before {
  color: var(--blue);
  animation: glitch-a 3s infinite linear alternate-reverse;
  text-shadow: 2px 0 var(--purple);
}

.glitch-text::after {
  color: var(--orange);
  animation: glitch-b 2.5s infinite linear alternate-reverse;
  text-shadow: -2px 0 var(--blue);
}

@keyframes glitch-a {
  0%,
  90%,
  100% {
    transform: translate(0);
    clip-path: inset(0 0 0 0);
  }
  92% {
    transform: translate(-2px, 1px);
    clip-path: inset(20% 0 60% 0);
  }
  94% {
    transform: translate(2px, -1px);
    clip-path: inset(50% 0 10% 0);
  }
}

@keyframes glitch-b {
  0%,
  88%,
  100% {
    transform: translate(0);
  }
  90% {
    transform: translate(2px, 1px);
  }
  93% {
    transform: translate(-3px, 0);
  }
}

.hero {
  position: relative;
  min-height: min(88vh, 900px);
  display: grid;
  align-items: center;
  padding: 1.25rem max(1rem, env(safe-area-inset-left)) 2rem max(1rem, env(safe-area-inset-right));
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  border-bottom: 4px solid var(--brown);
}

@media (max-width: 639px) {
  .hero {
    min-height: min(82vh, 820px);
    align-items: center;
    padding-top: 1rem;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg);
  background-image: url("/hero.png");
  background-size: cover;
  background-position: center 22%;
  opacity: 0.95;
  filter: contrast(1.05) saturate(1.05);
}

@media (max-width: 639px) {
  .hero-bg {
    background-position: center top;
    background-size: cover;
  }

  .hero-bg::after {
    background: linear-gradient(
      180deg,
      rgba(95, 132, 124, 0.2) 0%,
      rgba(13, 15, 14, 0.82) 50%,
      var(--bg) 100%
    );
  }
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(95, 132, 124, 0.15) 0%,
    rgba(13, 15, 14, 0.75) 55%,
    var(--bg) 100%
  );
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 15, 14, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 15, 14, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  align-self: center;
}

.hero-title {
  margin: 0 0 1rem;
}

.hero-title-line {
  display: block;
  font-family: var(--font-pixel);
  font-size: clamp(0.65rem, 2vw, 0.8rem);
  color: var(--purple);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.hero-title-main {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: clamp(1.5rem, 6vw, 3rem);
  line-height: 1.2;
  color: var(--white);
  text-shadow:
    4px 4px 0 var(--black),
    -1px -1px 0 var(--brown);
}

.hero-sub {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  max-width: 32ch;
  color: rgba(244, 247, 245, 0.92);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1rem 1.25rem;
  min-height: 48px;
  border: 3px solid var(--black);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 6px 6px 0 var(--black);
}

.btn-primary:hover {
  box-shadow: 8px 8px 0 var(--black);
  color: var(--white);
}

.btn-ghost {
  background: var(--brown);
  color: var(--white);
  box-shadow: 6px 6px 0 var(--black);
}

.btn-ghost:hover {
  color: var(--white);
  background: var(--purple);
  box-shadow: 8px 8px 0 var(--black);
}

.btn-block {
  width: 100%;
}

.section {
  position: relative;
  padding: 2.75rem max(1rem, env(safe-area-inset-left)) 2.75rem max(1rem, env(safe-area-inset-right));
  border-bottom: 2px solid rgba(13, 15, 14, 0.35);
}

@media (min-width: 640px) {
  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(0.85rem, 2.5vw, 1.15rem);
  line-height: 1.5;
  margin: 0 0 1rem;
  color: var(--white);
  text-shadow: 3px 3px 0 var(--black);
}

.section-lead {
  margin: 0 0 2rem;
  font-size: 1rem;
  max-width: 52ch;
  color: rgba(244, 247, 245, 0.9);
}

.accent-orange {
  color: var(--orange);
  font-weight: 600;
}

.ramp {
  background:
    radial-gradient(ellipse 80% 50% at 10% 40%, rgba(179, 96, 229, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 90% 60%, rgba(68, 109, 221, 0.15), transparent),
    var(--bg);
}

.ramp-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .ramp-track {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: stretch;
  }
}

.ramp-step {
  position: relative;
  margin: 0;
  padding: 1.25rem;
  background: rgba(13, 15, 14, 0.28);
  border: 3px solid var(--black);
  box-shadow: 8px 8px 0 rgba(13, 15, 14, 0.35);
}

@media (min-width: 640px) {
  .ramp-step {
    padding: 1.5rem;
  }
}

.ramp-step:nth-child(1) {
  border-color: var(--orange);
}

.ramp-step:nth-child(2) {
  border-color: var(--purple);
}

.ramp-step:nth-child(3) {
  border-color: var(--blue);
}

.ramp-step-badge {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  display: inline-block;
  padding: 0.5rem 0.65rem;
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
  margin-bottom: 1rem;
  box-shadow: 4px 4px 0 var(--black);
}

.ramp-step-body h3 {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  margin: 0 0 0.75rem;
  color: var(--white);
}

.ramp-step-body p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.ramp-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}

.ramp-list li {
  margin-bottom: 0.35rem;
}

.ramp-list li::marker {
  color: var(--orange);
}

.ramp-tasks {
  margin-top: 0.5rem;
}

.ramp-tasks-note {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  opacity: 0.92;
  line-height: 1.45;
}

.apply-tasks {
  margin: 1rem 0 1.5rem;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.apply-tasks li {
  margin-bottom: 0.35rem;
}

.apply-tasks li::marker {
  color: var(--orange);
}

.apply-copy .section-lead a {
  color: var(--blue);
  border-bottom: 1px solid currentColor;
}

.text-link {
  font-weight: 600;
  color: var(--blue);
  border-bottom: 2px solid currentColor;
}

.text-link:hover {
  color: var(--orange);
}

.text-link-block {
  display: inline-block;
  margin-top: 0.65rem;
}

.ramp-sprites {
  display: none;
}

@media (min-width: 1100px) {
  .ramp-sprites {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    opacity: 0.85;
  }

  .ramp-sprites img {
    width: 72px;
    height: 72px;
    border: 3px solid var(--black);
    box-shadow: 6px 6px 0 var(--black);
  }
}

.gallery-section {
  background: linear-gradient(180deg, rgba(77, 63, 39, 0.25) 0%, var(--bg) 45%);
  overflow: hidden;
}

.gallery-wrap {
  position: relative;
}

.gallery-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.gallery-header .section-title {
  color: var(--purple);
}

.gallery-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  perspective: 1200px;
}

@media (max-width: 640px) {
  .gallery-stage {
    gap: 0.5rem;
  }

  .gallery-cylinder {
    order: 1;
    flex: 1 0 100%;
    width: 100%;
    height: min(52vw, 260px);
    min-height: 220px;
  }

  .gallery-prev {
    order: 2;
  }

  .gallery-next {
    order: 3;
  }
}

.gallery-nav {
  flex-shrink: 0;
  width: max(44px, 12vw);
  height: max(44px, 12vw);
  max-width: 52px;
  max-height: 52px;
  font-family: var(--font-pixel);
  font-size: clamp(0.55rem, 3vw, 0.65rem);
  color: var(--white);
  background: var(--brown);
  border: 3px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  cursor: pointer;
  transition: transform 0.1s ease;
  touch-action: manipulation;
}

.gallery-nav:hover {
  background: var(--purple);
  transform: scale(1.05);
}

.gallery-nav:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--black);
}

.gallery-cylinder {
  position: relative;
  width: min(100%, 720px);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: pan-x pinch-zoom;
  transform-style: preserve-3d;
}

.gallery-card {
  position: absolute;
  width: min(220px, 78vw);
  max-width: 240px;
  padding: clamp(0.45rem, 2vw, 0.75rem);
  background: var(--white);
  border: 4px solid var(--black);
  box-shadow: 0 0 0 2px var(--purple), 12px 12px 0 rgba(13, 15, 14, 0.45);
  transform-style: preserve-3d;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    filter 0.35s ease;
  cursor: grab;
}

.gallery-card:active {
  cursor: grabbing;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--black);
}

.gallery-card-ribbon {
  margin-top: 0.5rem;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  text-align: center;
  color: var(--black);
  letter-spacing: 0.08em;
}

.gallery-card.is-front {
  z-index: 10;
  filter: none;
}

.gallery-card:not(.is-front) {
  opacity: 0.55;
  filter: grayscale(0.25) brightness(0.88);
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.thumb {
  width: max(48px, 11vw);
  height: max(48px, 11vw);
  max-width: 56px;
  max-height: 56px;
  padding: 0;
  border: 3px solid var(--black);
  background: var(--brown);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--black);
  transition: transform 0.12s ease, outline 0.12s ease;
  touch-action: manipulation;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb:hover,
.thumb:focus-visible {
  transform: translate(-2px, -2px);
  outline: 2px solid var(--orange);
}

.thumb.is-active {
  outline: 3px solid var(--blue);
  box-shadow:
    3px 3px 0 var(--black),
    0 0 0 2px var(--white);
}

.gallery-hint {
  text-align: center;
  font-size: clamp(0.75rem, 3vw, 0.8rem);
  opacity: 0.75;
  margin: 0;
  padding: 0 0.5rem;
  line-height: 1.45;
}

.apply-section {
  background: radial-gradient(circle at 80% 20%, rgba(229, 70, 12, 0.14), transparent 45%), var(--bg);
}

.apply-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 880px) {
  .apply-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 3rem;
  }
}

.apply-copy .section-title {
  color: var(--orange);
}

.apply-showcase {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.apply-pixel {
  border: 4px solid var(--black);
  box-shadow: 8px 8px 0 var(--black);
}

.apply-pixel.delay {
  margin-bottom: 1.5rem;
}

.apply-form {
  padding: 1.25rem;
  background: rgba(13, 15, 14, 0.35);
  border: 3px solid var(--black);
  box-shadow: 10px 10px 0 rgba(13, 15, 14, 0.4);
}

@media (min-width: 640px) {
  .apply-form {
    padding: 1.75rem;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
  font-size: 0.85rem;
}

.field span {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
}

.field input,
.field textarea {
  font-family: var(--font-mono);
  font-size: max(1rem, 16px);
  padding: 0.75rem 0.85rem;
  border: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--blue);
}

.field input:invalid:not(:placeholder-shown) {
  box-shadow: 0 0 0 3px var(--orange);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
}

.check input {
  margin-top: 0.25rem;
  accent-color: var(--blue);
}

.form-note {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--purple);
}

.form-note.is-ok {
  color: var(--white);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  text-align: center;
}

.footer-links a {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-dot {
  opacity: 0.6;
}

.footer-chain {
  color: rgba(244, 247, 245, 0.85);
}

.site-footer {
  padding: max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)) max(1.25rem, env(safe-area-inset-right));
  background: var(--brown);
  border-top: 4px solid var(--black);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem 1.25rem;
  font-size: clamp(0.75rem, 3vw, 0.8rem);
}

@media (min-width: 640px) {
  .footer-inner {
    justify-content: space-between;
  }
}

.footer-brand {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
}

.footer-pixels {
  display: flex;
  gap: 0.5rem;
}

.footer-pixels img {
  border: 2px solid var(--black);
}

.toast {
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translate3d(-50%, 120%, 0);
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.95rem 1.2rem;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 3vw, 0.95rem);
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  color: var(--white);
  background: var(--brown);
  border: 3px solid var(--black);
  box-shadow: 8px 8px 0 rgba(13, 15, 14, 0.5);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.toast.is-visible {
  transform: translate3d(-50%, 0, 0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .toast.is-visible {
    transform: translate3d(-50%, 0, 0);
  }
}
