/* ============================================================
   Duyen House 官方網站 — 溫柔療癒系
   色票／字型沿用 App（app_colors.dart / duyen_typography.dart）
   ============================================================ */

:root {
  /* 主色 — 暖橘紅 */
  --primary: #E1625A;
  --primary-dark: #BB413A;
  --primary-soft: #EBB5B0;
  /* 暖金 — 越南意象點綴 */
  --gold: #E0B070;
  --gold-light: #FFD9A0;
  --gold-soft: #F3E2C7;
  /* 中性 */
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-warm: #F9F1E1;
  --line: #E0DAD2;
  /* 文字 */
  --ink: #3D3327;
  --ink-soft: #8B847B;
  --ink-faint: #B8B0A6;
  /* 造型 */
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-soft: 0 10px 40px rgba(61, 51, 39, 0.08);
  --shadow-card: 0 6px 24px rgba(61, 51, 39, 0.06);
  --maxw: 1120px;
  --font-serif: 'LXGW WenKai TC', 'Noto Serif TC', 'Songti TC', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

/* ---------- 導覽列 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 36px; width: auto; flex-shrink: 0; }
.nav-actions { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }

.lang-switch { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.lang-switch button {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-switch button.active { background: var(--primary); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0; position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--primary); }
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); max-width: 30em; margin-bottom: 34px; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.store-badge { display: inline-flex; align-items: center; transition: transform 0.2s, opacity 0.2s; }
.store-badge:hover { transform: translateY(-2px); opacity: 0.85; }
.store-badge img { display: block; width: auto; }
.store-badge.apple img { height: 46px; }
.store-badge.google img { height: 66px; } /* Google 官方徽章四周自帶留白，放大以與 Apple 視覺對齊 */
.coming-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--primary);
  background: var(--surface-warm);
  border: 1px solid var(--gold-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

/* 手機示意框 */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: min(280px, 78vw);
  aspect-ratio: 9 / 19.3;
  border-radius: 40px;
  background: #1B130D;
  padding: 10px;
  box-shadow: 0 30px 70px rgba(61, 51, 39, 0.22), 0 6px 18px rgba(61,51,39,0.14);
  position: relative;
  transform: rotate(2deg);
}
/* 手機示意改用真 App 畫面（自帶 Dynamic Island），故移除假瀏海 */
.phone-screen { width: 100%; height: 100%; border-radius: 31px; overflow: hidden; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 通用 section ---------- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { text-align: center; max-width: 40em; margin: 0 auto 52px; }
.section-head .section-title { margin-bottom: 16px; }
.section-head p { color: var(--ink-soft); font-size: 17px; }

/* 蓮花裝飾 */
.lotus { width: 60px; height: 60px; margin: 0 auto 18px; color: var(--gold); }
.lotus svg { width: 100%; height: 100%; }

/* ---------- 理念區 ---------- */
.philosophy { background: linear-gradient(180deg, var(--surface-warm), var(--bg)); text-align: center; }
.philosophy .wrap { max-width: 760px; }
.philosophy .body-lg { font-size: clamp(17px, 2.2vw, 21px); color: var(--ink); line-height: 1.95; margin-top: 8px; }

/* ---------- 功能特色 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.feature-ico {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-warm);
  border-radius: 16px;
  margin-bottom: 18px;
  color: var(--primary);
}
.feature-ico svg { width: 28px; height: 28px; }
.feature-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); font-size: 15px; }

/* ---------- 畫面展示 ---------- */
.showcase { background: var(--surface-warm); }
.shots { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.shot { text-align: center; }
.shot .phone { transform: none; width: min(240px, 66vw); }
.shot figcaption { margin-top: 18px; font-size: 16px; font-weight: 600; color: var(--ink); }

/* ---------- 下載 CTA ---------- */
.download { text-align: center; }
.download-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 32px;
  padding: clamp(44px, 7vw, 76px) 28px;
  color: #fff;
  box-shadow: 0 24px 60px rgba(225, 98, 90, 0.28);
  position: relative;
  overflow: hidden;
}
.download-card h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; margin-bottom: 14px; }
.download-card p { opacity: 0.92; font-size: 17px; margin-bottom: 30px; }
.download-card .cta-row { justify-content: center; }
.download-card .coming-tag { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.3); color: #fff; }

/* ---------- Footer ---------- */
.footer { padding: 60px 0 40px; border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 36px; }
.footer-brand { max-width: 26em; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--ink-soft); font-size: 15px; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--ink-soft); font-size: 15px; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; color: var(--ink-faint); font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.03em; }

/* ---------- 滾動淡入 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 響應式 ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-visual { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: column; gap: 28px; }
}

@media (max-width: 640px) {
  .nav-link { display: none; }
}

@media (max-width: 540px) {
  .wrap { padding: 0 18px; }
  .brand span { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .lang-switch button { padding: 5px 8px; font-size: 11px; }
}

/* ============================================================
   條款長文頁（隱私權政策 / 服務條款）
   ============================================================ */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.legal h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 700; margin-bottom: 8px; }
.legal .updated { color: var(--ink-faint); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }
.legal .intro { color: var(--ink-soft); font-size: 17px; margin: 20px 0 8px; line-height: 1.8; }
.legal h2 { font-size: 21px; font-weight: 700; margin: 36px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.legal h3 { font-size: 17px; font-weight: 700; margin: 22px 0 6px; color: var(--ink); }
.legal p { margin: 12px 0; color: var(--ink); }
.legal ul { margin: 12px 0 12px 20px; }
.legal li { margin: 7px 0; color: var(--ink); }
.legal a { color: var(--primary); }
.legal a:hover { text-decoration: underline; }
.legal strong { font-weight: 700; }
.legal .fill { background: #FFF3CD; border-bottom: 2px solid var(--gold); padding: 1px 6px; border-radius: 4px; font-weight: 700; color: #8A6D00; }
[data-lang-section] { display: none; }
[data-lang-section].active { display: block; }
