/* ==========================================================================
   Brand identity case study: Helix Labs. The moment of activation.
   Rounded panels and a living gradient, as in the brand book.
   ========================================================================== */
.hx { --li: #cafa28; --mi: #9ddfc7; --k: #1c1c1c; --f-display: -apple-system, "SF Pro Display", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; --f-text: -apple-system, "SF Pro Text", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; position: relative; font-family: var(--f-text); color: var(--k); }
.hx > section { position: relative; z-index: 1; }
.hx ~ .sect { position: relative; z-index: 1; }
.hx ~ .sect:not(.closing-cta) { background: var(--bg); }
.hx-h { margin: 0; font: 300 clamp(2.4rem, 1.5rem + 2.6vw, 4rem)/1 var(--f-display); letter-spacing: -0.04em; color: var(--k); }
.hx-h b { font-weight: 650; }
.hx-h--w { color: #fff; }

/* ---------- The gradient that never stops ---------- */
.hx-field { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #fff; }
.hx-field i { position: absolute; width: 120vmax; height: 120vmax; left: -60vmax; top: -60vmax; will-change: transform; }
.hx-field canvas { display: block; width: 100%; height: 100%; }

/* ---------- The square ---------- */
.hx-dot { visibility: hidden; position: fixed; left: 0; top: 0; z-index: 40; width: 100px; height: 100px; background: currentColor; color: var(--k); border-radius: 5%; pointer-events: none; transform-origin: 0 0; will-change: transform; transition: color 0.3s; }
.hx-spot { display: block; aspect-ratio: 1; }
.hx-spot.is-home { background: var(--c); border-radius: 5%; }
.hx-spot--mid { width: 14px; margin-top: 12px; }
.hx-wm { position: relative; }
.hx-wm svg { display: block; width: 100%; height: auto; fill: var(--k); overflow: visible; }
/* the logo keeps its own square: the one that travels only leaves from here, so the logo is always whole */
.hx-wm .hx-spot { position: absolute; background: var(--k); border-radius: 5%; }

/* ---------- The opening ---------- */
.hx-open .st-reel__stage, .hx-concept .st-reel__stage, .hx-end .st-reel__stage { background: transparent; }
.hx-open__in { position: relative; z-index: 1; display: grid; grid-template-rows: auto 1fr; height: 100%; padding-top: calc(var(--nav-h) + 28px); padding-bottom: clamp(32px, 6vh, 64px); }
.hx-open__say { align-self: end; display: grid; gap: clamp(20px, 3vh, 36px); max-width: 52%; }
.hx-open h1 { margin: 0; font: 400 clamp(1.5rem, 1rem + 1.4vw, 2.4rem)/1.14 var(--f-display); letter-spacing: -0.03em; color: var(--k); }
.hx-open__tile { position: absolute; right: var(--gutter); top: 50%; height: 74vh; aspect-ratio: 692 / 920; margin: 0; translate: 0 -46%; will-change: transform; }
.hx-open__tile img { display: block; width: 100%; height: 100%; }

/* ---------- The panels ---------- */
.hx-intro { padding-block: 10vh; }
.hx-intro__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 80px); align-items: start; }
.hx-intro__copy { display: grid; gap: clamp(20px, 3vh, 32px); align-content: center; font-size: 19px; line-height: 1.42; }
.hx-intro__copy p { margin: 0; }
.hx-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 16px; align-items: start; }
.hx-row .hx-spot { width: 14px; margin-top: 7px; }
.hx-row h3 { margin: 0 0 4px; font: 650 19px/1.2 var(--f-text); }

/* ---------- The concept ---------- */
.hx-concept__wash { position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 58%, rgba(202, 250, 40, 0.75), rgba(202, 250, 40, 0) 70%); opacity: 0; }
.hx-concept__head { position: absolute; left: 0; right: 0; top: calc(var(--nav-h) + 8px); display: grid; gap: 16px; }
.hx-concept__head p { margin: 0; max-width: 44em; font-size: 19px; line-height: 1.4; }
.hx-concept__wm { position: absolute; left: 50%; top: 58%; width: min(52vw, 780px); translate: -50% -50%; }
.hx-note { position: absolute; width: 17em; margin: 0; font-size: 14.5px; line-height: 1.32; opacity: 0; }
.hx-note--a { left: -26%; top: -38%; }
.hx-note--b { right: -16%; top: -66%; }
.hx-note--c { right: -6%; bottom: -74%; }

/* ---------- The variations ---------- */
.hx-var { padding-block: 8vh; }
.hx-var__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: end; }
.hx-var__grid > p { margin: 0; font-size: 19px; line-height: 1.4; }
.hx-var__grid figure { margin: 0; overflow: hidden; border-radius: 22px; }
.hx-var__grid img { display: block; width: 100%; height: auto; transition: scale 1.2s var(--ease-out); }
.hx-var__grid figure:hover img { scale: 1.04; }
.hx-var__wide { grid-column: 1 / -1; }

/* ---------- The values ---------- */
.hx-values__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hx-values .st-reel__stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 12, 8, 0.86), rgba(10, 12, 8, 0.6) 38%, transparent 64%); pointer-events: none; }
.hx-values__in { position: absolute; z-index: 1; left: var(--gutter); top: 0; bottom: 0; width: min(38vw, 560px); display: grid; align-content: center; gap: clamp(16px, 2.6vh, 28px); color: #fff; }
.hx-values ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font: 500 clamp(1.15rem, 0.9rem + 0.8vw, 1.6rem)/1.2 var(--f-text); }
.hx-values li { display: grid; grid-template-columns: 22px auto; align-items: center; gap: 12px; opacity: 0.45; transition: opacity 0.4s; }
.hx-values li.is-on { opacity: 1; }
.hx-values li .hx-spot { width: 14px; }
.hx-values p { margin: 0; font-size: 19px; line-height: 1.42; color: rgba(255, 255, 255, 0.88); }

/* ---------- The colours ---------- */
.hx-cols { padding-block: 10vh; }
.hx-cols__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.hx-cols button { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); height: clamp(220px, 21vw, 320px); overflow: hidden; border: 1px solid rgba(28, 28, 28, 0.32); border-radius: 18px; background: #fff; text-align: left; color: var(--k); cursor: pointer; }
.hx-cols span { display: grid; grid-template-rows: auto auto 1fr; gap: 10px; padding: 18px; font-size: 14px; line-height: 1.32; }
.hx-cols em { font-style: normal; }
.hx-cols button b { align-self: end; font-weight: 500; font-size: 15px; }
.hx-sw { display: block; height: 100%; border-left: 1px solid rgba(28, 28, 28, 0.14); transition: filter 0.3s; }
.hx-cols button:hover .hx-sw { filter: brightness(1.04); }

/* ---------- The type ---------- */
.hx-type { padding-block: 8vh; }
.hx-type__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hx-type__grid p { margin: 16px 0 0; font-size: 18px; line-height: 1.42; }
.hx-range { display: grid; gap: 10px; margin-top: 24px; font-size: 15px; }
.hx-range input { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--k); cursor: ew-resize; }
.hx-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: var(--k); border-radius: 2px; }
.hx-range input::-moz-range-thumb { width: 22px; height: 22px; background: var(--k); border: 0; border-radius: 2px; }
.hx-faces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.hx-faces p { display: grid; gap: 4px; margin: 0; }
.hx-faces span { font-size: 14px; color: #54605a; }
.hx-faces b { font: 600 clamp(1.6rem, 1.2rem + 1vw, 2.2rem)/1.1 var(--f-display); letter-spacing: -0.02em; }
.hx-faces__s b { font: 400 clamp(1.8rem, 1.3rem + 1.2vw, 2.6rem)/1.1 "Instrument Serif", serif; letter-spacing: 0; }
.hx-table { padding: clamp(16px, 2vw, 28px); border: 1px solid rgba(28, 28, 28, 0.4); border-radius: 18px; background: rgba(255, 255, 255, 0.72); }
.hx-table > div { display: grid; grid-template-columns: minmax(0, 1fr) 96px 44px; align-items: baseline; gap: 12px; padding-block: 10px; font-size: calc(var(--b, 64) * 1px / pow(1.618, var(--n))); line-height: 1.12; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; }
.hx-table span:nth-child(2) { font-size: 16px; font-weight: inherit; letter-spacing: 0; }
.hx-table output { font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- The look ---------- */
.hx-look { padding-block: 8vh; }
.hx-look__sub { margin: 12px 0 24px; max-width: 46em; font-size: 19px; line-height: 1.4; }
.hx-look__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.hx-look__list li { display: grid; align-items: end; min-height: clamp(150px, 15vw, 210px); padding: 20px; border: 1px solid rgba(28, 28, 28, 0.32); border-radius: 18px; background: rgba(255, 255, 255, 0.6); font: 500 clamp(1.05rem, 0.9rem + 0.5vw, 1.35rem)/1.2 var(--f-display); letter-spacing: -0.02em; }
.hx-icons__h { margin-top: clamp(40px, 7vh, 72px); }
.hx-icons { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); margin-top: 8px; border-top: 1px solid rgba(28, 28, 28, 0.14); border-left: 1px solid rgba(28, 28, 28, 0.14); }
.hx-icons i { --a: 0; position: relative; display: grid; place-items: center; aspect-ratio: 1; border-right: 1px solid rgba(28, 28, 28, 0.14); border-bottom: 1px solid rgba(28, 28, 28, 0.14); font: normal 300 28px/1 "Material Symbols Outlined"; font-feature-settings: "liga"; color: var(--k); background: rgba(202, 250, 40, calc(var(--a) * 0.9)); }

/* ---------- The stack ---------- */
.hx-stack { display: grid; gap: 7vh; padding: 6vh var(--gutter) 10vh; }
.hx-stack figure { position: sticky; top: calc(9vh + var(--i) * 12px); width: min(100%, calc(80vh * var(--ar))); margin: 0 auto; overflow: hidden; border-radius: 24px; transform-origin: 50% 0; will-change: transform; }
.hx-stack img { display: block; width: 100%; height: auto; }
.hx-kit { padding-block: 4vh 10vh; }
.hx-kit figure { border-radius: 20px; }

/* ---------- The end ---------- */
.hx-end__say { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: grid; align-content: center; gap: 12px; }
.hx-end h2 { margin: 0; font: 400 clamp(3rem, 1.4rem + 5vw, 6.4rem)/1 var(--f-display); letter-spacing: -0.045em; color: var(--k); }
.hx-end h2 b { font-weight: 650; }
.hx-end__say p { margin: 0; font-size: 22px; }
.hx-end__mark { position: absolute; right: 7vw; top: 50%; height: 92vh; aspect-ratio: 220 / 302; translate: 0 -50%; will-change: transform; }
.hx-end__mark svg { display: block; width: 100%; height: 100%; fill: var(--k); }
.hx-end__mark .hx-spot { position: absolute; }

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .hx-field { position: absolute; }
  .hx-open__say { max-width: none; }
  .hx-open__tile { position: relative; right: auto; top: auto; translate: none; height: auto; width: 60%; margin: 24px auto; }
  .hx-intro__grid, .hx-var__grid, .hx-cols__grid, .hx-type__grid { grid-template-columns: minmax(0, 1fr); }
  .hx-concept__head, .hx-values__in, .hx-end__say { width: auto; padding: 24px var(--gutter); }
  .hx-concept__wm { translate: none; left: auto; padding: 24px var(--gutter); }
  .hx-note { position: static; opacity: 1; width: auto; margin-top: 8px; }
  .hx-values li { opacity: 1; }
  .hx-values .st-reel__stage { color: #fff; }
  .hx-stack figure { position: relative; top: auto; width: 100%; }
  .hx-look__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-end__mark { display: none !important; }
  .hx-icons { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* phones: the type ladder at about half size, so the specimen fits beside its weight and size */
@media (max-width: 720px) {
  .hx-table > div { grid-template-columns: minmax(0, 1fr) 72px 28px; gap: 8px; font-size: calc(var(--b, 64) * 0.4px / pow(1.618, var(--n))); white-space: normal; }
}

/* scroll section heights, so they are in place before st-helix.js runs (same numbers as its reel() calls) */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .hx-open { height: 220vh; } .hx-concept { height: 380vh; } .hx-values { height: 420vh; } .hx-end { height: 260vh; }
}
