/* ============================================================================
   CAPSEAD — Home's arrival (hero v13, owner-approved 2026-11-05).
   ----------------------------------------------------------------------------
   The markup is the rest frame (composition B): the mark standing on the seam's light,
   the thesis and the ways in, all final from the first paint. hero.js may play a
   ~3.6 s opening in a WebGL2 canvas behind the words and then hand the mark back to the SVG;
   after that the canvas only holds the seam's light, redrawn when the pointer moves.
      html.hz-gl     the canvas draws the seam and its light (the CSS light below is the
                     fallback for no-JS and no-WebGL2)
      html.hz-intro  the canvas also draws the mark, until the hand-back
   ========================================================================== */

.hz { position: relative; min-height: max(100svh, 600px); display: flex; flex-direction: column;
  padding: 0 0 clamp(40px, 6.5svh, 74px); isolation: isolate; overflow: clip;
  --hz-gap: 5px; --hz-top: clamp(26px, 8.6svh, 96px); --hz-max: 440px; }
.hz-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.hz-front { position: relative; z-index: 1; flex: 1 1 auto; width: 100%; display: flex; flex-direction: column;
  align-items: center; text-align: center; }

/* the mark stands above the seam: as tall as the room under the navigation allows, never taller
   than 440 px, its tail --hz-gap above the line */
.hz-stage { position: relative; flex: 1 1 auto; align-self: stretch; min-height: 150px; pointer-events: none; }
.hz-mark { position: absolute; left: 50%; bottom: var(--hz-gap);
  height: min(var(--hz-max), calc(100% - var(--nav-h) - var(--hz-top) - var(--hz-gap))); width: auto; aspect-ratio: 788 / 1012;
  transform: translateX(-49.893%); overflow: visible; display: block; }
html.hz-intro .hz-mark { visibility: hidden; }

/* the seam: a hairline of the mark's own spectrum, with the light standing on it */
.hz-seam { position: relative; height: 2px; width: min(560px, 62vw); margin: 0 0 30px; flex: 0 0 auto; }
.hz-seam > i { position: absolute; pointer-events: none; display: block; }
.hz-line { left: 0; right: 0; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #011539, #0579EE 39%, #7FE2FD 65%, #029E9B 80%, #02AC84);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
/* the glow: the spectrum with its end fade baked into the gradient (a mask would clip the blur to the box) */
.hz-glow { left: 0; right: 0; top: -9px; height: 20px; opacity: .85; filter: blur(5px);
  background: linear-gradient(90deg, rgba(1, 21, 57, 0) 0%, rgb(3, 72, 150) 20%, #0579EE 39%, #7FE2FD 65%, #029E9B 80%,
    rgba(2, 172, 132, 0) 100%); }
.hz-spill { left: -30%; width: 160%; top: -70px; height: 142px; opacity: .34; filter: blur(10px);
  background: linear-gradient(90deg, #011539, #0579EE 33%, #7FE2FD 59%, #029E9B 76%, #02AC84);
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .45) 35%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .45) 35%, transparent 100%); }
.hz-line, .hz-glow { transition: filter .45s var(--ease-out); }
.hz:has(.hz-go:hover) .hz-line, .hz:has(.hz-go:focus-visible) .hz-line { filter: brightness(1.45); }
html.hz-gl .hz-seam > i { visibility: hidden; }

/* the thesis and the ways in: the site's own h1 voice, final from the first paint. The first sentence carries the
   emphasis at full ink; the second, the product's promise, answers it a step quieter (size, weight and lines unchanged) */
h1.hz-h { font-size: clamp(27px, calc((min(100vw, 1240px) - 80px) / 24.4), 50px); font-weight: 200; line-height: 1.12;
  letter-spacing: -0.032em; color: var(--ink); max-width: 20.5em; }
h1.hz-h .hz-l1, h1.hz-h .hz-l2 { display: block; }
h1.hz-h .hz-l1 > span, h1.hz-h .hz-l2 > span { display: block; text-wrap: balance; }
h1.hz-h .hz-l1 { color: var(--ink); }
h1.hz-h .hz-l2 { margin-top: .12em; color: var(--ink-secondary); }
.hz-word { font-weight: 300;
  background-image: linear-gradient(97deg, #7FE2FD 0%, #0579EE 33%, #029E9B 70%, #02AC84 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hz-word { color: var(--teal); -webkit-text-fill-color: currentColor; }
}
@media (forced-colors: active) { .hz-word { background: none; color: CanvasText; -webkit-text-fill-color: currentColor; } }
.hz-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.hz-cta .hz-go { position: relative; isolation: isolate; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
  transition: transform .2s var(--ease-out), box-shadow .34s var(--ease-out), background-color .2s var(--ease-out); }
.hz-cta .hz-go::before { content: ''; position: absolute; inset: -4px; border-radius: var(--r-pill); z-index: -1;
  padding: 1px; background: linear-gradient(101deg, #7FE2FD, #0579EE 34%, #011539 56%, #029E9B 82%, #02AC84);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .5; transition: opacity .3s var(--ease-out), inset .4s var(--ease-settle); }
.hz-cta .hz-go::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-pill); z-index: -1;
  background: radial-gradient(120% 160% at 50% -40%, rgba(234, 252, 255, .45), rgba(255, 255, 255, 0) 62%);
  opacity: .5; transition: opacity .3s var(--ease-out); }
@media (hover: hover) {
  .hz-cta .hz-go:hover::before { opacity: 1; inset: -6px; }
  .hz-cta .hz-go:hover::after { opacity: .9; }
  .hz-cta .hz-go:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 22px rgba(127, 226, 253, .22); }
}
.hz-cta .hz-go:focus-visible::before { opacity: 1; inset: -6px; }
.hz-cta .hz-go:focus-visible::after { opacity: .9; }

/* phone: a chevron says there is a page below (no hairline: no vertical rails anywhere) */
.hz-cue { display: none; }
.hz-cue svg { display: block; margin: 0 auto; width: 14px; height: 9px; opacity: .75; color: var(--ink-faint); }

.hz-replay { position: absolute; right: var(--gut); bottom: 20px; z-index: 2; transition: opacity .4s var(--ease-out); }
.hz-replay.is-playing { opacity: .35; cursor: default; }


@media (min-width: 761px) and (max-height: 800px) {
  .hz-seam { margin-bottom: 22px; }
  .hz-cta { margin-top: 22px; }
}

/* ---- phone: composed for the phone's first screen. The mark, the seam, the thesis and the ways in are one group,
   centred in the room under the navigation, with clear air between the mark and the seam. The mark is about a
   quarter of the screen as Safari first shows it (svh: toolbars in), so the headline and both buttons stand well
   clear of the screen's foot and of any toolbar over it. Its size is in svh, not a height media query: iOS
   measures those against the larger, toolbars-out viewport ---- */
@media (max-width: 760px) {
  /* the tail's air above the seam keeps its proportion to the mark (22 px under a 226 px mark before), so the
     light still crosses the same distance from the tip into the seam */
  .hz { padding-bottom: 26px; min-height: max(calc(100svh - 34px), 600px); --hz-top: 22px;
    --hz-m: clamp(132px, 27.5svh, 200px); --hz-gap: calc(var(--hz-m) * .0973); }
  /* the group is centred above the chevron's own room, so the two never meet on a short screen */
  .hz-front { padding-bottom: 34px; }
  .hz-stage { flex: 0 0 auto; height: calc(var(--nav-h) + var(--hz-m) + var(--hz-gap)); min-height: 0; margin-top: auto; }
  .hz-mark { height: var(--hz-m); }
  .hz-cue { display: block; position: absolute; left: 0; right: 0; bottom: 0; }
  /* the seam keeps its proportion to the mark (as on the desktop), so the tail still stands about 74 % along it */
  .hz-seam { width: min(320px, 76vw, calc(var(--hz-m) * 1.3)); margin-bottom: 32px; }
  .hz-spill { top: -40px; height: 82px; background: linear-gradient(90deg, #011539, #0579EE 39%, #7FE2FD 65%, #029E9B 80%, #02AC84); }
  /* the tail stands further right on the phone's seam (about 74 % along): the cyan follows it */
  .hz-line { background: linear-gradient(90deg, #011539, #0579EE 45%, #7FE2FD 74%, #029E9B 86%, #02AC84); }
  .hz-glow { background: linear-gradient(90deg, rgba(1, 21, 57, 0) 0%, rgb(3, 66, 138) 20%, #0579EE 45%, #7FE2FD 74%, #029E9B 86%,
    rgba(2, 172, 132, 0) 100%); }
  h1.hz-h { font-size: clamp(24px, 6.9vw, 29px); line-height: 1.2; letter-spacing: -.028em; max-width: 14.6em; }
  .hz-cta { margin-top: 22px; margin-bottom: auto; width: 100%; }
  .hz-cta .btn-primary, .hz-cta .btn-ghost { flex: 1 1 46%; justify-content: center; }
  .hz-replay { bottom: auto; top: 66px; right: 8px; width: 44px; height: 44px; padding: 0; justify-content: center; border-color: transparent; }
  .hz-replay .replay-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 360px) {
  h1.hz-h { font-size: 23px; max-width: 13.6em; }
  .hz-cta .btn-primary, .hz-cta .btn-ghost { padding: 0 16px; }
}
/* small phones (the iPhone SE): tighter type and buttons. Gated on width too, since iOS answers max-height with
   the toolbars-out viewport (667 on the SE, about 745 on a 390-wide iPhone, which keeps the type above) */
@media (max-width: 380px) and (max-height: 700px) {
  .hz { min-height: calc(100svh - 26px); padding-bottom: 14px; --hz-gap: 20px; --hz-top: 14px; }
  h1.hz-h { font-size: clamp(19px, 5.8vw, 23px); line-height: 1.22; max-width: 15.5em; }
  .hz-seam { margin-bottom: 30px; }
  .hz-cta { margin-top: 14px; gap: 8px; }
  .hz-cta .btn-primary, .hz-cta .btn-ghost { height: 44px; padding: 0 12px; font-size: 13px; }
  .hz-cue { margin-top: 10px; }
}
