/* Batta Studios. Dark only: the sand intro and the yellow beak need a dark stage.
   Radius rule: interactive = pill, surfaces and media = --radius, phones are physical (36px). */

:root {
  --bg: #0e0e10;
  --bg-2: #161619;
  --bg-3: #1e1e22;
  --line: #2a2a30;
  --line-strong: #4a4a52;
  --text: #f2f1ec;
  --muted: #a6a6ad;
  --accent: #ffc71c;
  --accent-edge: #b88a00;
  --accent-ink: #141006;

  --radius: 20px;
  --pill: 999px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-pixel: "Silkscreen", ui-monospace, monospace;

  /* z-index scale */
  --z-nav: 10;
  --z-intro: 20;
  --z-skip: 30;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* stable gutter: hiding the scrollbar during the intro must not resize the hero */
html { scroll-behavior: smooth; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
html.intro { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(72px, 9vw, 120px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hl { color: var(--accent); }
.i { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.eyebrow { font: 400 .8rem/1 var(--font-pixel); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 20px; }
.section-lead { color: var(--muted); font-size: 1.15rem; max-width: 58ch; margin-top: 20px; }

.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: var(--z-skip);
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--pill);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.top-sentinel { position: absolute; top: 0; height: 80px; width: 1px; }

/* ---------- buttons: arcade keys with a hard bottom edge ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: 1em 1.6em; border-radius: var(--pill); border: 0;
  font: 600 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 0 var(--accent-edge); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-edge); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-edge); }
.btn-ghost { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text); background: rgb(242 241 236 / .04); }
.btn-ghost:active { transform: translateY(2px); }
.btn-ghost .i { transition: transform .25s var(--ease); }
.btn-ghost:hover .i { transform: translate(2px, -2px); }
.btn-sm { padding: .8em 1.25em; font-size: .92rem; }
.btn-lg { padding: 1.15em 2em; font-size: 1.1rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: var(--z-nav); height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--gutter);
  transition: background-color .3s, box-shadow .3s, transform .8s var(--ease);
}
.nav.scrolled { background: rgb(14 14 16 / .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.intro .nav { transform: translateY(-110%); }
.nav-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 1rem/1 var(--font-display); letter-spacing: -0.01em; }
.nav-brand img { width: 42px; height: auto; }
.nav-links { display: flex; gap: 32px; margin-left: auto; margin-right: 12px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 899px) { .nav-links { display: none; } }
@media (max-width: 379px) { .nav-brand span { display: none; } }

/* ---------- hero + sand ---------- */
.hero { position: relative; min-height: 100dvh; display: grid; align-items: center; padding-block: 100px 64px; overflow: hidden; }
.sand { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.15rem, 4.5vw, 3.75rem); }
.hero .lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 44ch; margin-top: 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-visual img { width: 100%; max-width: 480px; height: auto; margin-inline: auto; }
.canvas-on .hero-visual img { visibility: hidden; }

/* copy waits ~.35s so the logo has flown clear of it */
.hero-copy > * { transition: opacity .9s var(--ease) .35s, transform .9s var(--ease) .35s; }
.hero-copy > :nth-child(2) { transition-delay: .43s; }
.hero-copy > :nth-child(3) { transition-delay: .51s; }
.hero-copy > :nth-child(4) { transition-delay: .59s; }
.intro .hero-copy > * { opacity: 0; transform: translateY(28px); }

.intro-count, .intro-skip { display: none; }
.intro .intro-count, .intro .intro-skip { display: block; }
.intro-count {
  position: fixed; left: var(--gutter); bottom: 28px; z-index: var(--z-intro);
  font: 400 .8rem/1 var(--font-pixel); text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.intro-count span { color: var(--accent); }
.intro-skip {
  position: fixed; right: var(--gutter); bottom: 20px; z-index: var(--z-intro);
  background: none; border: 0; color: var(--muted); font: 500 .9rem/1 var(--font-body);
  padding: 10px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px;
}
.intro-skip:hover { color: var(--text); }

@media (max-width: 767px) {
  .hero { align-items: start; padding-top: 96px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { order: -1; }
  .hero-visual img { max-width: min(76vw, 340px); }
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; }
.marquee-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.marquee-track span {
  display: inline-flex; align-items: center; gap: 40px; padding-right: 40px;
  font: 400 clamp(1rem, 2vw, 1.4rem)/1 var(--font-pixel); text-transform: uppercase; color: var(--muted);
}
.marquee-track span::after { content: ""; width: 10px; height: 10px; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- work: three phones fan out on reveal ---------- */
.phones {
  display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(10px, 3vw, 44px); padding: clamp(48px, 7vw, 88px) 16px 0;
}
.shot { width: clamp(96px, 21vw, 270px); transition: transform 1.1s var(--ease), opacity .8s var(--ease); }
.shot-main { width: clamp(124px, 26vw, 320px); z-index: 1; }
.shot:first-child { transform: rotate(-5deg) translateY(28px); }
.shot:last-child { transform: rotate(5deg) translateY(28px); }
.js .phones:not(.in) .shot { opacity: 0; transform: translateY(90px) rotate(0); }
.js .phones:not(.in) .shot-main { transform: translateY(60px); }
.phones .shot:first-child, .phones .shot:last-child { transition-delay: .12s; }
.phone {
  padding: clamp(5px, .8vw, 10px); border-radius: clamp(18px, 2.6vw, 36px); background: var(--bg-3);
  box-shadow: inset 0 0 0 1.5px #36363d, 0 40px 80px -30px rgb(0 0 0 / .7);
}
.phone img { width: 100%; height: auto; border-radius: clamp(13px, 2vw, 27px); }
.shot figcaption { text-align: center; margin-top: 18px; font: 400 clamp(.62rem, 1.2vw, .8rem)/1.3 var(--font-pixel); text-transform: uppercase; color: var(--muted); }
.work-cta { display: flex; justify-content: center; margin-top: clamp(48px, 6vw, 72px); }

/* ---------- offer bento ---------- */
.bento {
  display: grid; gap: 16px; margin-top: clamp(36px, 5vw, 56px);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "menu menu menu menu scan scan"
    "menu menu menu menu codes codes"
    "board board board dash dash dash";
}
.cell {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  min-height: 240px; padding: clamp(22px, 2.6vw, 32px);
  border-radius: var(--radius); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
}
.cell p { color: var(--muted); max-width: 46ch; }
.cell-menu { grid-area: menu; min-height: 500px; background: radial-gradient(120% 80% at 75% 0%, #2c2610 0%, var(--bg-2) 62%); }
.cell-scan { grid-area: scan; background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.cell-scan p { color: #4a3a08; }
.cell-codes {
  grid-area: codes;
  background: repeating-conic-gradient(#1b1b1f 0 25%, var(--bg-2) 0 50%) 0 0 / 22px 22px;
}
.cell-board { grid-area: board; min-height: 300px; }
.cell-dash { grid-area: dash; min-height: 300px; background: linear-gradient(160deg, #1d1d22, var(--bg-2) 55%); }

.cups { position: absolute; inset: 0 0 auto auto; width: 72%; height: 70%; z-index: -1; }
.cups img { position: absolute; width: 34%; height: auto; filter: drop-shadow(0 24px 30px rgb(0 0 0 / .5)); transition: transform .6s var(--ease); }
.cups img:nth-child(1) { right: 52%; top: 18%; transform: rotate(-12deg); }
.cups img:nth-child(2) { right: 20%; top: 6%; width: 38%; transform: rotate(6deg); }
.cups img:nth-child(3) { right: -4%; top: 34%; width: 40%; transform: rotate(14deg); }
.cell-menu:hover .cups img:nth-child(1) { transform: rotate(-16deg) translateY(-10px); }
.cell-menu:hover .cups img:nth-child(2) { transform: rotate(2deg) translateY(-16px); }
.cell-menu:hover .cups img:nth-child(3) { transform: rotate(18deg) translateY(-8px); }

.big-rank {
  position: absolute; top: 20px; left: clamp(22px, 2.6vw, 32px); z-index: -1;
  font: 800 clamp(4.5rem, 8vw, 7.5rem)/1 var(--font-display); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 2px var(--accent); opacity: .9;
}

@media (max-width: 899px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "menu menu" "scan codes" "board board" "dash dash"; }
  .cell-menu { min-height: 440px; }
}
@media (max-width: 599px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "menu" "scan" "codes" "board" "dash"; }
  .cell-menu { min-height: 400px; }
  .cell-scan, .cell-codes, .cell-dash { min-height: 200px; }
  .cups { width: 100%; }
}

/* ---------- sites ---------- */
.sites-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.browser-stack { position: relative; padding-bottom: 22%; }
.browser { border-radius: var(--radius); overflow: hidden; background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -36px rgb(0 0 0 / .8); }
.browser img { width: 100%; height: auto; }
.browser-bar { display: flex; gap: 6px; padding: 12px 14px; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.browser-back { position: absolute; width: 58%; right: -6%; bottom: 0; transition-delay: .2s; }
.sites-copy p { color: var(--muted); font-size: 1.15rem; max-width: 40ch; margin-top: 20px; }
.sites-copy .note { font-size: .95rem; margin-top: 14px; }
@media (max-width: 899px) {
  .sites-grid { grid-template-columns: 1fr; }
  .browser-back { right: 0; }
}

/* ---------- process: giant verbs fill in as they arrive ---------- */
.steps { list-style: none; padding: 0; margin-top: clamp(32px, 5vw, 56px); }
.steps li {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px 40px; align-items: center;
  padding-block: clamp(20px, 3vw, 32px); border-top: 1px solid var(--line);
}
.step-verb {
  font: 800 clamp(2.8rem, 8.5vw, 7rem)/.95 var(--font-display); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--line-strong);
  transition: color .7s steps(5), -webkit-text-stroke-color .7s steps(5);
}
.steps li.in .step-verb { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.steps li p { color: var(--muted); font-size: 1.1rem; max-width: 44ch; }
@media (max-width: 767px) { .steps li { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-head { position: sticky; top: 108px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding-block: 24px; cursor: pointer; list-style: none;
  font: 600 1.15rem/1.35 var(--font-body);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .i { color: var(--accent); transition: transform .3s var(--ease); }
.faq-list details[open] summary .i { transform: rotate(45deg); }
.faq-list details p { color: var(--muted); max-width: 60ch; padding-bottom: 24px; }
@media (max-width: 767px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-head { position: static; }
}

/* ---------- final ---------- */
.final { padding-block: clamp(96px, 14vw, 180px); text-align: center; border-top: 1px solid var(--line); }
.final h2 { font-size: clamp(2.2rem, 6.2vw, 5.2rem); max-width: 15ch; margin: 0 auto 44px; }
.final-alt { color: var(--muted); margin-top: 28px; }
.final-alt a { color: var(--text); text-underline-offset: 4px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 32px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { color: var(--muted); font-size: .95rem; }
.footer-links { display: flex; gap: 8px; }
.footer-links a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--pill); color: var(--muted); transition: color .2s, background-color .2s; }
.footer-links a:hover { color: var(--text); background: var(--bg-3); }
.footer-links .i { width: 22px; height: 22px; }

/* ---------- scroll reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.bento .reveal:nth-child(2), .bento .reveal:nth-child(4) { transition-delay: .08s; }
.bento .reveal:nth-child(3), .bento .reveal:nth-child(5) { transition-delay: .16s; }
/* stepped wipe so media "pixels in". Clip the img, not the observed frame:
   a fully clipped target never reports as intersecting. */
.js .reveal-pixel img { clip-path: inset(0 100% 0 0); transition: clip-path .9s steps(12); transition-delay: inherit; }
.js .reveal-pixel.in img { clip-path: inset(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .js .reveal, .js .reveal-pixel img, .js .phones:not(.in) .shot { opacity: 1; transform: none; clip-path: none; }
}
