/* ==========================================================================
   AgentLogicLoop — design system
   Dark-first editorial. Accent used sparingly: CTAs, labels, states.
   ========================================================================== */

:root {
  --bg: #080808;
  --bg-2: #101010;
  --bg-3: #161616;
  --fg: #f5f5f0;
  --muted: #9a9a95;
  --faint: #5c5c58;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #c6ff3d;
  --accent-ink: #0a0a0a;
  --warm: #efe9dd;

  --font-sans: "Inter Tight", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --nav-h: 72px;
  --radius: 4px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --fs-eyebrow: 12px;
  --fs-body: clamp(16px, 1.1vw, 18px);
  --fs-lead: clamp(18px, 1.5vw, 22px);
  --fs-h3: clamp(22px, 2vw, 30px);
  --fs-h2: clamp(40px, 6vw, 80px);
  --fs-h1: clamp(48px, 7vw, 104px);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform .2s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(88px, 12vw, 180px); }
.section--tight { padding-block: clamp(64px, 8vw, 120px); }
.section--alt { background: var(--bg-2); }
.mt-20 { margin-top: 20px; }
.mt-28 { margin-top: 28px; }
.mt-36 { margin-top: 36px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Grain texture on selected dark sections */
.grain { isolation: isolate; }
.grain::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.eyebrow--plain::before { display: none; }

.h1, .h2, .h3 { font-weight: 800; letter-spacing: -0.045em; line-height: .92; text-wrap: balance; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); line-height: .95; }
.h3 { font-size: var(--fs-h3); letter-spacing: -0.03em; line-height: 1.05; font-weight: 700; }
.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--muted); max-width: 46ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

.section-head { display: grid; gap: 24px; margin-bottom: clamp(48px, 7vw, 96px); }
.section-head--split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; }
}

/* Masked line reveal */
.line-mask { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line-mask > span { display: inline-block; transition: transform 1.1s var(--ease-out); }
.js .line-mask > span { transform: translateY(105%); }
.is-in .line-mask > span, .line-mask.is-in > span { transform: none; }
.line-mask:nth-child(2) > span { transition-delay: .12s; }
.line-mask:nth-child(3) > span { transition-delay: .24s; }

.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }

/* If the app bundle fails to start, never leave content hidden. */
.js-failed [data-reveal], .js-failed .line-mask > span, .js-failed .cascade__unit { opacity: 1 !important; transform: none !important; }

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 16px; --pad-x: 24px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
  will-change: transform;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--fg); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--lg { --pad-y: 22px; --pad-x: 36px; min-height: 64px; font-size: 14px; }
@media (max-width: 599px) {
  .btn--lg { width: 100%; white-space: normal; text-align: center; --pad-x: 24px; letter-spacing: .08em; }
}
.btn--sm { --pad-y: 10px; --pad-x: 18px; min-height: 40px; font-size: 12px; }

/* Arrow: ↗ at rest, → on hover with motion */
.btn__arrow { position: relative; width: 1em; height: 1em; overflow: hidden; display: inline-block; flex: none; }
.btn__arrow::before, .btn__arrow::after {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  line-height: 1;
  transition: transform .45s var(--ease-out), opacity .3s;
}
.btn__arrow::before { content: "↗"; }
.btn__arrow::after { content: "→"; transform: translateX(-120%); opacity: 0; }
.btn:hover .btn__arrow::before, .btn:focus-visible .btn__arrow::before { transform: translate(120%, -120%); opacity: 0; }
.btn:hover .btn__arrow::after, .btn:focus-visible .btn__arrow::after { transform: none; opacity: 1; }
.btn__arrow--down::before { content: "↓"; }
.btn__arrow--down::after { content: "↓"; transform: translateY(-120%); }
.btn:hover .btn__arrow--down::before { transform: translateY(120%); }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 6px;
  transition: border-color .3s, color .3s;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease-out), border-color .4s, backdrop-filter .4s;
}
.nav.is-scrolled {
  background: rgba(8, 8, 8, .78);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.03em; font-size: 19px; }
.logo__mark { width: 26px; height: 26px; flex: none; }
@media (max-width: 420px) {
  .nav__inner { gap: 12px; }
  .logo { font-size: 16px; gap: 8px; }
  .nav__actions { gap: 8px; }
}
.nav__links { display: none; gap: 36px; }
.nav__link {
  position: relative; font-size: 14px; color: var(--muted);
  transition: color .25s;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--fg); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
}
.nav__toggle-lines { position: relative; width: 16px; height: 10px; }
.nav__toggle-lines::before, .nav__toggle-lines::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: var(--fg);
  transition: transform .35s var(--ease-out), top .35s var(--ease-out);
}
.nav__toggle-lines::before { top: 0; }
.nav__toggle-lines::after { top: 8.5px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-lines::before { top: 4.25px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-lines::after { top: 4.25px; transform: rotate(-45deg); }
.nav__cta-label-long { display: none; }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
  .nav__cta-label-long { display: inline; }
  .nav__cta-label-short { display: none; }
}

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  padding: calc(var(--nav-h) + 32px) var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease-out), visibility 0s linear .4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.mobile-menu__links { display: grid; gap: 8px; }
.mobile-menu__link { font-size: clamp(40px, 12vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.mobile-menu__link[aria-current="page"] { color: var(--accent); }
@media (min-width: 900px) { .mobile-menu { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + clamp(32px, 6vw, 72px));
  padding-bottom: clamp(48px, 6vw, 80px);
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 5vw, 64px); align-items: center; }
@media (min-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); }
}
.hero__title { margin-top: 28px; }
.hero__title .line-mask:nth-child(2) > span { color: var(--fg); }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__sub { margin-top: 28px; font-size: var(--fs-lead); line-height: 1.45; max-width: 34ch; color: var(--fg); font-weight: 500; letter-spacing: -0.01em; }
.hero__copy { margin-top: 16px; max-width: 52ch; color: var(--muted); }
.hero__ctas { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { margin-top: 32px; display: grid; gap: 14px; }
.hero__meta-line { font-size: 14px; color: var(--muted); }

.loop-cue { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.loop-cue__step { transition: color .4s; }
.loop-cue__step.is-active { color: var(--accent); }
.loop-cue__sep { color: var(--faint); }

/* Hero showcase: editorial grid of 9:16 ads */
.showcase {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 14px);
  height: clamp(460px, 64vw, 760px);
}
.showcase__col { display: grid; gap: clamp(8px, 1vw, 14px); align-content: start; will-change: transform; }
.showcase__col:nth-child(1) { transform: translateY(12%); }
.showcase__col:nth-child(3) { transform: translateY(6%); }
.showcase::before, .showcase::after {
  content: ""; position: absolute; left: -2px; right: -2px; height: 18%; z-index: 2; pointer-events: none;
}
.showcase::before { top: -2px; background: linear-gradient(var(--bg), transparent); }
.showcase::after { bottom: -2px; background: linear-gradient(transparent, var(--bg)); }
@media (min-width: 1100px) { .showcase { height: min(78vh, 780px); } }
@media (max-width: 599px) {
  .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); height: 520px; }
  .showcase__col:nth-child(3) { display: none; }
}

/* ---------- Media cards (VideoCard) ---------- */
.media {
  position: relative; overflow: hidden;
  background: var(--bg-3);
  border-radius: var(--radius);
  aspect-ratio: var(--ar, 9 / 16);
  isolation: isolate;
}
.media img, .media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), opacity .6s var(--ease-out);
}
.media video { opacity: 0; }
.media.is-playing video { opacity: 1; }
.media__chrome {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, transparent 22%, transparent 62%, rgba(0,0,0,.7) 100%);
}
.media__tag {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 2px;
  background: rgba(8,8,8,.6); color: var(--fg);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.media__caption { font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-size: clamp(16px, 1.6vw, 22px); text-wrap: balance; }
.media__caption small { display: block; margin-top: 6px; font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(245,245,240,.7); }
.media__progress { position: absolute; left: 12px; right: 12px; top: 8px; height: 2px; background: rgba(255,255,255,.2); border-radius: 2px; overflow: hidden; z-index: 3; }
.media__progress::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(var(--p, 0)); }
.media--fallback img { visibility: hidden; }
.media--fallback { background: radial-gradient(120% 80% at 30% 20%, var(--fallback-a, #2a2a2a), var(--bg-3) 70%); }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: 22px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee__group { display: flex; align-items: center; flex: none; }
.marquee__item { font-family: var(--font-mono); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-inline: 28px; white-space: nowrap; }
.marquee__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Featured work ---------- */
.work-grid { display: grid; gap: clamp(12px, 1.5vw, 20px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.work-grid--featured .project:nth-child(1) { grid-column: span 2; grid-row: span 2; }
@media (max-width: 599px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-grid--featured .project:nth-child(1) { grid-column: auto; grid-row: auto; }
}

/* ProjectCard */
.project { display: grid; gap: 14px; align-content: start; }
.project__link { display: block; position: relative; border-radius: var(--radius); }
.project__media { --ar: 4 / 5; }
.project:hover .media img, .project:hover .media video,
.project__link:focus-visible .media img, .project__link:focus-visible .media video { transform: scale(1.04); }
.project__arrow {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 16px;
  transform: scale(.6) rotate(-45deg); opacity: 0;
  transition: transform .5s var(--ease-out), opacity .3s;
}
.project:hover .project__arrow, .project__link:focus-visible .project__arrow { transform: none; opacity: 1; }
.project__meta { display: grid; gap: 6px; }
.project__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.project__name { font-weight: 800; letter-spacing: -0.03em; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.1; }
.project__type { color: var(--accent); }
.project__desc { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 52ch; }
.project__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--faint); }

.concept-note { margin-top: 32px; display: flex; gap: 12px; align-items: flex-start; color: var(--faint); font-size: 13px; max-width: 70ch; }

/* ---------- Problem: one product → dozens ---------- */
.multiply { display: grid; gap: 48px; }
@media (min-width: 1000px) { .multiply { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 80px; } }
.multiply__copy { display: grid; gap: 22px; max-width: 52ch; }
.multiply__copy p { color: var(--muted); font-size: var(--fs-lead); line-height: 1.45; }
.multiply__copy strong { color: var(--fg); font-weight: 600; }

.cascade { display: grid; gap: 10px; }
.cascade__row { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; padding-block: 16px; border-top: 1px solid var(--line); }
.cascade__label { display: grid; gap: 2px; }
.cascade__num { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.cascade__units { display: flex; flex-wrap: wrap; gap: 6px; }
.cascade__unit {
  height: 34px; padding-inline: 12px; display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 13px; color: var(--muted); white-space: nowrap;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), border-color .3s, color .3s;
  transition-delay: calc(var(--i, 0) * 60ms + var(--row, 0) * 220ms);
}
.cascade__row:nth-child(2) { --row: 1; }
.cascade__row:nth-child(3) { --row: 2; }
.cascade__row:nth-child(4) { --row: 3; }
.cascade__unit:nth-child(2) { --i: 1; }
.cascade__unit:nth-child(3) { --i: 2; }
.cascade__unit:nth-child(4) { --i: 3; }
.cascade__unit:nth-child(5) { --i: 4; }
.js .cascade__unit { opacity: 0; transform: translateY(8px); }
.js .cascade.is-in .cascade__unit { opacity: 1; transform: none; }
.cascade__unit--product { background: var(--fg); color: var(--accent-ink); border-color: var(--fg); font-weight: 600; }
.cascade__result { padding-top: 20px; border-top: 1px solid var(--line); }
.variants { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 16px; }
.variants__cell {
  aspect-ratio: 9 / 16; border-radius: 2px; background: var(--bg-3);
  transition: background-color .5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 18ms + 1.1s);
}
.cascade.is-in .variants__cell { background: #262626; }
.cascade.is-in .variants__cell:nth-child(7n + 3) { background: var(--accent); }
@media (max-width: 599px) {
  .cascade__row { grid-template-columns: 1fr; gap: 12px; }
  .variants { grid-template-columns: repeat(10, 1fr); }
}

/* ---------- Solution: the creative operating system ---------- */
.pipeline { position: relative; display: grid; gap: 0; counter-reset: step; }
.pipeline__step {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.pipeline__step:last-child { border-bottom: 1px solid var(--line); }
.pipeline__idx { font-family: var(--font-mono); font-size: 12px; color: var(--faint); padding-top: 8px; transition: color .4s; }
.pipeline__title { font-size: clamp(22px, 2.6vw, 38px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; color: var(--faint); transition: color .5s var(--ease-out); }
.pipeline__desc { margin-top: 8px; color: var(--muted); font-size: 15px; max-width: 48ch; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s var(--ease-out), opacity .5s; }
.pipeline__step.is-active .pipeline__title { color: var(--fg); }
.pipeline__step.is-active .pipeline__idx { color: var(--accent); }
.pipeline__step.is-active .pipeline__desc { max-height: 120px; opacity: 1; }
.pipeline__step--out .pipeline__title { color: var(--fg); }
.pipeline__step--out.is-active .pipeline__title { color: var(--accent); }

.solution { display: grid; gap: 56px; }
@media (min-width: 1000px) {
  .solution { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: start; }
  .solution__sticky { position: sticky; top: calc(var(--nav-h) + 48px); }
}
.solution__stack { position: relative; margin-top: 40px; max-width: 380px; }
.solution__stack .media { --ar: 4 / 5; }
.solution__badge {
  position: absolute; left: -12px; bottom: 24px; z-index: 3;
  padding: 10px 14px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  border-radius: 2px;
}

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 700px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .services { grid-template-columns: repeat(3, 1fr); } }
.service {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 24px;
  padding: clamp(24px, 2.6vw, 36px);
  border-bottom: 1px solid var(--line);
  transition: background-color .5s var(--ease-out);
}
@media (min-width: 700px) {
  .service { border-right: 1px solid var(--line); }
  .service:nth-child(2n) { border-right: 0; }
}
@media (min-width: 1100px) {
  .service:nth-child(2n) { border-right: 1px solid var(--line); }
  .service:nth-child(3n) { border-right: 0; }
}
.service:hover { background: var(--bg-2); }
.service__top { display: flex; justify-content: space-between; align-items: center; }
.service__num { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.service__preview { --ar: 16 / 10; }
.service__preview video, .service__preview img { filter: saturate(.85); }
.service:hover .service__preview video, .service:hover .service__preview img { filter: none; transform: scale(1.03); }
.service__title { font-size: clamp(24px, 2.2vw, 32px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.service__desc { margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 40ch; }

/* ---------- Why: traditional vs loop ---------- */
.versus { display: grid; gap: 16px; }
@media (min-width: 900px) { .versus { grid-template-columns: 1fr 1fr; gap: 0; } }
.versus__col { padding: clamp(28px, 3.5vw, 56px); border: 1px solid var(--line); }
@media (min-width: 900px) { .versus__col + .versus__col { border-left: 0; } }
.versus__col--old { background: transparent; }
.versus__col--new { background: var(--fg); color: var(--accent-ink); border-color: var(--fg); }
.versus__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 40px; }
.versus__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.versus__col--old .versus__label { color: var(--faint); }
.versus__list { display: grid; }
.versus__item {
  font-size: clamp(22px, 2.6vw, 36px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1;
  padding-block: 14px; border-top: 1px solid currentColor;
  border-top-color: var(--line);
  transition: color .8s var(--ease-out), opacity .8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.versus__item:nth-child(2) { --i: 1; }
.versus__item:nth-child(3) { --i: 2; }
.versus__item:nth-child(4) { --i: 3; }
.versus__item:nth-child(5) { --i: 4; }
.versus__col--new .versus__item { border-top-color: rgba(10,10,10,.14); }
.versus__col--old .versus__item { position: relative; color: var(--muted); }
.versus__col--old .versus__item::after {
  content: ""; position: absolute; left: 0; top: 55%; height: 2px; width: 100%;
  background: var(--muted); transform: scaleX(0); transform-origin: left;
  transition: transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms + .3s);
}
.versus.is-in .versus__col--old .versus__item { color: var(--faint); }
.versus.is-in .versus__col--old .versus__item::after { transform: scaleX(.6); }
.versus__col--new .versus__item { opacity: .15; }
.versus.is-in .versus__col--new .versus__item { opacity: 1; transition-delay: calc(var(--i, 0) * 120ms + .6s); }
.versus__item-tick { display: inline-block; width: .55em; height: .55em; margin-right: .35em; background: var(--accent); border-radius: 50%; vertical-align: .1em; outline: 2px solid var(--accent-ink); }

/* ---------- The Creative Loop ---------- */
.loop { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1000px) { .loop { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; } }
.loop__statement { font-size: clamp(26px, 3vw, 44px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.12; text-wrap: balance; }
.loop__statement .muted { font-weight: 700; }
.loop__ring { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin-inline: auto; }
.loop__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.loop__track { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.loop__arc { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease-in-out); }
.loop__node {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: clamp(11px, 1.1vw, 13px); letter-spacing: .14em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--muted);
  transition: color .4s, border-color .4s, background-color .4s;
  white-space: nowrap;
}
.loop__node.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.loop__center { position: absolute; inset: 22%; display: grid; place-items: center; text-align: center; }
.loop__center-word { font-size: clamp(28px, 4vw, 56px); font-weight: 800; letter-spacing: -0.05em; line-height: .95; }
.loop__center-desc { margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 22ch; margin-inline: auto; min-height: 3em; }

/* ---------- Process ---------- */
.steps { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 32px 24px 40px 0; border-bottom: 1px solid var(--line); display: grid; gap: 18px; align-content: start; }
@media (min-width: 900px) { .step { border-bottom: 0; padding-right: 32px; } .step + .step { border-left: 1px solid var(--line); padding-left: 32px; } }
.step__num { font-size: clamp(56px, 6vw, 96px); font-weight: 800; letter-spacing: -0.06em; line-height: .85; color: transparent; -webkit-text-stroke: 1px var(--line-strong); transition: color .6s, -webkit-text-stroke-color .6s; }
.step:hover .step__num { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.step__title { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; }
.step__desc { color: var(--muted); font-size: 15px; max-width: 32ch; }
.steps-cta { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }

/* ---------- Industries ---------- */
.industries { position: relative; border-top: 1px solid var(--line); }
.industry {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-block: clamp(14px, 1.6vw, 22px);
  border-bottom: 1px solid var(--line);
  cursor: default;
}
.industry__name { font-size: clamp(32px, 6vw, 88px); font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--faint); transition: color .4s var(--ease-out), transform .6s var(--ease-out); }
.industry__tag { color: var(--faint); transition: color .4s; }
.industry:hover .industry__name, .industry:focus-within .industry__name { color: var(--fg); transform: translateX(12px); }
.industry:hover .industry__tag { color: var(--accent); }
.industry__thumb { display: none; width: 56px; flex: none; }
.industry__thumb .media { --ar: 9 / 16; }
.industries__float {
  position: fixed; top: 0; left: 0; z-index: 50; width: 220px; pointer-events: none;
  opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.85);
  transition: opacity .3s var(--ease-out), transform .45s var(--ease-out);
}
.industries__float.is-visible { opacity: 1; }
.industries__float .media { --ar: 4 / 5; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
@media (hover: none), (max-width: 899px) {
  .industry__thumb { display: block; }
  .industry__name { color: var(--fg); }
  .industries__float { display: none; }
}

/* ---------- Audience ---------- */
.audience { display: grid; gap: 16px; }
@media (min-width: 900px) { .audience { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.aud-card {
  display: grid; gap: 64px; align-content: space-between;
  padding: clamp(24px, 2.8vw, 40px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .4s, transform .6s var(--ease-out);
}
.aud-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.aud-card__title { font-size: clamp(26px, 2.4vw, 34px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.aud-card__desc { margin-top: 14px; color: var(--muted); }

/* ---------- Final CTA ---------- */
.cta {
  position: relative; overflow: hidden;
  padding-block: clamp(120px, 16vw, 240px);
  text-align: center;
  background: #050505;
}
.cta__bg { position: absolute; inset: 0; z-index: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 8px; opacity: .22; filter: grayscale(.4) contrast(1.05); }
.cta__bg .media { --ar: 9 / 16; border-radius: 2px; }
.cta__bg .media:nth-child(even) { transform: translateY(18%); }
.cta__veil { position: absolute; inset: 0; z-index: 1; background: radial-gradient(60% 60% at 50% 50%, rgba(5,5,5,.55), #050505 85%); }
.cta__inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 28px; }
.cta__title { font-size: clamp(44px, 8vw, 120px); max-width: 14ch; }
.cta__sub { font-size: var(--fs-lead); color: var(--fg); max-width: 36ch; }
.cta__fine { color: var(--muted); font-size: 14px; max-width: 48ch; }
@media (max-width: 599px) { .cta__bg { grid-template-columns: repeat(3, 1fr); } .cta__bg .media:nth-child(n + 4) { display: none; } }

/* ---------- Footer ---------- */
.footer { padding-top: clamp(64px, 8vw, 120px); padding-bottom: 32px; border-top: 1px solid var(--line); }
.footer__top { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer__top { grid-template-columns: 1.2fr 1fr auto; align-items: start; } }
.footer__tagline { font-size: var(--fs-lead); max-width: 30ch; color: var(--muted); }
.footer__nav { display: grid; gap: 10px; }
.footer__nav a { color: var(--muted); transition: color .25s; width: fit-content; }
.footer__nav a:hover { color: var(--fg); }
.footer__wordmark {
  margin-top: clamp(64px, 8vw, 120px);
  font-size: clamp(44px, 12.2vw, 196px); font-weight: 900; letter-spacing: -0.065em; line-height: .8;
  white-space: nowrap; user-select: none;
}
.footer__wordmark span { color: var(--accent); }
.footer__bottom { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 13px; }

/* ---------- Work page ---------- */
.page-hero { padding-top: calc(var(--nav-h) + clamp(56px, 9vw, 140px)); padding-bottom: clamp(48px, 6vw, 88px); }
.page-hero__title { margin-top: 24px; max-width: 13ch; }
.page-hero__lead { margin-top: 28px; }

.filters { position: sticky; top: var(--nav-h); z-index: 20; background: rgba(8,8,8,.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-block: 1px solid var(--line); }
.filters__list { display: flex; gap: 8px; overflow-x: auto; padding-block: 14px; scrollbar-width: none; }
.filters__list::-webkit-scrollbar { display: none; }
.filter {
  flex: none; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  transition: color .25s, border-color .25s, background-color .25s;
}
.filter:hover { color: var(--fg); border-color: var(--fg); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filter__count { opacity: .55; margin-left: 4px; }

.reel { display: grid; gap: clamp(12px, 1.5vw, 20px); grid-template-columns: 1fr; padding-top: clamp(32px, 4vw, 56px); grid-auto-flow: dense; }
@media (min-width: 600px) { .reel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .reel { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.reel .project { grid-column: span 1; }
@media (min-width: 1000px) {
  .reel .project[data-ar="9:16"] { grid-column: span 2; }
  .reel .project[data-ar="4:5"] { grid-column: span 2; }
  .reel .project[data-ar="1:1"] { grid-column: span 2; }
  .reel .project[data-ar="16:9"] { grid-column: span 4; }
}
@media (min-width: 600px) and (max-width: 999px) {
  .reel .project[data-ar="16:9"] { grid-column: span 2; }
}
.reel .project[hidden] { display: none; }
.reel__empty { padding: 64px 0; color: var(--muted); }

/* Case study dialog */
.case {
  width: min(1180px, 100vw); max-width: 100vw; max-height: 100dvh; height: 100dvh;
  margin: 0 0 0 auto; padding: 0; border: 0;
  background: var(--bg); color: var(--fg);
  overflow: hidden;
}
@media (min-width: 900px) { .case { border-left: 1px solid var(--line); } }
.case::backdrop { background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.case[open] { animation: case-in .6s var(--ease-out); }
@keyframes case-in { from { transform: translateX(6%); opacity: 0; } }
.case__scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.case__bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 16px var(--gutter); background: rgba(8,8,8,.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.case__close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 18px; transition: border-color .25s, background-color .25s; }
.case__close:hover { border-color: var(--fg); }
.case__body { padding: clamp(28px, 4vw, 56px) var(--gutter) 80px; display: grid; gap: 48px; }
@media (min-width: 900px) { .case__body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; } .case__media-wrap { position: sticky; top: 96px; } }
.case__media { max-height: 76vh; margin-inline: auto; }
.case__title { font-size: clamp(44px, 6vw, 84px); font-weight: 800; letter-spacing: -0.05em; line-height: .9; }
.case__type { margin-top: 14px; color: var(--accent); }
.case__facts { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.case__fact { padding: 16px 12px 16px 0; }
.case__fact dt { color: var(--faint); }
.case__fact dd { margin-top: 6px; font-weight: 600; }
.case__sections { margin-top: 40px; display: grid; }
.case__section { padding-block: 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
@media (min-width: 700px) { .case__section { grid-template-columns: 200px 1fr; gap: 24px; } }
.case__section h3 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.case__section p { color: var(--fg); }
.case__section--angle { background: var(--bg-2); padding-inline: 20px; border-top: 0; border-left: 2px solid var(--accent); }
.case__cta { margin-top: 40px; }
.case__note { margin-top: 20px; color: var(--faint); font-size: 13px; }

/* ---------- Pricing ---------- */
/* Each plan is a horizontal row: name + price | features | CTA.
   Collapses to two columns below 1280px and a stacked card on phones. */
.plans { display: grid; gap: 16px; }
.plan {
  position: relative; display: grid; gap: 24px; align-items: center;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "price" "list" "cta";
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2);
  transition: border-color .4s, transform .6s var(--ease-out);
}
@media (min-width: 700px) {
  .plan {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas: "head list" "price list" "cta cta";
    column-gap: 40px;
  }
}
@media (min-width: 1280px) {
  .plan {
    grid-template-columns: minmax(240px, 1fr) minmax(0, 1.5fr) auto;
    grid-template-areas: "head list cta" "price list cta";
    column-gap: 48px; row-gap: 20px;
  }
  .plan__list, .plan__cta-wrap { padding-left: 48px; border-left: 1px solid var(--line); align-self: stretch; }
  .plan--featured .plan__list, .plan--featured .plan__cta-wrap { border-color: rgba(10,10,10,.14); }
}
.plan:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.plan--featured { background: var(--fg); color: var(--accent-ink); border-color: var(--fg); }
.plan--featured:hover { border-color: var(--accent); }
.plan__badge {
  position: absolute; top: -13px; left: clamp(24px, 3vw, 40px);
  padding: 6px 10px; border-radius: 2px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.plan__head { grid-area: head; }
.plan__name { font-size: clamp(26px, 2.4vw, 34px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan__fit { margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 32ch; }
.plan--featured .plan__fit { color: #4a4a46; }
.plan__price { grid-area: price; display: flex; flex-wrap: wrap; align-items: baseline; align-content: center; gap: 4px 10px; }
.plan__amount { font-size: clamp(48px, 4.6vw, 72px); font-weight: 900; letter-spacing: -0.06em; line-height: .85; }
.plan__cadence { color: var(--muted); }
.plan--featured .plan__cadence { color: #4a4a46; }
.plan__list { grid-area: list; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; align-content: center; }
@media (max-width: 459px) { .plan__list { grid-template-columns: 1fr; } }
.plan__list li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; font-weight: 500; line-height: 1.35; }
.plan__list li::before {
  content: "✓"; flex: none; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: rgba(198,255,61,.14); color: var(--accent); transform: translateY(2px);
}
.plan--featured .plan__list li::before { background: var(--accent-ink); color: var(--accent); }
.plan__cta-wrap { grid-area: cta; display: flex; align-items: center; }
.plan__cta { width: 100%; white-space: normal; text-align: center; }
@media (min-width: 1280px) {
  .plan__cta { white-space: nowrap; --pad-x: 28px; min-height: 56px; font-size: 13px; }
}
.plan--featured .plan__cta { background: var(--accent-ink); color: var(--fg); }
.plan--featured .plan__cta:hover { background: var(--accent); color: var(--accent-ink); }
.plans__note { margin-top: 32px; max-width: 64ch; color: var(--muted); }

/* ---------- Book page ---------- */
.book { padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 88px)); padding-bottom: clamp(64px, 8vw, 120px); }
.book__grid { display: grid; gap: 48px; }
@media (min-width: 1000px) { .book__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 72px; align-items: start; } .book__intro { position: sticky; top: calc(var(--nav-h) + 40px); } }
.book__title { margin-top: 24px; font-size: clamp(44px, 6.2vw, 92px); }
.book__lead { margin-top: 24px; }
.checks { margin-top: 36px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.checks li { display: flex; align-items: center; gap: 14px; padding-block: 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 18px; }
.checks__tick { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 13px; flex: none; }
.book__fine { margin-top: 24px; color: var(--muted); font-size: 14px; }
.booking {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); overflow: hidden; min-height: 720px;
}
.booking__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.booking__live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.booking__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(198,255,61,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(198,255,61,0); } 100% { box-shadow: 0 0 0 0 rgba(198,255,61,0); } }
.booking__frame { display: block; width: 100%; height: 720px; border: 0; background: var(--bg-2); }
.booking__fallback { padding: 48px 28px; display: grid; gap: 20px; justify-items: start; }
.booking__fallback p { color: var(--muted); max-width: 44ch; }

/* ---------- Cursor (pointer: fine only, enhancement) ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--fg); mix-blend-mode: difference;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), opacity .3s;
  opacity: 0;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal], .js .line-mask > span, .js .cascade__unit { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none; }
  .showcase__col { transform: none !important; }
  .cursor { display: none; }
}
