/* =========================================================================
   Yolko LP — style.css
   設計 tokens 全部來自角色設定，未自創配色。
   ========================================================================= */

/* ---- 標題字型：自架 jf-openhuninn（粉圓體，開源，已子集化）---- */
@font-face {
  font-family: "jf-openhuninn";
  src: url("assets/fonts/jf-openhuninn.woff2") format("woff2");
  font-weight: 400 700;      /* 單一字重，涵蓋 400–700 以避免瀏覽器合成假粗體 */
  font-style: normal;
  font-display: swap;        /* 取不到或載入中都先用 fallback，不卡住渲染 */
}

/* ---- 內文字型：自架 Noto Sans TC（已子集化，同源遞送）---- */
@font-face {
  font-family: "Noto Sans TC";
  src: url("assets/fonts/noto-sans-tc.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;        /* 先用系統字體上畫面，載入後再交換，不卡住渲染 */
}

/* ---- Design tokens ---- */
:root {
  --bg:      #FFF7E6;   /* 底色 */
  --block:   #FFEECC;   /* 區塊底 / 卡片 / blob */
  --yellow:  #FFD86B;   /* 主黃 */
  --accent:  #FFA726;   /* CTA 與強調 */
  --text:    #4A3B2A;   /* 深暖棕（主要文字，高對比）*/
  --muted:   #6E5F4E;   /* 次要文字（audit 修正：原 #8A7A66 對比 3.9:1 不足，調深至 AA 通過） */

  --radius:  24px;
  --maxw:    840px;

  --font-head: "jf-openhuninn", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-body: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Segoe UI", sans-serif;

  --bounce: cubic-bezier(.34, 1.56, .64, 1);   /* Q 彈 */
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;                 /* 手機無橫向捲動的保險 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---- 鍵盤 focus 可見 ---- */
:where(a, button, [tabindex], iframe):focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  border-radius: 8px;
}

/* =========================================================================
   1. Hero
   ========================================================================= */
.hero {
  position: relative;
  overflow: hidden;                   /* 裁掉超大 blob，避免橫向捲動 */
  text-align: center;
  padding: 52px 0 40px;
  background: var(--bg);
}
/* 簽名元素：hero 背景一枚超大的柔和蛋形 blob */
.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 118vw);
  aspect-ratio: 1 / 1.06;                                  /* 略高的蛋形 */
  background: var(--block);
  border-radius: 50% 50% 49% 49% / 56% 56% 44% 44%;        /* 蛋形輪廓 */
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }

.hero__egg {
  width: min(66vw, 280px);
  margin: 0 auto 6px;
}
.hero__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.75rem, 6.4vw, 2.6rem);
  line-height: 1.42;
  letter-spacing: .01em;
  margin: 6px 0 14px;
}
.hero__sub {
  max-width: 34ch;
  margin: 0 auto 26px;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text);
}
.hero__note {
  margin-top: 14px;
  color: var(--muted);
  font-size: .85rem;
}

/* 蛋形全圓角 CTA，hover/按下有 Q 彈 scale 微動效 */
.cta {
  display: inline-block;
  padding: 1.05rem 2.5rem;
  background: var(--accent);
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(255, 167, 38, .28);
  transition: transform .25s var(--bounce), box-shadow .25s ease;
  will-change: transform;
}
.cta:hover {
  transform: scale(1.045);
  box-shadow: 0 14px 30px rgba(255, 167, 38, .34);
}
.cta:active { transform: scale(.97); }

/* =========================================================================
   共用：section 標題
   ========================================================================= */
.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.4rem, 4.8vw, 1.9rem);
  line-height: 1.5;
  text-align: center;
}

/* =========================================================================
   2. 三步驟
   ========================================================================= */
.steps { padding: 40px 0; }
.steps__grid {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: 1fr;         /* 手機直向堆疊 */
  gap: 16px;
}
.step-card {
  background: var(--block);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(74, 59, 42, .05);   /* 陰影極淡 */
  transition: transform .25s var(--bounce);
}
.step-card:hover { transform: translateY(-3px); }
.step-card__emoji { display: block; font-size: 2.4rem; line-height: 1; margin-bottom: .6rem; }
.step-card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.18rem;
  margin: .2rem 0 .5rem;
}
.step-card__desc { color: var(--text); font-size: .98rem; line-height: 1.75; }

/* =========================================================================
   3. 病徵對照區（本版 hidden；上線拿掉 hidden 即可）
   ========================================================================= */
.states { padding: 40px 0; }
.states__grid {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.state-card {
  background: var(--block);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(74, 59, 42, .05);
}
.state-card img { border-radius: 16px; margin: 0 auto 12px; width: min(70%, 260px); }
.state-card__caption { color: var(--text); font-size: .98rem; line-height: 1.7; }
.state-card__caption strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin-bottom: 2px;
}

/* =========================================================================
   4. Waitlist
   ========================================================================= */
.waitlist { padding: 8px 0 48px; }
.form-card {
  margin-top: 24px;
  padding: 12px;
  background: var(--block);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(74, 59, 42, .05);
}
.tally-mount {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 680px;                  /* 預留高度＝iframe 高，注入時不產生位移（CLS）；
                                         2026-07-13 實測 375px 表單內容高 575px */
}
.tally-mount iframe {
  display: block;
  width: 100%;
  min-height: 680px;
  border: 0;
  background: transparent;
}
.privacy {
  max-width: 58ch;
  margin: 18px auto 0;
  color: var(--text);
  font-size: .9rem;
  line-height: 1.7;
  text-align: center;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  margin-top: 8px;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(74, 59, 42, .10);
}
.site-footer p { color: var(--muted); font-size: .88rem; text-align: center; line-height: 1.7; overflow-wrap: anywhere; }
.site-footer__mail { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* =========================================================================
   Breakpoint：≥ 720px 三欄並排
   ========================================================================= */
@media (min-width: 720px) {
  .hero { padding: 72px 0 52px; }
  .hero__egg { width: 300px; }
  .steps, .states { padding: 56px 0; }
  .steps__grid, .states__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* =========================================================================
   prefers-reduced-motion：關閉所有動效
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .cta:hover, .cta:active, .step-card:hover { transform: none; }
}
