/* 單手學單字 marketing site. Palette mirrors lib/app_theme.dart so the site and
   the app read as one product: ink #17213A, coral #E95F43, mint #168A72,
   gold #D59416, paper #FBF8F1. Light-first with a dark-mode swap. */

:root {
  --ink: #17213a;
  --muted: #57617a;
  --paper: #fbf8f1;
  --surface: #ffffff;
  --coral: #e95f43;
  --coral-deep: #b73f27;
  --mint: #168a72;
  --gold: #d59416;
  --line: rgba(23, 33, 58, 0.12);
  --chip: #eef4f1;
  --hero-a: #eaf3ef;
  --hero-b: #e7ecfa;
  --hero-c: #fdf1e0;
  --shadow: 0 18px 40px rgba(23, 33, 58, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f0e8;
    --muted: #a3adc4;
    --paper: #0b1120;
    --surface: #182137;
    --coral: #ff9b83;
    --coral-deep: #ffdbd2;
    --mint: #64dcc0;
    --gold: #ffce70;
    --line: rgba(244, 240, 232, 0.14);
    --chip: #202a42;
    --hero-a: #121b30;
    --hero-b: #16203a;
    --hero-c: #241d12;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}

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

/* Traditional Chinese sets better without mid-word breaks. */
html[lang="zh-Hant"] body { word-break: keep-all; line-break: strict; }

.inner { max-width: 1120px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 10px clamp(16px, 4vw, 36px);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; text-decoration: none; }
.brand img { border-radius: 9px; }
.nav-links { display: flex; gap: 16px; margin-left: auto; font-size: 14px; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(140deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%);
  overflow: hidden;
}
.hrow {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(20px, 4vw, 56px); align-items: center;
  padding-top: clamp(40px, 7vw, 84px); padding-bottom: clamp(40px, 7vw, 84px);
}
.eyebrow { font-weight: 700; letter-spacing: 0.08em; color: var(--mint); font-size: 13px; margin: 0 0 10px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.25; margin: 0 0 18px; }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); margin: 0 0 22px; max-width: 40ch; }
.free-note { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.hshots { position: relative; display: flex; justify-content: center; min-height: 420px; }
.hshots img { width: min(46%, 250px); border-radius: 22px; box-shadow: var(--shadow); }
.hshots .s1 { transform: rotate(-5deg) translate(6%, 2%); z-index: 2; }
.hshots .s2 { transform: rotate(5deg) translate(-4%, 9%); }
@media (max-width: 860px) {
  .hrow { grid-template-columns: 1fr; }
  .hshots { min-height: 0; margin-top: 8px; }
}

/* ---------- store badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badges.center { justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: #17213a; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px; padding: 9px 18px 9px 14px; min-width: 176px;
  transition: transform 0.15s ease;
}
@media (prefers-color-scheme: dark) { .badge { background: #28334d; } }
.badge:hover { transform: translateY(-1px); }
.badge svg { width: 26px; height: 26px; flex: none; }
.badge small { display: block; font-size: 11px; opacity: 0.85; line-height: 1.3; }
.badge strong { display: block; font-size: 17px; line-height: 1.3; }
.badge[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* ---------- stats strip ---------- */
.stats { background: var(--ink); color: #f4f0e8; }
@media (prefers-color-scheme: dark) { .stats { background: #182137; } }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 26px 0; }
.stat { text-align: center; padding: 8px 4px; }
.stat strong { display: block; font-size: clamp(20px, 2.4vw, 30px); }
.stat span { font-size: 13px; opacity: 0.8; }
@media (max-width: 700px) { .statgrid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
section { padding: clamp(44px, 6vw, 78px) 0; }
section h2 { font-size: clamp(24px, 3vw, 36px); margin: 0 0 12px; line-height: 1.35; }
section .sub { color: var(--muted); margin: 0 0 32px; max-width: 62ch; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px 20px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ico { font-size: 26px; line-height: 1; margin-bottom: 12px; }

/* ---------- ladder ---------- */
.ladder { display: grid; gap: 10px; }
.rung {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px;
}
.rung b { color: var(--mint); font-size: 15px; }
.rung span { color: var(--muted); font-size: 14.5px; }
.rung em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; font-size: 14px; }
@media (max-width: 620px) {
  .rung { grid-template-columns: 1fr auto; }
  .rung b { grid-column: 1 / -1; }
}

/* ---------- screenshot strip ---------- */
.shots { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.shots img { width: 232px; flex: none; border-radius: 20px; box-shadow: var(--shadow); scroll-snap-align: start; }

/* ---------- faq ---------- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16.5px; }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* ---------- cta ---------- */
.cta { background: var(--chip); text-align: center; }
.cta h2 { margin-bottom: 8px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 14px; }
.frow { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }
.flinks { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- legal pages ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 40px clamp(18px, 4vw, 40px) 72px; }
.legal h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 6px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.legal h2 { font-size: 20px; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .note {
  background: var(--chip); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; margin: 22px 0;
}
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 700; }
.legal .back { display: inline-block; margin-bottom: 24px; color: var(--mint); text-decoration: none; font-weight: 600; }
