/* Stage = hero + "Hai thành một". Default (no JS, reduced motion, no WebGL): a static poster of two CSS circles
   behind the hero. html.motion turns on the sticky scenes; .is-gl on a container swaps circles for the shader. */
.stage { position: relative; }
.stage-pin {
  position: absolute; inset: 0 0 auto; height: 100svh; z-index: 0;
  overflow: clip; pointer-events: none; background: var(--bg);
}
.motion .stage-pin { position: sticky; top: 0; }
/* Pull the hero up over the pin (a negative margin on the sticky pin would let it run past the stage). */
.motion .hero { margin-top: -100svh; }
.ink-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.is-gl > .ink-canvas { display: block; }

/* The duo box: the single layout source for poster and shader (js/hero-ink-scene.js reads its rect).
   Aspect 1.6:1, each circle as tall as the box: centres sit 1.2 radii apart. Phones: big inks in the lower
   half, bleeding off the sides. Desktop: inks fill most of the frame, behind the headline. */
.duo {
  --duo-w: min(150vw, 70svh * 1.6);
  position: absolute; left: calc(50% - var(--duo-w) / 2); bottom: -6svh;
  width: var(--duo-w); aspect-ratio: 1.6;
}
.circle {
  position: absolute; top: 0; width: 62.5%; aspect-ratio: 1; border-radius: 50%;
  mix-blend-mode: multiply; transition: translate 500ms var(--ease-out); /* transform belongs to GSAP */
}
.circle--client { left: 0; background: var(--client); }
.circle--studio { right: 0; background: var(--studio); }
.duo.is-named .circle--client { translate: 7% 0; }
.duo.is-named .circle--studio { translate: -7% 0; }
.is-gl .circle { visibility: hidden; }
.duo-label {
  position: absolute; top: 50%; translate: -50% -50%; text-align: center; color: var(--ink);
  font: 700 clamp(1rem, 1.6vw, 1.6rem)/1.15 var(--font-display); white-space: nowrap;
}
.duo-label--client { left: 18.75%; }
.duo-label--studio { left: 81.25%; }
.team-label {
  left: 50%; width: 22%; white-space: normal; overflow-wrap: anywhere; text-wrap: balance;
  font-size: clamp(1.1rem, 2.2vw, 2.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.01em;
  transition: width 500ms var(--ease-out);
}
.duo.is-named .team-label { width: 30%; }
.is-gl .duo-label { left: 0; top: 0; translate: none; will-change: transform; transition: none; }

/* Hero copy sits above the ink. */
.hero {
  position: relative; z-index: 1; min-height: 100svh;
  display: grid; align-content: start; gap: 1.25rem;
  padding: calc(var(--header-h) + 0.5rem) var(--gutter) 34svh;
}
.h1-stack {
  position: relative; max-width: 11ch;
  font: 800 clamp(3.1rem, 14.5vw, 10rem)/1.02 var(--font-display); /* stacked marks still clear at 1.02 */
  letter-spacing: -0.045em; text-wrap: balance;
}
.h1-stack > * { font: inherit; letter-spacing: inherit; margin: 0; }
/* Tint copies (js/hero-title-tints.js): clipped to each ink, dark complementary tones, >= 4.3:1. */
.h1-tint, .h1-tint--ab { position: absolute; inset: 0; pointer-events: none; clip-path: circle(0 at 0 0); }
.h1-tint--a { color: #1A2CA3; }      /* on yellow: 8.3:1 */
.h1-tint--b { color: #6B1A00; }      /* on blue: 6.0:1 */
.h1-tint--ab { color: #5C0F4E; }     /* on green: 4.3:1 (large text) */
.hero-intro { max-width: 30ch; font-size: clamp(1.0625rem, 0.6vw + 1rem, 1.375rem); font-weight: 500; }
.name-form { display: grid; gap: 0.5rem; max-width: 26rem; }
.name-form label { font-weight: 600; }
.name-form input {
  min-height: 56px; padding: 0 1.4rem; width: 100%;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink);
  font: 500 1.125rem/1.2 var(--font-body);
}
.name-form input::placeholder { color: var(--ink-soft); opacity: 1; }
.hint { font-size: 0.9rem; color: var(--ink); }  /* navy, not grey: it may sit on ink */
.scroll-cue, .ink-hint { position: absolute; bottom: 1.25rem; font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.scroll-cue { left: var(--gutter); display: none; align-items: center; gap: 0.75rem; }
.motion .scroll-cue { display: flex; }
.scroll-cue-line { width: 3rem; height: 2px; background: var(--ink); transform-origin: left; }
/* Desktop only, and only while the shader is live: says the pointer does something. */
.ink-hint { display: none; right: var(--gutter); }
@media (hover: hover) and (pointer: fine) and (min-width: 960px) { .stage-pin.is-gl ~ .hero .ink-hint { display: block; } }
@media (max-width: 420px) { .scroll-cue { white-space: nowrap; font-size: 0.8rem; } .scroll-cue-line { display: none; } }
.motion-pending .hero h1 { opacity: 0; animation: failsafe-show 0s 2.5s forwards; }
@keyframes failsafe-show { to { opacity: 1; } }

@media (min-width: 960px) {
  .duo { --duo-w: min(84vw, 140svh); left: calc(63vw - var(--duo-w) / 2); bottom: auto; top: calc(52svh - var(--duo-w) / 3.2); }
  .hero { align-content: center; gap: 1.5rem; padding: calc(var(--header-h) + 1rem) var(--gutter) 4.5rem; }
  .h1-stack { font-size: clamp(5rem, 9.4vw, 10rem); max-width: 12ch; }
  .duo-label--client { left: 27%; top: 82%; }  /* poster: under the headline, beside the input */
  .hero-intro, .name-form { max-width: min(30rem, 34vw); }
  .scroll-cue, .ink-hint { bottom: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .circle, .team-label { transition: none; }
}
