/* sketchpebble landing page - the Daylight direction (chosen 18 Sep).
   Warm white, a soft wash of sun and sky, one calm teal accent, rounded
   buttons. System fonts, no outside requests. */

:root {
  color-scheme: light dark;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --bg: #fffdf9;
  --surface: #ffffff;
  --ink: #0f1826;
  --muted: #4a5561;
  --faint: #6b7580;
  --line: #efebe2;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f4f1;
  --accent-soft-ink: #0b5c56;
  --sun: #fff3cf;
  --sky: #e6f4ff;
  --pill-ink: #7a5b00;
  --pill-line: #efe6cf;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418;
    --surface: #161d22;
    --ink: #edf2f4;
    --muted: #a7b3bc;
    --faint: #8a969f;
    --line: #26313a;
    --accent: #3fbfae;
    --accent-ink: #0b1614;
    --accent-soft: #15302d;
    --accent-soft-ink: #8fe0d4;
    --sun: #3a2f12;
    --sky: #12263a;
    --pill-ink: #f0cf73;
    --pill-line: #4a3d18;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--ink); font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(700px 420px at 90% -6%, var(--sun) 0%, transparent 70%),
    radial-gradient(800px 480px at 105% 28%, var(--sky) 0%, transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
a { color: inherit; }
h1, h2 { letter-spacing: -.02em; }

/* --- nav --- */
.nav {
  display: flex; align-items: center; gap: 28px;
  max-width: 1160px; margin: 0 auto; padding: 20px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.mark-body { fill: var(--surface); stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.mark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.mark-top { fill: var(--accent); opacity: .18; }
.links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover { color: var(--ink); }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font: 600 15px/1 var(--font);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  white-space: nowrap;
}
.btn.sm { padding: 8px 16px; font-size: 14px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--faint); }
.btn.tonal { background: var(--accent-soft); color: var(--accent-soft-ink); }
.btn:focus-visible, .links a:focus-visible, .brand:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}

/* --- hero --- */
main { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.hero {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px;
  align-items: center; padding: 48px 0 24px;
}
.pill {
  display: inline-block; font-size: 13px; font-weight: 600; padding: 5px 13px;
  border-radius: 999px; background: var(--surface); color: var(--pill-ink);
  border: 1px solid var(--pill-line);
}
.hero h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.06; margin: 20px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 18px; color: var(--muted); margin: 0; max-width: 34em; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.hero-model { margin: 0; }
.stage {
  position: relative; aspect-ratio: 1.15 / 1; width: 100%;
  border-radius: 22px; overflow: hidden; cursor: grab;
  touch-action: pan-y;             /* vertical swipes still scroll the page */
}
.stage:active { cursor: grabbing; }
.stage canvas { display: block; width: 100% !important; height: 100% !important; }
.fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Belt and braces: the UA [hidden] rule does not reach SVG elements. */
.fallback[hidden], .stage[data-ready] .fallback { display: none; }
.hero-model figcaption {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 10px; min-height: 38px;
}
.hint { font-size: 13px; color: var(--faint); }

/* --- sections --- */
.steps, .uses {
  display: grid; gap: 16px; margin: 40px 0 0;
}
.steps { grid-template-columns: repeat(3, 1fr); }
.uses { grid-template-columns: repeat(2, 1fr); }
.step, .uses article, .fits, .trial {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.step h2, .uses h2, .fits h2, .trial h2 { font-size: 18px; margin: 12px 0 6px; }
.uses h2, .fits h2, .trial h2 { margin-top: 0; }
.step p, .uses p, .fits p, .trial p { margin: 0; color: var(--muted); font-size: 15.5px; }
.n { width: 36px; height: 36px; border-radius: 10px; display: grid;
  place-items: center; font-size: 17px; color: var(--ink); }
.n.a { background: var(--sun); } .n.b { background: var(--accent-soft); }
.n.c { background: var(--sky); }
.fits, .trial { margin-top: 16px; }
.trial { background: transparent; }

/* --- footer --- */
.foot {
  max-width: 1160px; margin: 48px auto 0; padding: 22px 24px 40px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--faint);
}
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* --- phone --- */
@media (max-width: 820px) {
  .nav { gap: 12px; padding: 16px; }
  .links { display: none; }
  .nav .btn { margin-left: auto; }
  main { padding: 0 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; gap: 24px; }
  .steps, .uses { grid-template-columns: 1fr; }
  .foot { padding: 20px 16px 32px; }
}

/* ---- privacy & terms window (legal.js) ------------------------------- */
/* The same component as the app's (src/epover_service/static/app.css):
   opens over the page, and closing it leaves the visitor where they were. */
.legal-dialog {
  width: min(720px, calc(100vw - 32px)); max-height: min(82vh, 900px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  box-shadow: 0 8px 30px rgba(16, 24, 40, .14); overflow: hidden;
  font-family: var(--font); line-height: 1.55;
}
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog::backdrop { background: rgba(15, 24, 38, .45); }
.legal-head {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.legal-head h2 { flex: 1; margin: 0; font-size: 19px; letter-spacing: -.01em; }
.legal-full { font-size: 13px; white-space: nowrap; color: var(--accent); }
.legal-close {
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px;
  font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
  background: transparent; color: var(--muted);
}
.legal-close:hover { background: var(--accent-soft); color: var(--ink); }
.legal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.legal-body { overflow-y: auto; padding: 8px 24px 24px; outline: none; font-size: 15px; }
.legal-body .card { padding: 18px 0; border-bottom: 1px solid var(--line); }
.legal-body .card:last-child { border-bottom: 0; }
.legal-body h2 { font-size: 16px; margin: 0 0 6px; }
.legal-body .sub { color: var(--muted); }
.legal-body mark { background: var(--sun); color: inherit; padding: 0 2px; }
.legal-body a { color: var(--accent); }
@media (max-width: 560px) {
  .legal-dialog { width: 100vw; max-width: 100vw; max-height: 92vh;
    margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0; }
  .legal-full { display: none; }
}
