/* ==================================================================
   JULAZY — premium digital studio homepage
   Design: dark graphite / black glass / off-white / icy gray / cyan
   Two layout modes controlled by a body class set in main.js:
     .snap-mode   → desktop cinematic snap scroll (overlapping panels)
     .normal-mode → mobile / tablet / reduced-motion (stacked, normal scroll)
   Default CSS (no JS) falls back to the stacked, fully readable layout.
   ================================================================== */

/* -------------------------------- Tokens ------------------------- */
:root {
  --ink: #06080a;
  --graphite: #0b1015;
  --panel-dark: #0a0e12;
  --off-white: #eef1f3;
  --icy: #dbe3e7;
  --pale-cyan: #e9f1f2;
  --mist: #f6f8f7;
  --steel: #7f8f93;
  --quiet-gold: #c6b68a;

  --text-light: #eef2f4;
  --text-dark: #0a0f13;
  --muted-light: rgba(233, 240, 243, 0.60);
  --muted-dark: rgba(12, 18, 22, 0.62);

  --cyan: #35e0e6;
  --cyan-soft: rgba(53, 224, 230, 0.14);
  --cyan-deep: #0f9ba1;

  --line-light: rgba(255, 255, 255, 0.10);
  --line-dark: rgba(10, 20, 24, 0.14);

  --maxw: 1280px;
  --ease-cine: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }
html.snap-mode { scroll-behavior: auto; } /* JS drives motion in snap mode */

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
  /* Body backdrop tween target for the story (JS animates these vars). */
  --bg-top: #06080a;
  --bg-bottom: #0a0e12;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.34;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.skip-link {
  position: fixed;
  left: 12px; top: -60px;
  z-index: 200;
  background: var(--cyan);
  color: #04262a;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

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

/* -------------------------------- Type helpers ------------------- */
.eyebrow,
.tech-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.tech-label--cyan { color: var(--cyan); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 56px);
}
.container--narrow { max-width: 860px; }
.center { text-align: center; }

/* -------------------------------- Buttons ------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.85em 1.5em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-cine), background 0.25s, border-color 0.25s, color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: 0.6em 1.15em; font-size: 0.85rem; }
.btn--wide { width: 100%; margin-top: auto; }
.btn--primary {
  background: linear-gradient(180deg, #8af4f7 0%, var(--cyan) 100%);
  color: #04262a;
  box-shadow: 0 16px 46px -18px rgba(53, 224, 230, 0.72);
}
.btn--primary:hover { background: #59eaef; }
.btn--ghost {
  background: transparent;
  border-color: var(--line-light);
  color: var(--text-light);
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }
/* Ghost button on light backgrounds */
[data-theme="light"] .btn--ghost { border-color: var(--line-dark); color: var(--text-dark); }
[data-theme="light"] .btn--ghost:hover { border-color: var(--cyan-deep); color: var(--cyan-deep); }

/* ================================================================ */
/*  Fixed WebGL stage                                                */
/* ================================================================ */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-cine);
}
.stage__canvas { display: block; width: 100%; height: 100%; }

/* Radial cyan glow behind the bonsai; opacity animated per step. */
.stage__glow {
  position: absolute;
  left: 50%; top: 46%;
  width: min(70vw, 720px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(134, 246, 250, 0.24), rgba(53, 224, 230, 0.1) 38%, rgba(53, 224, 230, 0) 66%);
  filter: blur(12px);
  opacity: 0.9;
  transition: opacity 0.6s var(--ease-cine);
}

/* Poster fallback: subtle placeholder until model loads / if WebGL fails. */
.stage__poster {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(53, 224, 230, 0.16), rgba(6, 8, 10, 0) 45%),
    var(--ink);
  opacity: 1;
  transition: opacity 0.8s var(--ease-cine);
}
.stage.is-ready .stage__poster { opacity: 0; }

/* ================================================================ */
/*  Navigation                                                       */
/* ================================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  margin-top: 14px;
  padding: 10px clamp(14px, 3vw, 22px);
  display: flex;
  align-items: center;
  gap: 24px;
  width: calc(100% - clamp(24px, 6vw, 72px));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(6, 8, 10, 0.38);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 70px -52px rgba(53, 224, 230, 0.5);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.92rem;
}
.nav__mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(53, 224, 230, 0.46);
  border-radius: 8px;
  color: #bffcff;
  background: linear-gradient(180deg, rgba(53, 224, 230, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 18px rgba(53, 224, 230, 0.06), 0 0 24px rgba(53, 224, 230, 0.12);
}
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 0.92rem;
}
.nav__links a { color: var(--muted-light); transition: color 0.2s; }
.nav__links a:hover { color: var(--text-light); }
.nav__cta { margin-left: 4px; }
/* Nav colour adapts to light story steps */
body.nav-light .nav__brand { color: var(--text-dark); }
body.nav-light .nav__links a { color: var(--muted-dark); }
body.nav-light .nav__links a:hover { color: var(--text-dark); }
body.nav-light .nav__inner {
  border-color: rgba(10, 20, 24, 0.12);
  background: rgba(246, 248, 247, 0.72);
}
body.nav-light .nav__mark {
  color: #06575d;
  border-color: rgba(15, 155, 161, 0.34);
  background: rgba(255, 255, 255, 0.62);
}
body.nav-scrolled .nav {
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
}

/* ================================================================ */
/*  Story — shared                                                   */
/* ================================================================ */
.story { position: relative; z-index: 1; }
.story__panel-inner { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 56px); }

.eyebrow { margin-bottom: 22px; }

/* Hero copy */
.hero { max-width: 720px; }
.hero__title {
  font-size: clamp(2.25rem, 3.8vw, 3.85rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 760;
  margin-bottom: 26px;
}
.hero__title .line { display: block; }
.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--muted-light);
  max-width: 34ch;
  margin-bottom: 34px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__actions.center { justify-content: center; }
.hero__status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted-light);
  display: flex; align-items: center; gap: 10px;
}
.hero__specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(100%, 620px);
  margin-top: 26px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.hero__specs span {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 13px 15px;
  font-size: 0.8rem;
  color: rgba(238, 242, 244, 0.62);
  background: rgba(6, 8, 10, 0.34);
}
.hero__specs strong {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2.4s var(--ease-cine) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Story text blocks */
.block-left { max-width: 560px; }
.story__panel-inner.center { text-align: center; max-width: 940px; }
.story__headline {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  font-weight: 650;
  margin: 18px 0;
}
.story__headline--xl { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.08; }
.story__sub {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--muted-light);
  max-width: 46ch;
}
.story__panel-inner.center .story__sub { margin-inline: auto; }

.tech-label { display: inline-block; }

/* Chips / labels */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  padding: 7px 13px;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  color: var(--muted-light);
}

/* Structure cards (step 3) */
.struct-cards { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.struct-card {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-dark);
  color: var(--text-dark);
  box-shadow: 0 12px 30px -18px rgba(10, 20, 30, 0.4);
}

/* Automation pipeline (step 4) — vertical flow with a travelling packet.
   A lead descends Form → Qualify → CRM → Notify → Follow-up; each node lights
   as the packet passes. Animations run only while the step is active. */
.pipeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
  padding-left: 2px;
}
.pipeline::before { /* the track line */
  content: "";
  position: absolute;
  left: 6px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(53, 224, 230, 0.12) 100%);
  opacity: 0.35;
}
.pipeline__step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text-light);
}
.pipeline__dot {
  flex: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--cyan-deep);
  background: #061a1f;
  box-shadow: 0 0 0 5px rgba(5, 7, 10, 0.9);
  position: relative; z-index: 1;
  animation: dotLite 5s linear infinite;
  animation-delay: calc(var(--i) * 1s);
  animation-play-state: paused;
}
.pipeline__label { opacity: 0.9; }
.pipeline__pulse { /* the travelling packet */
  position: absolute;
  left: 2px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #bffcff;
  box-shadow: 0 0 16px 3px var(--cyan);
  z-index: 2;
  animation: pipeFlow 5s var(--ease-cine) infinite;
  animation-play-state: paused;
}
@keyframes pipeFlow {
  0%   { top: 6px; opacity: 0; }
  8%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: calc(100% - 16px); opacity: 0; }
}
@keyframes dotLite {
  0%, 100% { background: #061a1f; box-shadow: 0 0 0 5px rgba(5, 7, 10, 0.9); }
  7%       { background: var(--cyan); box-shadow: 0 0 14px var(--cyan), 0 0 0 5px rgba(5, 7, 10, 0.9); }
  16%      { background: #061a1f; box-shadow: 0 0 0 5px rgba(5, 7, 10, 0.9); }
}
/* Run the pipeline only when the step is on screen. */
body.snap-mode .story__panel.is-active .pipeline__pulse,
body.snap-mode .story__panel.is-active .pipeline__dot,
body.normal-mode .pipeline__pulse,
body.normal-mode .pipeline__dot { animation-play-state: running; }

/* Live status dot (step 5 eyebrow) */
.status { display: inline-flex; align-items: center; gap: 9px; }
.status__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2.4s var(--ease-cine) infinite;
}

/* ---- System core (step 5): orbital rings + data satellites ---- */
.core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.core__svg {
  width: min(84vh, 860px);
  height: min(84vh, 860px);
  max-width: 96vw;
  overflow: visible;
}
.core__halo { transform-box: fill-box; }
.core__orbit {
  fill: none;
  stroke: var(--cyan);
  stroke-opacity: 0.15;
  stroke-width: 1;
  stroke-dasharray: 2 9;
}
.core__spin {
  transform-origin: 0px 0px; /* viewBox is centred on 0,0 */
  animation: spin 38s linear infinite;
  animation-play-state: paused;
}
.core__spin--rev { animation-duration: 28s; animation-direction: reverse; }
.core__sat { fill: #bffcff; filter: drop-shadow(0 0 6px var(--cyan)); }
.core__sat--sm { fill: var(--cyan); }
@keyframes spin { to { transform: rotate(360deg); } }
/* Rings orbit only while step 5 is on screen. */
body.snap-mode .story__panel.is-active .core__spin,
body.normal-mode .core__spin { animation-play-state: running; }

/* Pillars (step 5) */
.pillars { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 40px; }
.pillar {
  min-width: 210px;
  padding: 26px 24px;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(53, 224, 230, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.02);
  text-align: left;
}
.pillar__num { font-family: var(--font-mono); color: var(--cyan); font-size: 0.9rem; }
.pillar__title { font-size: 1.15rem; font-weight: 600; margin-top: 10px; }

/* Scroll cue (step 0) */
.scroll-cue {
  position: absolute;
  left: 50%; bottom: 34px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.scroll-cue__line {
  width: 1px; height: 42px;
  background: linear-gradient(var(--cyan), transparent);
  animation: cue 2s var(--ease-cine) infinite;
}
@keyframes cue { 0% { transform: scaleY(0.2); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0.2); transform-origin: bottom; } }

/* Step rail (snap mode only) */
.story__rail { display: none; }

/* Panel theme text colours */
.story__panel[data-theme="light"] { color: var(--text-dark); }
.story__panel[data-theme="light"] .eyebrow,
.story__panel[data-theme="light"] .tech-label { color: var(--muted-dark); }
.story__panel[data-theme="light"] .story__sub { color: var(--muted-dark); }
.story__panel[data-theme="light"] .chip { border-color: var(--line-dark); color: var(--muted-dark); }

/* ================================================================ */
/*  SNAP MODE (desktop)                                              */
/* ================================================================ */
body.snap-mode .story { height: 100vh; }
body.snap-mode .story__viewport {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
body.snap-mode .story__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-inline: clamp(28px, 6vw, 112px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: transparent; /* backdrop comes from the animated body + stage */
}
body.snap-mode .story__panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Text sits in a side column, never centred over the model. */
body.snap-mode .story__panel-inner {
  margin: 0;
  padding-inline: 0;
  max-width: 540px;   /* overrides .hero / .block-left centring */
  width: 100%;
}
body.snap-mode .story__panel[data-align="left"]  { justify-content: flex-start; }
body.snap-mode .story__panel[data-align="right"] { justify-content: flex-end; }
body.snap-mode .story__panel[data-align="center"] { justify-content: center; }
body.snap-mode .story__panel[data-align="center"] .story__panel-inner {
  max-width: 940px;
  text-align: center;
}
body.snap-mode .story__panel[data-step="0"] .story__panel-inner { max-width: 600px; }
body.snap-mode .story__panel[data-step="0"] .hero__title { max-width: 10.6ch; }

/* Readability scrim: a soft directional wash on the text side so copy stays
   legible over whatever part of the bonsai is behind it. Colour follows theme,
   direction follows the text alignment. */
body.snap-mode .story__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
}
body.snap-mode .story__panel[data-theme="dark"]  { --scrim: 6, 8, 10; }
body.snap-mode .story__panel[data-theme="light"] { --scrim: 240, 243, 245; }
body.snap-mode .story__panel[data-theme="descent"] { --scrim: 6, 8, 10; }
body.snap-mode .story__panel[data-theme="black"] { --scrim: 3, 4, 5; }
body.snap-mode .story__panel[data-align="left"]::before {
  background: linear-gradient(90deg,
    rgba(var(--scrim), 0.96) 0%, rgba(var(--scrim), 0.82) 34%,
    rgba(var(--scrim), 0.36) 55%, rgba(var(--scrim), 0) 74%);
}
body.snap-mode .story__panel[data-align="right"]::before {
  background: linear-gradient(270deg,
    rgba(var(--scrim), 0.96) 0%, rgba(var(--scrim), 0.82) 34%,
    rgba(var(--scrim), 0.36) 55%, rgba(var(--scrim), 0) 74%);
}
body.snap-mode .story__panel[data-align="center"]::before {
  background: radial-gradient(ellipse at 50% 55%,
    rgba(var(--scrim), 0.88) 0%, rgba(var(--scrim), 0.5) 42%, rgba(var(--scrim), 0) 74%);
}

/* Step progress rail */
body.snap-mode .story__rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: fixed;
  right: 34px; top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}
body.snap-mode .story__rail-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.4s, transform 0.4s, box-shadow 0.4s;
}
body.snap-mode.rail-light .story__rail-dot { background: rgba(10, 20, 24, 0.2); }
body.snap-mode .story__rail-dot.is-active {
  background: var(--cyan);
  transform: scale(1.5);
  box-shadow: 0 0 14px var(--cyan);
}

/* Marketing scrolls over the fixed stage */
body.snap-mode .marketing {
  position: relative;
  z-index: 2;
  background: var(--ink);
}

/* ================================================================ */
/*  NORMAL MODE (mobile / tablet / reduced-motion) + no-JS default   */
/* ================================================================ */
body.normal-mode .story__panel,
body:not(.snap-mode) .story__panel {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  padding-block: clamp(80px, 14vh, 150px);
  opacity: 1;
  visibility: visible;
}

/* Step 0 (hero) keeps the 3D visible behind it */
body.normal-mode .story__panel[data-step="0"],
body:not(.snap-mode) .story__panel[data-step="0"] {
  min-height: 100vh;
  padding-top: 120px;
  background: linear-gradient(180deg, rgba(6, 8, 10, 0.55) 0%, rgba(6, 8, 10, 0) 30%, rgba(6, 8, 10, 0) 55%, rgba(6, 8, 10, 0.85) 100%);
}

/* Opaque themed backgrounds so later panels cover the fixed canvas */
body.normal-mode .story__panel[data-theme="dark"]:not([data-step="0"]),
body:not(.snap-mode) .story__panel[data-theme="dark"]:not([data-step="0"]) { background: var(--graphite); }
body.normal-mode .story__panel[data-theme="light"],
body:not(.snap-mode) .story__panel[data-theme="light"] { background: var(--off-white); }
body.normal-mode .story__panel[data-theme="descent"],
body:not(.snap-mode) .story__panel[data-theme="descent"] {
  background: linear-gradient(180deg, var(--icy), var(--ink));
  color: var(--text-light);
}
body.normal-mode .story__panel[data-theme="black"],
body:not(.snap-mode) .story__panel[data-theme="black"] { background: #030405; }

/* In normal mode the marketing block just follows in flow */
body.normal-mode .marketing,
body:not(.snap-mode) .marketing { position: relative; z-index: 2; background: var(--ink); }

/* Hide the scroll cue when stacked */
body.normal-mode .scroll-cue,
body:not(.snap-mode) .scroll-cue { display: none; }

/* Dim the fixed stage once past the hero in normal mode (JS also pauses render) */
body.normal-mode .stage { opacity: 1; }

/* ================================================================ */
/*  Marketing sections                                               */
/* ================================================================ */
.marketing { color: var(--text-light); }
.section { padding-block: clamp(72px, 12vh, 140px); position: relative; }
.section__head { max-width: 760px; margin-bottom: 52px; }
.section__title {
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 680;
  margin-top: 16px;
}
.section__title--xl { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.section__intro { color: var(--muted-light); font-size: 1.08rem; margin-top: 18px; max-width: 60ch; }
.section__head .section__intro { margin-inline: 0; }
.center .section__intro { margin-inline: auto; }

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: -20px 0 30px;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.signal-strip span {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(238, 242, 244, 0.68);
  background: rgba(255, 255, 255, 0.025);
}

/* Offers */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.offer {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(255, 255, 255, 0.01);
  transition: transform 0.4s var(--ease-cine), border-color 0.4s;
}
.offer:hover { transform: translateY(-6px); border-color: rgba(53, 224, 230, 0.4); }
.offer--featured {
  border-color: rgba(53, 224, 230, 0.45);
  box-shadow: 0 34px 90px -58px rgba(53, 224, 230, 0.72);
}
.offer__tag { font-family: var(--font-mono); color: var(--cyan); font-size: 0.85rem; }
.offer__title { font-size: 1.4rem; font-weight: 680; margin: 12px 0 8px; }
.offer__desc { color: var(--muted-light); margin-bottom: 22px; }
.offer__list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 28px; }
.offer__list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted-light);
  font-size: 0.95rem;
}
.offer__list li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 1px;
  background: var(--cyan);
  opacity: 0.75;
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step {
  padding: 28px 26px;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.step__num { font-family: var(--font-mono); color: var(--cyan); font-size: 0.85rem; }
.step__title { font-size: 1.25rem; font-weight: 640; margin: 10px 0 8px; }
.step p { color: var(--muted-light); font-size: 0.96rem; }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work-card {
  border: 1px solid var(--line-light);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  padding-bottom: 26px;
}
.work-card__media {
  height: 190px;
  background: var(--panel-dark);
  position: relative;
  overflow: hidden;
}
.work-card__media::after {
  content: "";
  position: absolute; inset: 0;
  opacity: 0.9;
}
.work-card__media--3d { background: radial-gradient(circle at 60% 40%, rgba(53, 224, 230, 0.4), #05171a 60%); }
.work-card__media--ai { background: linear-gradient(135deg, #0a1418, #123037 80%); }
.work-card__media--flow {
  background:
    repeating-linear-gradient(90deg, rgba(53, 224, 230, 0.16) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(53, 224, 230, 0.10) 0 1px, transparent 1px 46px),
    #071215;
}
.work-card__title { font-size: 1.2rem; font-weight: 640; margin: 22px 26px 8px; }
.work-card p { color: var(--muted-light); font-size: 0.95rem; margin: 0 26px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 6px 22px;
  background: rgba(255, 255, 255, 0.02);
}
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.08rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 1.3rem;
  transition: transform 0.3s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { color: var(--muted-light); padding-bottom: 20px; max-width: 68ch; }

/* CTA */
.section--cta {
  background: radial-gradient(circle at 50% 0%, rgba(53, 224, 230, 0.10), rgba(3, 4, 5, 0) 55%), #030405;
  border-top: 1px solid var(--line-light);
}
.section--cta .section__title { margin-inline: auto; max-width: 20ch; }

/* Footer */
.footer { background: #030405; border-top: 1px solid var(--line-light); padding-block: 48px; }
.footer__inner { display: flex; flex-direction: column; gap: 8px; }
.footer__brand { font-weight: 700; letter-spacing: 0.18em; }
.footer__note { color: var(--muted-light); }
.footer__copy { color: rgba(233, 240, 243, 0.4); font-size: 0.85rem; margin-top: 8px; }

/* ================================================================ */
/*  Reveal animation (marketing) — set by main.js when in view       */
/* ================================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-cine), transform 0.7s var(--ease-cine);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ================================================================ */
/*  Responsive                                                       */
/* ================================================================ */
@media (max-width: 1024px) {
  .offer-grid, .process-grid, .work-grid { grid-template-columns: repeat(2, 1fr); }
  .nav__links { display: none; }
  .hero__specs, .signal-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .offer-grid, .process-grid, .work-grid { grid-template-columns: 1fr; }
  .hero__lead, .story__sub { max-width: none; }
  body.normal-mode .stage,
  body:not(.snap-mode) .stage {
    opacity: 0.42;
  }
  body.normal-mode .story__panel[data-step="0"],
  body:not(.snap-mode) .story__panel[data-step="0"] {
    min-height: auto;
    padding-top: 36vh;
    padding-bottom: 72px;
    background:
      linear-gradient(180deg, rgba(6, 8, 10, 0) 0%, rgba(6, 8, 10, 0.76) 39%, rgba(6, 8, 10, 0.98) 57%, #06080a 100%);
  }
  .hero__title {
    font-size: clamp(2.2rem, 10.2vw, 2.72rem);
    line-height: 1;
    max-width: 11ch;
  }
  .hero__lead {
    font-size: 1rem;
    color: rgba(238, 242, 244, 0.72);
  }
  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .nav__cta { display: none; }
  .nav__inner {
    width: calc(100% - 24px);
    margin-top: 12px;
  }
  .hero__specs, .signal-strip { grid-template-columns: 1fr; }
  .hero__specs span, .signal-strip span { min-height: 58px; }
  .pillar { min-width: 0; width: 100%; }
}

/* ================================================================ */
/*  Reduced motion                                                   */
/* ================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  /* Show the pipeline as a static, fully-lit flow (no travelling packet). */
  .pipeline__pulse { display: none; }
  .pipeline__dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
}
