/* Readliva's site: one stylesheet, no external fonts or scripts. Colors are the brand's
   (docs/product-vision.md): emerald accent, ink, mist, light blue, and a touch of orange. */
:root {
  --emerald: #22806a;
  --emerald-soft: rgba(34, 128, 106, 0.12);
  --mint: #6fd9b0;
  --ink: #14262b;
  --ink-2: #3d5258;
  --muted: #5b6f74;
  --mist: #f3f8f7;
  --sky: #d9eefb;
  --sky-deep: #a6d2f0;
  --orange: #f28c5b;
  --surface: #ffffff;
  --surface-2: #f7fbfa;
  --line: rgba(20, 38, 43, 0.09);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 20px 50px -24px rgba(20, 38, 43, 0.35), 0 4px 14px -6px rgba(20, 38, 43, 0.12);
  --shadow-soft: 0 12px 30px -18px rgba(20, 38, 43, 0.3);
  --hero-top: #d9eefb;
  --hero-bottom: #f3f8f7;
  --page: #f3f8f7;
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --emerald: #6fd9b0;
    --emerald-soft: rgba(111, 217, 176, 0.14);
    --ink: #e8f2f0;
    --ink-2: #c3d4d1;
    --muted: #93a8a6;
    --surface: #13242a;
    --surface-2: #172c33;
    --line: rgba(232, 242, 240, 0.09);
    --glass: rgba(16, 30, 35, 0.72);
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 12px 30px -18px rgba(0, 0, 0, 0.7);
    --hero-top: #0f2a35;
    --hero-bottom: #0c1b20;
    --page: #0c1b20;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--emerald); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: var(--glass);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 8px rgba(20, 38, 43, 0.18); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 999px; font-size: 0.95rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--emerald-soft); color: var(--emerald); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: #22806a; color: #fff; box-shadow: 0 10px 24px -10px rgba(34, 128, 106, 0.7); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.btn .soon { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.btn-stack { display: flex; flex-direction: column; line-height: 1.15; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
  padding: 72px 0 96px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; right: -120px; top: -140px; background: radial-gradient(circle, rgba(111, 217, 176, 0.9), transparent 70%); }
.hero::after { width: 420px; height: 420px; left: -160px; bottom: -180px; background: radial-gradient(circle, rgba(166, 210, 240, 0.95), transparent 70%); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); font-size: 0.85rem; font-weight: 600;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.hero h1 {
  font-family: var(--display); font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.04;
  letter-spacing: -0.035em; margin: 18px 0 18px; font-weight: 700;
}
.hero h1 .accent {
  background: linear-gradient(100deg, #22806a 0%, #2fa184 45%, #3a8fc0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-color-scheme: dark) {
  .hero h1 .accent { background-image: linear-gradient(100deg, #6fd9b0 0%, #8de3c3 45%, #8ec9f0 100%); }
}
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 34rem; margin: 0 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: var(--muted); font-size: 0.92rem; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { color: var(--emerald); }

.hero-art { position: relative; justify-self: center; width: min(460px, 100%); }
.hero-art .halo {
  position: absolute; inset: 8% 6% 10%; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.9), rgba(217, 238, 251, 0) 68%);
}
@media (prefers-color-scheme: dark) {
  .hero-art .halo { background: radial-gradient(circle at 50% 45%, rgba(111, 217, 176, 0.22), rgba(15, 42, 53, 0) 68%); }
}
.hero-art .mascot { position: relative; width: 100%; animation: float 6s ease-in-out infinite; }
.bubble {
  position: absolute; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); padding: 12px 16px;
}
.bubble-word { left: -8%; top: 14%; min-width: 210px; animation: float 7s ease-in-out infinite reverse; }
.bubble-word .w { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.bubble-word .ipa { color: var(--muted); font-size: 0.85rem; margin-left: 6px; }
.bubble-word .t { color: var(--emerald); font-weight: 600; margin-top: 2px; }
.bubble-word .t::before { content: "→ "; color: var(--muted); font-weight: 400; }
.bubble-listen { right: -4%; bottom: 16%; display: flex; align-items: center; gap: 10px; border-radius: 999px; padding: 10px 14px; animation: float 8s ease-in-out infinite; }
.play { width: 34px; height: 34px; border-radius: 50%; background: #22806a; color: #fff; display: grid; place-items: center; }
.wave { display: flex; align-items: center; gap: 3px; height: 22px; }
.wave i { display: block; width: 3px; border-radius: 3px; background: var(--emerald); animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(1) { height: 30%; animation-delay: -0.1s; }
.wave i:nth-child(2) { height: 70%; animation-delay: -0.3s; }
.wave i:nth-child(3) { height: 45%; animation-delay: -0.5s; }
.wave i:nth-child(4) { height: 90%; animation-delay: -0.7s; }
.wave i:nth-child(5) { height: 55%; animation-delay: -0.2s; }
.wave i:nth-child(6) { height: 35%; animation-delay: -0.6s; }
.wave i:nth-child(7) { height: 65%; animation-delay: -0.4s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes wave { 0%, 100% { transform: scaleY(0.55); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 56px; }
.kicker { color: var(--emerald); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
h2 { font-family: var(--display); font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -0.03em; margin: 10px 0 14px; }
.section-head p { color: var(--ink-2); font-size: 1.1rem; margin: 0; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 96px; }
.feature.flip .feature-text { order: 2; }
.feature-text h3 { font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.025em; line-height: 1.15; margin: 8px 0 12px; }
.feature-text p { color: var(--ink-2); margin: 0 0 14px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; color: var(--ink-2); }
.ticks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: var(--emerald-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%2322806a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Illustrations of the app, drawn in HTML so they stay sharp and honest. */
.mock {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 28px; box-shadow: var(--shadow); padding: 34px 32px 30px;
}
.mock-bg { position: relative; border-radius: 34px; padding: 26px; background: linear-gradient(145deg, var(--sky) 0%, var(--mist) 100%); }
@media (prefers-color-scheme: dark) { .mock-bg { background: linear-gradient(145deg, #12303b 0%, #0f2228 100%); } }
.page { font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.page .chapter { font-family: var(--font); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.page p { margin: 0 0 10px; }
.hl { background: rgba(111, 217, 176, 0.35); border-radius: 5px; padding: 1px 3px; box-shadow: 0 0 0 1px rgba(34, 128, 106, 0.25); }
.reading { background: rgba(111, 217, 176, 0.22); border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 1px 2px; }
.dim { opacity: 0.45; }
.anchor { position: relative; }
.popover {
  position: absolute; left: -24px; top: calc(100% + 12px); width: 250px; z-index: 2;
  font-family: var(--font); line-height: 1.4; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px;
}
.popover > span { display: block; }
.popover::before {
  content: ""; position: absolute; top: -8px; left: 26px; width: 14px; height: 14px; transform: rotate(45deg);
  background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.popover .row { display: flex !important; justify-content: space-between; align-items: baseline; gap: 10px; }
.popover .w { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.popover .ipa { color: var(--muted); font-size: 0.85rem; }
.popover .t { font-size: 1.15rem; font-weight: 600; color: var(--emerald); margin-top: 4px; }
.popover .lang { margin-top: 10px; display: flex !important; gap: 8px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-2); font-family: var(--font); }

.player {
  margin-top: 18px; display: flex; align-items: center; gap: 14px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; box-shadow: var(--shadow-soft);
  font-family: var(--font); font-size: 0.9rem; color: var(--ink-2);
}
.player .ctrl { color: var(--ink-2); display: grid; place-items: center; }
.player .speed { margin-left: auto; font-weight: 600; }

.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.formats .fmt {
  padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); color: var(--ink);
}
.formats .fmt:nth-child(3n+1) { border-bottom: 3px solid var(--emerald); }
.formats .fmt:nth-child(3n+2) { border-bottom: 3px solid var(--sky-deep); }
.formats .fmt:nth-child(3n) { border-bottom: 3px solid var(--orange); }
.sources { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.9rem; align-items: center; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-soft);
}
.card .icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--emerald-soft); color: var(--emerald); margin-bottom: 16px;
}
.card h3 { font-family: var(--display); font-size: 1.2rem; letter-spacing: -0.015em; margin: 0 0 8px; }
.card p { color: var(--ink-2); margin: 0; }
.langs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.alt { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { .alt { background: #0f2127; } }

/* ---------- Follow Readliva ---------- */
.follow { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { .follow { background: #0f2127; } }
.follow-row {
  list-style: none; padding: 0; margin: 0 auto; max-width: 860px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.follow-btn {
  display: flex; align-items: center; gap: 16px; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; color: var(--ink); font-weight: 600;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.follow-btn:hover {
  text-decoration: none; transform: translateY(-2px);
  border-color: var(--emerald);
  box-shadow: 0 18px 38px -20px rgba(34, 128, 106, 0.45), var(--shadow-soft);
}
.follow-icon {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: var(--emerald-soft); color: var(--emerald);
  display: grid; place-items: center;
}
.follow-text { display: flex; flex-direction: column; line-height: 1.25; }
.follow-name { font-family: var(--display); font-size: 1.08rem; letter-spacing: -0.01em; }
.follow-handle { color: var(--muted); font-weight: 500; font-size: 0.9rem; margin-top: 2px; }

/* Looks */
.looks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.look { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-soft); background: var(--surface); }
.look .paper { height: 130px; padding: 16px; display: flex; flex-direction: column; gap: 7px; }
.look .paper i { display: block; height: 6px; border-radius: 3px; opacity: 0.5; }
.look .paper i:nth-child(2) { width: 85%; } .look .paper i:nth-child(3) { width: 92%; } .look .paper i:nth-child(4) { width: 60%; }
.look .label { padding: 12px 14px 14px; }
.look .label b { display: block; font-size: 0.98rem; }
.look .label span { color: var(--muted); font-size: 0.85rem; line-height: 1.35; display: block; }
.paper.classic { background: #ffffff; } .paper.classic i { background: #1c1c1e; }
.paper.study { background: #fbfdff; } .paper.study i { background: #23466e; }
.paper.lamp { background: #f7edd9; } .paper.lamp i { background: #6b4a1f; }
.paper.night { background: #1c1c1f; } .paper.night i { background: #d9cfc0; }
.paper.midnight { background: #000; } .paper.midnight i { background: #bfc7d0; }
.paper .title-bar { height: 10px !important; width: 50% !important; opacity: 0.85 !important; margin-bottom: 4px; }

/* Privacy band */
.privacy-band { padding: 0 0 96px; }
.band {
  position: relative; overflow: hidden; border-radius: 36px; padding: 56px;
  background: radial-gradient(120% 140% at 85% 20%, #1d4a52 0%, #14262b 55%, #0d1b1f 100%);
  color: #e8f2f0; display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 32px; align-items: center;
}
.band h2 { color: #fff; }
.band p { color: #bfd3d0; margin: 0 0 18px; }
.band .ticks li { color: #d6e5e2; }
.band .ticks li::before { background-color: rgba(111, 217, 176, 0.16); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%236fd9b0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.band a { color: #6fd9b0; font-weight: 600; }
.band .mascot-small { width: min(260px, 100%); justify-self: center; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45)); animation: float 7s ease-in-out infinite; }

/* Final call */
.final { text-align: center; padding: 40px 0 110px; }
.final .app-icon { width: 108px; height: 108px; border-radius: 24px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.final p { color: var(--ink-2); margin: 0 auto 26px; max-width: 34rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 46px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--ink-2); }

/* ---------- Text pages (support, privacy) ---------- */
.page-hero {
  position: relative; overflow: hidden; padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
}
.page-hero::before {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 217, 176, 0.75), transparent 70%); filter: blur(60px); opacity: 0.6;
}
.page-hero .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 760px; }
.page-hero h1 { font-family: var(--display); font-size: clamp(2.2rem, 4.6vw, 3.2rem); letter-spacing: -0.035em; line-height: 1.05; margin: 10px 0 12px; }
.page-hero p { color: var(--ink-2); font-size: 1.15rem; margin: 0; max-width: 38rem; }
.page-hero img { width: 160px; flex: none; animation: float 7s ease-in-out infinite; }
.prose { padding: 56px 0 96px; }
.prose .wrap { max-width: 760px; }
.prose h2 { font-size: 1.45rem; letter-spacing: -0.02em; margin: 42px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.contact-card {
  display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 22px 24px; margin: 0 0 36px;
}
.contact-card .icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--emerald-soft); color: var(--emerald); flex: none; }
.contact-card p { margin: 0; }
.note { color: var(--muted); font-size: 0.95rem; }
.owner { background: #ffe9a8; color: #3b2f00; padding: 0 0.3rem; border-radius: 5px; font-weight: 600; }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .hero { padding: 48px 0 72px; }
  .hero .wrap, .feature, .band { grid-template-columns: 1fr; }
  .hero-art { width: min(380px, 92%); margin-top: 8px; }
  .feature.flip .feature-text { order: 0; }
  .cards { grid-template-columns: 1fr; }
  .follow-row { grid-template-columns: 1fr; max-width: 420px; }
  .looks { grid-template-columns: repeat(2, 1fr); }
  .band { padding: 36px 26px; }
  section { padding: 72px 0; }
  .page-hero img { width: 110px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav a { padding: 8px 9px; }
  .bubble-word { left: -2%; top: 6%; min-width: 0; }
  .bubble-listen { right: 0; }
  /* The word can sit near the edge: the bubble goes under its paragraph, full width. */
  .page p:has(.anchor) { position: relative; }
  .anchor { position: static; }
  .popover { left: 0; right: 0; width: auto; }
  .popover::before { display: none; }
  .nav .wide { display: none; }
  .mock { padding: 26px 20px 22px; }
  .mock-bg { padding: 14px; border-radius: 26px; }
  .page-hero .wrap { flex-direction: column-reverse; align-items: flex-start; }
}
