/* =========================================================
   MIVARE — 網站樣式表 (styles.css)
   ---------------------------------------------------------
   想改顏色？只要改下面 :root 裡的色碼，全站會一起變。
   ========================================================= */

/* ---------- 1. 品牌字體（已放在 /fonts 資料夾，不需外部連線） ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin-300-italic.woff2") format("woff2");
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- 2. 品牌色彩與基本設定 ---------- */
:root {
  --forest: #2C3E2D;        /* 森林綠：主色 */
  --forest-deep: #223123;   /* 深一階的森林綠：頁尾 */
  --cream: #F5F0E8;         /* 奶油白：背景 */
  --cream-soft: #EDE6DA;    /* 稍深的奶油色：區塊交替 */
  --gold: #B8935A;          /* 暖金：點綴 */
  --gold-light: #D4B483;    /* 淺金：深色背景上的文字 */
  --gold-ink: #8C6A3C;      /* 深金：淺色背景上的小字（更好閱讀） */
  --charcoal: #2A2A2A;      /* 炭灰：內文 */
  --muted: #6B675F;         /* 次要文字 */

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);  /* 左右留白，手機自動縮小 */
  --max: 1200px;                     /* 內容最大寬度 */
  --section: clamp(80px, 12vw, 160px); /* 區塊上下間距 */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.005em;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 小標（全大寫、字距拉開） */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 24px;
}

/* 細金線裝飾 */
.rule {
  display: block;
  width: 56px; height: 1px;
  background: var(--gold);
  border: 0; margin: 0;
}

/* 跳到主內容（鍵盤使用者無障礙用） */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--forest); color: var(--cream);
  padding: 12px 20px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* ---------- 3. Logo ---------- */
.logo {
  display: inline-flex; flex-direction: column; align-items: center;
  text-decoration: none; color: inherit; line-height: 1;
}
.logo__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.42em;
  margin-right: -0.42em; /* 抵銷最後一個字母的字距，讓置中準確 */
}
.logo__tag {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.38em;
  margin-top: 6px;
  margin-right: -0.38em;
  color: var(--gold);
}

/* ---------- 4. 頁首（固定在上方） ---------- */
.header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  color: var(--cream);
  transition: background-color .4s ease, color .4s ease, box-shadow .4s ease;
}
.header.is-scrolled,
.header.is-light {
  background: rgba(245, 240, 232, 0.96);
  color: var(--forest);
  box-shadow: 0 1px 0 rgba(44, 62, 45, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
.nav { display: flex; align-items: center; gap: 40px; }
.nav a {
  text-decoration: none;
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.24em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.nav a.btn { padding: 0 26px 0 calc(26px + 0.24em); }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width .35s ease;
}
.nav a:not(.btn):hover::after { width: 100%; }

/* 手機選單按鈕 */
.menu-toggle {
  display: none;
  background: none; border: 0; color: inherit;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1px;
  background: currentColor; transition: transform .3s ease, opacity .3s ease;
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 26px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- 5. 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0 32px;
  font-family: var(--sans);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.26em; text-transform: uppercase;
  text-decoration: none;
  border: 1px solid currentColor;
  background: transparent; color: inherit;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
  border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--cream); }
.btn--gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--forest); }
.btn--outline:hover { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.header:not(.is-scrolled):not(.is-light) .btn--outline:hover { background: var(--cream); color: var(--forest); border-color: var(--cream); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- 6. 主視覺 Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  background: var(--forest);
  color: var(--cream);
  overflow: hidden;
  padding: 140px 0 100px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}
.hero h1 {
  font-size: clamp(48px, 7.4vw, 104px);
  font-weight: 300;
  line-height: 1.02;
  margin: 0 0 32px;
}
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero__lede {
  max-width: 440px;
  font-size: 17px;
  color: rgba(245, 240, 232, 0.82);
  margin: 0 0 44px;
}
.hero__art {
  justify-self: center;
  width: min(100%, 440px);
  color: var(--gold);
}
.hero__art svg { width: 100%; height: auto; }
.hero__note {
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(245, 240, 232, 0.6);
}
.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 1px; height: 56px; background: rgba(212, 180, 131, 0.35); overflow: hidden;
}
.hero__scroll::after {
  content: ""; position: absolute; left: 0; top: -56px; width: 1px; height: 56px;
  background: var(--gold-light); animation: drip 2.6s ease-in-out infinite;
}
@keyframes drip { to { top: 56px; } }

/* 線條插畫的描繪動畫 */
.draw path, .draw line, .draw ellipse, .draw circle {
  stroke-dasharray: 1200; stroke-dashoffset: 1200;
  animation: draw 3.2s ease forwards;
}
.draw path:nth-child(2n) { animation-delay: .3s; }
.draw path:nth-child(3n) { animation-delay: .6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- 7. 一般區塊 ---------- */
.section { padding: var(--section) 0; }
.section--soft { background: var(--cream-soft); }
.section--forest { background: var(--forest); color: var(--cream); }
.section--forest .eyebrow, .hero .eyebrow { color: var(--gold-light); }

/* 開場宣言 */
.statement { text-align: center; }
.statement p.big {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.18;
  color: var(--forest);
  max-width: 900px;
  margin: 0 auto;
}
.statement p.big em { color: var(--gold); }
.statement .rule { margin: 48px auto 0; }

/* 標題區 */
.section-head { max-width: 640px; margin-bottom: clamp(48px, 7vw, 88px); }
.section-head h2 { font-size: clamp(38px, 5vw, 64px); color: var(--forest); }
.section--forest .section-head h2 { color: var(--cream); }
.section-head p { margin: 24px 0 0; color: var(--muted); max-width: 520px; }
.section--forest .section-head p { color: rgba(245, 240, 232, 0.75); }

/* 使用步驟（The Ritual） */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 4vw, 64px);
  list-style: none; margin: 0; padding: 0;
  counter-reset: step;
}
.step { border-top: 1px solid rgba(44, 62, 45, 0.18); padding-top: 32px; }
.step__num {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 18px; color: var(--gold); display: block; margin-bottom: 20px;
}
.step h3 { font-size: 32px; color: var(--forest); margin-bottom: 14px; }
.step p { margin: 0; color: var(--muted); }
.ritual-foot {
  margin-top: clamp(56px, 8vw, 96px);
  display: flex; align-items: center; gap: 24px;
  font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3vw, 34px);
  color: var(--forest);
}
.ritual-foot .rule { flex: 0 0 56px; }

/* 雙欄：頭皮教育 */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 120px); align-items: center;
}
.split__art {
  aspect-ratio: 4 / 5;
  background: var(--forest);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); position: relative;
}
.split__art svg { width: 62%; height: auto; }
.split__art .frame {
  position: absolute; inset: 18px; border: 1px solid rgba(184, 147, 90, 0.4); pointer-events: none;
}
.split h2 { font-size: clamp(40px, 5.4vw, 72px); color: var(--forest); margin-bottom: 8px; }
.split h2 + .sub {
  font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3vw, 34px);
  color: var(--gold); margin: 0 0 32px;
}
.split p { color: var(--muted); max-width: 460px; }

/* 使用時刻（For the in-between） */
.moments {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(212, 180, 131, 0.3);
}
.moment {
  padding: 40px 28px 8px 0;
  border-right: 1px solid rgba(212, 180, 131, 0.18);
}
.moment + .moment { padding-left: 28px; }
.moment:last-child { border-right: 0; }
.moment__time {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-light); display: block; margin-bottom: 16px;
}
.moment h3 { font-size: 28px; margin-bottom: 12px; }
.moment p { margin: 0; color: rgba(245, 240, 232, 0.72); font-size: 15px; }

/* 品牌承諾 */
.promises {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 64px);
  text-align: center;
}
.promise svg { width: 40px; height: 40px; margin: 0 auto 24px; color: var(--gold); }
.promise h3 { font-size: 26px; color: var(--forest); margin-bottom: 10px; }
.promise p { margin: 0 auto; color: var(--muted); max-width: 300px; font-size: 15px; }

/* ---------- 8. 候補名單表單 ---------- */
.waitlist { text-align: center; position: relative; overflow: hidden; }
.waitlist h2 { font-size: clamp(42px, 6vw, 80px); margin-bottom: 20px; }
.waitlist h2 em { color: var(--gold-light); }
.waitlist .intro { max-width: 520px; margin: 0 auto 48px; color: rgba(245, 240, 232, 0.78); }

.form { max-width: 560px; margin: 0 auto; text-align: left; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field label {
  display: block; font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 8px;
}
.field input {
  width: 100%; height: 52px;
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(245, 240, 232, 0.4);
  color: var(--cream);
  font-family: var(--sans); font-weight: 300;
  font-size: 16px;  /* 16px 以上，iPhone 才不會自動放大畫面 */
  padding: 0 2px; border-radius: 0;
  -webkit-appearance: none; appearance: none;
  transition: border-color .3s ease;
}
.field input::placeholder { color: rgba(245, 240, 232, 0.4); }
.field input:focus { outline: none; border-bottom-color: var(--gold-light); }
.consent {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 28px 0 32px; font-size: 13px; line-height: 1.6;
  color: rgba(245, 240, 232, 0.75); cursor: pointer;
}
.consent input {
  flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0;
  accent-color: var(--gold);
}
.consent a { color: var(--gold-light); }
.form .btn { width: 100%; }
.form__status { min-height: 24px; margin: 18px 0 0; font-size: 14px; text-align: center; color: var(--gold-light); }
.form__status.is-error { color: #E8B4A0; }
.hp { position: absolute !important; left: -9999px !important; } /* 防機器人欄位，真人看不到 */

/* ---------- 9. 常見問題 FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details { border-top: 1px solid rgba(44, 62, 45, 0.18); }
.faq details:last-child { border-bottom: 1px solid rgba(44, 62, 45, 0.18); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 28px 0;
  font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); color: var(--forest);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--sans); font-weight: 300; font-size: 24px; color: var(--gold);
  transition: transform .3s ease; flex: 0 0 auto;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 28px; color: var(--muted); max-width: 640px; }

/* ---------- 10. 頁尾 ---------- */
.footer { background: var(--forest-deep); color: var(--cream); padding: 88px 0 40px; }
.footer__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
  padding-bottom: 64px; border-bottom: 1px solid rgba(212, 180, 131, 0.2);
}
.footer .logo { align-items: flex-start; }
.footer .logo__name { margin-right: 0; }
.footer__tagline {
  font-family: var(--serif); font-style: italic; font-size: 22px;
  color: var(--gold-light); margin: 28px 0 0;
}
.footer h4 {
  font-family: var(--sans); font-weight: 400; font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-light);
  margin: 0 0 20px;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; }
.footer a { text-decoration: none; color: rgba(245, 240, 232, 0.8); font-size: 15px; }
.footer a:hover { color: var(--gold-light); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 32px; font-size: 12px; letter-spacing: 0.06em; color: rgba(245, 240, 232, 0.5);
}

/* ---------- 11. 內頁（隱私政策、感謝頁、404） ---------- */
.page { padding: 180px 0 var(--section); min-height: 70vh; }
.page .container { max-width: 760px; }
.page h1 { font-size: clamp(42px, 6vw, 72px); color: var(--forest); margin-bottom: 24px; }
.page h2 { font-size: 28px; color: var(--forest); margin: 48px 0 12px; }
.page p, .page li { color: var(--charcoal); }
.page .meta { color: var(--muted); font-size: 14px; }
.center-page { text-align: center; }
.center-page .rule { margin: 40px auto; }

/* 捲動時淡入（由 script.js 控制） */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* =========================================================
   12. 手機與平板版面（Responsive）
   ========================================================= */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .hero__lede { margin-left: auto; margin-right: auto; }
  .hero__art { order: -1; width: min(44vw, 200px); }
  .hero__cta { display: flex; flex-direction: column; align-items: center; }
  .split { grid-template-columns: 1fr; }
  .split__art { aspect-ratio: 5 / 4; }
  .moments { grid-template-columns: 1fr 1fr; }
  .moment { padding: 36px 24px 36px 0 !important; border-bottom: 1px solid rgba(212, 180, 131, 0.18); }
  .moment:nth-child(2n) { border-right: 0; padding-left: 24px !important; }
  .moment:nth-child(2n+1) { padding-left: 0 !important; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .header__inner { height: 68px; }
  .logo__name { font-size: 18px; }
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 68px 0 0 0;
    flex-direction: column; justify-content: center; gap: 36px;
    background: var(--cream); color: var(--forest);
    opacity: 0; visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
  }
  .nav a { font-size: 13px; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .header { background: var(--cream); color: var(--forest); }
  .menu-open { overflow: hidden; }

  .hero { padding: 110px 0 90px; }
  .hero__lede { font-size: 16px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 32px 0; }
  .ritual-foot { justify-content: center; text-align: center; flex-direction: column; gap: 20px; }
  .ritual-foot .rule { flex: none; width: 56px; height: 1px; }
  .moments { grid-template-columns: 1fr; }
  .moment:nth-child(n) { border-right: 0; padding: 32px 0 !important; }
  .promises { grid-template-columns: 1fr; gap: 56px; }
  .form__row { grid-template-columns: 1fr; gap: 8px; }
  .footer__top { grid-template-columns: 1fr; gap: 40px; }
  .footer__bottom { flex-direction: column; }
}

/* 內頁的簡易選單（只有 Home），手機也直接顯示 */
.nav.nav--simple {
  position: static; display: flex; flex-direction: row;
  opacity: 1; visibility: visible; background: none; gap: 24px;
}

/* ---------- 品牌故事 Our Story ---------- */
.story { background: var(--cream); position: relative; }
.story::before { /* 與上方奶油色區塊之間的細金線分隔 */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter)), var(--max)); height: 1px;
  background: rgba(184, 147, 90, 0.35);
}
.story__inner { max-width: 760px; }
.story__head { text-align: center; margin-bottom: clamp(48px, 7vw, 80px); }
.story__eyebrow { color: var(--gold); }
.story h2 { font-size: clamp(44px, 6vw, 80px); color: var(--forest); margin-bottom: 20px; }
.story__sub {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35;
  color: var(--gold); margin: 0;
}
.story__head .rule { margin: 40px auto 0; }
.story__body { max-width: 620px; margin: 0 auto; }
.story__body p { color: var(--charcoal); margin: 0 0 1.4em; font-size: 17px; line-height: 1.85; }
.story__body .story__lead {
  font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 32px);
  line-height: 1.3; color: var(--forest); margin-bottom: 1em;
}
.story__close { text-align: center; margin-top: clamp(48px, 7vw, 80px); }
.story__sign {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(26px, 3.2vw, 36px); line-height: 1.35; color: var(--forest);
  margin: 0;
}

@media (max-width: 760px) {
  .story__body p { font-size: 16px; }
}

/* 平板寬度：選單變成 5 項後，縮小間距避免貼到 Logo */
@media (min-width: 761px) and (max-width: 1000px) {
  .nav { gap: 22px; }
  .nav a { letter-spacing: 0.18em; }
  .nav a.btn { padding: 0 16px 0 calc(16px + 0.18em); }
}
