/* Homepage motion treatment. Original CSS. Loaded only on index.html.
   GSAP and Lenis are loaded by js/growth.js only when motion is allowed. See LICENSES.md. */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(7rem, 12vw, 9rem);
}
.hero .wrap { position: relative; }
.hero-copy { max-width: 62rem; }
.hero h1 {
  font-size: clamp(3.1rem, 13.2vw, 7.75rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0 0 1.75rem;
  max-width: 9.5em;
  text-wrap: balance;
}
.hero .lead { max-width: 33rem; }
/* Horizon glow, a wide flat ellipse under the hero */
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  left: -25%;
  right: -25%;
  bottom: -38%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(242, 177, 52, 0.34), rgba(150, 110, 255, 0.18) 42%, transparent 70%);
  filter: blur(24px);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.2px);
  background-size: 8px 8px;
  -webkit-mask-image: radial-gradient(60% 50% at 50% 100%, #000, transparent 75%);
  mask-image: radial-gradient(60% 50% at 50% 100%, #000, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
.hero-orbit { display: none; }
@media (min-width: 64rem) {
  .hero-orbit {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    width: 22rem;
    transform: translateY(-46%);
    opacity: 0.55;
    pointer-events: none;
    z-index: -1;
  }
  .hero-orbit svg { width: 100%; height: auto; overflow: visible; }
}
.hero-orbit .ghost-path { fill: none; stroke: rgba(242, 177, 52, 0.35); stroke-width: 2; stroke-dasharray: 6 10; }
.hero-orbit .caption { fill: var(--muted); font: 400 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* Scroll to explore cue (condensed type, pulsing line) */
.scroll-cue {
  position: absolute;
  left: var(--pad);
  bottom: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  align-items: flex-end;
  gap: 0.9rem;
  font-family: var(--cond);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.scroll-cue:hover { color: #fff; }
.scroll-cue i { display: block; width: 1px; height: 3rem; background: linear-gradient(var(--accent), transparent); transform-origin: top; }
@media (min-width: 90rem) { .scroll-cue { left: calc(50% - var(--max) / 2 + var(--pad)); } }
/* Phones: keep the cue in the page flow under the buttons so it never sits on top of hero text */
@media (max-width: 47.99rem) {
  .hero { flex-direction: column; justify-content: center; align-items: stretch; padding-bottom: 3rem; }
  .scroll-cue { position: relative; left: auto; bottom: auto; align-self: flex-start; margin: 2.75rem var(--pad) 0; font-size: 1rem; }
  .scroll-cue i { height: 2.25rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .hero .chip, .js .hero h1, .js .hero .lead, .js .hero .btn-row, .js .hero .scroll-cue, .js .hero-orbit {
    animation: hero-rise 1s var(--ease) both;
  }
  .js .hero .chip { animation-delay: 0.1s; }
  .js .hero h1 { animation-delay: 0.2s; }
  .js .hero .lead { animation-delay: 0.34s; }
  .js .hero .btn-row { animation-delay: 0.46s; }
  .js .hero .scroll-cue { animation-delay: 0.8s; }
  .js .hero .scroll-cue i { animation: scroll-hint 2s var(--ease-ui) 1.6s infinite; }
}
@keyframes hero-rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes scroll-hint { 50% { transform: scaleY(1.5); opacity: 0.6; } }

/* ---------- Marquee (giant condensed type) ---------- */
.marquee {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  background: #000;
}
.marquee-track { display: inline-flex; will-change: transform; }
.marquee-set { display: inline-flex; flex: none; align-items: center; }
.marquee span {
  font-family: var(--cond);
  font-size: clamp(2.75rem, 9vw, 7rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: #ebeced;
  padding: 0 clamp(1rem, 2.5vw, 2rem);
}
.marquee span.o { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.45); }
.marquee b { color: var(--accent); font-family: var(--mono); font-weight: 400; font-size: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 45s linear infinite; }
}
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
}

/* ---------- Growth scene (pinned, driven by scroll) ---------- */
.growth {
  --p: 0;
  position: relative;
  padding: 0;
  background: var(--bg);
}
.growth-stage {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 5.5rem 0 2rem;
  z-index: 1;
  overflow: hidden;
}
.growth-stage::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -45%;
  height: 80%;
  z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(242, 177, 52, calc(0.08 + var(--p) * 0.22)), rgba(150, 110, 255, 0.1) 45%, transparent 72%);
  pointer-events: none;
}
.growth-stage-inner { position: relative; z-index: 1; display: grid; gap: 1.75rem; align-items: center; width: 100%; }
@media (min-width: 64rem) { .growth-stage-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3.5rem; } }
.growth-visual { position: relative; }
.growth-visual svg { width: 100%; height: auto; max-height: 70svh; overflow: visible; display: block; }
@media (max-width: 63.99rem) {
  .hero { min-height: 0; padding-top: clamp(3rem, 10vw, 4.5rem); padding-bottom: 8.5rem; }
  .growth-stage { align-items: flex-start; padding: 4.25rem 0 0.75rem; }
  .growth-visual svg { max-height: 30svh; }
  .growth-readout .lead { margin-bottom: 0.4rem; font-size: 0.98rem; }
  .growth-metric { font-size: clamp(3.4rem, 17vw, 4.6rem); margin-top: 0.35rem; }
  .growth-metric-label { margin-bottom: 0.45rem; }
  .growth-window { margin-bottom: 0.55rem; }
  .growth-stage .growth-source { display: none; }
  .growth-readout h2 { font-size: clamp(2rem, 9vw, 2.6rem); margin-bottom: 0.5rem; }
}
.growth-track { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 3; stroke-linecap: round; }
.growth-draw {
  fill: none;
  stroke: url(#growth-gradient);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--p));
  filter: drop-shadow(0 0 6px rgba(242, 177, 52, 0.45));
}
.growth-stations-dots circle { fill: #000; stroke: rgba(255, 255, 255, 0.3); stroke-width: 2; }
.growth-stations-dots circle.is-on { fill: var(--accent); stroke: var(--accent); }
.rocket { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 6px rgba(242, 177, 52, 0.4)); }
.rocket-body { fill: #f7f4ee; }
.rocket-window { fill: #0b1020; stroke: var(--accent); stroke-width: 1.4; }
.rocket-fin { fill: var(--lav); }
.rocket-flame { fill: var(--accent); opacity: calc(0.25 + var(--p) * 0.75); }

.growth-kicker { margin: 0 0 0.9rem; }
.growth-readout h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 0.75rem; }
.growth-metric {
  font-family: var(--font);
  font-size: clamp(4rem, 9.5vw, 7.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  margin: 1rem 0 0.5rem;
}
.growth-metric-label { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); margin: 0 0 0.75rem; }
.growth-window { color: var(--muted); margin: 0 0 0.75rem; max-width: 28rem; }
.growth-compare { margin: 0; color: var(--ink); max-width: 28rem; }
.growth-source { margin: 1.25rem 0 0; font-size: 0.82rem; color: var(--dim); max-width: 32rem; }

.growth-chapters { display: flex; flex-direction: column; pointer-events: none; }
.growth-chapter { min-height: 85vh; }

/* Static cards: no-JS and reduced-motion fallback, recap after the pin */
.growth-cards { padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--line); position: relative; z-index: 2; background: var(--bg); }
.growth-cards h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -0.03em; }
.growth-cards .grid { margin-top: 2rem; }
.card .figure { font-family: var(--font); font-weight: 300; font-size: clamp(2rem, 3.4vw, 2.6rem); letter-spacing: -0.05em; color: #fff; margin: 0 0 0.25rem; line-height: 1; }
.card .when { color: var(--muted); font-size: 0.92rem; margin: 0.75rem 0 0; }
.growth-cards .note-line { margin-top: 1.25rem; color: var(--muted); }

/* Starfield and parallax depth */
.growth-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.growth-stars { position: absolute; inset: -30% 0; background-repeat: no-repeat; opacity: 0.5; will-change: transform; }
.growth-stars-a {
  background-image:
    radial-gradient(1px 1px at 8% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 42%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 36% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 68%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 28%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 74% 54%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 86% 16%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 14% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 41% 88%, #fff 50%, transparent 51%);
  transform: translate3d(0, calc(var(--star-a, 0) * 1px), 0);
}
.growth-stars-b {
  opacity: 0.28;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 30%, #dcdbff 50%, transparent 51%),
    radial-gradient(1px 1px at 29% 62%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 22%, #dcdbff 50%, transparent 51%),
    radial-gradient(2px 2px at 70% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 83% 38%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 90%, #dcdbff 50%, transparent 51%);
  transform: translate3d(0, calc(var(--star-b, 0) * 1px), 0);
}
@media (prefers-reduced-motion: no-preference) {
  .growth-stars-b { animation: twinkle 5s ease-in-out infinite alternate; }
}
@keyframes twinkle { from { opacity: 0.15; } to { opacity: 0.4; } }

/* Lenis requirements (from the MIT project, trimmed) */
html.lenis, html.lenis body { height: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.lenis.lenis-stopped { overflow: clip; }

/* When GSAP pin is active, the stage is positioned by ScrollTrigger */
.js.motion-ok .growth-stage { position: relative; top: auto; min-height: calc(100svh - var(--header-h, 4rem)); }

/* ---------- Services: giant inline list with dot separators ---------- */
.inline-services { border-top: 1px solid var(--line); }
.inline-list { list-style: none; margin: 0; padding: 0; font-family: var(--serif); font-size: clamp(2.4rem, 6.4vw, 5.25rem); line-height: 1.06; letter-spacing: -0.035em; }
.inline-list li { display: inline; }
.inline-list li:not(:last-child)::after { content: " \00b7  "; color: var(--accent); padding: 0 0.1em; }
.inline-list a { color: #fff; text-decoration: none; transition: color 0.4s ease-in-out, opacity 0.4s ease-in-out; }
.inline-list a:hover, .inline-list a:focus-visible { color: #fff; }
.inline-descs { margin-top: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1.25rem; }
.inline-descs p { margin: 0; color: var(--muted); max-width: 34rem; font-size: 1.05rem; }
.inline-descs .label { display: block; margin-bottom: 0.4rem; color: var(--accent); }
@media (min-width: 64rem) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  .inline-descs { display: block; position: relative; min-height: 6.5rem; }
  .inline-descs p { position: absolute; inset: 0 auto auto 0; opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); pointer-events: none; }
  .inline-descs p:first-child { opacity: 1; transform: none; }
  .inline-list:hover a, .inline-list:focus-within a { opacity: 0.28; }
  .inline-list a:hover, .inline-list a:focus-visible { opacity: 1; }
  .inline-list:has(li:nth-child(2) a:is(:hover, :focus-visible)) ~ .inline-descs p:first-child,
  .inline-list:has(li:nth-child(3) a:is(:hover, :focus-visible)) ~ .inline-descs p:first-child { opacity: 0; transform: translateY(-8px); }
  .inline-list:has(li:nth-child(1) a:is(:hover, :focus-visible)) ~ .inline-descs p:nth-child(1),
  .inline-list:has(li:nth-child(2) a:is(:hover, :focus-visible)) ~ .inline-descs p:nth-child(2),
  .inline-list:has(li:nth-child(3) a:is(:hover, :focus-visible)) ~ .inline-descs p:nth-child(3) { opacity: 1; transform: none; }
}

/* ---------- How it works strip ---------- */
.how .pills { margin-top: 1.5rem; }

/* ---------- Statement (words light up on scroll) ---------- */
.statement h2 { font-size: clamp(2.4rem, 6.5vw, 5.5rem); line-height: 1.02; max-width: 15em; margin-bottom: 1.75rem; }
.statement .w { transition: opacity 0.2s linear; }
.statement .lead { margin: 0; }

/* Reduced motion: no sticky journey, finished path, all cards visible */
@media (prefers-reduced-motion: reduce) {
  .growth { --p: 1; }
  .growth-stage { position: static; min-height: auto; padding-top: clamp(3rem, 7vw, 4.5rem); padding-bottom: clamp(2rem, 5vw, 3rem); }
  .growth-chapters { display: none; }
  .rocket-flame { opacity: 1; }
  .hero-orbit .ghost-path { stroke-dasharray: none; }
  .growth-stars { transform: none; opacity: 0.35; }
  .statement .w { opacity: 1; }
}
