/* Angilau Automation: split stage.
   Theme: six tokens and two faces. Everything bespoke is driven by three
   custom properties app.js writes: --split (divider position, 0..100),
   --page-p (page progress) and, per dual element, --cut (px). */

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --sc-canvas:     #F6F8FB;
  --sc-surface:    #FFFFFF;
  --sc-ink:        #072D55;
  --sc-ink-soft:   #4A5D78;
  --sc-accent:     #036C94;
  --sc-accent-ink: #FFFFFF;
  --sc-font-display: "Geist", system-ui, sans-serif;
  --sc-font-text:    "Geist", system-ui, sans-serif;
  --sc-font-mono:    "Geist Mono", ui-monospace, monospace;
  --sc-shadow-color: 212 60% 22%;

  --hand: #E4E8EE;          /* the "by hand" ground: cool desk grey */
  --paper: #FFFEF9;         /* paperwork, slightly warmer than the app white */
  --note: #FAF0C4;          /* a sticky note is a material, not an accent */
  --teal: #0587B8;          /* the logo's teal: marks, glow, data fills only */
  --line: color-mix(in oklab, var(--sc-ink) 14%, transparent);

  --split: 50;
  --page-p: 0;
  --inner: clamp(1.5rem, 4.2vw, 4.75rem);
  --col: 34rem;
}

html { background: var(--sc-canvas); }
body {
  margin: 0;
  color: var(--sc-ink);
  background: transparent;
  font-family: var(--sc-font-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: color-mix(in oklab, var(--teal) 26%, white); color: var(--sc-ink); }
:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; }
.mono { font-family: var(--sc-font-mono); }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--sc-ink); color: #fff; padding: 10px 14px; border-radius: 8px;
  text-decoration: none; transition: top var(--sc-d-fast) var(--sc-ease-out);
}
.skip:focus { top: 16px; }

main { position: relative; z-index: 2; }

/* ------------------------------------------------------------- grounds -- */
.ground { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.ground__built { position: absolute; inset: 0; background: var(--sc-canvas); overflow: hidden; }
.ground__glow {
  position: absolute; border-radius: 50%;
  filter: blur(10px);
  translate: calc(var(--gx, 0) * 1px) calc(var(--gy, 0) * 1px);
}
.ground__glow--a {
  width: 62vw; height: 62vw; right: -14vw; top: -20vw;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--teal) 22%, transparent), transparent);
}
.ground__glow--b {
  width: 46vw; height: 46vw; right: 14vw; bottom: -24vw;
  background: radial-gradient(closest-side, color-mix(in oklab, #7FC3E6 30%, transparent), transparent);
}
.ground__hand {
  position: absolute; inset: 0; background: var(--hand);
  clip-path: inset(0 calc(100% - var(--split) * 1%) 0 0);
}

/* ------------------------------------------------------------ divider -- */
.divider { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.divider__rail {
  position: absolute; inset: 0;
  transform: translate3d(calc(var(--split) * 1%), 0, 0);
  transition: opacity var(--sc-d-slow) var(--sc-ease-out);
}
.divider__line {
  position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px;
  background: color-mix(in oklab, var(--sc-ink) 22%, transparent);
}
.divider__fill {
  position: absolute; inset: 0; width: 1px;
  background: var(--teal);
  transform-origin: 50% 0; transform: scaleY(var(--page-p));
}
.divider__cap {
  position: absolute; top: 16px; left: 0; translate: -50% 0;
  display: grid; grid-template-columns: 4.6rem auto 4.6rem; align-items: center; gap: 12px;
  padding: 5px 14px; border-radius: var(--sc-r-pill);
  background: color-mix(in oklab, var(--sc-surface) 94%, transparent);
  box-shadow: var(--sc-e2), var(--sc-edge);
}
.divider__mark {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: auto;
  transition: transform var(--sc-d-fast) var(--sc-ease-out);
}
.divider__mark svg { width: 30px; height: auto; translate: 2px 0; }
.divider__mark:active { transform: scale(0.97); }
.divider__label {
  font-size: var(--sc-t-xs); font-weight: 600; letter-spacing: var(--sc-track-wide);
  text-transform: uppercase; color: var(--sc-ink-soft); white-space: nowrap;
}
.divider__label--hand { text-align: right; }
.divider__label--built { color: var(--sc-accent); }
.divider__cta {
  position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom));
  translate: -50% 0; pointer-events: auto;
  transition: opacity var(--sc-d-slow) var(--sc-ease-out), transform var(--sc-d-fast) var(--sc-ease-out);
}
.is-closing .divider__cta { opacity: 0; pointer-events: none; }
.is-collapsed .divider__rail { opacity: 0; }

/* ------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--sc-r-pill);
  font: 600 var(--sc-t-sm)/1 var(--sc-font-text); letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--sc-d-fast) var(--sc-ease-out), background-color var(--sc-d-fast) var(--sc-ease-out), box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.btn--primary {
  background: var(--sc-accent); color: var(--sc-accent-ink);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 6px 16px -6px hsl(200 90% 25% / 0.55);
}
.btn--lg { min-height: 52px; padding: 0 28px; font-size: var(--sc-t-base); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #025E82; }
  .link:hover { text-decoration-thickness: 2px; }
}
.btn:active { transform: translateY(1px) scale(0.98); }
.link {
  color: var(--sc-accent); font-weight: 600; font-size: var(--sc-t-sm);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}

/* --------------------------------------------------------------- halves -- */
.halves { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.half--hand { padding: 0 var(--inner) 0 var(--sc-gutter); }
.half--built { padding: 0 var(--sc-gutter) 0 var(--inner); }
.half > * { max-width: var(--col); }
.half--hand { color: var(--sc-ink); }

h1, h2, h3 { font-family: var(--sc-font-display); font-weight: 650; letter-spacing: var(--sc-track-tight); text-wrap: balance; margin: 0; }
.sc-body { color: var(--sc-ink-soft); font-size: var(--sc-t-base); line-height: var(--sc-leading-body); }

.sample {
  font: 500 10.5px/1 var(--sc-font-mono); letter-spacing: 0.02em;
  color: var(--sc-ink-soft); text-transform: uppercase;
}

.zone-hand, .zone-seam { display: none; }

/* ---------------------------------------------------------------- hero -- */
.hero {
  display: flex; flex-direction: column;
  padding-top: clamp(18px, 3vh, 30px);
  overflow: hidden;
}
.hero__brand {
  display: flex; align-items: center; gap: 10px;
  padding-left: var(--sc-gutter); height: 54px;
  margin-top: 0;
}
.hero__mark { width: 34px; height: auto; }
.wordmark { font-weight: 650; font-size: 1.05rem; letter-spacing: -0.02em; }
.wordmark span { font-weight: 450; color: var(--sc-ink-soft); }

.hero__h1 {
  margin-top: clamp(1.5rem, 6vh, 4.5rem);
  font-size: clamp(2.25rem, 1.1rem + 2.9vw, 4.4rem);
  line-height: 1.02;
}
.hero__h1 .half--built { color: var(--sc-ink); }
.hero__h1 .half--hand { color: color-mix(in oklab, var(--sc-ink) 82%, var(--hand)); }
.hero__sub { margin-top: clamp(0.9rem, 2.4vh, 1.6rem); }
.hero__sub p { margin: 0; color: var(--sc-ink-soft); font-size: var(--sc-t-base); line-height: 1.55; max-width: 30rem; text-wrap: pretty; }
.intro { display: flex; gap: 14px; align-items: flex-start; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--sc-surface), var(--sc-e2); margin-top: 2px; }
.hero__actions { display: flex; align-items: center; gap: 22px; margin-top: 1.25rem; }

.hero__scene { position: relative; z-index: 3; flex: 1; min-height: 260px; margin-top: 1rem; pointer-events: none; --half-card: calc(min(580px, 44vw) / 2); }
.hero__brand, .hero__h1, .hero__sub { position: relative; z-index: 4; }
.hero__sub .half--built .intro { max-width: 17.5rem; }

/* the founder, standing on the Built side in the light */
.hero__portrait {
  position: absolute; z-index: 2; bottom: 0; right: -7vw;
  height: min(70vh, 660px); aspect-ratio: 900 / 1011;
  translate: calc(var(--px, 0) * 1px) calc(var(--py, 0) * 1px);
  pointer-events: none;
}
.hero__portrait img {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: bottom;
  /* fade the bottom and the cropped left edge so the photo has no hard frame */
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%), linear-gradient(to right, transparent 0%, #000 14%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, #000 82%, transparent 100%), linear-gradient(to right, transparent 0%, #000 14%);
          mask-composite: intersect;
}
.sheet > .sample { right: auto; left: 0; }
.hero__light {
  position: absolute; left: 39%; top: -8%; width: 96%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--teal) 30%, white) 0%, color-mix(in oklab, var(--teal) 12%, transparent) 55%, transparent 100%);
}
.plane { position: absolute; inset: 0; translate: calc(var(--px, 0) * 1px) calc(var(--py, 0) * 1px); }
.plane--far { filter: blur(1.2px); opacity: 0.9; }

.sheet {
  --card-w: min(580px, 44vw);
  position: absolute; left: calc(50% - var(--card-w) / 2); top: 46%;
  width: var(--card-w); translate: 0 -50%;
}

/* far + near props */
.scrap {
  background: var(--paper); border-radius: 6px;
  box-shadow: var(--sc-e2);
  padding: 14px 16px; font-size: 13px; line-height: 1.45; color: var(--sc-ink-soft);
}
.scrap p { margin: 0; }
.scrap .mono { font-size: 11.5px; color: var(--sc-ink); margin-bottom: 6px; }
.plane--far .tile--spark { display: none; }
.plane--far .scrap--mail { position: absolute; left: 5%; top: 6%; width: 250px; rotate: -4deg; scale: 0.9; }
.tile {
  position: absolute; right: 5%; top: 56%; width: 200px; padding: 14px 16px;
  background: var(--sc-surface); border-radius: 12px; box-shadow: var(--sc-e2), var(--sc-edge);
  rotate: 3deg; scale: 0.9;
}
.tile__label { font-size: 12px; font-weight: 600; color: var(--sc-ink-soft); }
.tile svg { display: block; width: 100%; margin-top: 8px; }
.tile polyline { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.sticky {
  background: var(--note); padding: 14px 16px; border-radius: 3px;
  box-shadow: 0 10px 18px -10px hsl(45 50% 25% / 0.5), 0 1px 2px hsl(45 40% 20% / 0.2);
  font-size: 14px; font-weight: 550; line-height: 1.3; color: #3D3418;
}
.sticky p { margin: 0; }
.sticky--hero { position: absolute; left: calc(50% - var(--half-card) - 26px); top: 66%; width: 170px; rotate: -5deg; }
.toast {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--sc-surface); border-radius: 14px; padding: 12px 16px 12px 12px;
  box-shadow: var(--sc-e3), var(--sc-edge); width: 236px;
}
.toast p { margin: 2px 0 0; font-size: 13px; color: var(--sc-ink-soft); }
.toast b { font-size: 13.5px; }
.toast__icon { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--sc-ink) url("brand/favicon.svg") center/22px no-repeat; background-color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.toast--hero { position: absolute; right: calc(50% - var(--half-card) - 150px); top: 9%; }

/* --------------------------------------------------------------- duals -- */
.dual { position: relative; display: grid; border-radius: 14px; box-shadow: var(--sc-e3); }
.dual__face {
  grid-area: 1 / 1; border-radius: inherit; overflow: hidden;
  min-width: 0;
}
.dual__face--hand { clip-path: inset(0 calc(100% - var(--cut, 50%)) 0 0); background: var(--paper); }
.dual__face--built { clip-path: inset(0 0 0 var(--cut, 50%)); background: var(--sc-surface); }
.dual > .sample { position: absolute; right: 0; bottom: -22px; }

/* spreadsheet face */
.xl__bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: #EEF0EA; font-size: 11.5px; color: #4E5545;
}
.xl__dot { width: 10px; height: 10px; border-radius: 2px; background: #6E8A5A; }
.xl__grid { width: 100%; border-collapse: collapse; font: 450 12.5px/1 var(--sc-font-mono); color: #33392E; }
.xl__grid th, .xl__grid td { border: 1px solid #DEDFD6; padding: 7px 10px; text-align: left; white-space: nowrap; }
.xl__grid th { background: #F4F4EE; font-weight: 600; color: #5C6352; }
.xl__grid td:last-child, .xl__grid th:last-child { text-align: right; }
.xl__grid .is-flag td { background: #FBF0B8; }
.xl__grid tfoot td { font-weight: 600; }
.xl__err { text-decoration: underline wavy #B04A3A; text-underline-offset: 3px; color: #7A2E22; }

/* dashboard face */
.dash { padding: 16px 20px 18px; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
.dash__head { display: flex; justify-content: space-between; align-items: center; }
.dash__title { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.dash__live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--sc-accent); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: pulse 2.4s var(--sc-ease-out) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.dash__kpis { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 12px; }
.dash__kpis div { background: var(--sc-canvas); border-radius: 10px; padding: 12px 14px; }
.dash__kpis b { display: block; font-size: clamp(1.15rem, 0.8rem + 1vw, 1.6rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dash__kpis small { display: block; margin-top: 4px; font-size: 12px; color: var(--sc-ink-soft); }
.dash__bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--hand); gap: 2px; }
.dash__bar i { display: block; height: 100%; }
.dash__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--sc-ink-soft); }
.dash__legend li { display: inline-flex; align-items: center; gap: 6px; }
.dash__legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* ---------------------------------------------------------------- hours -- */
.hours { padding-top: clamp(4rem, 12vh, 8rem); }
.hours__h { font-size: var(--sc-t-2xl); line-height: 1.05; }
.row { padding-block: clamp(3.5rem, 11vh, 7.5rem) 0; align-items: start; }
.row:last-child { padding-bottom: clamp(4rem, 12vh, 8rem); }
.row__h { font-size: var(--sc-t-xl); line-height: 1.12; letter-spacing: var(--sc-track-snug); }
.sc-stack > .row__h + * { margin-top: var(--sc-3); }
.sc-stack > * + .scrap, .sc-stack > * + .thread, .sc-stack > * + .calls,
.sc-stack > * + .figure, .sc-stack > * + .board, .sc-stack > * + .track { margin-top: var(--sc-6); }

.scrap--row { max-width: 26rem; rotate: -1.2deg; }

.figure { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 0; }
.figure__n { font-size: var(--sc-t-3xl); font-weight: 650; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--sc-ink); padding-block: 0.06em; }
.figure__l { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); max-width: 14rem; line-height: 1.4; }

.thread { display: flex; flex-direction: column; gap: 8px; max-width: 22rem; }
.thread p { margin: 0; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.35; max-width: 80%; }
.thread__in { background: var(--sc-surface); align-self: flex-start; border-bottom-left-radius: 5px; box-shadow: var(--sc-e1); }
.thread__out { background: #CCD5E1; align-self: flex-end; border-bottom-right-radius: 5px; }

.calls { list-style: none; margin: 0; padding: 14px 16px; background: var(--paper); border-radius: 6px; box-shadow: var(--sc-e2); max-width: 22rem; font-size: 14px; color: var(--sc-ink-soft); }
.calls li + li { margin-top: 8px; }
.calls .mono { color: var(--sc-ink); margin-right: 10px; font-size: 12.5px; }

.board {
  position: relative; background: var(--sc-surface); border-radius: 14px; padding: 8px 18px 30px;
  box-shadow: var(--sc-e2), var(--sc-edge); max-width: 30rem;
}
.board__row { display: grid; grid-template-columns: 1fr 5.5rem 7.5rem; align-items: center; gap: 14px; padding: 12px 0; font-size: 14px; font-weight: 550; }
.board__row + .board__row { box-shadow: 0 -1px 0 var(--line); }
.board__row em { font-style: normal; font-size: 12.5px; color: var(--sc-ink-soft); font-weight: 500; }
.meter { height: 6px; border-radius: 99px; background: var(--hand); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--teal); transform-origin: 0 50%; transform: scaleX(var(--v)); }
.meter--warn i { background: var(--sc-ink); }
.board .sample { position: absolute; left: 18px; bottom: 12px; }

.track { list-style: none; margin: 0; padding: 4px 0 0; max-width: 24rem; }
.track li { position: relative; padding: 0 0 18px 30px; }
.track li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  box-sizing: border-box; border: 2px solid color-mix(in oklab, var(--sc-ink) 28%, transparent); background: var(--sc-surface);
}
.track li.is-done::before { background: var(--teal); border-color: var(--teal); }
.track li.is-now::before { border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in oklab, var(--teal) 18%, transparent); }
.track b { display: block; font-size: 15px; }
.track span { display: block; font-size: 13.5px; color: var(--sc-ink-soft); margin-top: 2px; }

/* -------------------------------------------------------------- play ---- */
.play { display: flex; flex-direction: column; padding-top: clamp(5.5rem, 15vh, 9rem); }
.play__h { font-size: var(--sc-t-2xl); line-height: 1.05; }
.play__hint { margin: 1rem 0 0; padding-left: calc(50% + var(--inner)); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.hint--touch { display: none; }
.tickets { position: relative; flex: 1; margin-top: clamp(1.5rem, 5vh, 3rem); }
.ticket {
  --tw: min(380px, 31vw);
  position: absolute; left: 0; width: var(--tw); height: 128px;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  outline-offset: 4px;
}
.ticket:nth-child(1) { top: 0; }
.ticket:nth-child(2) { top: 150px; }
.ticket:nth-child(3) { top: 300px; }
.ticket.is-dragging { cursor: grabbing; box-shadow: var(--sc-e3), 0 22px 40px -18px hsl(var(--sc-shadow-color) / 0.35); }
.ticket .dual__face { padding: 14px 18px; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; }
.ticket .dual__face--hand { background: var(--paper); }
.ticket__name { font-size: 12px; font-weight: 650; letter-spacing: 0.02em; text-transform: uppercase; color: var(--sc-ink-soft); }
.ticket .dual__face--built .ticket__name { color: var(--sc-accent); }
.xl__grid--mini td { padding: 4px 8px; font-size: 11.5px; }
.slip { margin: 0; font-size: 14px; line-height: 1.4; color: #3B3F48; font-family: var(--sc-font-mono); font-size: 12.5px; }
.sms { margin: 0; background: var(--sc-canvas); border-radius: 14px 14px 14px 4px; padding: 9px 12px; font-size: 14px; line-height: 1.35; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 0; }
.chips span { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--sc-canvas); }
.ticket__big { font-size: 2rem; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.ticket__run {
  display: inline-flex; align-items: center; gap: 7px; margin-top: auto;
  font-size: 12.5px; font-weight: 600; color: var(--sc-accent);
  opacity: 0; transform: translateY(4px);
  transition: opacity 260ms var(--sc-ease-out), transform 260ms var(--sc-ease-out);
}
.ticket.is-run .ticket__run { opacity: 1; transform: none; }
.tick { width: 16px; height: 16px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.6l4.6-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.ticket__grip {
  position: absolute; right: -15px; top: 50%; translate: 0 -50%;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--sc-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5 10.5 8 6 12.5' fill='none' stroke='%23072D55' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
  box-shadow: var(--sc-e2), 0 0 0 1px var(--line);
  transition: opacity 200ms var(--sc-ease-out);
}
.ticket.is-run .ticket__grip { opacity: 0; }
.play__sample { position: absolute; left: var(--sc-gutter); bottom: 24px; }

/* --------------------------------------------------------------- how ---- */
.how { padding-block: clamp(5rem, 16vh, 10rem) clamp(5rem, 14vh, 9rem); }
.how__h { font-size: var(--sc-t-2xl); line-height: 1.06; }
.how__h .half--hand { color: color-mix(in oklab, var(--sc-ink) 72%, var(--hand)); }
.how__body { margin-top: clamp(1.5rem, 4vh, 2.5rem); align-items: start; }
.plain { margin: 0; padding: 0; list-style: none; color: var(--sc-ink-soft); }
.plain li { padding: 10px 0; text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--sc-ink) 30%, transparent); }
.plain li + li { box-shadow: 0 -1px 0 color-mix(in oklab, var(--sc-ink) 10%, transparent); }
.steps { margin: var(--sc-6) 0 0; }
.steps div + div { margin-top: var(--sc-5); }
.steps dt { font-weight: 650; font-size: var(--sc-t-lg); letter-spacing: -0.015em; }
.steps dd { margin: 4px 0 0; color: var(--sc-ink-soft); line-height: 1.55; }
.facts { margin: var(--sc-7) 0 0; display: grid; grid-template-columns: auto 1fr; column-gap: 24px; }
.facts div { display: contents; }
.facts dt, .facts dd { padding: 10px 0; box-shadow: 0 -1px 0 var(--line); margin: 0; }
.facts dt { font-size: var(--sc-t-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sc-ink-soft); padding-top: 13px; }
.facts dd { font-weight: 550; }

/* ------------------------------------------------------------- close ---- */
.close { display: flex; }
.close__grid { flex: 1; align-items: center; }
.close__left { position: relative; height: 100%; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.close__ask {
  position: absolute; left: var(--sc-gutter); top: clamp(5rem, 14vh, 8rem); margin: 0;
  font-size: var(--sc-t-xl); font-weight: 650; letter-spacing: var(--sc-track-snug);
}
.close__scene { position: absolute; inset: 0; }
.founder { position: absolute; left: 50%; bottom: 0; margin: 0; height: min(82vh, 720px); aspect-ratio: 900 / 1011; translate: -50% 0; }
.founder__light {
  position: absolute; left: 50%; top: -6%; width: 92%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--teal) 30%, white) 0%, color-mix(in oklab, var(--teal) 12%, transparent) 55%, transparent 100%);
  opacity: var(--light, 0.4);
}
.founder__cut {
  position: relative; display: block; width: 100%; height: 100%; object-fit: contain; object-position: bottom;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  opacity: 0; transition: opacity 400ms var(--sc-ease-out);
}
.founder__cut.is-loaded { opacity: 1; }
.founder__tag {
  position: absolute; right: 2%; bottom: 20%;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 16px; border-radius: 14px;
  background: var(--sc-surface); box-shadow: var(--sc-e2), var(--sc-edge);
}
.founder__tag b { font-size: 15px; letter-spacing: -0.01em; }
.founder__tag span { font-size: 12.5px; color: var(--sc-ink-soft); }
.pile { position: absolute; left: 50%; top: 62%; width: 0; height: 0; pointer-events: none; }
.pile__item {
  position: absolute; left: 50%; top: 50%; width: 190px; height: 74px; margin: -37px 0 0 -95px;
  border-radius: 12px;
  transform: translate3d(
    calc(var(--sx) + (var(--ex) - var(--sx)) * var(--k, 0)),
    calc(var(--sy) + (var(--ey) - var(--sy)) * var(--k, 0)), 0);
}
.pile__item .dual__face { padding: 12px 16px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: 12.5px; color: var(--sc-ink-soft); }
.pile__item .dual__face b { font-size: 18px; color: var(--sc-ink); letter-spacing: -0.02em; }
.pile__item .dual__face--built span { color: var(--sc-accent); font-weight: 600; }
.pile__item .sticky { border-radius: 12px; }
.pile__item .sticky p { font-size: 16px; }
.pile__item--1 { --sx: -40px; --sy: -60px; --ex: 170px;  --ey: -260px; }
.pile__item--2 { --sx: 34px;  --sy: 6px;   --ex: 225px;  --ey: -40px; }
.pile__item--3 { --sx: -24px; --sy: 74px;  --ex: -165px; --ey: 95px; }

.close__right { display: flex; flex-direction: column; align-items: flex-start; }
.close__h { font-size: var(--sc-t-3xl); line-height: 1.02; }
.close__right .sc-body { margin-top: var(--sc-4); max-width: 27rem; }
.close__right .btn { margin-top: var(--sc-6); }
.foot {
  margin-top: clamp(3rem, 10vh, 6rem); display: flex; align-items: center; gap: 10px;
  font-size: var(--sc-t-xs); color: var(--sc-ink-soft);
}
.foot svg { width: 22px; height: auto; }

/* ------------------------------------------------------------ mobile ---- */
@media (max-width: 860px) {
  :root { --inner: var(--sc-gutter); }
  .ground__hand { display: none; }
  .halves { grid-template-columns: 1fr; }
  .half--hand, .half--built { padding: 0 var(--sc-gutter); }
  .tagged > .half::before {
    display: block; margin-bottom: 8px;
    font: 600 11px/1 var(--sc-font-text); letter-spacing: var(--sc-track-wide); text-transform: uppercase;
  }
  .tagged > .half--hand::before { content: "By hand"; color: var(--sc-ink-soft); }
  .tagged > .half--built::before { content: "Built"; color: var(--sc-accent); }

  /* chrome becomes a dock: one action, hidden where the page already shows it */
  .divider__rail { display: none; }
  .divider__cta { bottom: max(16px, env(safe-area-inset-bottom)); box-shadow: var(--sc-e3); transition: opacity var(--sc-d-base) var(--sc-ease-out), translate var(--sc-d-base) var(--sc-ease-out); }
  .dock-hidden .divider__cta { opacity: 0; translate: -50% 12px; pointer-events: none; }

  /* zones run their own seam on a phone */
  .zone-hand { display: block; position: absolute; inset: 0; background: var(--hand); clip-path: inset(0 calc(100% - var(--zseam, 50%)) 0 0); z-index: 0; pointer-events: none; }
  .zone-seam { display: block; position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: color-mix(in oklab, var(--sc-ink) 26%, transparent); transform: translateX(var(--zseam, 50vw)); z-index: 3; pointer-events: none; }
  .hero > *:not(.zone-hand):not(.zone-seam):not(.hero__portrait):not(.hero__scene), .close > *:not(.zone-hand):not(.zone-seam) { position: relative; z-index: 1; }
  /* in the hero the seam only crosses the sheet, never the headline */
  .hero > .zone-hand, .hero > .zone-seam { display: none; }
  .hero__scene::before, .hero__scene::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; pointer-events: none; }
  .hero__scene::before { right: 0; background: var(--hand); clip-path: inset(0 calc(100% - var(--zseam, 50%)) 0 0); border-radius: 18px 0 0 18px; }
  .hero__scene::after { width: 1px; background: color-mix(in oklab, var(--sc-ink) 30%, transparent); transform: translateX(var(--zseam, 50vw)); z-index: 3; }
  .pile__item--3 { display: none; }

  .hero { padding-top: 14px; }
  .hero__brand { height: 44px; }
  .hero__h1 { margin-top: 1.25rem; font-size: clamp(2rem, 1.2rem + 3.6vw, 2.6rem); }
  .hero__h1 .half + .half { margin-top: 0.9rem; }
  .hero__sub { margin-top: 0.75rem; }
  .hero__sub .half + .half { margin-top: 0.75rem; }
  .hero__sub p { font-size: 15px; }
  .hero__actions { margin-top: 1rem; }
  .hero__scene { margin-top: 0.75rem; min-height: 230px; }
  .sheet { --card-w: min(80vw, 330px); left: var(--sc-gutter); top: auto; bottom: 16px; translate: none; }
  .sheet::after { content: ""; position: absolute; top: -10px; bottom: -10px; left: 0; width: 2px; background: var(--teal); transform: translateX(calc(var(--cut, 50%) - 1px)); z-index: 2; pointer-events: none; }
  .hero__scene::before, .hero__scene::after { display: none; }
  .hero__sub .half--hand { display: none; }
  .hero__portrait { right: -14vw; height: 50svh; }
  /* the sheet anchors to the bottom of the screen, in front of the photo */
  .hero > .hero__scene { position: static; flex: none; min-height: 0; margin: 0; }
  .hero > .hero__portrait { position: absolute; z-index: 2; }
  .hero .plane { z-index: 3; }
  .hero .sheet { position: absolute; }
  .xl__grid tbody tr:nth-child(n+5) { display: none; }
  .plane--far { display: none; }
  .sticky--hero { left: auto; right: 10px; top: auto; bottom: 22px; width: 124px; font-size: 12px; padding: 9px 11px; rotate: 4deg; }
    .toast--hero .toast__icon { width: 24px; height: 24px; background-size: 18px; }
  .xl__grid th, .xl__grid td { padding: 5px 6px; font-size: 10.5px; }
  .xl__grid td:nth-child(2), .xl__grid th:nth-child(2) { max-width: 82px; overflow: hidden; text-overflow: ellipsis; }
  .dash { padding: 12px 14px; gap: 10px; }
  .dash__kpis { gap: 6px; }
  .dash__kpis div { padding: 8px 9px; }
  .dash__kpis small { font-size: 10.5px; }
  .dash__legend { font-size: 10.5px; gap: 4px 10px; }

  .hours__h .half + .half { margin-top: 0.4rem; }
  .row { padding-top: 3rem; }
  .row .half--hand { background: var(--hand); padding-block: 2rem 2.25rem; }
  .row .half--built { padding-block: 2rem 0; }
  .board__row { grid-template-columns: 1fr 3.5rem 6.5rem; gap: 10px; font-size: 13px; }

  .play { padding-top: 4.5rem; }
  .play__h .half + .half { margin-top: 0.3rem; }
  .play__hint { padding-left: var(--sc-gutter); }
  .hint--fine { display: none; } .hint--touch { display: inline; }
  .tickets { flex: none; display: flex; flex-direction: column; gap: 14px; padding: 0 var(--sc-gutter); }
  .ticket { position: relative; left: auto; top: auto !important; width: 100%; height: 118px; cursor: default; }
  .ticket__grip {
    right: auto; left: 0; translate: calc(var(--cut, 100%) - 15px) -50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10 3.5 5.5 8l4.5 4.5' fill='none' stroke='%23072D55' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .ticket::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--teal); transform: translateX(calc(var(--cut, 100%) - 1px)); pointer-events: none; opacity: 0.8; }
  .ticket.is-run::after { opacity: 0; }
  .play__sample { position: static; margin: 12px var(--sc-gutter) 0; }

  .how__h .half + .half { margin-top: 0.4rem; }
  .how__body .half--built { margin-top: 2.5rem; }

  .close { flex-direction: column; justify-content: center; }
  .close__grid { flex: none; gap: 1.5rem; }
  .close__left { height: auto; flex-direction: column; }
  .close__ask { position: static; font-size: var(--sc-t-lg); margin-bottom: 1rem; align-self: flex-start; }
  .close__scene { position: relative; inset: auto; height: 44svh; width: 100%; }
  .founder__tag { right: -2%; bottom: 4%; padding: 7px 12px; }
  .founder__tag b { font-size: 13px; }
  .founder__tag span { font-size: 11px; }
  .founder { height: 100%; }
  .pile__item { width: 150px; height: 60px; margin: -30px 0 0 -75px; }
  .pile__item .dual__face { padding: 8px 12px; font-size: 11px; }
  .pile__item .dual__face b { font-size: 15px; }
  .pile { top: 66%; }
  .pile__item--1 { --sx: -24px; --sy: -44px; --ex: -104px; --ey: -96px; }
  .pile__item--2 { --sx: 22px;  --sy: 4px;   --ex: 104px;  --ey: -44px; }
  .pile__item--3 { --sx: -18px; --sy: 50px;  --ex: -96px;  --ey: 40px; }
  .close__h { font-size: var(--sc-t-2xl); }
  .foot { margin-top: 1.75rem; }
}

@media (max-width: 860px) and (max-height: 700px) {
  .hero__sub .half--hand { display: none; }
  .hero__scene { display: none; }
  .hero > .hero__portrait { height: 36svh; right: -10vw; }
  .close__scene { height: 36svh; }
  .close__ask { display: none; }
}


/* --------------------------------------------------------- booking form -- */
.book-open { overflow: hidden; }
.book {
  margin: 0 0 0 auto; padding: 0; border: 0; background: transparent;
  width: min(500px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  color: var(--sc-ink);
}
.book::backdrop { background: hsl(212 60% 14% / 0.32); }
.book[open] { animation: book-in 240ms var(--sc-ease-out); }
.book[open]::backdrop { animation: fade-in 240ms var(--sc-ease-out); }
@keyframes book-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes fade-in { from { opacity: 0; } }
.book__panel {
  position: relative; box-sizing: border-box; height: 100%; overflow-y: auto;
  background: var(--sc-surface); padding: clamp(24px, 4vh, 40px) clamp(22px, 3vw, 36px) 28px;
  box-shadow: -24px 0 60px -30px hsl(var(--sc-shadow-color) / 0.45);
}
.book__x {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--sc-canvas); cursor: pointer; display: grid; place-items: center;
  transition: background-color var(--sc-d-fast) var(--sc-ease-out), transform var(--sc-d-fast) var(--sc-ease-out);
}
.book__x svg { width: 14px; height: 14px; fill: none; stroke: var(--sc-ink); stroke-width: 1.8; stroke-linecap: round; }
.book__x:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .book__x:hover { background: var(--hand); } }
.book__head { display: flex; gap: 14px; align-items: flex-start; padding-right: 44px; }
.book__head h2 { font-size: var(--sc-t-xl); line-height: 1.1; }
.book__head p { margin: 6px 0 0; color: var(--sc-ink-soft); line-height: 1.5; font-size: var(--sc-t-sm); }
.book__form { margin-top: clamp(20px, 3.5vh, 32px); display: flex; flex-direction: column; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; }
.field label em { font-style: normal; font-weight: 450; color: var(--sc-ink-soft); margin-left: 4px; }
.field input, .field textarea {
  font: inherit; font-size: 15px; color: var(--sc-ink); background: var(--sc-surface);
  border: 1px solid color-mix(in oklab, var(--sc-ink) 22%, transparent); border-radius: 10px;
  padding: 11px 13px; min-height: 46px; box-sizing: border-box; width: 100%;
  transition: border-color var(--sc-d-fast) var(--sc-ease-out), box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.field textarea { resize: vertical; min-height: 104px; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in oklab, var(--sc-ink-soft) 80%, white); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sc-accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--sc-accent) 22%, transparent); }
.field__m { font-size: 12.5px; color: var(--sc-ink-soft); }
.field:not(.is-bad) .field__m:not(#f-msg-m) { display: none; }
.field.is-bad input, .field.is-bad textarea { border-color: #A2392B; }
.field.is-bad .field__m { color: #A2392B; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.book__err { margin: 0; padding: 12px 14px; border-radius: 10px; background: #FBEDEA; color: #7A2E22; font-size: 14px; line-height: 1.45; }
.book__err a { color: inherit; font-weight: 600; }
.book__send { align-self: flex-start; margin-top: 4px; }
.book__send:disabled { opacity: 0.7; cursor: progress; }
.book__fine { margin: 0; font-size: 12.5px; color: var(--sc-ink-soft); }
.book__done { margin-top: clamp(28px, 6vh, 56px); outline: none; }
.book__done h3 { font-size: var(--sc-t-xl); margin-top: 18px; }
.book__done p { color: var(--sc-ink-soft); line-height: 1.55; margin: 8px 0 24px; }
.book__done b { color: var(--sc-ink); }
.tick--lg { display: block; width: 44px; height: 44px; }

@media (max-width: 860px) {
  .book { margin: auto 0 0; width: 100vw; height: 94dvh; max-height: 94dvh; }
  .book[open] { animation-name: book-up; }
  @keyframes book-up { from { opacity: 0; transform: translateY(32px); } }
  .book__panel { border-radius: 20px 20px 0 0; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .book[open], .book[open]::backdrop { animation: none; } }

/* ---------------------------------------------------- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .plane { translate: none !important; }
  .ground__glow { translate: none; }
  .ground__hand { transition: opacity 260ms linear; }
}
