/* Reuso website: one stylesheet for every page. Colours match the app (app/src/theme.ts). */
:root {
  --bg: #ffffff;
  --surface: #f3f5f8;
  --ink: #16181d;
  --ink-soft: #3d4248;
  --muted: #5f6670;
  --border: #e3e7ec;
  --brand: #1a75bb;
  --brand-dark: #135a91;
  --brand-tint: #e8f5fd;
  --brand-ink: #133a57;
  --orange-tint: #fdf3e7;
  --orange-ink: #8a3f06;
  --radius: 16px;
  --max: 1080px;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

img, svg { max-width: 100%; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.logo-mark { width: 32px; height: 32px; flex: none; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--brand-tint) 0%, var(--bg) 100%); padding: 72px 0 56px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 18px; max-width: 14ch; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--ink-soft); max-width: 40ch; margin: 0 0 28px; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; }
.badge.soon { background: var(--bg); color: var(--ink-soft); border: 1px solid var(--border); }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--surface); }
h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 0 0 6px; }
.section-lead { color: var(--ink-soft); max-width: 60ch; margin: 0 0 32px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
section.alt .card { border-color: transparent; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; margin-bottom: 12px; }

.price-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.price-row:last-child { border-bottom: 0; }
.price-row strong { white-space: nowrap; }

.note { background: var(--brand-tint); color: var(--brand-ink); border-radius: 12px; padding: 14px 16px; font-size: 15px; }
.note.warn { background: var(--orange-tint); color: var(--orange-ink); }

.subhead { margin-bottom: 14px; }
.grid.spaced { margin-bottom: 36px; }
.card.narrow { max-width: 720px; }
.after { margin-top: 18px; }

/* Legal pages */
.doc { padding: 48px 0 64px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 6px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 36px 0 8px; }
.doc h3 { margin-top: 20px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.toc { background: var(--surface); border-radius: 12px; padding: 16px 20px; margin: 0 0 24px; font-size: 15px; }
.toc ol { margin: 6px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-footer { background: var(--ink); color: #c9ced6; padding: 40px 0; font-size: 15px; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h4 { color: #fff; margin: 0 0 8px; font-size: 15px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 4px 0; }
.site-footer .small { color: #9aa2ad; font-size: 13px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; gap: 6px; min-height: 0; }
  .site-header { position: static; }
  .hero { padding: 48px 0 40px; }
  section { padding: 44px 0; }
  .price-row { flex-direction: column; gap: 2px; }
}
