/* Duskeep — marketing & legal site.
   Palette and type mirror lib/theme/duskeep_theme.dart. */

:root {
  color-scheme: light dark;

  --bg: #F6F3EF;
  --bg-2: #EFEAE4;
  --surface: #FFFDFB;
  --ink: #1E2230;
  --ink-dim: #5F6475;
  --line: rgba(30, 34, 48, 0.1);

  --coral: #F08C6A;
  --apricot: #F7B08E;
  --on-coral: #2A1510;
  --coral-text: #A04A32;      /* coral that passes AA as text on linen */
  --coral-text-2: #C46042;

  --peach: #FFD8C2;
  --blush: #F7C9D3;
  --lavender: #DCD3F5;
  --lavender-deep: #C9C6EF;
  --sage: #3F7A57;
  --card-ink: #2A2233;
  --card-ink-dim: #5E5262;

  --dusk: linear-gradient(135deg, var(--peach) 0%, var(--blush) 55%, var(--lavender) 100%);
  --sky: linear-gradient(180deg, #F3E6EE 0%, #F8E3DC 55%, var(--bg) 100%);

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(30, 34, 48, 0.05), 0 8px 24px -8px rgba(30, 34, 48, 0.12);
  --shadow-lg: 0 2px 4px rgba(30, 34, 48, 0.04), 0 24px 48px -16px rgba(60, 40, 70, 0.22);

  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Lora", ui-serif, Georgia, serif;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151D;
    --bg-2: #161B26;
    --surface: #1B2130;
    --ink: #ECEEF4;
    --ink-dim: #9BA3B6;
    --line: rgba(236, 238, 244, 0.1);
    --coral-text: #F4A487;
    --coral-text-2: #F08C6A;
    --sage: #7DB494;
    --dusk: linear-gradient(135deg, #EAC1AD 0%, #E0B3C0 55%, #C3B9E4 100%);
    --sky: linear-gradient(180deg, #1A1D2C 0%, #171A26 60%, var(--bg) 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 48px -16px rgba(0, 0, 0, 0.6);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--coral-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--coral-text-2); }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--bg); }

/* ---------- Header ---------- */

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

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 21px; letter-spacing: -0.03em;
}
.wordmark:hover { color: var(--ink); }
.wordmark img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 1px 3px rgba(30, 34, 48, 0.18); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--ink-dim); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 999px;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { .hide-sm { display: none; } .nav-links a { padding: 8px 10px; } }

/* ---------- Buttons & badge ---------- */

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  height: 56px; padding: 0 22px 0 18px; border-radius: 14px;
  border: 1px solid #000;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.5);
}
.store-badge:hover { color: #fff; transform: translateY(-1px); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge .t { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.store-badge .t small { font-size: 11.5px; font-weight: 500; letter-spacing: 0.01em; }
.store-badge .t strong { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
@media (prefers-color-scheme: dark) { .store-badge { border-color: #A6A6A6; } }
@media (prefers-reduced-motion: reduce) { .store-badge { transition: none; } .store-badge:hover { transform: none; } }

.fine { color: var(--ink-dim); font-size: 14px; }

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

.hero { background: var(--sky); padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }

.hero-icon {
  width: 96px; height: 96px; border-radius: 22px;
  box-shadow: 0 2px 6px rgba(30, 34, 48, 0.08), 0 18px 36px -14px rgba(160, 74, 50, 0.45);
  margin-bottom: 22px;
}
.hero .name { font-weight: 800; font-size: 24px; letter-spacing: -0.035em; margin-bottom: 12px; color: var(--ink); }
.hero h1 { font-size: clamp(42px, 6vw, 68px); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 20px; }
.hero .lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-dim); max-width: 34ch; margin-bottom: 32px; line-height: 1.5; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }

/* The sample page: what Duskeep writes, in the app's Lora voice. */
.page-card {
  background: var(--dusk);
  color: var(--card-ink);
  border-radius: 28px;
  padding: 28px 30px 22px;
  box-shadow: var(--shadow-lg);
  max-width: 470px;
  margin: 0 0 0 auto;
  position: relative;
}
.page-card .meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid rgba(42, 34, 51, 0.14); margin-bottom: 18px; }
.page-card .day { font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--card-ink-dim); }
.page-card .date { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, 0.72); border-radius: 999px; padding: 5px 13px; font-size: 14px; font-weight: 600; color: var(--card-ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #F2C46D; flex: none; }
.dot.sage { background: #7DB494; }
.page-card blockquote { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.65; }
.page-card .foot { margin-top: 18px; font-size: 14px; color: var(--card-ink-dim); display: flex; align-items: center; gap: 8px; }

.moments { list-style: none; margin: 18px 0 0; padding: 0; max-width: 470px; margin-left: auto; display: grid; gap: 10px; }
.moments li {
  display: grid; grid-template-columns: 48px 12px 1fr; gap: 10px; align-items: baseline;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 15px; box-shadow: var(--shadow);
}
.moments time { color: var(--ink-dim); font-variant-numeric: tabular-nums; font-size: 14px; }
.moments .dot { align-self: center; }
.moments q { color: var(--ink); }

@media (max-width: 900px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .page-card, .moments { margin-left: 0; max-width: 560px; }
}
@media (max-width: 480px) {
  .page-card { padding: 22px 22px 18px; border-radius: 24px; }
  .page-card blockquote { font-size: 17px; }
  .hero-icon { width: 80px; height: 80px; border-radius: 18px; }
}

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section.alt { background: var(--bg-2); }
@media (max-width: 640px) { .section { padding: 64px 0; } }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow, .section-head .eyebrow, .doc-hero .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral-text); margin: 0 0 12px; }
.section h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin-bottom: 14px; }
.section-head p { color: var(--ink-dim); font-size: 19px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card h3 { font-size: 21px; font-weight: 700; margin: 18px 0 8px; }
.card p { color: var(--ink-dim); }
.step {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--dusk); color: var(--card-ink); font-weight: 800; font-size: 18px;
}
.ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); color: var(--coral-text); }
.ic svg { width: 22px; height: 22px; }

/* ---------- Screenshots ---------- */

.shots {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.shots li { margin: 0; }
.shots img {
  width: 100%; border-radius: 22px; background: var(--bg-2);
  box-shadow: var(--shadow-lg); aspect-ratio: 720 / 1564;
}
@media (max-width: 900px) {
  .shots {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(62vw, 280px);
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 24px 24px; margin: 0 -24px;
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shots li { scroll-snap-align: center; }
}

/* ---------- Privacy ---------- */

.privacy-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; gap: 32px; } }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.points h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.points p { color: var(--ink-dim); font-size: 16px; }
.more { display: inline-block; margin-top: 22px; font-weight: 600; }

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 880px; margin: 0 auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 32px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan.plus { border: 2px solid var(--coral); }
.plan h3 { font-size: 24px; font-weight: 800; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 17px; font-weight: 600; color: var(--ink-dim); letter-spacing: 0; }
.plan .sub { color: var(--ink-dim); font-size: 15px; margin-bottom: 22px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.plan li svg { width: 20px; height: 20px; margin-top: 3px; color: var(--sage); }
.plan.plus li svg { color: var(--coral-text); }
.plans-note { text-align: center; margin-top: 24px; }

/* ---------- Closing ---------- */

.closing { text-align: center; }
.closing .inner {
  background: var(--dusk); color: var(--card-ink); border-radius: 32px; padding: 64px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.closing h2 { color: var(--card-ink); margin: 0; }
.closing p { color: var(--card-ink-dim); font-size: 18px; max-width: 46ch; }
.closing img { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 12px 28px -12px rgba(160, 74, 50, 0.55); }
.closing .store-badge { margin-top: 8px; }
.closing a:not(.store-badge) { color: #7E3824; }

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

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 15px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot .wordmark { font-size: 18px; }
.foot .wordmark img { width: 26px; height: 26px; border-radius: 7px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { color: var(--ink-dim); text-decoration: none; font-weight: 600; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.copy { color: var(--ink-dim); width: 100%; font-size: 14px; }

/* ---------- Legal & support pages ---------- */

.doc-hero { background: var(--sky); padding: 64px 0 40px; }
.doc-hero h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 800; letter-spacing: -0.035em; }
.doc-hero p { color: var(--ink-dim); margin-top: 12px; font-size: 18px; max-width: 56ch; }

.doc { max-width: 760px; padding: 24px 24px 96px; }
.doc h2 { font-size: 26px; font-weight: 800; margin: 48px 0 14px; scroll-margin-top: 88px; }
.doc h3 { font-size: 19px; font-weight: 700; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 12px 0; }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--coral-text); }
.doc strong { font-weight: 700; }
.doc .summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-top: 8px; box-shadow: var(--shadow);
}
.doc .summary h2 { margin-top: 0; font-size: 19px; }
.doc .summary ul { margin-bottom: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600;
}
.toc a:hover { border-color: var(--coral); }

.callout { border-left: 3px solid var(--coral); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 18px 0; }

details.faq {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin: 10px 0; padding: 0 20px;
}
details.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; padding: 18px 28px 18px 0; position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--ink-dim); border-bottom: 2px solid var(--ink-dim); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
details.faq[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
@media (prefers-reduced-motion: reduce) { details.faq summary::after { transition: none; } }
details.faq summary:focus-visible { outline-offset: 0; }
details.faq > :not(summary) { padding-bottom: 18px; }
details.faq p + p { margin-top: 10px; }

.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--dusk); color: var(--card-ink); border-radius: var(--radius); padding: 26px 28px; margin-top: 8px;
}
.contact-card > div { flex: 1 1 320px; }
.contact-card p { color: var(--card-ink-dim); overflow-wrap: anywhere; }
.contact-card strong { color: var(--card-ink); font-size: 19px; display: block; }
.button {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px;
  border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none;
}
.contact-card .button { background: #1E2230; color: #F6F3EF; }
.button:hover { color: var(--bg); opacity: 0.92; }
.contact-card .button:hover { color: #F6F3EF; }

.wrap.narrow { max-width: 760px; }
