/* 發發菜單 fafagogo 官網樣式
   手機優先：先寫手機版，再用 min-width 調整平板、桌機。 */

/* ===== 變數 ===== */
:root {
  /* 顏色（對比都符合 WCAG AA） */
  --brand: #C23B22;        /* 朱紅：按鈕、連結、重點。配白字 5.3:1 */
  --brand-dark: #9E2E19;   /* 滑過、奶茶底上的連結 */
  --accent: #F2B53A;       /* 蛋黃：標籤、裝飾，只配深色字 */
  --bg: #FFF8EE;           /* 米白：頁面底色 */
  --surface: #F3E6D3;      /* 淺奶茶：區塊底色 */
  --card: #FFFFFF;
  --text: #2B211B;         /* 深咖啡：主要文字 */
  --text-muted: #5C4A3E;   /* 次要文字 */
  --border: #E2CFB6;
  --placeholder: #D9D2C7;

  /* 字級：內文 18px，全站最小 17px */
  --fs-small: 1.0625rem;
  --fs-body: 1.125rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --fs-h1: clamp(2.125rem, 1.4rem + 3.6vw, 3.5rem);

  --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --gutter: 20px;
  --max: 1080px;
  --tap: 56px;             /* 主要按鈕高度 */
}

/* ===== 基本 ===== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.75;
}

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

h1, h2, h3 { margin: 0 0 .6em; line-height: 1.35; font-weight: 700; letter-spacing: .02em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; }

a { color: var(--brand); text-underline-offset: .2em; }
a:hover { color: var(--brand-dark); }

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

[x-cloak] { display: none !important; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: .75em 1em; border-radius: 8px;
  background: var(--text); color: #fff;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ===== 按鈕 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: .6em 1.75em;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-size: var(--fs-lead); font-weight: 700; line-height: 1.3;
  text-decoration: none; text-align: center; cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--card); color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--card); color: var(--brand-dark); border-color: var(--brand-dark); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn { flex: 1 1 100%; }
@media (min-width: 480px) {
  .btn-row .btn { flex: 0 0 auto; }
}

/* ===== 頁首 ===== */
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); }

.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; min-height: 72px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo-zh { font-size: 1.375rem; font-weight: 800; letter-spacing: .04em; }
.logo-en { font-size: var(--fs-small); font-weight: 700; color: var(--brand-dark); }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 16px;
  border: 2px solid var(--border); border-radius: 12px;
  background: var(--card); color: var(--text);
  font: inherit; font-size: var(--fs-small); font-weight: 700; cursor: pointer;
}

.site-nav { display: none; width: 100%; padding-bottom: 16px; }
.site-nav.is-open { display: block; }
.site-nav ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: flex; align-items: center; min-height: 52px; padding: 0 14px;
  border-radius: 12px; color: var(--text); font-weight: 700; text-decoration: none;
}
.site-nav a:hover { background: var(--surface); color: var(--text); }

/* 目前所在頁面：用 <body class="page-xxx"> 標示 */
.page-pricing .site-nav a[href="/pricing/"],
.page-cases .site-nav a[href="/cases/"],
.page-faq .site-nav a[href="/faq/"],
.page-about .site-nav a[href="/about/"] { color: var(--brand-dark); box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }

.header-cta { display: none; }

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .site-nav { display: block; width: auto; margin-left: auto; padding: 0; }
  .site-nav ul { display: flex; }
  .header-cta { display: inline-flex; min-height: 48px; padding: .4em 1.25em; font-size: var(--fs-body); }
}

/* ===== 區塊 ===== */
.section { padding-block: clamp(4rem, 10vw, 7rem); }
.section-alt { background: var(--surface); }
.section-alt a:not(.btn) { color: var(--brand-dark); }

.section-head { max-width: 38em; margin-bottom: 2.5rem; }
.section-head p { color: var(--text-muted); font-size: var(--fs-lead); }
.section-head.center { margin-inline: auto; text-align: center; }

.lead { max-width: 34em; color: var(--text-muted); font-size: var(--fs-lead); }

.more-link { margin: 2rem 0 0; font-weight: 700; }
.more-link.center { text-align: center; }

/* ===== 首頁 Hero ===== */
.hero { padding-block: clamp(2.5rem, 8vw, 6rem); }
.hero-inner { display: grid; gap: 2.5rem; align-items: center; }
.hero-brand {
  display: inline-block; margin-bottom: 1.25rem; padding: .15em .9em;
  border-radius: 999px; background: var(--accent); color: var(--text);
  font-size: var(--fs-small); font-weight: 700;
}
.hero .lead { margin-bottom: 2rem; }
.hero-note { margin: 1rem 0 0; color: var(--text-muted); font-size: var(--fs-small); }
.hero picture img { width: 100%; border-radius: 24px; background: var(--placeholder); }

@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
}

/* ===== 內頁標題區 ===== */
.page-hero { padding-block: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2rem); }

/* ===== 三步驟 ===== */
.steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.step { padding: 2rem 1.5rem; border-radius: var(--radius); background: var(--card); }
.step h3 { margin-bottom: .4em; }
.step p { margin: 0; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin-bottom: 1rem;
  border-radius: 50%; background: var(--accent); color: var(--text);
  font-size: 1.5rem; font-weight: 800;
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 店家案例卡片 ===== */
.cards { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.case-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.case-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--placeholder); }
.case-body { padding: 1.25rem 1.5rem 1.5rem; }
.case-body h3, .case-name { margin-bottom: .2em; font-size: var(--fs-h3); }
.case-type { color: var(--text-muted); font-size: var(--fs-small); }
.case-card blockquote { margin: 0; font-size: var(--fs-lead); }
.case-card blockquote p { margin: 0; }

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* ===== 價格 ===== */
.price-card {
  max-width: 560px; margin-inline: auto; padding: 2.5rem 1.75rem;
  border: 2px solid var(--brand); border-radius: 24px;
  background: var(--card); text-align: center;
}
.price-label { margin-bottom: .25rem; font-size: var(--fs-lead); font-weight: 700; }
.price-amount { margin: 0 0 .5rem; color: var(--brand); font-size: clamp(3.5rem, 12vw, 5rem); font-weight: 800; line-height: 1.1; }
.price-amount small { font-size: .4em; }
.price-note { color: var(--text-muted); }
.price-card .btn { width: 100%; }

.check-list { display: grid; gap: .75rem; margin: 1.5rem 0 2rem; padding: 0; list-style: none; text-align: left; }
.check-list li { position: relative; padding-left: 2.25rem; }
.check-list li::before {
  content: ""; position: absolute; left: .2rem; top: .45em;
  width: 1.1rem; height: .6rem;
  border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand);
  transform: rotate(-45deg);
}

.timeline { display: grid; gap: 16px; max-width: 640px; margin: 0; padding: 0; list-style: none; }
.timeline li { padding: 1.25rem 1.5rem; border-left: 6px solid var(--accent); border-radius: var(--radius); background: var(--card); }
.timeline-date { display: block; font-weight: 800; }

.promise-list { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.promise-list li { padding: 1.5rem; border-radius: var(--radius); background: var(--card); }
.promise-list h3 { margin-bottom: .3em; }
.promise-list p { margin: 0; }

@media (min-width: 768px) {
  .promise-list { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 常見問題 ===== */
.faq-list { display: grid; gap: 12px; max-width: 760px; margin-inline: auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.faq-item h2, .faq-item h3 { margin: 0; font-size: var(--fs-lead); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 64px; padding: 1rem 1.25rem;
  border: 0; background: none; color: var(--text);
  font: inherit; font-weight: 700; text-align: left; cursor: pointer;
}
.faq-q::after { content: "＋"; flex-shrink: 0; color: var(--brand); font-size: 1.5rem; line-height: 1; }
.faq-q[aria-expanded="true"]::after { content: "－"; }
.faq-a { padding: 0 1.25rem 1.25rem; }
.faq-a p:last-child { margin-bottom: 0; }

/* ===== 關於我們 ===== */
.founder { display: grid; gap: 2rem; align-items: center; }
.founder img { width: 100%; max-width: 320px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--placeholder); }

@media (min-width: 768px) {
  .founder { grid-template-columns: 320px 1fr; gap: 3rem; }
}

/* ===== 一般文字頁 ===== */
.prose { max-width: 40em; }

/* ===== 行動呼籲色帶 ===== */
.cta-band { background: var(--brand); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 32em; margin-inline: auto; margin-bottom: 2rem; font-size: var(--fs-lead); }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-primary { background: #fff; color: var(--brand); }
.cta-band .btn-primary:hover { background: var(--bg); color: var(--brand-dark); }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.cta-band .btn-secondary:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ===== 頁尾 ===== */
.site-footer { padding-block: 3.5rem; background: var(--text); color: var(--surface); font-size: var(--fs-small); }
.site-footer a { color: #fff; }
.footer-title { margin-bottom: .75rem; color: #fff; font-size: var(--fs-body); font-weight: 700; }
.footer-grid { display: grid; gap: 2rem; }
.footer-links { display: grid; margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; }
.copyright { margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .2); }

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1.4fr 1fr; }
}

/* ===== 手機底部固定按鈕 ===== */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 10px var(--gutter);
  border-top: 1px solid var(--border); background: var(--bg);
}
.sticky-cta .btn { width: 100%; }
body { padding-bottom: calc(var(--tap) + 21px); }

@media (min-width: 900px) {
  .sticky-cta { display: none; }
  body { padding-bottom: 0; }
}
