/* ExecRecon hybrid Home. Loads after the accepted mockup.css and adds three
   things: v2's pinned hero scene, v2's three-shot cinematic close, and v3's
   real sign-up form. Colour comes only from tokens.css.

   Every scroll effect sits under html.scenes:not(.rm). home-scenes.js adds
   .scenes only once it is running, so with no script, a failed script,
   reduced motion or the footer toggle, each scene shows its end state,
   complete and still. A scene whose content is taller than the screen
   (short phones, enlarged text) gets .unpin and is laid out as a normal
   section, so nothing is clipped out of reach. New parts are sized in rem. */

:root {
  --obsidian: var(--color-obsidian);
  --paper: var(--color-paper);
  --gold: var(--color-heritage-gold);
  --gold-hi: var(--color-luminous-gold);
  --champagne: var(--color-champagne);
  --paper-dim: var(--text-muted);
  --ink-2: var(--text-muted-on-paper);
  --rule: var(--rule-on-paper);
  --rule-strong: var(--rule-on-paper-strong);
  --pad-x: clamp(1.5rem, 7vw, 7rem);
  --pin: 100vh;
  /* scroll variables rest at the end state */
  --p: 1; --e: 1; --p2: 1; --v: 0; --r: 1; --l: 1; --l2: 0; --t: 1;
}
@supports (height: 100svh) { :root { --pin: 100svh; } }

/* ---------- v2 hero: the photograph eases in, the first line leans with the speed of the scroll ---------- */
.ks { position: relative; background: var(--obsidian); color: var(--paper); overflow: clip; }
.ks .pin { position: relative; min-height: var(--pin); padding: calc(72px + var(--space-12)) var(--pad-x) var(--space-20); display: flex; flex-direction: column; justify-content: safe flex-end; }
/* the scroll length never drops below ~70rem past one screen, so a short window still gets a full, unhurried motion */
html.scenes:not(.rm) .ks:not(.unpin) { height: max(calc(var(--len, 2.2) * 100vh), calc(100vh + 70rem)); }
html.scenes:not(.rm) .ks:not(.unpin) .pin { position: sticky; top: 0; height: var(--pin); overflow: clip; }
.plate { position: absolute; inset: 0; overflow: clip; z-index: 0; background: var(--obsidian); }
.plate img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); }
.plate.side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--obsidian) 0%, color-mix(in srgb, var(--obsidian) 83%, transparent) 32%, color-mix(in srgb, var(--obsidian) 20%, transparent) 78%), linear-gradient(0deg, var(--obsidian), transparent 40%); }
.ks .pin > :not(.plate) { position: relative; z-index: 2; }
.ks .pin > .hero-caption { position: absolute; }
/* fit-to-screen: set by home-scenes.js so a short window keeps the motion instead of losing it */
.ks .pin > :not(.plate):not(.hero-caption) { zoom: var(--fit, 1); }
.cine .shot-text { zoom: var(--tfit, 1); }

/* compact masthead: less bar, more page (accepted was 104px / 86px) */
.masthead { height: 72px; }
.brand img { width: 172px; }
/* the accepted hero's sizes */
.k-big { max-width: 56rem; font-size: clamp(3.375rem, 6.65vw, 6.5rem); font-weight: 500; letter-spacing: -.055em; line-height: 1.02; overflow-wrap: anywhere; }
.k-big span { display: block; }
html.scenes:not(.rm) .ks:not(.unpin).open .plate img { transform: scale(calc(1.16 - .16 * var(--e))); }
html.scenes:not(.rm) .ks:not(.unpin) .k-run { transform: translateX(calc(var(--e) * 16vw)) skewX(calc(var(--v) * -9deg)); transform-origin: 0 100%; will-change: transform; }
/* the second line starts dimmed and brightens as you scroll; its floor stays readable (3.6:1) */
html.scenes:not(.rm) .ks:not(.unpin) .k-stay { opacity: calc(.42 + .58 * var(--p2)); transform: translateX(calc(var(--e) * -1.5vw)); }
.hero-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-6) var(--space-20); margin-top: var(--space-12); }
.hero-foot .lede { max-width: 34ch; font-size: 1.0625rem; line-height: 1.6; color: var(--paper-dim); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-8); }
.actions .text-link { gap: var(--space-10); }

/* ---------- the one action: gold, used only for "Tell me when it opens" ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; max-width: 100%; min-height: 2.75rem; padding: var(--space-3) var(--space-5); border: 1px solid transparent; border-radius: var(--radius); font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background var(--motion-fast) var(--motion-ease-out), border-color var(--motion-fast) var(--motion-ease-out), transform var(--motion-fast) var(--motion-ease-out); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--obsidian); }
.btn-primary:not(:disabled):hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn:not(:disabled):active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: wait; }

/* ---------- pressed and focus states the accepted stylesheet leaves out ---------- */
.text-link:active, .route-list > a:active, .door:active, .path-row:active { opacity: .7; }
.route-list > a:hover > span:first-child { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
select:focus-visible, textarea:focus-visible { outline: 3px solid var(--obsidian); outline-offset: 5px; }
.ks a:focus-visible, .cine .dark a:focus-visible, .people-section a:focus-visible { outline-color: var(--champagne); }
#motion-toggle { min-height: 2.75rem; }
#motion-toggle:not(:disabled):hover { color: var(--champagne); }
#motion-toggle:not(:disabled):active { opacity: .7; }
#motion-toggle:disabled { opacity: .6; text-decoration: none; }
footer > div a { display: inline-flex; align-items: center; min-height: 2.75rem; }
footer a:active { opacity: .7; }

/* ---------- v2 close: a line on its own, an iris onto a photograph, then ExecOS assembles ---------- */
.cine { position: relative; background: var(--obsidian); color: var(--paper); }
.cine-anchor { position: absolute; top: 176vh; left: 0; width: 1px; height: 1px; }
html.scenes:not(.rm) .cine:not(.unpin) .cine-anchor { top: calc((100% - 100vh) * .9); } /* where ExecOS has finished assembling */
.shot { position: relative; min-height: 88vh; overflow: clip; display: flex; }
.shot.light { background: var(--paper); color: var(--obsidian); }
.shot.dark { background: var(--obsidian); color: var(--paper); }
.shot-text { position: relative; z-index: 2; padding: clamp(1.75rem, 6vh, 4.5rem) var(--pad-x); }
html.scenes:not(.rm) .cine:not(.unpin) { height: max(calc(var(--shots, 3) * 125vh), calc(100vh + 110rem)); }
html.scenes:not(.rm) .cine:not(.unpin) .cine-stage { position: sticky; top: 0; height: var(--pin); overflow: clip; }
html.scenes:not(.rm) .cine:not(.unpin) .shot { position: absolute; inset: 0; min-height: 0; clip-path: var(--clip, none); will-change: clip-path; }
html.scenes:not(.rm) .cine:not(.unpin) .cut-iris { --clip: inset(calc((1 - var(--r)) * 50%) calc((1 - var(--r)) * 50%)); }
html.scenes:not(.rm) .cine:not(.unpin) .cut-left { --clip: inset(0 calc((1 - var(--r)) * 100%) 0 0); }
.beat { align-items: center; }
.beat-line { max-width: 16ch; font-size: clamp(2.125rem, 4.6vw, 4rem); font-weight: 500; letter-spacing: -.05em; line-height: 1.06; text-wrap: balance; }
html.scenes:not(.rm) .cine:not(.unpin) .beat-line { opacity: calc(1 - .85 * var(--l2, 0)); }
html.scenes:not(.rm) .cine:not(.unpin) .people-shot .plate img { transform: scale(calc(1.12 - .12 * var(--l))); }
.title { flex-direction: column; justify-content: center; }
/* one step above the accepted 112px ExecOS heading, and never wider than a narrow phone */
.title-word { display: flex; font-size: min(clamp(4.25rem, 10vw, 8rem), 22vw); font-weight: 500; letter-spacing: -.06em; line-height: .95; }
.title-word span { margin-right: -.035em; will-change: transform; }
html.scenes:not(.rm) .cine:not(.unpin) .title-word span { transform: translateX(calc((1 - var(--t)) * var(--dx))); opacity: calc(.42 + .58 * var(--t)); }
.title .execos-lead { max-width: 30ch; margin-top: var(--space-6); }
.title .execos-note { max-width: 24rem; margin-top: var(--space-5); font-size: .9375rem; color: var(--paper-dim); }
.title .route-list { max-width: 36rem; margin-top: var(--space-8); }
.leg { display: block; max-width: 36rem; height: 2px; margin: var(--space-10) 0 0; border: 0; background: var(--gold); transform-origin: 0 50%; }
html.scenes:not(.rm) .cine:not(.unpin) .leg { transform: scaleX(var(--t, 1)); }

/* ---------- people on Obsidian, so no two paper panels meet at the form ---------- */
.people-section { background: var(--obsidian); color: var(--paper); --shape-surface: var(--obsidian); }
.people-section p { color: var(--paper-dim); }
.people-art { border-top-color: var(--rule-on-dark); border-bottom-color: var(--rule-on-dark); }
.people-art > span { border-bottom-color: var(--rule-on-dark-strong); }

/* ---------- the list (v3): the real sign-up form, the doors beside it ---------- */
.list { position: relative; padding: clamp(4rem, 9vw, 7rem) var(--pad-x); background: var(--paper); }
.list-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; max-width: 1550px; margin: 0 auto; }
.list h2 { max-width: 18ch; font-size: clamp(2.375rem, 4.2vw, 3.875rem); }
.list .list-note { max-width: 44ch; margin-top: var(--space-6); font-size: 1rem; color: var(--ink-2); }
.anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
form[data-notify] { display: grid; gap: var(--space-5); max-width: 34rem; margin-top: var(--space-8); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: var(--space-5); }
.field { display: grid; gap: var(--space-1); font-size: .8125rem; color: var(--ink-2); }
.field label span { font-weight: 400; }
/* the accepted dialog's inputs: a single bottom rule, no box */
.field input, .field select, .field textarea { width: 100%; min-height: 2.75rem; padding: var(--space-3) 0; border: 0; border-bottom: 1px solid var(--obsidian); border-radius: 0; background: transparent; color: var(--obsidian); font: inherit; font-size: 1rem; line-height: 1.4; transition: border-color var(--motion-fast) var(--motion-ease-out); }
.field select { appearance: none; padding-right: 2.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23080808' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right var(--space-1) center; }
.field textarea { min-height: 6.5em; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-width: 2px; }
.field [aria-invalid="true"] { border-bottom: 2px solid var(--obsidian); outline: 2px solid var(--obsidian); outline-offset: 2px; }
.check:has(input[aria-invalid="true"]) { outline: 2px solid var(--obsidian); outline-offset: 4px; }
.field-err { padding-left: var(--space-3); border-left: 2px solid var(--obsidian); font-size: .8125rem; line-height: 1.4; color: var(--obsidian); }
.field-err[hidden] { display: none; }
.honeypot { display: none; }
.consent { display: grid; gap: var(--space-3); }
.check { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: center; min-height: 2.75rem; font-size: .8125rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 1.375rem; height: 1.375rem; margin: 0; accent-color: var(--obsidian); }
.small { font-size: .8125rem; }
.small a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; text-underline-offset: 3px; }
form[data-notify] .btn { justify-self: start; }
/* state is carried by words first, then by the rule, never by colour alone */
.form-status { min-height: 1.5em; max-width: 52ch; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.form-status[data-state="success"], .form-status[data-state="error"] { padding-left: var(--space-3); color: var(--obsidian); }
.form-status[data-state="success"] { border-left: 2px solid var(--obsidian); }
.form-status[data-state="error"] { border-left: 4px solid var(--obsidian); }
.form-status[data-state="success"]::before { content: "Saved. "; font-weight: 600; }
.form-status[data-state="error"]::before { content: "Not saved. "; font-weight: 600; }
/* the doors use the accepted path-row type */
.doors { border-top: 1px solid var(--obsidian); }
.door { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto; gap: var(--space-4); align-items: baseline; padding: var(--space-5) 0; border-bottom: 1px solid var(--rule); }
.door:hover .door-name { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.door-name { font-size: 1.25rem; font-weight: 500; letter-spacing: -.03em; }
.door-for { font-size: .9375rem; color: var(--ink-2); }
.door-go { font-size: 1.5rem; line-height: 1; transition: transform 180ms ease; }
.door:hover .door-go { transform: translate(3px, -3px); }

@media (max-width: 760px) {
  /* compact masthead on phones; the hero's top padding clears it without growing with text */
  .masthead { height: 60px; padding: 0 var(--space-6); }
  .brand img { width: 148px; }
  .masthead nav { top: 60px; }
  .ks .pin { padding: calc(60px + var(--space-8)) var(--space-6) var(--space-16); }
  .k-big { font-size: clamp(2.8rem, 10.4vw, 4.6rem); line-height: 1.04; }
  .hero-foot { display: block; margin-top: var(--space-8); }
  .actions { margin-top: var(--space-6); }
  .actions .hero-link { margin-top: 0; }
  .plate.side::after { background: linear-gradient(90deg, color-mix(in srgb, var(--obsidian) 88%, transparent), color-mix(in srgb, var(--obsidian) 30%, transparent)), linear-gradient(0deg, var(--obsidian), transparent 60%); }
  html.scenes:not(.rm) .ks:not(.unpin) .k-run { transform: translateX(calc(var(--e) * 7vw)) skewX(calc(var(--v) * -9deg)); }
  .title .route-list { margin-top: var(--space-6); }
  .list-in { grid-template-columns: 1fr; }
  .door { grid-template-columns: 1fr auto; }
  .door-for { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-delay: 0s !important; }
}
/* launch.js clears the status line when saving starts; this keeps a visible word there until the outcome arrives */
.form-status[data-state="pending"]:empty::before { content: "Saving your details…"; }
