/* 公幼時程官網樣式：沿用 App 綠色主色與圓體、厚邊卡片語彙；支援深色模式與 reduced-motion */
:root {
  --green: #58cc02;
  --green-depth: #58a700;
  --green-text: #3f7d00; /* 白字底色／連結色，對比 ≥ 4.5 */
  --blue: #1cb0f6;
  --orange: #ff9600;
  --gold: #ffc800;
  --bg: #ffffff;
  --bg-soft: #f6fbee;
  --card: #ffffff;
  --border: #e5e5e5;
  --text: #1f2a1a;
  --muted: #5b6656;
  --shadow: 0 10px 30px rgba(40, 80, 0, 0.08);
  --radius: 20px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green-text: #7fe02e;
    --bg: #131f24;
    --bg-soft: #17262c;
    --card: #202f36;
    --border: #37464f;
    --text: #eef4ea;
    --muted: #a7b5ad;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.75;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--green-text); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: .01em; }
.nb { display: inline-block; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--green-text); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* 導覽列 */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--green-text); }
.menu-btn { display: none; background: none; border: 2px solid var(--border); border-radius: 12px; width: 44px; height: 44px; color: var(--text); cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; margin: auto; position: relative; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; left: 0; }
.menu-btn span::after { position: absolute; top: 6px; left: 0; }

/* 按鈕：立體厚邊 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 16px; font-weight: 800; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer; background: var(--green-text); color: #fff; box-shadow: 0 5px 0 #2e5c00; transition: transform .1s, box-shadow .1s; }
.btn:hover { transform: translateY(1px); box-shadow: 0 4px 0 #2e5c00; }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 #2e5c00; }
.btn.is-soon { background: var(--border); color: var(--muted); box-shadow: 0 5px 0 color-mix(in srgb, var(--border) 70%, #000); cursor: default; }
.btn.is-soon:hover, .btn.is-soon:active { transform: none; box-shadow: 0 5px 0 color-mix(in srgb, var(--border) 70%, #000); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg-soft), var(--bg)); padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green-text); font-weight: 800; padding: 4px 14px; border-radius: 999px; font-size: .9rem; margin-bottom: 16px; }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 24px; }
.note { font-size: .9rem; color: var(--muted); margin: 14px 0 0; }

/* Hero 示意卡（以 HTML 模擬 App 的「招生之路」） */
.mock { background: var(--card); border: 2px solid var(--border); border-bottom-width: 6px; border-radius: 28px; padding: 22px; max-width: 380px; margin-inline: auto; box-shadow: var(--shadow); }
.mock-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mock-head img { width: 48px; height: 48px; border-radius: 12px; }
.mock-head b { display: block; line-height: 1.3; }
.mock-head small { color: var(--muted); }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--border); border-radius: 16px; margin-top: 10px; font-weight: 700; }
.step i { font-style: normal; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--border); font-size: .9rem; flex: none; }
.step small { margin-left: auto; color: var(--muted); font-weight: 600; white-space: nowrap; }
.step.done i { background: var(--gold); }
.step.now { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.step.now i { background: var(--green); color: #fff; }
.step.now small { color: var(--green-text); font-weight: 800; }

/* 區塊 */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 36em; margin: 0 auto 36px; }
.section-head p { color: var(--muted); }
.alt { background: var(--bg-soft); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--card); border: 2px solid var(--border); border-bottom-width: 5px; border-radius: var(--radius); padding: 22px; }
.card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 12px; background: color-mix(in srgb, var(--green) 16%, transparent); }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }

.steps { counter-reset: s; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding-top: 56px; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--green-text); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.2rem; }
.steps p { color: var(--muted); margin: 0; }

/* 免費 / Pro 對照 */
.table-wrap { overflow-x: auto; border: 2px solid var(--border); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 520px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { font-size: .95rem; background: var(--bg-soft); }
td:not(:first-child), th:not(:first-child) { text-align: center; }
.pro-col { color: var(--green-text); font-weight: 800; }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; }
details { background: var(--card); border: 2px solid var(--border); border-radius: 16px; padding: 4px 20px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: outside; }
details p { color: var(--muted); }

/* 文章頁（隱私政策） */
.doc { max-width: 760px; padding: 48px 0 72px; }
.doc h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.doc h2 { font-size: 1.35rem; margin-top: 2em; }
.doc .meta { color: var(--muted); font-size: .95rem; }
.doc li { margin-bottom: .4em; }
.callout { background: var(--bg-soft); border: 2px solid var(--green); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.callout p:last-child { margin: 0; }

/* 頁尾 */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--muted); font-size: .92rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; flex-wrap: wrap; }

/* 捲動顯示（可被 reduced-motion 關閉） */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* 響應式 */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  section { padding: 48px 0; }
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; }
}
@media print { .site-header, .menu-btn { display: none; } }
