/* The phone deck (js/deck.js). Every rule here is under html.dk, which only a phone with the scene running gets:
   one screen per stop, things side by side in rails, nothing scrolling on its own. */

html.dk { scroll-padding-top: 0; touch-action: pan-x pinch-zoom; --dk-top: 78px; --dk-foot: calc(18px + env(safe-area-inset-bottom)); }
html.dk.dk-typing, html.dk.dk-zoomed { touch-action: auto; } /* (the keyboard is up, or the page is pinched larger: it may move freely) */
html.dk body { overscroll-behavior-y: none; }
html.dk .dk-page { height: var(--dk-h, 100svh); min-height: 0; box-sizing: border-box; position: relative; }
html.dk .prog { display: none; }

/* ---------------------------------------------------------------- the line along the top: one tick per screen */
.dk-prog { display: none; }
html.dk .dk-prog { display: block; position: fixed; left: 0; right: 0; top: 0; height: 12px; z-index: 41; pointer-events: none; }
html.dk .dk-prog i { position: absolute; top: 3px; display: block; }
html.dk .dk-ln { left: 12px; right: 12px; height: 1px; background: rgba(238,233,223,.16); }
html.dk .dk-done { left: 0; width: 100%; height: 1px; background: linear-gradient(90deg, rgba(58,120,255,0) 12px, rgba(58,120,255,.55) 40%, #8ab8ff); transform-origin: 0 50%; transform: scaleX(0); }
html.dk .dk-tk { left: 0; width: 1px; height: 5px; margin-top: -2px; background: rgba(238,233,223,.32); transition: background .3s, height .3s; }
html.dk .dk-tk.st { height: 7px; margin-top: -3px; background: rgba(58,120,255,.6); }
html.dk .dk-tk.past { background: rgba(138,184,255,.7); }
html.dk .dk-tk.on { background: #fff; }
html.dk .dk-ball { left: -3.5px; top: 0 !important; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff, #a9c8ff 55%, #3a78ff); box-shadow: 0 0 0 2px rgba(58,120,255,.28), 0 0 12px 1px rgba(58,120,255,.9); }

/* ---------------------------------------------------------------- rails: a stop with several things slides sideways */
html.dk .dk-rail { touch-action: pan-x pinch-zoom; flex-shrink: 0; display: flex !important; flex-wrap: nowrap; align-items: stretch; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); padding: 2px var(--gut) 2px; margin-inline: calc(-1 * var(--gut)); list-style: none; scrollbar-width: none; overscroll-behavior-x: contain; grid-template-columns: none; border: 0; }
html.dk .dk-rail::-webkit-scrollbar { display: none; }
html.dk.dk-typing .dk-rail, html.dk.dk-zoomed .dk-rail { touch-action: auto; }
html.dk .dk-rail > * { flex: 0 0 min(84%, 420px); min-width: 0; scroll-snap-align: start; }
html.dk .dk-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
html.dk .dk-dots i { width: 12px; height: 2px; background: rgba(238,233,223,.24); transition: width .35s var(--out), background .35s; }
html.dk .dk-dots i.on { width: 26px; background: var(--signal); box-shadow: 0 0 8px rgba(58,120,255,.7); }

/* a screen of words reads against a calmed scene */
html.dk .dk-page:not(.hero):not(.ch):not(.ftr)::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(10,10,11,.2) 0%, rgba(10,10,11,.74) 24%, rgba(10,10,11,.82) 74%, rgba(10,10,11,.3) 100%); }
html.dk .dk-page:not(.hero):not(.ch):not(.ftr) { isolation: isolate; }

/* ---------------------------------------------------------------- the hero */
html.dk .hero { min-height: 0; }

/* ---------------------------------------------------------------- where you are: four cards side by side */
html.dk .stages { min-height: 0; display: flex; flex-direction: column; justify-content: center; padding: var(--dk-top) var(--gut) var(--dk-foot); }
html.dk .stages::before { display: none; }
html.dk .stages-hd { display: block; margin: 0 0 20px; }
html.dk .stages .eyebrow { margin-bottom: 12px; }
html.dk .stages h2 { font-size: clamp(34px, 10vw, 44px); }
html.dk .stg-track::before, html.dk .stg-track::after, html.dk .stg::before { display: none; }
html.dk .stg { padding-top: 0; }
html.dk .stg-card { padding: 18px 18px 16px; -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(12,12,14,.94); }
html.dk .stg-p { display: block; font-size: 14.5px; }
html.dk .stg h3 { font-size: 24px; margin-bottom: 10px; }

/* ---------------------------------------------------------------- services: the intro, then the ideas as six cards */
html.dk .svc-intro { display: block; min-height: 0; padding: 0; }
html.dk .svc-intro-in { max-width: none; display: flex; flex-direction: column; justify-content: center; padding: var(--dk-top) var(--gut) var(--dk-foot); }
html.dk .svc-intro-in::before { display: none; }
html.dk .svc-intro h2 { font-size: clamp(40px, 11.5vw, 52px); margin-bottom: 16px; }
html.dk .svc-private { margin: 22px 0 0; }
html.dk .svc-board { display: flex; flex-direction: column; justify-content: center; max-width: none; padding: var(--dk-top) var(--gut) var(--dk-foot); }
html.dk .board-view { display: none; }
html.dk .board-intro { margin: 2px 0 14px; font-size: 15px; }
html.dk .dk-lanes .blane { flex-basis: min(90%, 440px); display: flex; flex-direction: column; gap: 12px; padding: 16px 14px 14px; border: 1px solid var(--hair2); background: rgba(12,12,14,.94); }
html.dk .dk-lanes .blane.private { border-color: rgba(58,120,255,.6); background: linear-gradient(160deg, rgba(22,34,64,.96), rgba(12,12,14,.95) 60%); }
html.dk .dk-lanes .lane-tog { display: none; }
html.dk .dk-lanes .lane-k { display: flex; align-self: flex-start; align-items: baseline; gap: 9px; padding: 0 0 10px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--hair); box-shadow: none; font: 700 19px/1.15 var(--sans); font-stretch: 88%; }
html.dk .dk-lanes .lane-k b { font-size: 11px; }
/* a service's ideas are one grid, two to a row (the board's two looping rows run on as one) */
html.dk .dk-lanes .lane-rows { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 0; }
html.dk .dk-lanes .lane-v, html.dk .dk-lanes .lane-t { display: contents; }
html.dk .dk-lanes .lane-t[aria-hidden] { display: none; } /* (the looping copy belongs to the moving board) */
html.dk .dk-lanes .lane-t li { display: flex; }
html.dk .dk-lanes .idea { width: 100%; min-height: 36px; font-size: 12.5px; line-height: 1.18; padding: 5px 8px; white-space: normal; text-align: left; justify-content: space-between; }
html.dk .dk-lanes .idea::after { margin-left: 6px; }
html.dk .board-ft { margin-top: 14px; }
html.dk .bf-bespoke span { font-size: 13px; }
@media (max-height: 720px) { html.dk .bf-bespoke { display: none; } html.dk .svc-board { padding-top: 70px; } html.dk .board-ft { margin-top: 10px; padding-top: 10px; } }
@media (max-height: 600px) { html.dk .board-intro { display: none; } } /* (a very short phone: the + on every idea says it) */

/* ---------------------------------------------------------------- the six stations: the machine fills the screen above a short caption */
html.dk .ch { min-height: 0; justify-content: flex-end; padding: 0 12px var(--dk-foot); }
html.dk .ch-card { position: relative; top: auto; bottom: auto; width: 100%; padding: 14px 16px 10px; background: rgba(10,10,11,.9); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.dk .ch-hd { padding-bottom: 8px; margin-bottom: 10px; }
html.dk .ch h3 { font-size: 27px; margin-bottom: 7px; }
html.dk .ch-card > p.ch-desc { font-size: 14.5px; line-height: 1.42; margin: 0 0 8px; }
html.dk .ch-card > p.ch-stat { display: none; }
html.dk .ch-acts { gap: 2px 22px; }
html.dk .ch-more { margin-top: 10px; padding: 12px 14px 14px; }
/* a short phone: the panel takes the description's place while it is open */
@media (max-height: 760px) { html.dk .ch-card:has(.ch-more:not([hidden])) > p.ch-desc { display: none; } }
html.dk .ch-card.dk-tight:has(.ch-more:not([hidden])) > :is(.ch-hd, p.ch-desc) { display: none; }
html.dk .ch-card.dk-tight:has(.ch-more:not([hidden])) h3 { font-size: 23px; margin-bottom: 4px; }
@media (max-height: 600px) {
  html.dk .ch-card:has(.ch-more:not([hidden])) > .ch-hd { display: none; }
  html.dk .ch-more { padding: 10px 12px 12px; }
  html.dk .ch-card > .ch-more .cm-k { margin: 10px 0 6px; }
  html.dk .ch-more li, html.dk .ch-card > .ch-more .cm-first { font-size: 13.5px; }
}

/* ---------------------------------------------------------------- why it's worth it: three figures side by side */
html.dk .finale { min-height: 0; align-items: center; padding: var(--dk-top) var(--gut) var(--dk-foot); }
html.dk .finale::before { display: none; }
html.dk .fin-in::before { display: none; }
html.dk .finale h2 { font-size: clamp(38px, 10.6vw, 48px); }
html.dk .fin-stats { margin-top: 18px; }
html.dk .fin-stats li, html.dk .fin-stats li:nth-child(n+3) { display: flex; padding: 18px 16px 16px; border: 1px solid var(--hair2); background: rgba(12,12,14,.92); }
html.dk .fin-stats li b, html.dk .fin-stats li.lead b { font-size: 60px; }
html.dk .fin-stats li span, html.dk .fin-stats li.lead span { font-size: 15px; }
html.dk .finale .actions { margin-top: 22px; }

/* ---------------------------------------------------------------- how we work: three screens */
html.dk #approach.paper { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.dk .paper-in { padding: 0; }
html.dk .dk-ap, html.dk #approach .start, html.dk #approach .faq { display: flex; flex-direction: column; justify-content: center; padding: var(--dk-top) var(--gut) var(--dk-foot); }
html.dk .dk-page.dk-ap::after, html.dk #approach .dk-page::after { display: none; } /* (the plate is its own backing) */
html.dk #approach .form-hd { padding-bottom: 18px; }
html.dk #approach h2 { font-size: clamp(38px, 10.6vw, 48px); }
html.dk #approach .steps { margin-top: 20px; }
html.dk #approach .steps > .route { display: none; }
html.dk #approach .steps > .step { padding: 14px; border: 1px solid var(--hair2); background: rgba(16,16,18,.7); }
html.dk #approach .step-hd { margin: 12px 0 8px; }
html.dk #approach .steps > .step > p { font-size: 15px; line-height: 1.45; }
html.dk .start-faq { display: block; margin: 0; }
html.dk #approach .start h3, html.dk #approach .faq h3 { margin: 0 0 18px; font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.03em; font-stretch: 84%; }
html.dk .faq details, html.dk .faq details:last-child { padding: 16px 16px 6px; border: 1px solid var(--hair2); background: rgba(16,16,18,.7); }
html.dk .faq summary { padding: 0 30px 10px 0; font-size: 18px; }
html.dk .faq summary::after { top: -3px; right: 0; }
html.dk .faq details p { margin: 0 0 12px; animation: none; }

/* ---------------------------------------------------------------- book a call: the form fits the screen */
html.dk .contact { min-height: 0; align-items: center; padding: var(--dk-top) var(--gut) var(--dk-foot); }
html.dk .contact-in { gap: 16px; }
html.dk .ct-copy::before { display: none; }
html.dk .contact h2 { font-size: clamp(36px, 10vw, 44px); margin-bottom: 10px; }
html.dk .ct-copy p:not(.eyebrow) { font-size: 15px; }
html.dk .ct-copy .eyebrow { margin-bottom: 12px; }
html.dk .prompt { padding: 2px 14px 16px; }
html.dk .prompt-hd { display: none; }
html.dk .prompt .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
html.dk .prompt label { padding-top: 12px; font-size: 13px; }
html.dk .prompt input, html.dk .prompt select, html.dk .prompt textarea { margin-top: 6px; padding: 9px 10px; }
html.dk .prompt textarea { min-height: 76px; height: 76px; resize: none; }
html.dk .prompt textarea:placeholder-shown { overflow-y: hidden; } /* (an empty box has nothing to scroll: the swipe belongs to the deck) */
@media (max-height: 700px) { html.dk .contact .eyebrow { display: none; } }
@media (max-height: 620px) { html.dk .ct-copy p:not(.eyebrow) { display: none; } }
/* a field drawn under 16px makes an iPhone zoom in on it: a screen drawn smaller gives its fields the difference back */
html.dk .contact :is(input, select, textarea) { font-size: calc(16px / var(--dk-z, 1)); }
html.dk .submit-row { margin-top: 14px; gap: 10px 16px; }
html.dk .submit-row .note { font-size: 11px; }
/* the email draft takes the form's place */
html.dk .prompt:has(.result:not([hidden])) > :not(.result) { display: none; }
html.dk .result { margin-top: 10px; padding-top: 12px; border-top: 0; }
html.dk .result pre { max-height: 34vh; touch-action: pan-y; }
html.dk .res-actions { flex-wrap: wrap; gap: 10px 20px; }

/* ---------------------------------------------------------------- the footer is the last screen */
html.dk .ftr { display: flex; flex-direction: column; justify-content: flex-end; padding-top: var(--dk-top); }
html.dk .ftr.dk-page { height: auto; min-height: var(--dk-h, 100svh); }
html.dk .ftr-in { padding-top: 8px; }


/* ================================================================ the finish: the deck in motion */

/* ---------------------------------------------------------------- the seam: a contour line passes as the page travels */
.dk-seam { display: none; }
html.dk .dk-seam { display: block; position: absolute; left: 0; width: calc(100% + 220px); top: -7px; height: 14px; will-change: transform; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 14'><path d='M0 7C37 1 73 1 110 7S183 13 220 7' fill='none' stroke='%238ab8ff' stroke-width='1.3'/></svg>") 0 50% / 220px 14px repeat-x;
  filter: drop-shadow(0 0 5px rgba(58,120,255,.95)); }
html.dk.dk-moving .dk-seam { opacity: 1; transition-duration: .12s; animation: dkSeam 1.4s linear infinite; }
@keyframes dkSeam { to { transform: translateX(-220px); } }

/* ---------------------------------------------------------------- arriving: a screen builds as it comes in (deck.js marks it .dk-here) */
html.dk.dk-measure .dk-page * { translate: none !important; transition: none !important; }
html.dk .split .si { transition-duration: .75s; transition-delay: calc(var(--i) * 40ms + 70ms); }
html.dk .split:not(.in) .si { transition-duration: .2s; transition-delay: 0s; }
html.dk .dk-page:not(.hero):not(.ch) :is(.eyebrow, .dk-rail, .dk-dots, .svc-private, .board-intro, .board-ft, .finale .actions, .start-steps > li, .start > .btn, .prompt, .ct-copy > p:not(.eyebrow), .svc-intro-in > p:not(.eyebrow), .ftr-in, .ftr-base, .ftr-note) {
  opacity: 0; transition: opacity .25s ease, translate 0s linear .25s; } /* (leaving: a quick fade, no movement) */
html.dk .dk-page:not(.dk-here) .eyebrow { translate: -18px 0; }
html.dk .dk-page:not(.dk-here) .dk-rail { translate: 44px 0; }
html.dk .dk-page:not(.dk-here):not(.hero):not(.ch) :is(.svc-private, .board-intro, .board-ft, .finale .actions, .start-steps > li, .start > .btn, .prompt, .ct-copy > p:not(.eyebrow), .svc-intro-in > p:not(.eyebrow), .ftr-in, .ftr-base) { translate: 0 18px; }
html.dk .dk-page.dk-here:not(.hero):not(.ch) :is(.eyebrow, .dk-rail, .dk-dots, .svc-private, .board-intro, .board-ft, .finale .actions, .start-steps > li, .start > .btn, .prompt, .ct-copy > p:not(.eyebrow), .svc-intro-in > p:not(.eyebrow), .ftr-in, .ftr-base, .ftr-note) {
  opacity: 1; translate: none; transition: opacity .5s var(--out) var(--bd, 0s), translate .7s var(--out) var(--bd, 0s); }
html.dk .dk-here :is(.svc-intro-in > p:not(.eyebrow), .ct-copy > p:not(.eyebrow), .board-intro) { --bd: .12s; }
html.dk .dk-here :is(.dk-rail, .prompt) { --bd: .16s; }
html.dk .dk-here :is(.svc-private, .board-ft, .finale .actions, .start > .btn, .ftr-base) { --bd: .3s; }
html.dk .dk-here .dk-dots { --bd: .42s; }
html.dk .dk-here .start-steps > li:nth-child(1) { --bd: .1s; } html.dk .dk-here .start-steps > li:nth-child(2) { --bd: .18s; } html.dk .dk-here .start-steps > li:nth-child(3) { --bd: .26s; }
html.dk .dk-here .ftr-note { --bd: .4s; }

/* ---------------------------------------------------------------- rails with depth: the card in place full size and bright */
html.dk .dk-rail { position: relative; }
html.dk .dk-rail > * { scale: calc(.93 + .07 * var(--c, 1)); transform-origin: 0 50%; filter: brightness(calc(.48 + .52 * var(--c, 1))); }

/* ---------------------------------------------------------------- the spark on the line: a trail while it moves, a ring where it lands */
html.dk .dk-tail { left: 0; width: 100px; height: 3px; top: 2px !important; border-radius: 2px; transform-origin: 0 50%; background: linear-gradient(90deg, rgba(58,120,255,0), rgba(138,184,255,.95)); }
html.dk .dk-tail.rev { background: linear-gradient(270deg, rgba(58,120,255,0), rgba(138,184,255,.95)); }
html.dk .dk-pulse { left: -6.5px; top: -3px !important; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.9); opacity: 0; }
html.dk .dk-pulse.st { border-color: var(--signal); box-shadow: 0 0 12px rgba(58,120,255,.95); }

/* ---------------------------------------------------------------- a station's caption: what its machine is doing now */
.dk-now { display: none; }
html.dk .ch-hd { align-items: center; }
html.dk .dk-now { position: relative; display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 74%; margin-left: auto; padding-bottom: 6px; font: 500 10.5px/1.25 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--bone); opacity: 0; transition: opacity .35s; }
html.dk .dk-now.on { opacity: 1; }
html.dk .dk-now-live { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); animation: live 1.4s ease-in-out infinite; }
html.dk .dk-now-t { flex: 1; min-width: 0; overflow: hidden; }
html.dk .dk-now-t span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.dk .dk-now-k { flex: none; font-weight: 500; color: var(--ember); }
html.dk .dk-now-bar { position: absolute; left: 13px; right: 0; bottom: 0; height: 1.5px; background: rgba(238,233,223,.14); }
html.dk .dk-now-bar u { display: block; height: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 6px rgba(58,120,255,.9); }
.leaders .dk-lead { opacity: 0; }
html.dk-moving .leaders .dk-lead { opacity: 0 !important; }
.leaders .dk-lead path { stroke: var(--signal); stroke-width: 1.4; stroke-linejoin: round; stroke-dasharray: 5 4; animation: march .8s linear infinite; filter: drop-shadow(0 0 3px rgba(58,120,255,.85)); }
.leaders .dk-lead .ring { stroke: var(--signal); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ping 1.6s var(--out) infinite; }
.leaders .dk-lead .pg { fill: none; stroke: #b9d3ff; stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; }
.leaders .dk-lead .dot { fill: #fff; }

@media (prefers-reduced-motion: reduce) {
  html.dk .dk-seam, html.dk .dk-now-live, .leaders .dk-lead path, .leaders .dk-lead .ring { animation: none; }
}
