/* Lilt Reader website. Matches the app: walnut-brown accent, serif headings (New York on
   Apple devices), light and dark themes. No web fonts or third-party requests. */

:root {
  --bg: #fbf9f6;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --fg: #1d1b20;
  --muted: #625e69;
  --line: #e6e0d6;
  --accent: #8b5e3c;
  --accent-strong: #714a2d;
  --accent-soft: #f3e8dc;
  --highlight: rgba(139, 94, 60, 0.18);
  --shadow: 0 1px 2px rgba(29, 27, 32, 0.06), 0 12px 32px rgba(29, 27, 32, 0.08);
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121114;
    --surface: #1b1a1f;
    --surface-2: #232129;
    --fg: #ecebef;
    --muted: #a5a1ad;
    --line: #2f2c36;
    --accent: #c6946a;
    --accent-strong: #d9ac85;
    --accent-soft: #3a2a1e;
    --highlight: rgba(198, 148, 106, 0.30);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
  /* The phone's dark frame needs an edge against the dark page. */
  .phone { background: #2b2832; box-shadow: 0 0 0 1px #3d3946, var(--shadow); }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--sans);
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
                     gap: 8px 16px; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none;
         font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }

/* Buttons */

.button { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px;
          background: var(--fg); color: var(--bg); font-weight: 600; text-decoration: none; }
.button svg { width: 20px; height: 20px; }
.button.secondary { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.button[aria-disabled="true"] { cursor: default; }
.button small { display: block; font-size: 0.72rem; font-weight: 500; opacity: 0.8; line-height: 1.1; }
.button span { line-height: 1.15; text-align: left; }

/* Hero */

.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); margin: 0 0 16px; letter-spacing: -0.01em; }
.hero p.lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; max-width: 34ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; } }

/* Phone mock-up of the reader */

.phone { width: min(320px, 100%); margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 44px; padding: 12px;
         background: #1d1b20; box-shadow: var(--shadow); }
.screen { height: 100%; border-radius: 34px; background: var(--surface); overflow: hidden;
          display: flex; flex-direction: column; }
.screen-top { padding: 18px 20px 8px; font-size: 0.72rem; color: var(--muted); text-align: center; }
.screen-text { flex: 1; padding: 6px 20px; font-family: var(--serif); font-size: 0.86rem; line-height: 1.55; overflow: hidden; }
.screen-text h4 { font-size: 1rem; margin: 0 0 8px; }
.screen-text p { margin: 0 0 10px; }
.screen-text mark { background: var(--highlight); color: inherit; border-radius: 4px; padding: 1px 0; }
.screen-bar { border-top: 1px solid var(--line); padding: 10px 18px 22px; display: flex; align-items: center;
              justify-content: space-between; font-size: 0.72rem; color: var(--muted); }
.screen-bar .play { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.screen-bar .play svg { width: 16px; height: 16px; fill: #fff; }
.progress { height: 3px; background: var(--line); border-radius: 2px; margin: 0 18px 8px; }
.progress span { display: block; height: 100%; width: 38%; background: var(--accent); border-radius: 2px; }

/* Sections */

section { padding: 56px 0; }
section.alt { background: var(--surface-2); }
.section-head { max-width: 640px; margin: 0 0 32px; }
.section-head h2 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.08rem; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card h3 { font-size: 1.2rem; margin: 12px 0 6px; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; }
.icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.8;
            stroke-linecap: round; stroke-linejoin: round; }

.pro-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-family: var(--sans);
           font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; vertical-align: middle;
           background: var(--accent); color: #fff; }

/* Steps */

.steps { counter-reset: step; display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
                    background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps h3 { margin: 0 0 6px; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); }

/* Pricing */

.plans { display: grid; gap: 16px; }
@media (min-width: 860px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.plan.pro { border: 2px solid var(--accent); }
.plan h3 { font-size: 1.5rem; margin: 0 0 4px; }
.plan .price { font-size: 1rem; color: var(--muted); margin: 0 0 18px; }
.plan ul { margin: 0; padding: 0; list-style: none; }
.plan li { padding: 8px 0 8px 30px; position: relative; border-top: 1px solid var(--line); }
.plan li:first-child { border-top: 0; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px;
                   border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.price-options { display: grid; gap: 10px; margin: 0 0 18px; }
@media (min-width: 520px) { .price-options { grid-template-columns: repeat(3, 1fr); } }
.price-option { border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.price-option strong { display: block; font-size: 1.25rem; font-family: var(--serif); }
.price-option span { color: var(--muted); font-size: 0.85rem; }
.fine { color: var(--muted); font-size: 0.85rem; margin-top: 16px; }

/* Privacy callout */

.callout { display: grid; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line);
           border-radius: 20px; padding: 28px; }
@media (min-width: 760px) { .callout { grid-template-columns: auto 1fr; } }
.callout h2 { margin: 0 0 8px; font-size: 1.6rem; }
.callout p { margin: 0; color: var(--muted); }
.callout .icon { width: 56px; height: 56px; border-radius: 16px; }
.callout .icon svg { width: 30px; height: 30px; }

/* Document pages (privacy, terms, support) */

.doc { max-width: 720px; margin: 0 auto; padding: 48px 16px 64px; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.6rem); margin: 0 0 8px; }
.doc h1 + p { color: var(--muted); }
.doc h2 { font-size: 1.4rem; margin: 2.2rem 0 0.6rem; padding-top: 0.4rem; border-top: 1px solid var(--line); }
.doc h3 { font-family: var(--sans); font-size: 1.05rem; margin: 1.5rem 0 0.3rem; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin: 0.45rem 0; }
.doc code { font-size: 0.92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* Footer */

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

.not-found { text-align: center; padding: 96px 16px; }
.not-found h1 { font-size: 2.4rem; margin: 0 0 8px; }
.not-found p { color: var(--muted); }
