/* LifeCheck website. One stylesheet, no scripts. Colours come from the app (Color.kt). */

@font-face {
  font-family: "Spline Sans";
  src: url("fonts/spline-sans.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("fonts/spline-sans-mono.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --rose: #C2185B;
  --rose-deep: #4A0D26;
  --pink: #FCE4EC;
  --plum-soft: #F6E9ED;
  --canvas: #FBF7F8;
  --white: #FFFFFF;
  --ink: #221A1D;
  --muted: #5F5357;
  --tint: #F3ECEE;
  --line: #E6DCDF;
  --outline: #8C7F84;
  --sans: "Spline Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
}
img, video { max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding-left: 1.2em; }
a { color: var(--rose); text-underline-offset: 3px; }
a:hover { color: var(--rose-deep); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 4px; }

.page { max-width: 1240px; margin: 0 auto; padding: 24px 20px 48px; display: flex; flex-direction: column; gap: 56px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--white); padding: 10px 14px; z-index: 5; }

main { display: flex; flex-direction: column; gap: 64px; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-weight: 500; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 600; color: var(--ink); text-decoration: none; }
.brand svg { fill: var(--rose); width: 24px; height: 24px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 0; list-style: none; }
.nav a { color: var(--ink); text-decoration: none; display: inline-block; padding: 10px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--rose); }
.btn { display: inline-block; background: var(--ink); color: var(--white); padding: 12px 20px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.btn:hover { background: var(--rose-deep); color: var(--white); }

/* Type */
h1 { font-size: clamp(40px, 5.2vw, 76px); line-height: 1; font-weight: 500; letter-spacing: -0.04em; text-wrap: balance; }
.lede { color: var(--muted); max-width: 32em; }
.label { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--rose); letter-spacing: 0; }
.big { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.25; font-weight: 500; letter-spacing: -0.02em; }
.small { font-size: 16px; color: var(--muted); }
.todo { background: #FFF1CC; color: #4A3400; padding: 0 4px; border-radius: 3px; }

/* Device picker. Radio buttons drive it, so it works with no JavaScript. */
.pick { position: fixed; top: 0; left: 0; opacity: 0; pointer-events: none; }
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; }
.hero-text { flex: 3 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-stage { flex: 2 1 320px; min-width: 0; display: flex; justify-content: center; align-items: center; min-height: 600px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { cursor: pointer; border: 1.5px solid #BDB0B5; border-radius: 8px; padding: 11px 16px; min-height: 48px; font-size: 16px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.chip small { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.chip:hover { border-color: var(--rose); }

.phone { width: 290px; max-width: 100%; border-radius: 42px; background: var(--ink); padding: 10px; }
.phone .screen { aspect-ratio: 1080 / 2118; border-radius: 32px; overflow: hidden; background: var(--canvas); }
.phone img, .phone video { display: block; width: 100%; height: auto; }
.watch { width: 310px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); padding: 13px; }
.watch .screen { height: 100%; border-radius: 50%; overflow: hidden; background: #000; }
.watch img { display: block; width: 100%; height: 100%; }
.soon { max-width: 300px; border: 1.5px dashed var(--outline); border-radius: 16px; padding: 28px 24px; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.soon strong { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }

/* The five-minute ruler */
.ruler-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 28px clamp(16px, 3vw, 40px) 30px; display: flex; flex-direction: column; gap: 20px; }
.ruler-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 24px; }
.ruler-head .note { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cap .who { display: block; font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--rose); margin-bottom: 6px; }
.ruler { position: relative; padding: 80px 0 86px; }
.track { position: relative; height: 22px; border-left: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, var(--tint) 1.5px 20%); }
.fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--rose); }
.scale { top: 102px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 6px; position: absolute; left: 0; right: 0; }
.flag { position: absolute; cursor: pointer; background: var(--white); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 8px; padding: 8px 14px; min-height: 56px; display: flex; flex-direction: column; justify-content: center; white-space: nowrap; }
.flag .t { font-family: var(--mono); font-size: 12px; }
.flag .n { font-size: 16px; font-weight: 600; line-height: 1.25; }
.flag:hover { border-color: var(--rose); }
.flag.up { top: 12px; border-radius: 8px 8px 8px 0; }
.flag.down { bottom: 0; }
.flag.end { right: 0; bottom: 0; cursor: default; background: var(--tint); border-style: dashed; border-radius: 8px 0 8px 8px; }
.flag.end:hover { border-color: var(--ink); }
.at-0 { left: 0; }
.at-4 { left: 4%; }
.at-20 { left: 20%; }
.at-26 { left: 26%; }

/* A hidden device's step buttons must not take keyboard focus. */
#d-android:checked ~ input[name="watch-step"],
#d-wear:checked ~ input[name="phone-step"],
#d-iphone:checked ~ input[name$="-step"],
#d-applewatch:checked ~ input[name$="-step"] { display: none; }

/* Default: everything device-specific is hidden, then the checked radios switch things on. */
.page .dev, .page .step { display: none; }

#d-android:checked ~ .page .dev-android,
#d-wear:checked ~ .page .dev-wear,
#d-iphone:checked ~ .page .dev-iphone,
#d-applewatch:checked ~ .page .dev-applewatch { display: block; }

#d-android:checked ~ #pa-1:checked ~ .page .step-pa-1,
#d-android:checked ~ #pa-2:checked ~ .page .step-pa-2,
#d-android:checked ~ #pa-3:checked ~ .page .step-pa-3,
#d-wear:checked ~ #wa-1:checked ~ .page .step-wa-1,
#d-wear:checked ~ #wa-2:checked ~ .page .step-wa-2,
#d-wear:checked ~ #wa-3:checked ~ .page .step-wa-3,
#d-wear:checked ~ #wa-4:checked ~ .page .step-wa-4 { display: block; }

#d-android:checked ~ .page label[for="d-android"],
#d-wear:checked ~ .page label[for="d-wear"],
#d-iphone:checked ~ .page label[for="d-iphone"],
#d-applewatch:checked ~ .page label[for="d-applewatch"] { background: var(--pink); color: var(--rose-deep); border-color: var(--rose); }

#pa-1:checked ~ .page label[for="pa-1"],
#pa-2:checked ~ .page label[for="pa-2"],
#pa-3:checked ~ .page label[for="pa-3"],
#wa-1:checked ~ .page label[for="wa-1"],
#wa-2:checked ~ .page label[for="wa-2"],
#wa-3:checked ~ .page label[for="wa-3"],
#wa-4:checked ~ .page label[for="wa-4"] { background: var(--ink); color: var(--white); }

#d-android:focus-visible ~ .page label[for="d-android"],
#d-wear:focus-visible ~ .page label[for="d-wear"],
#d-iphone:focus-visible ~ .page label[for="d-iphone"],
#d-applewatch:focus-visible ~ .page label[for="d-applewatch"],
#pa-1:focus-visible ~ .page label[for="pa-1"],
#pa-2:focus-visible ~ .page label[for="pa-2"],
#pa-3:focus-visible ~ .page label[for="pa-3"],
#wa-1:focus-visible ~ .page label[for="wa-1"],
#wa-2:focus-visible ~ .page label[for="wa-2"],
#wa-3:focus-visible ~ .page label[for="wa-3"],
#wa-4:focus-visible ~ .page label[for="wa-4"] { outline: 3px solid var(--rose); outline-offset: 3px; }

#pa-2:checked ~ .page .dev-android .fill { width: 4%; }
#pa-3:checked ~ .page .dev-android .fill { width: 20%; }
#wa-2:checked ~ .page .dev-wear .fill { width: 4%; }
#wa-3:checked ~ .page .dev-wear .fill,
#wa-4:checked ~ .page .dev-wear .fill { width: 20%; }

/* Video and plain facts */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 72px; }
.split > .media { flex: 0 1 290px; margin: 0 auto; }
.split > .text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.facts { list-style: none; padding: 0; display: flex; flex-direction: column; }
.facts li { padding: 14px 0; border-top: 1px solid var(--line); }
.facts li:first-child { border-top-color: var(--ink); }
.facts li:last-child { border-bottom: 1px solid var(--ink); }

/* About rows */
.about { display: flex; flex-wrap: wrap; gap: 40px 72px; }
.about .why { flex: 3 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rows { flex: 2 1 320px; min-width: 0; }
.row { display: flex; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top-color: var(--ink); }
.row:last-child { border-bottom: 1px solid var(--ink); }
.row h2, .row h3 { flex: 0 0 120px; font-family: var(--mono); font-size: 14px; font-weight: 500; padding-top: 4px; }
.row p { color: var(--muted); overflow-wrap: anywhere; }

/* Text pages */
.doc { max-width: 44em; display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: clamp(36px, 4.4vw, 60px); margin-bottom: 8px; }
.doc h2 { font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 20px; line-height: 1.3; font-weight: 600; margin-top: 12px; }
.doc li { margin-bottom: 6px; }
.notice { background: var(--pink); color: var(--rose-deep); border-radius: 12px; padding: 18px 20px; }

.who-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 28px; }
.who-row > div { flex: 1 1 16em; min-width: 0; }
.who-row p + p { margin-top: 18px; }
.portrait { display: block; width: 200px; height: auto; border-radius: 16px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; color: var(--muted); }
.foot ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot a { color: var(--ink); display: inline-block; padding: 8px 0; }

/* Phones and small tablets: the ruler becomes a plain list of steps. */
@media (max-width: 860px) {
  .page { gap: 44px; }
  .hero-stage { min-height: 0; }
  .ruler { padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .track, .scale { display: none; }
  .flag, .flag.up, .flag.down, .flag.end { position: static; border-radius: 8px; white-space: normal; flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px; }
  .flag .t { flex: 0 0 3.2em; }
  .row { flex-direction: column; gap: 4px; }
  .row h2, .row h3 { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  .top .nav, .btn, .chips { display: none; }
}
