/* Coaching form: Cudo's calm palette. Phone first; one narrow column. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #FAF8F4;
  --fg: #161616;
  --fg-soft: #3F3D3A;
  --muted: #6B6966;
  --chip: #F2F0EC;
  --chip-hover: #E9E5DF;
  --on: #161616;
  --on-fg: #FFFFFF;
  --accent: #7A58E8;
  --accent-fg: #FFFFFF;
  --now: #FF7701;
  --err: #9A4A00;
  --line: #E4E1DB;
  --serif: "Newsreader", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --fg: #F2F0EC;
    --fg-soft: #D9D5CE;
    --muted: #A9A6A0;
    --chip: #242322;
    --chip-hover: #2E2C2A;
    --on: #F2F0EC;
    --on-fg: #161616;
    --accent: #9C83F5;
    --accent-fg: #161616;
    --err: #F0A868;
    --line: #2E2C2A;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.45;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 48px max(20px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 26px;
}

body.centered main { min-height: 100svh; justify-content: center; }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p { margin: 0; }
.mut { font-size: 13px; color: var(--muted); }
.center { text-align: center; }
.intro { display: flex; flex-direction: column; gap: 8px; }

.env {
  margin: 0;
  padding: 6px 12px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-fg);
  background: var(--accent);
}

.form { display: flex; flex-direction: column; gap: 26px; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .legend { display: block; padding: 0; margin: 0 0 10px; font-size: 15.5px; color: var(--fg); }

/* Radios that look like buttons: they still work without JavaScript and with a keyboard. */
.segs { display: flex; gap: 6px; }
.scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; }

.seg, .dot { position: relative; display: block; cursor: pointer; }
.seg { flex: 1; }
.seg input, .dot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span, .dot span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 6px;
  background: var(--chip);
  color: var(--fg-soft);
  transition: background-color .25s ease, color .25s ease;
}
.seg span { font-size: 14.5px; }
.dot span { font-size: 13px; font-variant-numeric: tabular-nums; }
.seg:hover span, .dot:hover span { background: var(--chip-hover); }
.seg input:checked + span, .dot input:checked + span { background: var(--on); color: var(--on-fg); }
.seg input:focus-visible + span, .dot input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

textarea, input[type="password"] {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--chip);
  color: var(--fg);
  padding: 12px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS from zooming in */
  line-height: 1.45;
}
textarea { resize: vertical; min-height: 110px; }
textarea + .mut { margin-top: 8px; }
textarea:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.form .send { width: 100%; }
.send:focus-visible, .plain:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.plain { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }

.err { margin-top: 8px; font-size: 13px; color: var(--err); }
.err.summary { margin: 0; }

/* Honeypot: hidden from people, visible to simple bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.thanks { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.thanks h1 { font-size: 30px; }
.now { width: 12px; height: 12px; border-radius: 50%; background: var(--now); animation: breathe 4s ease-in-out infinite; }
.your-step { color: var(--fg-soft); }
.quote { font-family: var(--serif); font-size: 19px; color: var(--fg); }

.big { font-family: var(--serif); font-size: 40px; line-height: 1.1; }

a { color: var(--fg); }

@keyframes breathe { 50% { opacity: .45; } }

@media (prefers-reduced-motion: reduce) {
  .now { animation: none; }
  .seg span, .dot span { transition: none; }
}
