/* MIKO marketing site. Theme tokens override scrollcraft.css; everything below is the
   page's own markup. See SPEC.md §7 for the palette and §2 for the grammar. */
:root {
  --sc-canvas: #F4F9FB;
  --sc-surface: #FFFFFF;
  --sc-ink: #0B2545;
  --sc-ink-soft: #4A6382;
  --sc-accent: #0A7A5E;
  --sc-accent-ink: #FFFFFF;
  --sc-font-display: "Outfit", system-ui, sans-serif;
  --sc-font-text: "Geist", system-ui, sans-serif;
  --sc-shadow-color: 212 60% 18%;
  --sc-e1: 0 1px 2px hsl(var(--sc-shadow-color) / 0.08), 0 2px 6px -1px hsl(var(--sc-shadow-color) / 0.06);
  --sc-e2: 0 2px 4px hsl(var(--sc-shadow-color) / 0.08), 0 10px 22px -6px hsl(var(--sc-shadow-color) / 0.14);
  --sc-e3: 0 4px 8px hsl(var(--sc-shadow-color) / 0.08), 0 22px 48px -10px hsl(var(--sc-shadow-color) / 0.20);
  --sc-edge: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --sky: #E3F1F8;
  --mint: #E6F6F0;
  --r: 8px;
  --r-plate: 12px;
}
html { background: var(--sc-canvas); }
body { color: var(--sc-ink); }
.sc-display { font-weight: 600; }
h1, h2, h3 { font-family: var(--sc-font-display); }
p { margin: 0; }

/* ------------------------------------------------------------ the door switch */
.doors-bar {
  position: fixed; inset-inline: 0; top: 0; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-4);
  padding: var(--sc-3) var(--sc-gutter);
  background: color-mix(in oklab, var(--sc-canvas) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.wordmark {
  font-family: var(--sc-font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em;
  text-decoration: none; color: var(--sc-ink);
}
.wordmark b { color: var(--sc-accent); font-weight: 700; }
.wordmark small { display: block; font-family: var(--sc-font-text); font-weight: 400; font-size: 0.68rem; letter-spacing: 0; color: var(--sc-ink-soft); margin-top: -2px; }
.switch { display: flex; gap: var(--sc-2); margin: 0; padding: 0; list-style: none; }
.switch button {
  background: none; border: 0; padding: 6px 10px; border-radius: var(--r); font-weight: 500; color: var(--sc-ink-soft);
  cursor: pointer; position: relative; transition: color var(--sc-d-fast) var(--sc-ease-out), background var(--sc-d-fast) var(--sc-ease-out);
}
.switch button::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 1px;
  background: var(--sc-accent); transform: scaleX(0); transform-origin: left; transition: transform var(--sc-d-base) var(--sc-ease-out);
}
.switch button[aria-pressed="true"] { color: var(--sc-ink); }
.switch button[aria-pressed="true"]::after { transform: scaleX(1); }
.switch button:hover { background: var(--sky); }
.switch button:active { transform: translateY(1px); }

/* audience variants: all three live in the markup, the two other doors are hidden */
html:not([data-audience="hiring"]) [data-door="hiring"],
html:not([data-audience="teams"]) [data-door="teams"],
html:not([data-audience="students"]) [data-door="students"] { display: none !important; }
[hidden] { display: none !important; }
.phone img { display: block; }

/* ------------------------------------------------------------ act 1: the doors */
.hero-stage { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: var(--sc-7);
  padding: calc(var(--bar, 4rem) + var(--sc-6)) var(--sc-gutter) var(--sc-7); max-width: var(--sc-maxw); margin-inline: auto; height: 100%; }
.hero-copy h1 { font-size: var(--sc-t-3xl); max-width: 14ch; }
.hero-copy .sc-lede { margin-top: var(--sc-5); color: var(--sc-ink-soft); }
.doors { margin: var(--sc-7) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--sc-hairline); }
.doors li { border-bottom: 1px solid var(--sc-hairline); }
.door {
  display: grid; grid-template-columns: 6.5rem 1fr auto; align-items: baseline; gap: var(--sc-4); width: 100%;
  padding: var(--sc-4) var(--sc-2); background: none; border: 0; text-align: left; cursor: pointer; border-radius: var(--r);
  transition: background var(--sc-d-fast) var(--sc-ease-out);
}
.door:hover { background: var(--sky); }
.door:active { transform: translateY(1px); }
.door .k { font-family: var(--sc-font-display); font-weight: 600; color: var(--sc-ink); }
.door .l { color: var(--sc-ink-soft); text-wrap: pretty; }
.door .go { color: var(--sc-accent); font-weight: 600; white-space: nowrap; }
.door[aria-pressed="true"] { background: var(--mint); }
.door[aria-pressed="true"] .k { color: var(--sc-accent); }

/* the layered scene: far wash, the phone, the sentence card in front */
.scene { position: relative; height: min(78vh, 46rem); min-height: 30rem; }
.scene .far { position: absolute; inset: 0; z-index: 0; }
.scene .far i { position: absolute; border-radius: 50%; filter: blur(42px); opacity: 0.9; }
.scene .far .b1 { width: 60%; height: 60%; left: 10%; top: 6%; background: #CFE6F5; }
.scene .far .b2 { width: 48%; height: 48%; right: 2%; bottom: 8%; background: #CFEFE2; }
.scene .mid { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1; width: clamp(15rem, 34vw, 19rem); }
.phone {
  position: relative; aspect-ratio: 390 / 844; border-radius: 2.2rem; background: #0B2545; padding: 0.55rem;
  box-shadow: var(--sc-e3), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 1.7rem; background: var(--sc-canvas); }
.phone::before { content: ""; position: absolute; top: 0.9rem; left: 50%; translate: -50%; width: 32%; height: 1.4rem; background: #0B2545; border-radius: 1rem; z-index: 2; }
.scene .near {
  position: absolute; z-index: 2; left: 2%; bottom: 10%; width: min(19rem, 70%);
  background: var(--sc-surface); border-radius: var(--r-plate); padding: var(--sc-4) var(--sc-5);
  box-shadow: var(--sc-e2), var(--sc-edge);
}
.scene .near .lab { font-size: var(--sc-t-xs); color: var(--sc-ink-soft); margin-bottom: var(--sc-1); }
.scene .near p.s { font-family: var(--sc-font-display); font-weight: 500; line-height: 1.3; text-wrap: pretty; }
.scene .near .who { display: flex; align-items: center; gap: var(--sc-2); margin-top: var(--sc-3); color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.scene .near .who i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc-accent); display: inline-block; }
.scene .haze { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, var(--sc-canvas) 0%, transparent 18%); }
@media (max-width: 860px) {
  .hero-stage { grid-template-columns: 1fr; gap: var(--sc-6); padding-top: calc(var(--bar, 4rem) + var(--sc-6)); padding-bottom: var(--sc-5); align-content: start; height: auto; }
  .scene .far { display: none; }
  .hero-copy h1 { font-size: var(--sc-t-2xl); max-width: none; }
  .door { grid-template-columns: 1fr; gap: 2px; padding: var(--sc-3) var(--sc-2); }
  .door .go { display: none; }
  .scene { height: 26rem; min-height: 0; }
  .scene .mid { width: 12rem; top: 46%; }
  .scene .near { width: min(15rem, 68%); bottom: 6%; padding: var(--sc-3) var(--sc-4); }
  .doors-bar { padding-block: var(--sc-2); gap: var(--sc-2); }
  .wordmark { font-size: 1.1rem; }
  .wordmark small { display: none; }
  .switch button { padding: 8px 6px; font-size: var(--sc-t-sm); }
  .switch button::after { left: 6px; right: 6px; }
}
@media (max-height: 700px) and (min-width: 861px) { .scene { height: 70vh; } }

/* ------------------------------------------------------------ act 2: silence */
.silence { display: grid; place-items: center; min-height: 60vh; padding: var(--sc-8) var(--sc-gutter); }
.silence p { font-family: var(--sc-font-display); font-size: var(--sc-t-xl); font-weight: 500; text-align: center; max-width: 24ch; text-wrap: balance; color: var(--sc-ink); }

/* ------------------------------------------------------------ act 3: the call */
.call-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--sc-7); align-items: center;
  max-width: var(--sc-maxw); margin-inline: auto; padding: calc(var(--bar, 4rem) + var(--sc-5)) var(--sc-gutter) var(--sc-7); height: 100%; }
.call-copy h2 { font-size: var(--sc-t-2xl); }
.call-copy .sc-body { margin-top: var(--sc-4); }
.call-copy .consent { margin-top: var(--sc-5); color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.plate {
  position: relative; background: var(--sc-surface); border-radius: var(--r-plate); padding: var(--sc-5);
  box-shadow: var(--sc-e3), var(--sc-edge); min-height: 24rem; display: flex; flex-direction: column; gap: var(--sc-4);
  transform: translateY(calc((1 - var(--sc-p, 0)) * 14px));
}
.plate .head { display: flex; align-items: center; justify-content: space-between; gap: var(--sc-3); }
.plate .who { display: flex; align-items: center; gap: var(--sc-3); }
.plate .avatar { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--mint); display: grid; place-items: center; color: var(--sc-accent); font-family: var(--sc-font-display); font-weight: 700; position: relative; }
.plate[data-state="speaking"] .avatar::after, .plate[data-state="connecting"] .avatar::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--sc-accent); opacity: 0.6; animation: ring 1.3s var(--sc-ease-out) infinite;
}
@keyframes ring { from { transform: scale(0.85); opacity: 0.7; } to { transform: scale(1.25); opacity: 0; } }
.plate .name { font-family: var(--sc-font-display); font-weight: 600; }
.plate .role { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.plate .timer { font-variant-numeric: tabular-nums; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.plate .state { min-height: 1.4em; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.plate[data-state="listening"] .state { color: var(--sc-accent); font-weight: 500; }
.transcript { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sc-2); flex: 1; max-height: 20rem; overflow-y: auto; }
.transcript li { padding: var(--sc-2) var(--sc-3); border-radius: var(--r); max-width: 88%; line-height: 1.45; text-wrap: pretty; overflow-wrap: anywhere; }
.transcript li.them { background: var(--sc-canvas); align-self: flex-start; }
.transcript li.you { background: var(--sky); align-self: flex-end; }
.transcript li.sys { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); padding-inline: 0; }
.plate .actions { display: flex; gap: var(--sc-3); flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--sc-5); border-radius: var(--r);
  border: 1px solid var(--sc-hairline-strong); background: var(--sc-surface); color: var(--sc-ink); font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background var(--sc-d-fast) var(--sc-ease-out), transform 80ms var(--sc-ease-out);
}
.btn:hover { background: var(--sc-canvas); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.fill { background: var(--sc-accent); border-color: var(--sc-accent); color: var(--sc-accent-ink); }
.btn.fill:hover { background: #086A51; }
.plate .verdict { font-family: var(--sc-font-display); font-weight: 500; font-size: var(--sc-t-lg); line-height: 1.3; text-wrap: pretty; padding-top: var(--sc-3); border-top: 1px solid var(--sc-hairline); }
.plate .err { color: #B42318; font-size: var(--sc-t-sm); }
.plate .sample { font-size: var(--sc-t-xs); color: var(--sc-ink-soft); }
@media (max-width: 860px) {
  .call-stage { grid-template-columns: 1fr; gap: var(--sc-5); padding-top: var(--sc-7); padding-bottom: var(--sc-7); align-content: start; height: auto; }
  .plate { min-height: 0; padding: var(--sc-4); }
  .transcript { max-height: 13rem; }
}

/* ------------------------------------------------------------ act 4: what comes back */
.back { padding-block: var(--sc-7) var(--sc-section); }
.back .sc-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--sc-7); align-items: center; }
.back h2 { font-size: var(--sc-t-2xl); }
.back .sc-body { margin-top: var(--sc-4); }
.back figure { margin: 0; position: relative; }
.back figure img { width: 100%; height: auto; border-radius: var(--r-plate); box-shadow: var(--sc-e3); background: var(--sc-surface); }
.back figure .phone { width: min(17rem, 70%); margin-inline: auto; }
.back figcaption { margin-top: var(--sc-3); font-size: var(--sc-t-xs); color: var(--sc-ink-soft); text-align: center; }
@media (max-width: 860px) { .back .sc-wrap { grid-template-columns: 1fr; gap: var(--sc-5); } }

/* ------------------------------------------------------------ act 5: how it works */
.how { padding-block: var(--sc-7) var(--sc-section); }
.how h2 { font-size: var(--sc-t-2xl); max-width: 18ch; }
.steps { list-style: none; margin: var(--sc-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-5) var(--sc-7); counter-reset: s; }
.steps li { display: grid; grid-template-columns: 2.2rem 1fr; gap: var(--sc-3); align-items: start; }
.steps li::before { counter-increment: s; content: counter(s); width: 2rem; height: 2rem; border-radius: 50%; background: var(--sky); color: var(--sc-ink); font-family: var(--sc-font-display); font-weight: 600; display: grid; place-items: center; }
.steps b { font-family: var(--sc-font-display); font-weight: 600; display: block; }
.steps p { color: var(--sc-ink-soft); margin-top: 2px; text-wrap: pretty; }
.honest { margin-top: var(--sc-6); padding-top: var(--sc-5); border-top: 1px solid var(--sc-hairline); color: var(--sc-ink-soft); max-width: var(--sc-measure); text-wrap: pretty; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ act 6: the entry (dark) */
.enter {
  --sc-canvas: #0B2545; --sc-surface: #11325A; --sc-ink: #F4F9FB; --sc-ink-soft: #A9BDD6; --sc-accent: #3FD39F; --sc-accent-ink: #0B2545;
  --sc-hairline: rgba(244, 249, 251, 0.14); --sc-hairline-strong: rgba(244, 249, 251, 0.28);
  background: var(--sc-canvas); color: var(--sc-ink);
}
.enter-stage { display: grid; grid-template-rows: 1fr auto; height: 100%; max-width: var(--sc-maxw); margin-inline: auto; padding: calc(var(--bar, 4rem) + var(--sc-5)) var(--sc-gutter) var(--sc-5); }
.enter-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sc-7); align-items: center; }
.enter h2 { font-size: var(--sc-t-2xl); color: var(--sc-ink); }
.enter .sc-body { margin-top: var(--sc-4); color: var(--sc-ink-soft); }
.enter .other { margin-top: var(--sc-5); color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.enter .other button { background: none; border: 0; padding: 0; color: var(--sc-accent); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; font: inherit; }
.form { display: grid; gap: var(--sc-3); background: var(--sc-surface); padding: var(--sc-5); border-radius: var(--r-plate); box-shadow: var(--sc-e3); }
.form label { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); display: grid; gap: 6px; }
.form input { background: #0B2545; border: 1px solid var(--sc-hairline-strong); border-radius: var(--r); padding: 12px 14px; color: var(--sc-ink); min-height: 48px; }
.form input:focus { border-color: var(--sc-accent); outline: none; box-shadow: 0 0 0 3px rgba(63, 211, 159, 0.25); }
.form .btn.fill { background: var(--sc-accent); border-color: var(--sc-accent); color: var(--sc-accent-ink); margin-top: var(--sc-2); }
.form .btn.fill:hover { background: #5BE0B0; }
.form .done { display: grid; gap: var(--sc-3); }
.form .done p { color: var(--sc-ink); text-wrap: pretty; }
.form .done a.link { color: var(--sc-accent); word-break: break-all; }
.form .err { color: #FFB4A8; font-size: var(--sc-t-sm); }
.form .note { color: var(--sc-ink-soft); font-size: var(--sc-t-xs); }
.foot { display: flex; flex-wrap: wrap; gap: var(--sc-2) var(--sc-5); justify-content: space-between; align-items: center; padding-top: var(--sc-5); border-top: 1px solid var(--sc-hairline); color: var(--sc-ink-soft); font-size: var(--sc-t-xs); }
.foot a { color: var(--sc-ink-soft); }
.foot nav { display: flex; gap: var(--sc-4); }
@media (max-width: 860px) {
  .enter-inner { grid-template-columns: 1fr; gap: var(--sc-5); align-content: start; }
  .enter-stage { padding-top: var(--sc-7); height: auto; gap: var(--sc-6); }
  .form { padding: var(--sc-4); }
}

@media (prefers-reduced-motion: reduce) {
  .plate { transform: none; }
  .plate .avatar::after { animation: none; }
}
