/* ==========================================================================
   MUEDO E20Pro — 品牌銷售網站
   設計系統：延續蝦皮視覺（墨黑／紙白／訊號綠／warning黃），
   標題採 Noto Serif TC（沉穩、非典型 3C 賣場字體），
   數據／規格／價格採 Space Grotesk 等寬感字體，呼應「聲學工程」調性。
   訊號分隔線（聲波 SVG）為全站簽名元素，呼應「開放式聆聽」核心賣點。
   ========================================================================== */

:root {
  --ink: #10182b;
  --ink-soft: #5b6472;
  --paper: #f5f4f1;
  --paper-dim: #e7e5df;
  --teal: #3e6fc4;        /* 品牌藍（取自 MUEDO 官方標誌與角標） */
  --teal-dark: #16223b;   /* 品牌深藍（取自科技感背景） */
  --sun: #ff8a42;         /* 品牌橘（取自產品鏡腳飾線） */
  --alert: #e8483a;
  --safe: #2fbf71;
  --white: #ffffff;

  --font-display: "Noto Serif TC", serif;
  --font-body: "Noto Sans TC", sans-serif;
  --font-mono: "Space Grotesk", "Noto Sans TC", monospace;

  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;
  --container: 1160px;
  --shadow: 0 20px 60px rgba(16, 24, 43, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { position: relative; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--teal);
  display: inline-block;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.35; }
h3 { font-size: 22px; line-height: 1.4; }
p { margin: 0; }
.lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 46ch;
}
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 16px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none;
}
.btn:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--teal);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(62, 111, 196, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(62, 111, 196, 0.45); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid rgba(245, 244, 241, 0.4);
}
.btn-ghost:hover { border-color: var(--paper); }
.btn-dark {
  background: var(--ink);
  color: var(--paper);
}
.btn-dark:hover { transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- 聲波分隔線（簽名元素） ---------- */
.wave-divider {
  width: 100%;
  height: 64px;
  display: block;
}
.wave-divider path {
  stroke: var(--teal);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.wave-divider.in-view path { stroke-dashoffset: 0; }
.wave-divider.on-dark path { stroke: var(--sun); opacity: 0.9; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 24, 43, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 244, 241, 0.08);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--paper);
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nav-logo span { color: var(--teal); }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a { text-decoration: none; opacity: 0.8; transition: opacity 0.15s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--sun);
}
.nav-menu-btn { display: none; background: none; border: none; color: var(--paper); font-size: 24px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0 0;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 138, 66, 0.14);
  color: var(--sun);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 138, 66, 0.35);
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.28;
}
.hero h1 em { font-style: normal; color: var(--teal); }
.hero-lede {
  margin-top: 20px;
  font-size: 18px;
  color: rgba(245, 244, 241, 0.72);
  max-width: 42ch;
}
.hero-price-row {
  margin-top: 34px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-price {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--white);
}
.hero-price-was {
  font-family: var(--font-mono);
  font-size: 18px;
  color: rgba(245, 244, 241, 0.5);
  text-decoration: line-through;
}
.hero-price-tag {
  background: var(--teal);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual img {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-l);
}
.hero-ring {
  position: absolute;
  border: 1px solid rgba(62, 111, 196, 0.35);
  border-radius: 50%;
  animation: ring-pulse 3.6s ease-out infinite;
}
.hero-ring.r1 { width: 340px; height: 340px; animation-delay: 0s; }
.hero-ring.r2 { width: 440px; height: 440px; animation-delay: 0.8s; }
.hero-ring.r3 { width: 540px; height: 540px; animation-delay: 1.6s; }
@keyframes ring-pulse {
  0% { opacity: 0.55; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-ring { animation: none; display: none; }
}

@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* ---------- 首購優惠倒數條 ---------- */
.promo-bar {
  background: var(--teal);
  color: var(--ink);
}
.promo-bar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.promo-countdown {
  display: flex;
  gap: 6px;
  font-family: var(--font-mono);
}
.promo-countdown span {
  background: var(--ink);
  color: var(--sun);
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 34px;
  text-align: center;
}
.promo-countdown .sep { background: none; color: var(--ink); padding: 4px 0; }

/* ---------- 產品實拍影片 ---------- */
.video-frame {
  max-width: 320px;
  margin: 0 auto;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.video-frame video {
  width: 100%;
  display: block;
  aspect-ratio: 462 / 720;
  background: #000;
}

/* ---------- 通用區塊 ---------- */
.section { padding: 96px 0; }
.section.dark { background: var(--ink); color: var(--paper); }
.section.paper { background: var(--paper); }
.section.dim { background: var(--paper-dim); }

/* ---------- 痛點對比 ---------- */
.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: var(--radius-l);
  overflow: hidden;
}
.pain-card { position: relative; min-height: 420px; }
.pain-card img { width: 100%; height: 100%; object-fit: cover; }
.pain-card::after {
  content: "";
  position: absolute; inset: 0;
}
.pain-card.bad::after { background: linear-gradient(180deg, rgba(232,72,58,0) 35%, rgba(232,72,58,0.55) 100%); }
.pain-card.good::after { background: linear-gradient(180deg, rgba(47,191,113,0) 35%, rgba(47,191,113,0.55) 100%); }
.pain-label {
  position: absolute; left: 24px; bottom: 22px; z-index: 2; color: #fff;
}
.pain-label .tag { font-family: var(--font-mono); font-size: 13px; opacity: 0.85; }
.pain-label .title { font-size: 20px; font-weight: 700; margin-top: 4px; }
@media (max-width: 720px) {
  .pain-grid { grid-template-columns: 1fr; }
}

/* ---------- 五大賣點 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--paper-dim);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.feature-card {
  background: var(--paper);
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--teal-dark);
  color: var(--sun);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.feature-card h3 { font-size: 17px; }
.feature-card p { font-size: 14px; color: var(--ink-soft); }
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- 情境四宮格 ---------- */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.scenario-card {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 3/4;
}
.scenario-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.scenario-card:hover img { transform: scale(1.06); }
.scenario-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,24,43,0) 50%, rgba(16,24,43,0.75) 100%);
}
.scenario-card span {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  color: #fff; font-weight: 700; font-size: 16px;
}
@media (max-width: 860px) {
  .scenario-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 2 in 1 ---------- */
.twoin1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.twoin1-list { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.twoin1-list .row { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 700; }
.twoin1-list .row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.twoin1 img { border-radius: var(--radius-l); }
@media (max-width: 860px) {
  .twoin1 { grid-template-columns: 1fr; }
  .twoin1 .visual { order: -1; }
}

/* ---------- 規格表 ---------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 15px;
}
.spec-table tr { border-bottom: 1px solid var(--paper-dim); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 16px 4px; }
.spec-table td:first-child { color: var(--ink-soft); width: 40%; font-family: var(--font-body); }
.spec-table td:last-child { font-weight: 700; text-align: right; }
.spec-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
@media (max-width: 720px) {
  .spec-two-col { grid-template-columns: 1fr; }
}
.ncc-badge {
  margin-top: 28px;
  background: var(--teal-dark);
  color: var(--paper);
  border-radius: var(--radius-m);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ncc-badge .label { font-size: 13px; opacity: 0.75; font-family: var(--font-mono); }
.ncc-badge .value { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--sun); }

/* ---------- 首購贈品 ---------- */
.addon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.addon-card {
  background: var(--white);
  border: 1.5px solid var(--paper-dim);
  border-radius: var(--radius-m);
  padding: 16px;
  position: relative;
}
.addon-card.gift::after {
  content: "免費贈送";
  position: absolute;
  top: 12px; right: 12px;
  background: var(--sun);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.addon-card img { border-radius: var(--radius-s); aspect-ratio: 1; object-fit: cover; margin-bottom: 12px; background: var(--paper-dim); }
.addon-card .name { font-weight: 700; font-size: 15px; }
.addon-card .price { font-family: var(--font-mono); color: var(--safe); font-weight: 700; margin-top: 6px; font-size: 14px; }
.addon-card .price .was { color: var(--ink-soft); text-decoration: line-through; font-weight: 500; margin-right: 6px; }
@media (max-width: 860px) {
  .addon-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 訂購卡（含 ECPay CTA） ---------- */
.order-section { background: var(--ink); color: var(--paper); }
.order-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-l);
  padding: 40px;
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 0 auto;
}
.order-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--paper-dim); font-size: 15px; }
.order-row:last-of-type { border-bottom: none; }
.order-row .amt { font-family: var(--font-mono); font-weight: 700; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0; }
.order-total .n { font-family: var(--font-mono); font-size: 34px; font-weight: 700; color: var(--alert); }
.qty-stepper { display: flex; align-items: center; gap: 12px; }
.qty-stepper button {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--paper-dim);
  background: var(--white); font-size: 18px; cursor: pointer; line-height: 1;
}
.qty-stepper span { font-family: var(--font-mono); font-weight: 700; min-width: 20px; text-align: center; }
.trust-row {
  display: flex; gap: 18px; margin-top: 20px; font-size: 12px; color: var(--ink-soft);
  flex-wrap: wrap;
}
.trust-row span { display: flex; align-items: center; gap: 6px; }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--paper-dim);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-body);
}
.faq-q .icon { font-family: var(--font-mono); font-size: 20px; color: var(--teal-dark); transition: transform 0.2s; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--ink-soft);
  font-size: 15px;
}
.faq-a p { padding-bottom: 20px; max-width: 68ch; }
.faq-item.open .faq-a { max-height: 240px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(245, 244, 241, 0.6);
  padding: 56px 0 32px;
  font-size: 13px;
}
.footer-top {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 32px; border-bottom: 1px solid rgba(244,243,239,0.1);
  margin-bottom: 24px;
}
.footer-logo { font-family: var(--font-mono); color: var(--paper); font-size: 18px; font-weight: 700; }
.footer-links { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; }

/* ---------- 客服聯絡卡片（含綠界驗證用Email、商品圖示）---------- */
.contact-card {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  background: rgba(245, 244, 241, 0.05);
  border: 1px solid rgba(245, 244, 241, 0.1);
  border-radius: var(--radius-m);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.contact-icons {
  display: flex;
  gap: 10px;
  font-size: 22px;
  flex-shrink: 0;
}
.contact-icons span {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(245, 244, 241, 0.08);
  border-radius: 10px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(245, 244, 241, 0.75);
}
.contact-info a { color: var(--sun); text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .contact-card { flex-direction: column; align-items: flex-start; }
}

/* ---------- 訂購 Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16,24,43,0.6);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 200;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--paper); border-radius: var(--radius-l);
  padding: 36px; max-width: 440px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal h3 { margin-bottom: 6px; }
.modal .lede { margin-bottom: 24px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--paper-dim); font-family: var(--font-body); font-size: 15px;
  background: var(--white);
}
.field input:focus, .field select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.modal-close {
  position: absolute; top: 16px; right: 20px; background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--ink-soft);
}
.modal-inner { position: relative; }
.modal-error { color: var(--alert); font-size: 13px; margin-top: 10px; display: none; }
.modal-error.show { display: block; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- utility ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; gap: 32px; } }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
