/* WhenDose's website: the app's own font (Roboto, SIL OFL) and colours (app/.../ui/Theme.kt).
   Built like Turn Aside's site (turnaside.app), with WhenDose's night-and-morning look. */
@font-face { font-family: "Roboto"; src: url("fonts/roboto.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --ground: #EDF1FF;
  --panel: #E2E7FB;
  --card: #FFFFFF;
  --ink: #232A5C;
  --muted: #545C8C;
  --rule: #D7DCF7;
  --brand: #3641B3;
  --link: #3641B3;
  --on-brand: #FFFFFF;
  --teal: #A5E6DC;
  --teal-ink: #0B5A4F;
  --ok: #1A6A4C;
  --ok-bg: #D6F5E6;
  --soon: #775000;
  --soon-bg: #FFF0C2;
  --night: #0F1230;
  --night-2: #1B1F4B;
  --night-ink: #F0F1FF;
  --night-muted: #C9D2FF;
  --emergency: #AE2255;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0F1230;
    --panel: #161A40;
    --card: #1B1F4B;
    --ink: #F0F1FF;
    --muted: #B9BFE8;
    --rule: #39407A;
    --brand: #8E9BFF;
    --link: #C5CFFF;
    --on-brand: #0F1230;
    --teal-ink: #7FD9B8;
    --ok: #A0EAD0;
    --ok-bg: #17382F;
    --soon: #FFDF85;
    --soon-bg: #3B3417;
    --night: #080A1E;
    --night-2: #12153A;
    --emergency: #FF9FBF;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 18px/1.6 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 1.9em; margin: 2em 0 0.6em; }
h3 { font-size: 1.25em; margin: 0 0 0.4em; font-weight: 700; }
a { color: var(--link); }
img, video { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* The top bar: the night sky */
.bar { background: var(--night); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 5; }
.brand { color: #F0F1FF; text-decoration: none; font-weight: 800; font-size: 1.15em; display: inline-flex; align-items: center; gap: 10px; }
.bar-cta { color: #0F1230; background: var(--teal); text-decoration: none; font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: 0.9em; white-space: nowrap; }

/* Layout */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow, .narrow { max-width: 760px; }
.center { text-align: center; }
.intro { max-width: 640px; margin: 0 auto 1.4em; color: var(--muted); }
.small { font-size: 0.9em; color: var(--muted); }
.band { background: var(--panel); padding: 8px 0 56px; margin-top: 56px; }
/* A night band: deep blue, with a few faint stars. */
.band.night {
  color: var(--night-ink);
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(201, 210, 255, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 32% 68%, rgba(201, 210, 255, 0.5), transparent 60%),
    radial-gradient(2px 2px at 58% 14%, rgba(201, 210, 255, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 42%, rgba(201, 210, 255, 0.5), transparent 60%),
    radial-gradient(2px 2px at 90% 80%, rgba(201, 210, 255, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 46% 88%, rgba(201, 210, 255, 0.4), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.band.night h2 { color: var(--night-ink); }
.band.night p, .band.night .small, .band.night li { color: var(--night-muted); }
.band.night a { color: var(--teal); }
.band.night .button.teal { color: #0F1230; }

/* Hero: morning after a long night */
.hero { padding: 40px 0 8px; background: radial-gradient(ellipse 80% 70% at 75% 30%, var(--card) 0%, transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 2.9em; margin: 12px 0 14px; }
.lead { font-size: 1.18em; }
.kicker { margin: -4px 0 18px; color: var(--muted); font-weight: 700; font-size: 1.05em; }
.lead.question { font-style: italic; font-size: 1.3em; margin-bottom: 0.4em; color: var(--ink); }
.pill { display: inline-block; margin: 0; padding: 4px 14px; border-radius: 999px; background: var(--teal); color: #0F1230; font-weight: 700; font-size: 0.85em; letter-spacing: 0.02em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.button { display: inline-block; text-decoration: none; font-weight: 700; padding: 12px 24px; border-radius: 999px; background: var(--brand); color: var(--on-brand); border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.button.quiet { background: transparent; color: var(--link); box-shadow: inset 0 0 0 2px currentColor; }
.button.teal { background: var(--teal); color: #0F1230; }
.note { margin: 18px 0 0; padding: 12px 16px; border-left: 4px solid var(--teal); background: var(--card); border-radius: 0 14px 14px 0; font-size: 0.95em; color: var(--muted); }
.note strong { color: var(--ink); }

/* Phone frames around screenshots */
.phone { margin: 0; padding: 10px; background: #0F1230; border-radius: 34px; box-shadow: 0 18px 40px rgba(20, 24, 70, 0.25); max-width: 300px; justify-self: center; }
.phone img { display: block; border-radius: 24px; }
.hero-phone { max-width: 320px; }

/* Video: a poster that becomes YouTube's player when pressed */
.video { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: pointer; background: #000; margin: 24px 0 8px; }
.video img { display: block; width: 100%; opacity: 0.92; transition: opacity 0.2s; }
.video:hover img, .video:focus-visible img { opacity: 1; }
/* Below the poster's words, so it doesn't sit on them. */
.play { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 10px 22px 10px 18px; border-radius: 999px; background: var(--teal); color: #0F1230; font: 800 1em "Roboto", sans-serif; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); white-space: nowrap; }
.play::before { content: ""; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #0F1230; }
.video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; margin: 24px 0 8px; }

/* How it works */
.step { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; margin: 48px 0; }
.step.flip { grid-template-columns: 1fr 300px; }
.step.flip .phone { order: 2; }
.num { margin: 0 0 6px; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #0F1230; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border-radius: 20px; padding: 22px 22px 8px; border: 1px solid var(--rule); }
.card p { margin-top: 0; }
.card .tel { white-space: nowrap; font-weight: 700; }
.tel.emergency { color: var(--emergency); }

/* Sources and privacy */
.chips { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips li { background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 14px; font-size: 0.9em; }
.ticks { list-style: none; padding: 0; max-width: 640px; margin: 0 auto; }
.ticks li { position: relative; padding-left: 32px; margin: 10px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* Questions */
details { background: var(--card); border-radius: 16px; padding: 4px 20px; margin: 10px 0; border: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details p { margin-top: 0; }

/* Footer (the privacy page uses it too) */
.foot { border-top: 1px solid var(--rule); padding: 24px 16px 32px; text-align: center; color: var(--muted); margin-top: 56px; }
.foot p { max-width: 760px; margin: 8px auto; }
.foot img { vertical-align: middle; margin-right: 6px; }
.urgent { max-width: 760px; margin: 0 auto 16px; padding: 12px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); }

/* The privacy page */
.page { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.page h1 { font-size: 2.2em; margin-bottom: 0.2em; }
.page h2 { font-size: 1.4em; margin-top: 1.8em; }
.muted { color: var(--muted); }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero { padding-top: 24px; }
  .hero-grid, .step, .step.flip { grid-template-columns: 1fr; gap: 24px; }
  .step.flip .phone { order: 0; }
  .hero h1 { font-size: 2.2em; }
  .hero-phone { max-width: 240px; }
  .phone { max-width: 260px; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  h2 { font-size: 1.6em; }
  .bar-cta { padding: 6px 12px; }
}
