/* 取名助手 Landing Page — 2026-10 改版
   色票取自 APP icon：米黃紙（#FFF3C2）、朱紅印泥（#7A0000）、墨黑 */
:root {
  --paper: #fff8e1;
  --paper-2: #fff3c2;
  --paper-3: #f6e7b4;
  --ink: #1d1410;
  --ink-2: #4a3a30;
  --ink-3: #7a6656;
  --seal: #7a0000;
  --seal-2: #a3150f;
  --gold: #c9973f;
  --gold-soft: #e8cf95;
  --line: rgba(122, 0, 0, .14);
  --card: #fffdf6;
  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(70, 20, 0, .35);
  --serif: "LXGW WenKai TC", "Kaiti TC", "DFKai-SB", "BiauKai", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --wood: #3f8f4e; --fire: #d2452b; --earth: #b8862b; --metal: #8a8f99; --water: #2f6fb3;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--seal); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; margin: 0; font-weight: 700; letter-spacing: .02em; }
p, figure { margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- 導覽列 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 225, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand span { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--seal); }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav ul a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.nav ul a:hover { color: var(--seal); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--seal); color: #fff8e1; text-decoration: none;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  box-shadow: 0 6px 16px -6px rgba(122, 0, 0, .6);
  transition: transform .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--seal-2); transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.lang { font-size: 14px; color: var(--ink-3); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -25vw; top: -10%;
  width: 70vw; max-width: 980px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #8e0b05 0%, var(--seal) 55%, #4d0000 100%);
  z-index: 0;
}
.hero::after {
  content: ""; position: absolute; right: calc(-25vw - 36px); top: calc(-10% - 36px);
  width: calc(70vw + 72px); max-width: 1052px; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--gold-soft); z-index: 0; opacity: .8;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--seal); background: var(--paper-2);
  border: 1px solid var(--gold-soft); border-radius: 999px; padding: 4px 14px; margin-bottom: 22px;
}
.eyebrow b { width: 8px; height: 8px; border-radius: 50%; background: var(--wood); display: inline-block; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); margin-bottom: 22px; }
:lang(en) .hero h1 { font-size: clamp(36px, 5vw, 60px); }
.hero h1 em { font-style: normal; color: var(--seal); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .22em;
  background: var(--gold-soft); z-index: -1; border-radius: 4px; opacity: .8;
}
.lede { font-size: clamp(17px, 1.9vw, 20px); color: var(--ink-2); max-width: 34em; margin-bottom: 30px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.play-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 10px 22px 10px 16px; border-radius: 14px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6);
  transition: transform .15s ease;
}
.play-badge:hover { transform: translateY(-2px); }
.play-badge svg { width: 30px; height: 30px; }
.play-badge small { display: block; font-size: 11px; letter-spacing: .06em; opacity: .8; line-height: 1.2; }
.play-badge strong { display: block; font-size: 21px; line-height: 1.2; font-weight: 600; }
.cta-note { font-size: 14px; color: var(--ink-3); }

.hero-visual { position: relative; height: 620px; }
.hero-visual .phone { position: absolute; width: 270px; }
.hero-visual .p1 { left: 50%; top: 10px; transform: translateX(-50%) rotate(-3deg); z-index: 2; }
.hero-visual .p2 { left: 50%; top: 70px; transform: translateX(18%) rotate(5deg); z-index: 1; }
.seal-stamp {
  position: absolute; z-index: 3; left: 4%; bottom: 40px;
  width: 112px; height: 112px; border-radius: 14px;
  background: var(--seal); color: var(--paper-2);
  font-family: var(--serif); font-size: 30px; line-height: 1.05; font-weight: 700;
  display: grid; place-items: center; text-align: center;
  transform: rotate(-8deg); box-shadow: var(--shadow);
  border: 3px solid var(--paper-2); outline: 2px solid var(--seal);
}

/* ---------- 手機框 ---------- */
.phone {
  background: #17110e; border-radius: 38px; padding: 9px;
  box-shadow: 0 30px 60px -24px rgba(40, 10, 0, .55), inset 0 0 0 1.5px #3a2c24;
}
.phone picture { display: block; }
.phone picture, .phone img { border-radius: 30px; overflow: hidden; width: 100%; aspect-ratio: 720 / 1560; object-fit: cover; object-position: top; background: #fdfaf2; }

/* ---------- 數字列 ---------- */
.stats { padding: 10px 0 30px; position: relative; z-index: 2; }
.stats ul {
  list-style: none; margin: 0; padding: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stats li { text-align: center; padding: 6px 4px; }
.stats li + li { border-left: 1px dashed var(--line); }
.stats strong { display: block; font-family: var(--serif); font-size: clamp(26px, 3.4vw, 38px); color: var(--seal); line-height: 1.2; }
.stats span { font-size: 14px; color: var(--ink-3); }

/* ---------- 區塊共用 ---------- */
section { scroll-margin-top: 72px; }
.sec { padding: 88px 0; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.kicker { font-size: 14px; letter-spacing: .2em; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
.sec-head h2 { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 14px; }
.sec-head p { color: var(--ink-2); }

/* ---------- 原理 ---------- */
.method { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.answer {
  max-width: 820px; margin: 0 auto 44px; padding: 26px 30px;
  background: var(--card); border-left: 5px solid var(--seal); border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow); font-size: 18px;
}
.answer strong { color: var(--seal); }
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.layer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; position: relative; }
.layer .n {
  position: absolute; top: -18px; left: 24px; width: 40px; height: 40px; border-radius: 10px;
  background: var(--seal); color: var(--paper-2); font-family: var(--serif); font-size: 20px; display: grid; place-items: center;
  transform: rotate(-6deg);
}
.layer h3 { font-size: 22px; margin: 10px 0 8px; }
.layer p { color: var(--ink-2); font-size: 16px; }
.demo { margin-top: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.demo .ch {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 28px; background: var(--paper-2); border: 1px solid var(--gold-soft);
}
.demo .ch.main { background: #e9f0ff; border-color: #8fb3f0; }
.demo .arrow { color: var(--ink-3); }
.tag { display: inline-block; font-size: 13px; border-radius: 999px; padding: 2px 10px; color: #fff; font-weight: 600; }
.t-wood { background: var(--wood); } .t-fire { background: var(--fire); } .t-earth { background: var(--earth); }
.t-metal { background: var(--metal); } .t-water { background: var(--water); }

.three { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.three div { padding: 26px 22px; text-align: center; background: var(--card); }
.three div + div { border-left: 1px solid var(--line); }
.three .pos { font-size: 14px; color: var(--ink-3); }
.three .big { font-family: var(--serif); font-size: 48px; color: var(--seal); line-height: 1.3; }
.three .mean { font-weight: 700; }

/* ---------- 功能 ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px dashed var(--line); }
.feature:nth-of-type(even) .f-visual { order: 2; }
.f-visual { display: flex; justify-content: center; align-items: flex-start; gap: 18px; position: relative; }
.f-visual::before {
  content: ""; position: absolute; inset: 12% 8%; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft) 0%, rgba(232, 207, 149, 0) 70%); z-index: 0;
}
.f-visual .phone { width: 260px; position: relative; z-index: 1; }
.f-visual .phone.small { width: 210px; margin-top: 60px; }
.f-text .label { display: inline-flex; align-items: center; gap: 8px; color: var(--seal); font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.f-text .label i {
  font-style: normal; width: 30px; height: 30px; border-radius: 8px; background: var(--seal); color: var(--paper-2);
  display: grid; place-items: center; font-family: var(--serif); font-size: 17px;
}
.f-text h3 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 14px; }
.f-text > p { color: var(--ink-2); margin-bottom: 18px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--seal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff3c2' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.sample { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 30px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.mini h3 { font-size: 22px; margin-bottom: 6px; }
.mini p { color: var(--ink-2); font-size: 16px; }
.elements { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- 步驟 ---------- */
.steps { background: var(--ink); color: #f6ead0; position: relative; overflow: hidden; }
.steps::before {
  content: "命"; position: absolute; right: -40px; bottom: -120px; font-family: var(--serif);
  font-size: 460px; line-height: 1; color: rgba(255, 243, 194, .045); pointer-events: none;
}
.steps .sec-head p { color: #cdbd9d; }
.steps .kicker { color: var(--gold-soft); }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step-list li {
  counter-increment: s; background: rgba(255, 243, 194, .06); border: 1px solid rgba(255, 243, 194, .14);
  border-radius: var(--radius); padding: 30px 26px;
}
.step-list li::before {
  content: counter(s, cjk-ideographic); display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--seal); color: var(--paper-2); font-family: var(--serif); font-size: 22px; margin-bottom: 14px;
  box-shadow: 0 0 0 4px rgba(201, 151, 63, .35);
}
.step-list h3 { font-size: 22px; margin-bottom: 6px; color: #fff3c2; }
.step-list p { color: #cdbd9d; font-size: 16px; }

/* ---------- 信任 ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.trust .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; margin-bottom: 12px; color: var(--seal); }
.trust .ico svg { width: 24px; height: 24px; }
.trust h3 { font-size: 19px; margin-bottom: 4px; }
.trust p { font-size: 15px; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq-list details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; transition: box-shadow .2s; }
.faq-list details[open] { box-shadow: var(--shadow); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
  font-family: var(--serif); font-size: 19px; font-weight: 700;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2.5px solid var(--seal); border-bottom: 2.5px solid var(--seal); transform: rotate(45deg); transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-list .a { padding: 0 0 20px; color: var(--ink-2); }
.faq-list .a p + p { margin-top: 8px; }

/* ---------- 結尾 CTA ---------- */
.final { padding: 30px 0 90px; }
.final-card {
  position: relative; overflow: hidden; border-radius: 32px; padding: 60px 48px;
  background: radial-gradient(circle at 85% 20%, #9b1209 0%, var(--seal) 45%, #4d0000 100%);
  color: var(--paper-2); display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center;
}
.final-card::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 340px; height: 340px; border-radius: 50%;
  border: 2px solid rgba(232, 207, 149, .5);
}
.final-card h2 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: 14px; }
.final-card p { color: #f1d9b0; margin-bottom: 26px; }
.final-card .play-badge { background: var(--paper-2); color: var(--ink); }
.final-card .phone { width: 230px; justify-self: center; transform: rotate(4deg); margin-bottom: -150px; }

/* ---------- 頁尾 ---------- */
footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 14px; color: var(--ink-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--seal); }
.disclaimer { width: 100%; font-size: 13px; }

/* 非中文瀏覽器的語言提示（不自動轉址，避免把 Googlebot 送去英文版） */
.lang-hint {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 420px; margin-left: auto;
  background: var(--ink); color: #fff3c2; border-radius: 14px; padding: 12px 14px 12px 18px;
  display: flex; gap: 12px; align-items: center; font-size: 15px; box-shadow: var(--shadow);
}
.lang-hint[hidden] { display: none; }
.lang-hint a { color: var(--gold-soft); font-weight: 700; }
.lang-hint button { margin-left: auto; background: none; border: 0; color: #cdbd9d; font-size: 22px; cursor: pointer; line-height: 1; }

/* ---------- 進場動畫 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- RWD ---------- */
@media (max-width: 960px) {
  .nav ul { display: none; }
  .nav .lang { margin-left: auto; }
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero::before { right: -45vw; top: 38%; width: 120vw; }
  .hero::after { right: calc(-45vw - 30px); top: calc(38% - 30px); width: calc(120vw + 60px); }
  .hero-visual { height: 520px; }
  .hero-visual .phone { width: 230px; }
  .layers, .step-list { grid-template-columns: 1fr; gap: 30px; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature:nth-of-type(even) .f-visual { order: 0; }
  .final-card { grid-template-columns: 1fr; padding: 44px 26px 0; }
  .final-card .phone { margin-bottom: -120px; width: 200px; }
  .final-card { padding-bottom: 0; }
  .final-card > div:last-child { height: 300px; overflow: hidden; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav .btn { display: none; }
  .sec { padding: 64px 0; }
  .stats ul { grid-template-columns: repeat(2, 1fr); padding: 14px; }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px dashed var(--line); padding-top: 12px; }
  .hero-visual { height: 440px; }
  .hero-visual .phone { width: 190px; }
  .seal-stamp { width: 84px; height: 84px; font-size: 22px; left: 0; bottom: 10px; }
  .three { grid-template-columns: 1fr; }
  .three div + div { border-left: 0; border-top: 1px solid var(--line); }
  .trust { grid-template-columns: 1fr; }
  .f-visual { gap: 12px; }
  .f-visual .phone { width: min(200px, 56%); }
  .f-visual .phone.small { width: 40%; margin-top: 40px; }
  .answer { padding: 20px; font-size: 17px; }
  .mini-grid { grid-template-columns: 1fr; }
}
