/*
 * Kai Dojo marketing site.
 *
 * ---------------------------------------------------------------------------
 * THE COLOUR RULE
 *
 * One gradient carries the identity — cyan to violet, the same one in the
 * wordmark. It is spent on the wordmark, the scroll rail, and two headline
 * phrases on the whole site. Everywhere else, emphasis comes from weight and
 * size, because a gradient used on every heading stops being a signature and
 * becomes a tic.
 *
 * Two exceptions:
 *   - WhatsApp green (#25d366) inside chat mockups. A WhatsApp screenshot
 *     that is not WhatsApp green is not a WhatsApp screenshot.
 *   - Cortex Lab teal (#2dd4bf) on the About page's parent-company band, and
 *     nowhere else. It marks a change of subject, not an accent.
 *
 * ---------------------------------------------------------------------------
 * DARK ONLY
 *
 * Picked from the use scene, not the category: a gym owner reading this at
 * 11pm on a phone, which is the exact moment the product exists for. There is
 * no prefers-color-scheme rule and no light palette.
 * ---------------------------------------------------------------------------
 */

:root {
  --ground: #05070d;
  --ground-2: #070b14;
  --panel: #0a0f1a;
  --panel-2: #0e1523;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --ink: #f4f7fb;
  --ink-2: #94a6bf;
  /* Calibrated against --panel-2, the lightest surface it sits on: 4.76:1
     there, 5.24:1 on the ground. The deck's #5d6c85 measures 3.79:1 and fails
     AA for small text — fine for a projected slide, not for a phone in
     daylight. */
  --ink-3: #74839c;
  --cyan: #01c8fd;
  --blue: #1880fd;
  --violet: #611dfb;

  /* The identity gradient, exactly as the deck defines it. */
  --grad: linear-gradient(100deg, #01c8fd 0%, #1880fd 45%, #611dfb 100%);
  /* Ends at a lighter violet: the deck's endpoint measures 2.95:1 as text on
     this ground, which misses even the 3:1 large-text floor. */
  --grad-ink: linear-gradient(100deg, #01c8fd 0%, #1880fd 48%, #7c3aed 100%);
  /* Stops at blue, so a dark button label never sits below 5.35:1. */
  --grad-btn: linear-gradient(100deg, #01c8fd 0%, #1880fd 100%);

  --wa: #25d366;
  --wa-bubble: #0d5c46;

  --display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', sans-serif;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --shell: 74rem;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
  accent-color: #1880fd;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #2a3446 var(--ground);
  /* Sections settle one at a time instead of overlapping. */
  scroll-snap-type: y proximity;
  scroll-padding-top: 4rem;
}

/*
 * Firm snapping only where a section actually fits the screen. Measured at
 * 1440x860 every section's content is under 730px, so a snapped position shows
 * exactly one section and nothing else — which is the point. At 390x780 five
 * of the nine are taller than the screen, and mandatory there would stop
 * someone reaching the bottom of what they are reading. Proximity for them.
 */
@media (min-width: 940px) and (min-height: 800px) {
  html { scroll-snap-type: y mandatory; }
}

/* Snapping needs a viewport to snap to. On a short screen, or for anyone who
   asked for less motion, it is off entirely. */
@media (max-height: 640px), (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--cyan);
}

/* The parts we did not draw still carry the design. */
::selection { background: rgba(1, 200, 253, 0.3); color: #fff; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: #2a3446; border-radius: 99px; border: 3px solid var(--ground); }
::-webkit-scrollbar-thumb:hover { background: #3a4760; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.028em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 1.5rem + 4.6vw, 5.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3.4rem); letter-spacing: -0.032em; }
h3 { font-size: clamp(1.15rem, 1.02rem + 0.62vw, 1.45rem); letter-spacing: -0.02em; }
h4 { font-size: 1.02rem; letter-spacing: -0.012em; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
img, svg, video { max-width: 100%; }

/* Emphasis is weight and size. The gradient is spent deliberately, twice on
   this page, and is never the way a heading gets loud. */
.grad-text {
  background: var(--grad-ink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.08rem, 1rem + 0.5vw, 1.32rem);
  line-height: 1.52;
  color: var(--ink-2);
  max-width: 46ch;
}

.small { font-size: 0.9rem; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--ink);
  color: var(--ground);
  padding: 0.8rem 1.3rem;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ------------------------------------------------------------ scroll rail */

.scroll-rail {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 100;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .scroll-rail { animation: rail-fill linear both; animation-timeline: scroll(root block); }
}
@keyframes rail-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ------------------------------------------------------------------ stage */
/*
 * A stage is a section with layers that counter-scroll.
 *
 *   translateY = offset x depth,  offset = viewportCentre - stageCentre
 *
 * As a stage rises through the viewport, offset climbs from negative to
 * positive. So POSITIVE depth pushes a layer DOWN as you scroll — it lags the
 * page and reads as distant. NEGATIVE depth pulls a layer UP faster than the
 * page and reads as near.
 *
 * That sign is the whole effect. Background positive, foreground negative:
 * the two part like curtains rather than drifting the same way at different
 * speeds. Getting it wrong makes the near layer recede, which is the version
 * that feels flat.
 */

.stage {
  position: relative;
  min-height: 100svh;
  padding: clamp(4.5rem, 9vh, 7rem) var(--gutter);
  display: grid;
  align-content: center;
  scroll-snap-align: start;
  isolation: isolate;
}

/* The last section carries the footer behind it, so it does not need to fill
   a viewport of its own. */
.stage:last-of-type { min-height: auto; }

.stage-inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.stage-narrow .stage-inner { max-width: 56rem; }

@media (min-width: 940px) {
  .stage-split .stage-inner { grid-template-columns: 1.05fr 0.95fr; }
  .stage-split.is-flipped .stage-copy { order: 2; }
  .stage-split.is-flipped .stage-fig { order: 1; }
}

.stage-bg { display: none; }

/*
 * One continuous field behind the whole document.
 *
 * The first version gave every section its own background, which meant every
 * section boundary was a visible seam and the colour lurched from teal to
 * violet nine times on the way down. This is a single tall sheet, fixed to the
 * viewport and drifting as one piece, so there is nothing to seam and the hue
 * moves through the page gradually rather than restarting.
 *
 * It drifts DOWN as you scroll, against the content coming up. motion.js owns
 * the transform; the geometry is here.
 */

.field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.field-sheet {
  position: absolute;
  left: -15%;
  right: -15%;
  top: -60vh;
  height: 220vh;
  will-change: transform;
  /*
   * Five very wide, very soft blooms stacked down one sheet. Wide and soft is
   * the whole trick: at this size no single bloom has an edge you can see, so
   * the hue changes as you travel without ever announcing a boundary. The
   * first version put these inside each section, which is why the colour
   * lurched from teal to violet nine times on the way down.
   */
  background:
    radial-gradient(75% 22% at 78% 10%, rgba(1, 200, 253, 0.26), transparent 72%),
    radial-gradient(80% 22% at 16% 30%, rgba(24, 128, 253, 0.26), transparent 74%),
    radial-gradient(85% 24% at 84% 50%, rgba(97, 29, 251, 0.32), transparent 74%),
    radial-gradient(80% 22% at 18% 70%, rgba(1, 200, 253, 0.22), transparent 74%),
    radial-gradient(85% 24% at 80% 90%, rgba(97, 29, 251, 0.28), transparent 74%);
}

/* A single soft vignette keeps the ground dark where the type sits, so the
   blooms never compete with a headline. */
.field::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 90% at 50% 50%, transparent 34%, rgba(5, 7, 13, 0.6) 100%);
}

.stage-copy { position: relative; z-index: 1; min-width: 0; }
.stage-fig { position: relative; z-index: 2; min-width: 0; }

.stage h2 + p { margin-top: 1.4rem; }
.stage > * + * { margin-top: 0; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  font: 600 0.97rem/1 var(--body);
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.11);
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn-primary {
  background: var(--grad-btn);
  border: 0;
  color: #03060d;
  font-weight: 700;
  backdrop-filter: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}
.btn-primary:hover {
  background: var(--grad-btn);
  filter: brightness(1.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.1rem; }

/* --------------------------------------------------------- header, footer */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  background: rgba(5, 7, 13, 0.84);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brandlock { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; flex: none; }
.brandlock .mark { width: 36px; height: 30px; flex: none; }
.brandlock .wordmark { font: 800 1.2rem/1 var(--display); letter-spacing: -0.038em; white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: clamp(0.7rem, 2vw, 1.8rem); }
.site-nav .nav-link { font-size: 0.93rem; color: var(--ink-2); text-decoration: none; transition: color 0.2s var(--ease); }
.site-nav .nav-link:hover { color: var(--ink); }
.site-nav .nav-link[aria-current='page'] { color: var(--ink); font-weight: 600; }
.site-nav .btn { padding: 0.6rem 1.1rem; font-size: 0.88rem; }

@media (max-width: 620px) {
  .site-nav .nav-link { display: none; }
  .brandlock .wordmark { font-size: 1.05rem; }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem var(--gutter) 2.75rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}
.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.footer-legal { width: 100%; padding-top: 1.75rem; border-top: 1px solid var(--line); }

/* ----------------------------------------------------------- beta banner */
/* BETA BANNER. One block, safe to edit or delete when the beta closes.
   Nothing else on any page depends on it. */
.beta-banner {
  border-bottom: 1px solid var(--line);
  background: rgba(24, 128, 253, 0.07);
  padding: 0.68rem var(--gutter);
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.beta-banner p { margin: 0; max-width: none; }
.beta-banner a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ hero */

.hero { padding-top: clamp(3.5rem, 7vh, 5.5rem); }
.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 3.2vw, 4.25rem);
  max-width: 20ch;
}
@media (min-width: 940px) {
  .hero .stage-inner { grid-template-columns: 1.18fr 0.82fr; }
}
.hero .lede { margin-top: 1.6rem; }

.hero-proof {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
}
.hero-proof span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-proof svg { width: 15px; height: 15px; color: var(--cyan); flex: none; }

/* -------------------------------------------------------- the 7x passage */
/*
 * Editorial, not a metric tile. The figure is set inside the sentence it
 * belongs to, because the sentence is the argument and the number alone is
 * just a number.
 */

.passage { max-width: 44rem; }
.passage p {
  font-family: var(--display);
  font-size: clamp(1.55rem, 1.1rem + 2vw, 2.6rem);
  line-height: 1.32;
  letter-spacing: -0.028em;
  color: var(--ink);
  max-width: none;
  text-wrap: pretty;
}
.figure-inline {
  font-size: 1.62em;
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.passage .cite {
  margin-top: 2rem;
  font-family: var(--body);
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--ink-3);
  letter-spacing: 0;
}
.passage .cite cite { font-style: italic; }

/* --------------------------------------------------------- the day strip */
/*
 * Structural truth, not invented data: which hours a front desk is staffed.
 * No distribution is claimed, because none was measured.
 */

.day { margin-top: 2.6rem; max-width: 40rem; }
.day-bar {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  height: 72px;
}
.day-bar i {
  display: block;
  border-radius: 3px;
  background: linear-gradient(180deg, #01c8fd, #1880fd);
  opacity: 0.85;
}
.day-bar i.staffed { background: rgba(255, 255, 255, 0.26); opacity: 1; }
.day-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.day-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.87rem;
  color: var(--ink-2);
}
.day-key span { display: inline-flex; align-items: center; gap: 0.5rem; }
.day-key b { width: 11px; height: 11px; border-radius: 3px; background: rgba(255, 255, 255, 0.26); flex: none; }
.day-key .covered b { background: linear-gradient(180deg, #01c8fd, #1880fd); }

/* ------------------------------------------------------------- the steps */
/* Numbered because the order is the information: you cannot set the tone of
   a knowledge base that does not exist yet. */

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1px;
  margin-top: 3rem;
  background: var(--line);
  border-block: 1px solid var(--line);
}
@media (min-width: 780px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step { background: var(--ground); padding: 2rem 1.75rem 2.1rem; }
.step-n {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.step h3 { margin: 1.1rem 0 0.6rem; }
.step p { color: var(--ink-2); font-size: 0.96rem; margin: 0; }

.steps-note { margin-top: 1.5rem; font-size: 0.9rem; color: var(--ink-3); }

/* ------------------------------------------------------------- the grid */
/*
 * A shared-hairline grid, not a row of cards. Cells differ in span so the
 * eye has somewhere to go.
 */

.matrix {
  display: grid;
  gap: 1px;
  margin-top: 3rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
@media (min-width: 720px) { .matrix { grid-template-columns: repeat(6, 1fr); } }

.cell { background: var(--ground-2); padding: 1.6rem 1.5rem; }
.cell h3 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.cell p { color: var(--ink-2); font-size: 0.93rem; margin: 0; }
@media (min-width: 720px) {
  .cell { grid-column: span 2; }
  .cell.wide { grid-column: span 3; }
  .cell.full { grid-column: span 6; }
  .cell.wide h3, .cell.full h3 { font-size: 1.22rem; }
  .cell.full { padding: 2rem 1.75rem; }
}

/* ---------------------------------------------------------- the refusals */

.refusals { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.9rem; }
.refusals li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.85rem;
  align-items: start;
  color: var(--ink-2);
  font-size: 0.99rem;
}
.refusals svg { width: 20px; height: 20px; color: var(--cyan); margin-top: 0.18rem; }

/* -------------------------------------------------------------- the FAQ */

.faq { margin-top: 2.75rem; border-top: 1px solid var(--line); padding-top: 0.5rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--cyan); }
.faq summary::after {
  content: '';
  width: 12px; height: 12px;
  margin-left: auto;
  flex: none;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq .answer { padding: 0 0 1.6rem; color: var(--ink-2); max-width: 62ch; }
.faq .answer p { font-size: 0.99rem; }

/* ----------------------------------------------------------------- phone */
/*
 * A device shell around the hero conversation. The colours inside are
 * WhatsApp's own dark mode — #0b141a ground, #202c33 incoming, #005c4b
 * outgoing — because a WhatsApp screenshot in any other palette is not a
 * WhatsApp screenshot, and this is the one screen a gym owner will recognise
 * instantly.
 */

.phone {
  width: min(100%, 21.5rem);
  margin-inline: auto;
  padding: 9px;
  border-radius: 44px;
  background: linear-gradient(160deg, #26303d, #10151d 45%, #232c38);
  box-shadow:
    0 40px 80px -18px rgba(0, 0, 0, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.phone-screen {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  background: #0b141a;
  display: flex;
  flex-direction: column;
}

.phone-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.5rem 0.9rem 0.65rem;
  background: #1f2c34;
}
.phone-bar::before {
  content: '';
  position: absolute;
  top: 0.42rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4.6rem;
  height: 1.1rem;
  border-radius: 99px;
  background: #05070d;
}
.phone-bar .avatar { width: 30px; height: 30px; flex: none; }
.phone-bar .avatar svg { display: block; width: 100%; height: 100%; border-radius: 50%; }
.phone-bar strong { display: block; font-size: 0.86rem; font-weight: 600; color: #e9edef; }
.phone-bar small { display: block; font-size: 0.68rem; color: #8696a0; }

.phone-thread {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 0.7rem 0.6rem;
  background: #0b141a;
}

.msg {
  position: relative;
  max-width: 84%;
  padding: 0.44rem 0.6rem 1.05rem;
  border-radius: 8px;
  font-size: 0.795rem;
  line-height: 1.42;
  margin: 0;
  color: #e9edef;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.25);
}
/* WhatsApp sets these at roughly 0.65 alpha, which measures 3.8:1 on its own
   outgoing green. On a real phone you glance at a timestamp; on a marketing
   page you read the mockup, so legibility wins over matching the tone exactly.
   The difference is invisible; the contrast is not. */
.msg time {
  position: absolute;
  right: 0.5rem;
  bottom: 0.28rem;
  font-size: 0.62rem;
  color: rgba(233, 237, 239, 0.86);
  font-variant-numeric: tabular-nums;
}
.msg.them { align-self: flex-start; background: #202c33; border-top-left-radius: 2px; }
.msg.kai  { align-self: flex-end;   background: #005c4b; border-top-right-radius: 2px; padding-left: 1.9rem; }
.msg.kai .read { color: #8ad4f5; }
.msg .kai-mark { position: absolute; left: 0.45rem; top: 0.5rem; width: 1.1rem; height: 0.92rem; }
.msg a { color: #8ad4f5; text-decoration: underline; text-underline-offset: 2px; }

.phone-compose {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.6rem 0.8rem 0.9rem;
  background: #0b141a;
  color: #8696a0;
  font-size: 0.78rem;
}
.phone-compose .field-fake {
  flex: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 99px;
  background: #202c33;
}
.phone-compose svg { width: 15px; height: 15px; flex: none; }

/* --------------------------------------------------------------- mockups */
/*
 * Elevation is declared once. These float, so they carry a shadow with a real
 * offset and no border — a 1px hairline under a wide soft shadow is the ghost
 * card.
 */

.mock {
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 30px 64px -12px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--panel-2);
}
.chat-head .avatar { width: 34px; height: 34px; flex: none; }
.chat-head .avatar svg { display: block; width: 100%; height: 100%; border-radius: 10px; }
.chat-head strong { display: block; font-size: 0.94rem; font-weight: 600; }
.chat-head small { display: block; font-size: 0.73rem; color: var(--ink-3); }
.chat-head .menu { margin-left: auto; width: 18px; height: 18px; color: var(--ink-3); }

.chat-body {
  padding: 1.15rem 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 12rem;
}

.bubble {
  position: relative;
  max-width: 85%;
  padding: 0.7rem 0.85rem 1.3rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
}
.bubble small {
  position: absolute;
  right: 0.7rem; bottom: 0.42rem;
  font-size: 0.68rem;
  color: rgba(244, 247, 251, 0.75);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bubble.question { align-self: flex-start; background: #1c2733; border-top-left-radius: 4px; }
.bubble.reply { align-self: flex-end; background: var(--wa-bubble); border-top-right-radius: 4px; padding-left: 2.5rem; }
.bubble .read { color: #6ce0ff; }

.reply-mascot { position: absolute; left: 0.6rem; top: 0.62rem; width: 1.5rem; height: 1.25rem; }

.chat-compose {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.87rem;
}
.chat-compose svg { width: 17px; height: 17px; }

.pill {
  display: inline-block;
  padding: 0.24rem 0.62rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill.needs { border-color: rgba(1, 200, 253, 0.45); color: #7fe3ff; background: rgba(1, 200, 253, 0.1); }

.handoff-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  background: var(--panel-2);
}
.handoff-top .avatar { width: 30px; height: 30px; flex: none; }
.handoff-top .avatar svg { display: block; width: 100%; height: 100%; border-radius: 9px; }
.handoff-top .who { font-weight: 600; font-size: 0.94rem; }
.handoff-top .pill { margin-left: auto; }

/* --------------------------------------------------------- the switch */

.control { padding: 1.5rem 1.4rem; text-align: center; }
.control-label { font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-3); }

.switch-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.055);
  margin-top: 0.95rem;
}
.switch-thumb {
  position: absolute;
  top: 5px; bottom: 5px; left: 5px;
  width: calc(50% - 5px);
  border-radius: 99px;
  background: var(--grad-btn);
  transition: transform 0.75s var(--ease);
  transition-delay: 0.3s;
}
.is-played .switch-thumb { transform: translateX(100%); }

.switch-side {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 0.5rem;
  font-size: 0.89rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.4s var(--ease) 0.45s;
}
.switch-side svg { width: 1.05rem; height: 1.05rem; }
.switch-side.is-left { color: #03060d; }
.is-played .switch-side.is-left { color: var(--ink-2); }
.is-played .switch-side.is-right { color: #03060d; }

.control-result { margin: 1rem 0 0; font-size: 0.89rem; color: var(--ink-3); max-width: none; }

/* ----------------------------------------------------------------- film */
/* The film is an offer, not the argument. It stays closed until asked for,
   which is also why it costs nothing to load. */
.film-toggle summary { list-style: none; cursor: pointer; }
.film-toggle summary::-webkit-details-marker { display: none; }


.film {
  max-width: 58rem;
  margin: 2.75rem auto 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 64px -12px rgba(0, 0, 0, 0.75);
}
.film video { display: block; width: 100%; height: auto; }

.stage-centre .stage-inner { justify-items: center; text-align: center; }
.stage-centre p { margin-inline: auto; }
.stage-centre .btn-row { justify-content: center; }

/* ------------------------------------------------ about: parent-company */
/* The one place Cortex Lab's teal appears. It marks a change of subject —
   this band is about the company, not the product. */

.parent-band {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.25rem);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.075), transparent 70%);
}
.parent-band p { color: var(--ink-2); }
.parent-band .label { font-size: 0.75rem; letter-spacing: 0.24em; text-transform: uppercase; color: #2dd4bf; margin-bottom: 0.9rem; }
.parent-band .btn { border-color: rgba(45, 212, 191, 0.5); margin-top: 1.2rem; }
.parent-band .btn:hover { border-color: #2dd4bf; background: rgba(45, 212, 191, 0.12); }

.industry-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
.industry-list li { padding: 1rem 1.2rem; background: var(--ground-2); font-weight: 600; font-size: 0.95rem; }

.pull {
  max-width: 40rem;
  margin: 2.5rem 0 0;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.025em;
}

.cite-note { margin-top: 1.4rem; font-size: 0.86rem; line-height: 1.5; color: var(--ink-3); }
.cite-note cite { font-style: italic; }

/* ----------------------------------------------------- contact specifics */

/*
 * Three blocks, two columns, and the order changes with the width.
 *
 * On a phone everything stacks, and the order in the markup is the order that
 * matters: invitation, form, address. On a desktop the form takes the right
 * column whole and the address tucks under the invitation, which is where the
 * eye is already finished.
 */
@media (min-width: 940px) {
  .contact-stage .stage-inner {
    grid-template-areas: 'copy form' 'aside form';
    grid-template-rows: auto 1fr;
    align-items: start;
    row-gap: 2.5rem;
  }
  .contact-stage .stage-copy { grid-area: copy; }
  .contact-stage .stage-fig { grid-area: form; }
  .contact-stage .contact-aside { grid-area: aside; }
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.contact-details li { display: grid; gap: 0.15rem; padding: 1.15rem 1.35rem; background: var(--panel); }
.contact-details .label { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); }
.contact-details .value { font-size: 1.01rem; color: var(--ink); }
.contact-details a { text-decoration: none; border-bottom: 1px solid var(--line-2); }
.contact-details a:hover { border-color: var(--cyan); }

/*
 * The booking form.
 *
 * One surface, one column, hairlines rather than boxes. Every field is the same
 * width because nothing here is worth guessing the length of — a half-width
 * "Phone" beside a half-width "Email" saves one row and costs the eye a
 * decision on every line.
 *
 * Inputs sit DARKER than the panel they are on. On a dark ground the instinct
 * is to lift them, and a lifted input reads as a button; sinking them reads as
 * a hole to put something in, which is what it is.
 */

.booking {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.5rem, 3vw, 2.15rem);
}

.booking h2 {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
}
.booking h2 + .field-note { margin-top: -0.75rem; }
.booking > h2:not(:first-child) {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.field-row { display: grid; gap: 0.4rem; margin: 0 0 1rem; }
.field-row label { font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.field-row .opt { color: var(--ink-3); font-weight: 400; }

.booking input,
.booking textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--ground-2);
  color: var(--ink);
  font: 400 0.97rem/1.45 var(--body);
}
.booking textarea { resize: vertical; min-height: 5.5rem; }
.booking ::placeholder { color: var(--ink-3); opacity: 1; }

.booking input:focus-visible,
.booking textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
  border-color: transparent;
}

/* Only after the browser has had something to complain about. `:invalid`
   alone marks every empty required field red before anybody has typed. */
.booking input:user-invalid,
.booking textarea:user-invalid { border-color: #f2777a; }

.booking button[type='submit'] { width: 100%; margin-top: 0.75rem; }

.field-note {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0.9rem 0 1.4rem;
}
.booking button + .field-note { margin-bottom: 0; }

.sent-note {
  margin: 1.1rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.sent-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ prose */

.prose { max-width: 44rem; margin: 0 auto; padding: clamp(2.5rem, 7vh, 4.5rem) var(--gutter) 5rem; }
.prose > header { margin-bottom: 3rem; }
.prose h1 { font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.2rem); }
.prose h2 {
  font-size: clamp(1.3rem, 1.15rem + 0.9vw, 1.7rem);
  margin: 3.5rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.prose h3 { margin: 2rem 0 0.6rem; font-size: 1.05rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: 0.55rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.prose a:hover { text-decoration-color: var(--cyan); }

.prose .table-scroll { overflow-x: auto; margin: 1.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 30rem; }
.prose th, .prose td { text-align: left; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--line-2);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.prose td { color: var(--ink-2); }

.toc { margin: 2rem 0 0; padding: 1.25rem 1.5rem; border: 1px solid var(--line); border-radius: 14px; }
.toc ol { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.3rem; }

/* An unfilled value the client must set. Visible on purpose: an obviously
   blank retention period is better than an invented one. */
.tbd {
  background: rgba(24, 128, 253, 0.14);
  border: 1px dashed var(--line-2);
  border-radius: 5px;
  padding: 0.1em 0.5em;
  color: var(--ink);
  font-weight: 600;
}

.notice {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(1, 200, 253, 0.32);
  border-radius: 12px;
  background: rgba(1, 200, 253, 0.05);
}
.notice p { margin: 0; color: var(--ink-2); font-size: 0.94rem; }

/* ----------------------------------------------------------------- motion */
/*
 * There is one authored moment on this site: the layers of a stage
 * counter-scrolling as it passes. Everything else is either content-motivated
 * (the switch throwing, the reply arriving) or it does not exist.
 *
 * Notably absent: a fade-and-rise entrance on every section. An identical
 * entrance repeated nine times is not motion design, it is a tic — and it
 * costs a visitor without JavaScript the whole page.
 *
 * Nothing here starts hidden. Motion enhances an already-visible default,
 * which is why this site needs no no-JS fallback: there is nothing to fall
 * back to.
 */

[data-depth] { will-change: auto; }
.is-live [data-depth] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  [data-depth] { transform: none !important; will-change: auto; }
  .switch-thumb { transition: none; }
  .scroll-rail { display: none; }
  .faq summary::after { transition: none; }
  * { animation-duration: 0.001ms !important; }
}
