/*
 * Dawnline site: Privacy, Terms, Support and the home page.
 * Plain CSS only: vercel.json allows styles and images from this site alone, so no web fonts,
 * no inline styles and no scripts. The system font is San Francisco on iPhone, like the app.
 */

:root {
  --bg: #f6f2ec;
  --surface: #fffdf9;
  --surface-2: #fbf5ee;
  --ink: #1c1f26;
  --muted: #565c69;
  --line: rgba(28, 31, 38, 0.09);
  --accent: #a85512;
  --accent-soft: #f6e4d4;
  --focus: #d2701f;
  --hero-top: #fff3e6;
  --hero-mid: #ffdcbd;
  --hero-end: #f7c3a5;
  --sun: rgba(255, 246, 228, 0.95);
  --shadow: 0 1px 2px rgba(60, 36, 16, 0.05), 0 12px 32px -12px rgba(60, 36, 16, 0.16);
  --radius: 20px;
  --wrap: 1080px;
  --read: 68ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --surface: #131a2d;
    --surface-2: #182038;
    --ink: #f3efe6;
    --muted: #aab1c6;
    --line: rgba(243, 239, 230, 0.10);
    --accent: #f2a65a;
    --accent-soft: rgba(242, 166, 90, 0.14);
    --focus: #f2a65a;
    --hero-top: #050816;
    --hero-mid: #0b1638;
    --hero-end: #5a3324;
    --sun: rgba(255, 200, 150, 0.30);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--accent); }
strong { font-weight: 650; }

.wrap { width: min(var(--wrap), 100% - 40px); margin: 0 auto; }

.skip { position: absolute; left: -999px; top: 12px; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 12px; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.mark { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(160deg, #fff3e6, #f7c3a5); color: #1c1f26; box-shadow: inset 0 0 0 1px rgba(28, 31, 38, 0.06); }
.mark svg { width: 22px; height: 22px; }

.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 550; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--ink); background: var(--line); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(172deg, var(--hero-top) 0%, var(--hero-mid) 55%, var(--hero-end) 100%);
  color: #1c1f26;
  padding: 64px 0 72px;
}
@media (prefers-color-scheme: dark) { .hero { color: #f3efe6; } }
/* The rising sun: a soft disc sitting on the bottom edge. Drawn in CSS, no image. */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; bottom: -260px; width: 620px; height: 620px; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--sun) 0%, transparent 62%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(28, 31, 38, 0.18), transparent);
}
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.72; margin: 0 0 12px; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 750; letter-spacing: -0.03em; max-width: 16ch; }
.lede { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; margin: 16px 0 0; max-width: 44ch; opacity: 0.86; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.chips li { margin: 0; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(28, 31, 38, 0.06); }
@media (prefers-color-scheme: dark) { .chips li { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); } }

/* ---------- At a glance ---------- */

.glance { margin-top: -40px; position: relative; }
.glance ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.glance li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.glance strong { display: block; font-size: 16px; margin: 10px 0 4px; }
.glance span:not(.icon) { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.icon svg { width: 22px; height: 22px; }

/* ---------- Document layout ---------- */

.doc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding: 56px 0 72px; align-items: start; }
.toc { position: sticky; top: 92px; font-size: 14.5px; }
.toc p { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.toc details { display: none; }

.article { max-width: var(--read); }
.article section { padding: 8px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.article section:last-child { border-bottom: 0; margin-bottom: 0; }
.article h2 { font-size: 24px; font-weight: 700; margin: 0 0 12px; display: flex; gap: 12px; align-items: baseline; }
.article h2 .n { flex: none; font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 22px; }
.article h3 { font-size: 18px; margin: 18px 0 8px; }

.callout { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 0 0 14px; box-shadow: var(--shadow); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.path { font-weight: 600; }

/* Definition-style rows for services, plans and retention. */
.rows { list-style: none; padding: 0; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.rows li { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; }
.rows li:first-child { border-top: 0; }
.rows b { font-weight: 650; }

/* ---------- Support ---------- */

.contact { margin-top: -40px; position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--muted); }
.email { font-size: 20px; font-weight: 650; color: var(--ink); word-break: break-word; margin: 4px 0 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; background: #1c1f26; color: #fff; font-weight: 650; text-decoration: none; }
.button:hover { text-decoration: none; filter: brightness(1.15); }
.button .sr-icon { display: inline-flex; }
.button svg { width: 18px; height: 18px; }
@media (prefers-color-scheme: dark) { .button { background: #f3efe6; color: #1c1f26; } }
.tips { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; }

.quick { padding: 48px 0 8px; }
.quick h2, .faq h2 { font-size: 26px; margin-bottom: 18px; }
.quick ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.quick li { margin: 0; }
.quick a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; color: var(--ink); text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.quick strong { display: block; margin: 10px 0 2px; }
.quick span:not(.icon) { color: var(--muted); font-size: 14.5px; line-height: 1.5; display: block; }

.faq { padding: 40px 0 72px; }
.faq > * { max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; scroll-margin-top: 92px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 650; position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 160ms ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details > :not(summary) { padding: 0 18px; color: var(--muted); }
.faq details > :last-child { padding-bottom: 16px; margin-bottom: 0; }

/* ---------- Home ---------- */

.home-hero { padding: 88px 0 96px; }
.home-hero h1 { max-width: 14ch; }
.store { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; min-height: 52px; padding: 0 22px; border-radius: 14px; background: #1c1f26; color: #fff; font-weight: 650; text-decoration: none; }
.store:hover { text-decoration: none; filter: brightness(1.15); }
@media (prefers-color-scheme: dark) { .store { background: #f3efe6; color: #1c1f26; } }
.features { padding: 0 0 72px; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* Filled in before release: highlighted so none is missed. */
.todo { background: rgba(210, 112, 31, 0.16); color: inherit; border-radius: 6px; padding: 0 5px; }

/* ---------- Small screens ---------- */

/* Home: app screenshots */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; }
.phone { display: block; width: 100%; max-width: 300px; margin: 0 auto; padding: 9px; border-radius: 46px; background: #1c1f26; box-shadow: 0 30px 60px -24px rgba(90, 51, 36, 0.45), 0 0 0 1px rgba(28, 31, 38, 0.08); }
.phone img { display: block; width: 100%; height: auto; border-radius: 37px; }
@media (prefers-color-scheme: dark) { .phone { background: #2a3149; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08); } }
.hero-phone { position: relative; z-index: 1; transform: rotate(2deg); max-width: 290px; }
.screens { padding: 8px 0 80px; }
.screens h2 { font-size: 26px; margin-bottom: 6px; }
.screens .lede { color: var(--muted); margin: 0 0 28px; max-width: 46ch; }
.screens ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.screens li { margin: 0; }
.screens figure { margin: 0; }
.screens .phone { max-width: 260px; }
.screens figcaption { text-align: center; margin-top: 18px; }
.screens figcaption strong { display: block; }
.screens figcaption span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.5; margin-top: 2px; }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-phone { transform: none; max-width: 240px; }
}
@media (max-width: 560px) {
  .screens ul { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; gap: 18px; }
  .screens li { scroll-snap-align: center; }
  .screens .phone { max-width: 220px; }
}
@media print { .phone, .screens { display: none; } }

@media (max-width: 900px) {
  .glance ul, .quick ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: 1fr; gap: 8px; padding-top: 36px; }
  .toc { position: static; }
  .toc > p, .toc > ol { display: none; }
  .toc details { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin-bottom: 20px; }
  .toc summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
  .toc details ol { margin-bottom: 12px; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .topbar .wrap { min-height: 56px; }
  .nav a { padding: 10px 10px; font-size: 14.5px; }
  .hero { padding: 44px 0 64px; }
  .glance ul { grid-template-columns: 1fr; }
  .glance li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .glance li strong { margin-top: 0; }
  .glance li .icon { grid-row: span 2; }
  .quick ul { grid-template-columns: 1fr; }
  .rows li { grid-template-columns: 1fr; gap: 2px; }
  .article h2 { font-size: 22px; }
}

@media (max-width: 380px) {
  .brand > span:last-child { display: none; }
}

@media print {
  .topbar, .toc, .footer nav, .skip { display: none; }
  .hero { background: none; padding: 0 0 16px; }
  .hero::before, .hero::after { display: none; }
  body { background: #fff; color: #000; }
}
