/* Runizi landing. One look, light only: cream card on a grey desk, mono for the UI, italic serif for the voice. */

:root {
  --bg: #d9d8d2;
  --card: #f4f4ef;
  --card-2: #ecece7;
  --ink: #1c1c1a;
  --ink-soft: #3a3a37;
  --muted: #6d6d68;
  --line: #2a2a27;
  --line-soft: #c9c9c2;
  --field: #fbfbf8;
  --link: #2233cc;
  --err: #a83232;
  --orange: #c77a1c;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", Georgia, serif;
  --width: 720px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
}

.page {
  max-width: var(--width);
  margin: 0 auto;
  padding: 48px 20px 56px;
  display: grid;
  gap: 28px;
}

/* Window frame */
.window {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 2px 0 rgba(0, 0, 0, 0.05),
    0 18px 40px -24px rgba(0, 0, 0, 0.35);
}
.titlebar {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1.5px solid var(--line);
  background: var(--card-2);
}
.dots { display: flex; gap: 6px; }
.dots i {
  width: 11px;
  height: 11px;
  border: 1.2px solid var(--line);
  border-radius: 50%;
}
.titlebar__name {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  pointer-events: none;
}
.window__body { padding: 36px 44px 40px; }

/* Type */
.meta {
  margin: 0 0 22px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.2;
}
.copy { margin: 0 0 24px; color: var(--ink-soft); }
.copy--tight { margin: 0; }
.hint {
  margin: 12px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons and links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 28px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(#f8f8f4, #e2e2dc);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 2px 0 var(--line);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { background: linear-gradient(#ffffff, #e9e9e3); }
.btn:active, .btn[aria-busy="true"] { transform: translateY(2px); box-shadow: 0 0 0 var(--line); }
.btn:focus-visible, .chip:focus-visible, .link:focus-visible, input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.btn[aria-busy="true"] { cursor: progress; opacity: 0.8; }
.btn--block { display: flex; width: 100%; }

.link {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Features */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.feature {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 12px;
}
.feature__num {
  grid-row: 1 / span 2;
  padding-top: 6px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.feature__title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 25px;
  line-height: 1.2;
}
.feature__copy { margin: 0; color: var(--ink-soft); }

/* Sample brief */
.brief {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 8px 16px;
  margin: 0 0 22px;
  padding: 18px 20px;
  background: var(--field);
  border: 1.5px solid var(--line-soft);
  border-radius: 3px;
  font-size: 13px;
}
.brief dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.brief dd { margin: 0; }
.light {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  vertical-align: 1px;
}
.light--orange { background: var(--orange); }

/* Integrations */
.brands {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
}
.brands li {
  padding: 9px 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--field);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 2px 0 var(--line);
}

/* Waitlist */
.progress {
  height: 3px;
  margin: -12px 0 28px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--ink);
  transition: width 0.25s ease;
}
.step { animation: rise 0.22s ease-out; }
@keyframes rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.question {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
}
.question:focus { outline: none; }
.question--sub { font-size: 22px; margin-top: 22px; }
.chips { display: grid; gap: 10px; }
.chips--row { grid-template-columns: 1fr 1fr; }
.chips--grid { grid-template-columns: 1fr 1fr; }
.chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13.5px;
  text-align: left;
  color: var(--ink);
  background: var(--field);
  border: 1.5px solid var(--line-soft);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.chip::before {
  content: "[ ]";
  flex: none;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--card-2); }
.chip[aria-pressed="true"]::before { content: "[x]"; color: var(--ink); }

.chips--pairs { grid-template-columns: 1fr 1fr; } /* stays two columns on phones, unlike chips--grid */
.chip--wide { grid-column: 1 / -1; }
.chips--or { margin-top: 16px; }

/* Shown on purpose but not selectable (trail): tells the others they are in the right place. */
.chip[aria-disabled="true"] {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
  cursor: not-allowed;
}
.chip[aria-disabled="true"]:hover { border-color: var(--line-soft); }
.chip[aria-disabled="true"]::before { content: "[-]"; }
.chip-note { grid-column: 1 / -1; margin: -4px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }

.label {
  display: block;
  margin: 0 0 8px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--next { margin-top: 24px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.slider-value { font-size: 13.5px; color: var(--ink); }

/* Age slider. The thumb stays dashed until the runner touches it: an untouched value is not an answer. */
.range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0 0 18px;
  background: transparent;
  cursor: pointer;
}
.range:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.range::-webkit-slider-runnable-track { height: 3px; background: var(--line-soft); border-radius: 2px; }
.range::-moz-range-track { height: 3px; background: var(--line-soft); border-radius: 2px; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -11.5px;
  background: linear-gradient(#f8f8f4, #e2e2dc);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 2px 0 var(--line);
}
.range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: linear-gradient(#f8f8f4, #e2e2dc);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 2px 0 var(--line);
}
.range:not(.is-set)::-webkit-slider-thumb { border-style: dashed; box-shadow: none; }
.range:not(.is-set)::-moz-range-thumb { border-style: dashed; box-shadow: none; }

.btn--next { margin-top: 22px; }
.btn--next:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--next:disabled:hover { background: linear-gradient(#f8f8f4, #e2e2dc); }

/* Where the recent race time stands. */
.result {
  margin: 18px 0 0;
  padding: 16px 18px;
  background: var(--field);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 2px 0 var(--line);
  animation: rise 0.22s ease-out;
}
.result__lede {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1.25;
}
/* Goal verdict: a label with a square, ink when the goal is safe, orange when ambitious, red when out of reach. */
.result__verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.result__verdict::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--line);
  background: var(--ink);
}
.result[data-verdict="ambitious"] .result__verdict::before { background: var(--orange); }
.result[data-verdict="out"] .result__verdict { color: var(--err); }
.result[data-verdict="out"] .result__verdict::before { background: var(--err); }
.result__detail { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.result__data { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.result__data + .result__data { margin-top: 4px; }
.result__lede:last-child { margin-bottom: 0; }

.field { display: block; margin: 0 0 12px; }
.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  background: var(--field);
  border: 1.5px solid var(--line-soft);
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.field input::placeholder { color: #8a8a84; }
.field input:focus { border-color: var(--ink); }
.field input[aria-invalid="true"] { border-color: var(--err); }
.field--time { margin-top: 20px; }
.question + .field--time { margin-top: 0; }
.field--time input { max-width: 220px; font-size: 18px; letter-spacing: 0.08em; }
.field--date input { max-width: 240px; font-size: 16px; } /* 16px or iOS zooms in on focus */

/* Weeks until the race: a big number and one box per week. Orange when the build is short. */
.countdown__lede {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1.25;
}
.countdown__num {
  font-size: 56px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__boxes { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 12px; }
.countdown__boxes i {
  width: 10px;
  height: 10px;
  background: var(--ink);
  border: 1.5px solid var(--line);
  animation: box-in 0.18s ease-out both;
}
.countdown--rush .countdown__boxes i { background: var(--orange); }
@keyframes box-in {
  from { background: transparent; transform: scale(0.6); }
}
.countdown__note { margin: 0; font-size: 12.5px; color: var(--ink-soft); }

/* Health data consent: unticked, above the question it unlocks. */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  border: 1.5px dashed var(--line-soft);
  border-radius: 3px;
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.consent:has(input:checked) { border-style: solid; border-color: var(--ink); }
.consent-link { margin: -8px 0 16px; }
.window--form .btn[type="submit"] { margin-top: 4px; }
.link--small { font-size: inherit; }

/* Privacy notice and legal pages. Bracketed placeholders stay highlighted until Adrien fills them in. */
.doc h2 {
  margin: 34px 0 10px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 25px;
  line-height: 1.2;
}
.doc h2:first-of-type { margin-top: 0; }
.doc h3 { margin: 20px 0 6px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }
.doc p, .doc li { color: var(--ink-soft); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 20px; }
.doc li + li { margin-top: 4px; }
.todo { padding: 0 3px; color: var(--ink); background: #f1dfbf; border-radius: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.error { margin: 14px 0 0; font-size: 12.5px; color: var(--err); }
.nav { margin: 24px 0 0; min-height: 20px; }
.step--done .lede { margin-bottom: 10px; }

/* FAQ */
.faq { margin: 0; }
.faq dt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1.2;
  margin: 0 0 6px;
}
.faq dd { margin: 0 0 22px; color: var(--ink-soft); }
.faq dd:last-child { margin-bottom: 0; }
.rule { border: 0; border-top: 1.5px dashed var(--line-soft); margin: 26px 0 18px; }

/* Footer */
.footer {
  display: grid;
  gap: 8px;
  padding: 4px 8px 0;
  font-size: 11.5px;
  color: var(--muted);
}
.footer p { margin: 0; }

/* Small screens */
@media (max-width: 600px) {
  .page { padding: 16px 12px 40px; gap: 18px; }
  .window__body { padding: 26px 20px 28px; }
  .lede { font-size: 27px; }
  .question { font-size: 24px; }
  .question--sub { font-size: 20px; }
  .result__lede { font-size: 20px; }
  .titlebar__name { letter-spacing: 0.16em; }
  .feature { grid-template-columns: 1fr; }
  .feature__num { grid-row: auto; padding-top: 0; margin-bottom: 4px; }
  .brief { grid-template-columns: 1fr; gap: 2px 0; }
  .brief dt { margin-top: 10px; }
  .brief dt:first-child { margin-top: 0; }
  .chips--grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
