/* 注音學英文 官方網站 */
:root {
  --brand: #ff8a00;
  --brand-deep: #e67600;
  --accent: #ff5c8a;
  --accent-soft: #ffe3ec;
  --bg: #fffaf3;
  --surface: #ffffff;
  --surface-muted: #fff1df;
  --text: #2b2118;
  --text-2: #6b5d50;
  --line: #f0e3d2;
  --shadow: 0 10px 30px rgba(120, 70, 10, 0.10);
  --radius: 20px;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17130f;
    --surface: #221c16;
    --surface-muted: #2c241c;
    --text: #f6ede4;
    --text-2: #c2b3a4;
    --line: #3a3027;
    --accent-soft: #3d2330;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #17130f;
  --surface: #221c16;
  --surface-muted: #2c241c;
  --text: #f6ede4;
  --text-2: #c2b3a4;
  --line: #3a3027;
  --accent-soft: #3d2330;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.75;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-deep); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) a { color: var(--brand); } }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--text-2); font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-muted); }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 24px; padding: 6px 8px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 16px; border: 2px solid transparent; }
.btn-primary { background: var(--brand); color: #fff !important; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { border-color: var(--line); color: var(--text) !important; background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Hero */
.hero { padding: 64px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 700;
  font-size: 14px; padding: 4px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.2; margin: 16px 0; letter-spacing: 0.02em; }
.hero h1 .hl { color: var(--brand); }
.hero p.lead { font-size: 18px; color: var(--text-2); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) {
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: 1fr; }
}

/* Phone mock */
.phone { width: 280px; max-width: 100%; margin: 0 auto; background: #1d1712; border-radius: 40px; padding: 12px;
  box-shadow: 0 30px 60px rgba(120, 70, 10, 0.25); }
.screen { background: #fffaf3; border-radius: 30px; overflow: hidden; color: #2b2118; }
.screen-top { background: linear-gradient(135deg, #ff9d2e, #ff7a00); color: #fff; padding: 22px 18px 34px;
  border-radius: 0 0 50% 50% / 0 0 22px 22px; }
.screen-top small { opacity: 0.9; font-size: 12px; }
.screen-top .bar { height: 6px; background: rgba(255,255,255,0.35); border-radius: 6px; margin-top: 8px; overflow: hidden; }
.screen-top .bar i { display: block; width: 65%; height: 100%; background: #fff; border-radius: 6px; }
.card { margin: -18px 14px 14px; background: #fff; border-radius: 22px; padding: 20px 16px; text-align: center;
  box-shadow: 0 8px 20px rgba(120, 70, 10, 0.12); }
.card .word { font-size: 38px; font-weight: 800; letter-spacing: 0.02em; }
.card .ipa { color: #6b5d50; font-size: 14px; }
.card .bpmf { color: #ff7a00; font-size: 20px; font-weight: 700; margin: 6px 0; letter-spacing: 0.1em; }
.card .zh { font-size: 15px; }
.card .stars { color: #ff8a00; letter-spacing: 3px; margin-top: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 14px 18px; }
.grid4 span { background: #fff1df; border-radius: 12px; font-size: 11px; padding: 8px 2px; text-align: center; }

/* Sections */
section.block { padding: 56px 0; }
section.block.alt { background: var(--surface-muted); }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 8px; }
.section-title p { color: var(--text-2); margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: var(--surface-muted); margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--text-2); font-size: 15px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split h2 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 12px; }
.split p { color: var(--text-2); }
ul.check { list-style: none; padding: 0; margin: 16px 0 0; }
ul.check li { padding-left: 30px; position: relative; margin: 8px 0; }
ul.check li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 13px; display: grid; place-items: center; margin-top: 3px; font-weight: 700; }

.beasts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.beast { border-radius: var(--radius); padding: 22px 18px; color: #fff; }
.beast b { font-size: 22px; display: block; }
.beast span { font-size: 14px; opacity: 0.92; }
.b-red { background: linear-gradient(135deg, #ff6a4d, #e23d3d); }
.b-black { background: linear-gradient(135deg, #3f5568, #22313f); }
.b-blue { background: linear-gradient(135deg, #2fb88a, #13856a); }
.b-white { background: linear-gradient(135deg, #b7a998, #7d6f62); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 10px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }

.download { text-align: center; background: linear-gradient(135deg, #ff9d2e, #ff6a00); color: #fff; border-radius: 28px;
  padding: 48px 24px; }
.download h2 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 34px); }
.download p { margin: 0 0 24px; opacity: 0.95; }
.download .cta { justify-content: center; }
.download .btn { background: #fff; color: #2b2118 !important; }
.download .btn:hover { background: #fff1df; }

/* Docs (privacy / disclaimer / support) */
.doc { max-width: 780px; margin: 0 auto; padding: 40px 20px 72px; }
.doc h1 { font-size: clamp(28px, 5vw, 38px); margin: 0 0 6px; }
.doc .meta { color: var(--text-2); font-size: 14px; margin-bottom: 28px; }
.doc h2 { font-size: 20px; margin: 36px 0 8px; padding-top: 8px; }
.doc h3 { font-size: 17px; margin: 20px 0 4px; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.toc b { display: block; margin-bottom: 4px; }
.toc ol { margin: 0; }
.note { background: var(--surface-muted); border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); }
th, td { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { background: var(--surface-muted); }

.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
@media (max-width: 600px) { .contact-cards { grid-template-columns: 1fr; } }
.contact { display: block; text-decoration: none; color: var(--text) !important; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.contact:hover { border-color: var(--brand); }
.contact .ico { font-size: 28px; }
.contact b { display: block; font-size: 18px; margin-top: 6px; }
.contact span { color: var(--text-2); font-size: 14px; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 6px; }
details p { margin: 6px 0 0; color: var(--text-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--text-2); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }

/* App store badges */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.download .store-badges { justify-content: center; }
.store-badge { display: inline-block; line-height: 0; transition: transform .15s, opacity .15s; }
.store-badge:hover { transform: translateY(-2px); opacity: .9; }
.store-badge img { height: 52px; width: auto; display: block; }
@media (max-width: 480px) { .store-badge img { height: 44px; } }
