/* 有詞 GotWords 官網樣式
   設計語言依 PRD §10.1：低飽和暖色系、充足留白、清晰層級（禁藍紫漸變、禁高飽和背景）
   色彩來源 mobile/src/theme.ts（light/dark 全套對應） */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --ink: #1C1917;
  --muted: #78716C;
  --line: #E7E5E4;
  --accent: #D97706;
  --accent-deep: #B45309;
  --accent-soft: #F6E8D3;
  --success: #059669;
  --bubble-ai: #F1EBE1;
  --bubble-user: #D97706;
  --bubble-user-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 8px 24px rgba(28, 25, 23, .06);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1080px;
}

/* 官網固定亮色（品牌識別；不跟隨系統深色模式——2026-09-05 用戶裁定） */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang TC", "PingFang SC", "Noto Sans CJK TC", "Microsoft JhengHei",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 .4em; }
h3 { font-size: 1.08rem; margin: 0 0 .35em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 840px; }

.section { padding: 72px 0; }

.section-sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 36px; max-width: 640px; }
.fine { color: var(--muted); font-size: .85rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── 語言建議橫幅 ─────────────────────────── */
.lang-banner[hidden] { display: none; }
.lang-banner {
  display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 8px 16px; background: var(--accent-soft); font-size: .9rem;
}
.lang-banner a { color: var(--accent-deep); font-weight: 600; }
.banner-close {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 1rem; padding: 4px 8px; min-width: 32px; min-height: 32px;
}

/* ── 導覽列 ─────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .95rem; padding: 8px 2px; }
.nav-links a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 12px; margin-left: 8px; }

/* 語言切換 */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .9rem; color: var(--muted); min-height: 44px;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px;
  list-style: none; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); min-width: 150px; z-index: 60;
}
.lang-menu a {
  display: block; padding: 9px 12px; text-decoration: none; font-size: .92rem;
  border-radius: 8px; color: var(--ink); white-space: nowrap;
}
.lang-menu a:hover { background: var(--accent-soft); }
.lang-menu a.current { color: var(--accent-deep); font-weight: 700; }

/* ── 按鈕 ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s ease, transform .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--card); }
.btn-sm { padding: 9px 16px; font-size: .9rem; min-height: 44px; }
.btn-lg { padding: 13px 22px; font-size: 1rem; min-height: 48px; }

/* ── Hero ─────────────────────────────── */
.hero { padding: 72px 0 56px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: .85rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin: 0 0 18px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent-deep); }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 26px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }

.stats { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; gap: 2px; }
.stats strong { font-size: 1.35rem; color: var(--accent-deep); letter-spacing: -0.02em; }
.stats span { font-size: .8rem; color: var(--muted); max-width: 150px; }

/* 音波裝飾 */
.wave { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; height: 28px; align-items: center; }
.wave i {
  width: 5px; border-radius: 3px; background: var(--accent); opacity: .55;
  animation: wave 1.4s ease-in-out infinite;
}
.wave i:nth-child(1) { height: 30%; animation-delay: 0s; }
.wave i:nth-child(2) { height: 55%; animation-delay: .1s; }
.wave i:nth-child(3) { height: 80%; animation-delay: .2s; }
.wave i:nth-child(4) { height: 100%; animation-delay: .3s; }
.wave i:nth-child(5) { height: 70%; animation-delay: .4s; }
.wave i:nth-child(6) { height: 95%; animation-delay: .5s; }
.wave i:nth-child(7) { height: 60%; animation-delay: .6s; }
.wave i:nth-child(8) { height: 85%; animation-delay: .7s; }
.wave i:nth-child(9) { height: 45%; animation-delay: .8s; }
.wave i:nth-child(10) { height: 75%; animation-delay: .9s; }
.wave i:nth-child(11) { height: 50%; animation-delay: 1s; }
.wave i:nth-child(12) { height: 35%; animation-delay: 1.1s; }
@keyframes wave { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1.25); } }

/* 對話示意卡（純對話，不模擬 App 畫面） */
.hero-visual { display: flex; flex-direction: column; align-items: center; }
.chat-card {
  width: min(380px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow); padding: 22px;
}
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble {
  margin: 0; padding: 10px 14px; border-radius: 18px; font-size: .92rem; max-width: 85%;
  line-height: 1.55;
}
.bubble.ai { background: var(--bubble-ai); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble.ai.ok { border: 1px solid color-mix(in srgb, var(--success) 35%, transparent); }
.bubble.user {
  background: var(--bubble-user); color: var(--bubble-user-ink);
  border-bottom-right-radius: 6px; align-self: flex-end;
}
.chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); font-size: .82rem; color: var(--muted);
  min-height: 36px;
}
.mock-note { color: var(--muted); font-size: .8rem; margin: 12px 0 0; }

/* ── 卡片網格 ───────────────────────────── */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.step { counter-increment: step; position: relative; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step::before {
  content: counter(step); position: absolute; top: -14px; left: 20px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700;
}
.step h3 { margin-top: 6px; }

.feature .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft);
  font-size: 1.3rem; margin-bottom: 12px;
}

.manifesto {
  margin: 48px auto 0; max-width: 680px; text-align: center;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem); font-weight: 600; line-height: 1.5;
  color: var(--ink); position: relative; padding: 8px 0;
}
.manifesto::before, .manifesto::after {
  content: ""; display: block; width: 56px; height: 3px; border-radius: 2px;
  background: var(--accent); margin: 18px auto;
}

/* ── 對比表 ─────────────────────────────── */
.table-wrap {
  border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto;
  background: var(--card); box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { font-size: .88rem; color: var(--muted); font-weight: 600; }
thead th:last-child, tbody td.got-col { background: var(--accent-soft); }
thead th:last-child { color: var(--accent-deep); font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }
td { color: var(--muted); }
.mark { font-weight: 600; }
.mark.yes { color: var(--success); }
.mark.part { color: var(--accent-deep); }
.mark.no { color: var(--muted); opacity: .7; }

/* ── 場景 chips ─────────────────────────── */
.scenes { margin-top: 32px; }
.scenes p { font-weight: 600; margin: 0 0 12px; }
.scene-chips { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; margin: 0; padding: 0; }
.scene-chips .chip { background: var(--card); }
.safety { margin-top: 20px; }

/* ── 等候名單 ───────────────────────────── */
.dl-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 40px 36px; text-align: center;
}
.dl-panel > p { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }
.waitlist { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.waitlist input {
  flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 14px; font-size: 1rem; background: var(--bg); color: var(--ink); min-height: 48px;
}
.waitlist input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.form-msg { min-height: 1.4em; margin: 14px 0 0; font-size: .92rem; }
.form-msg.ok { color: var(--success); }
.form-msg.warn { color: var(--accent-deep); }
.form-msg.err { color: #DC2626; }

/* ── FAQ ─────────────────────────────── */
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card);
  margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent-deep); font-size: 1.2rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: .95rem; }

/* ── 收尾 CTA ───────────────────────────── */
.closing {
  padding: 88px 0; text-align: center; background: var(--accent-soft);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.closing-line { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 700; margin: 0 0 8px; }
.closing-sub { color: var(--muted); margin: 0 0 28px; }

/* ── Footer ─────────────────────────────── */
.site-footer { padding: 56px 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px;
}
.footer-brand .brand-row { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 10px; }
.footer-brand .brand-row img { border-radius: 6px; }
.tagline { margin: 0 0 14px; font-weight: 600; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 { font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.footer-col a { text-decoration: none; color: var(--muted); font-size: .93rem; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 20px; display: flex;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-bottom p { margin: 0; }

/* ── 進場動畫（尊重 reduced-motion）──────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .wave i { animation: none; }
}

/* ── 響應式 ─────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .stats { justify-content: center; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
}

@media (max-width: 620px) {
  .section { padding: 52px 0; }
  .hero { padding: 48px 0 40px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .lang-self { display: none; }
  .waitlist { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .dl-panel { padding: 28px 20px; }
  .stats { gap: 18px; }
  .stats span { max-width: 110px; }
}
