/* Landing page. Colours follow the app (app/lib/theme.dart). */
:root {
  --yellow: #F6C85F;
  --yellow-soft: #FFF3CF;
  --coral: #F47C61;
  --ink: #3F2E2A;
  --ink-2: #674B44;
  --muted: #8C7A74;
  --line: #EADFD9;
  --bg: #FFFCF7;
  --card: #FFFFFF;
  --alt: #FFF8EA;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --yellow-soft: #3A3120;
    --ink: #F6EDE8;
    --ink-2: #E2D2CB;
    --muted: #B3A39C;
    --line: #3B302C;
    --bg: #1E1816;
    --card: #2A2220;
    --alt: #251E1B;
  }
}
:root[data-theme="dark"] {
  --yellow-soft: #3A3120; --ink: #F6EDE8; --ink-2: #E2D2CB; --muted: #B3A39C;
  --line: #3B302C; --bg: #1E1816; --card: #2A2220; --alt: #251E1B;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
body { overflow-x: hidden; }
h1, h2, h3, p { overflow-wrap: break-word; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: #3F2E2A; }
.btn.primary:hover { filter: brightness(.96); }
.btn.ghost:hover { background: var(--yellow-soft); }
.btn.small { min-height: 36px; padding: 0 16px; font-size: .9rem; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.links { display: flex; gap: 20px; margin-right: auto; }
.links a { text-decoration: none; color: var(--ink-2); }
.links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang select {
  min-height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); padding: 0 12px; font: inherit; font-size: .9rem;
}

/* hero */
.hero { background: linear-gradient(180deg, var(--yellow-soft), var(--bg)); padding: 56px 0 72px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--yellow); color: #3F2E2A; font-weight: 600; font-size: .85rem; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.01em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-img img { border-radius: 28px; box-shadow: 0 24px 48px -24px rgba(63, 46, 42, .45); }

/* sections */
.section { padding: 72px 0; }
.section.alt { background: var(--alt); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature h3 { font-size: 1.1rem; }
.feature p { margin: 0; color: var(--ink-2); }
.icon { width: 48px; height: 48px; border-radius: 14px; background: var(--yellow-soft);
  display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 14px; }

.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.how-img { border-radius: 24px; background: #fff; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; gap: 20px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%;
  background: var(--yellow); color: #3F2E2A; font-weight: 700; display: grid; place-items: center; }
.steps strong { font-size: 1.05rem; }
.steps span { color: var(--ink-2); }

.download { text-align: center; }
.dl-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  max-width: 560px; margin: 28px auto 16px; padding: 20px 24px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.dl-meta { display: grid; gap: 2px; }
.dl-meta .muted { font-size: .9rem; }
.dl-qr { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 auto 16px; font-size: .9rem; }
.dl-qr img { background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.note { color: var(--muted); font-size: .9rem; max-width: 560px; margin: 0 auto; }

.foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-in, .how { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .links { display: none; }
  .nav-in { gap: 12px; justify-content: space-between; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .nav-right { gap: 8px; }
  .nav-right .btn.small { padding: 0 12px; }
  .hero { padding: 36px 0 48px; }
  .section { padding: 52px 0; }
  .brand span { display: none; }
  .cta .btn { flex: 1 1 100%; }
  .dl-card .btn { width: 100%; }
}

/* /privacy and /terms (legal.js) */
.legal { max-width: 760px; padding-top: 32px; padding-bottom: 56px; line-height: 1.75; }
.legal h1 { font-size: 1.9rem; margin: 0 0 4px; }
.legal h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink-2, var(--ink)); overflow-wrap: anywhere; }
.legal ul { padding-left: 1.3em; }
.legal li + li { margin-top: 6px; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
