/* ===========================================================
   OrderFood Landing — 對齊 DESIGN.md token（藍主色 + 橘 accent、
   圓潤日系字體、pill 圓角保留給主 CTA、AA 對比）
   =========================================================== */

:root {
  /* 色彩（對齊 apps 既有 token） */
  --blue-50:  #eff6ff;
  --blue-300: #93c5fd;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --teal-500: #0d9488;

  --surface: #ffffff;
  --bg:      #f8fafc;
  --bg-soft: #f1f5f9;
  --border:  #e2e8f0;
  --ink:     #1e293b;
  --muted:   #475569;
  --muted-soft: #64748b;

  --status-new-bg: #fff7ed;       --status-new-fg: #9a3412;
  --status-prep-bg: #eff6ff;      --status-prep-fg: #1e40af;

  /* 圓角 */
  --r-pill: 999px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-xs: 6px;

  /* 陰影 */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.12);
  --shadow-brand: 0 8px 22px rgba(37, 99, 235, 0.18);

  /* 動效 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-cute: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.2s;

  --font: 'M PLUS Rounded 1c', 'Noto Sans TC', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1120px;
  --touch: 48px;
}

/* ---------- base ---------- */
*, *::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-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: var(--r-xs); }

.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--blue-600); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm);
  z-index: 100; transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch);
  padding: 12px 24px;
  font-family: inherit; font-size: 16px; font-weight: 700;
  border-radius: var(--r-pill);          /* pill 只給按鈕（主要動作） */
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-cute), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.btn--lg { padding: 15px 30px; font-size: 17px; }
.btn--block { display: flex; width: 100%; }

.btn--primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-brand); }
.btn--primary:hover { background: var(--blue-700); transform: translateY(-2px); }

.btn--ghost { background: var(--surface); color: var(--blue-700); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--blue-300); background: var(--blue-50); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--blue-600); color: #fff;
  border-radius: 10px; font-weight: 800; font-size: 19px;
  box-shadow: var(--shadow-sm);
}
.brand__name { font-size: 20px; letter-spacing: -0.02em; }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-weight: 500; color: var(--muted); transition: color var(--dur) var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links .btn { color: #fff; }
.nav__links .btn--ghost { color: var(--blue-700); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 48px; height: 48px; padding: 12px;
  background: none; border: none; cursor: pointer;
}
.nav__toggle span { height: 2.5px; background: var(--ink); border-radius: 2px; transition: var(--dur) var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 0%, var(--blue-50) 0%, transparent 60%),
    radial-gradient(50% 60% at 0% 100%, #fff7ed 0%, transparent 55%),
    var(--surface);
  padding-block: clamp(48px, 8vw, 96px);
}
.hero__inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-weight: 700; font-size: 14px; letter-spacing: 0.04em;
  color: var(--blue-700); background: var(--blue-50);
  padding: 6px 14px; border-radius: var(--r-pill); margin-bottom: 18px;
}
.eyebrow--center { display: block; width: fit-content; margin-inline: auto; }
.hero__title { font-size: clamp(32px, 5.2vw, 54px); font-weight: 800; }
.hero__sub { margin-top: 20px; font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 36ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--muted); font-size: 15px; font-weight: 500; }

/* hero 真實截圖：顧客手機（前層、置中）＋ 商家接單卡片（前層、左下浮貼） */
.hero__visual { position: relative; min-height: 480px; display: flex; justify-content: center; align-items: center; }

.shot-phone {
  position: relative; z-index: 2; margin: 0;
  width: min(62%, 280px);
  border: 9px solid #0f172a;
  border-radius: 36px;
  background: #0f172a;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.shot-phone img { display: block; width: 100%; height: auto; border-radius: 27px; }

.shot-board {
  position: absolute; left: 0; bottom: 6%; z-index: 3; margin: 0;
  width: min(66%, 340px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-5deg);
}
.shot-board img { display: block; width: 100%; height: auto; }
.shot-board__tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 12px; font-weight: 700;
  color: var(--status-new-fg); background: var(--status-new-bg);
  padding: 4px 10px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 9vw, 104px); }
.value { background: var(--bg); }
.features { background: var(--surface); }
.flow { background: var(--bg); }
.faq { background: var(--surface); }

.section__head { max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section__head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.section__head p { margin-top: 14px; color: var(--muted); font-size: 17px; }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 26px; background: var(--blue-50); border-radius: var(--r-md); margin-bottom: 16px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* ---------- feature columns ---------- */
.feature-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.feature-col--accent { border-color: var(--blue-300); box-shadow: var(--shadow-md); }
.feature-col__top { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px dashed var(--border); }
.feature-col__tag {
  display: inline-block; font-size: 14px; font-weight: 700;
  color: var(--blue-700); background: var(--blue-50);
  padding: 5px 12px; border-radius: var(--r-pill); margin-bottom: 12px;
}
.feature-col--accent .feature-col__tag { color: var(--orange-500); background: #fff7ed; }
.feature-col h3 { font-size: 20px; }

.ticks li {
  position: relative; padding-left: 28px; margin-bottom: 11px;
  color: var(--muted); font-size: 15.5px;
}
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--blue-600); font-weight: 800;
}
.feature-col--accent .ticks li::before { color: var(--orange-500); }

/* ---------- flow steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px 22px; box-shadow: var(--shadow-sm);
}
.step__n {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 16px;
  font-size: 20px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-radius: var(--r-md);
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- faq ---------- */
.faq__list details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 4px 20px; margin-bottom: 12px;
  transition: box-shadow var(--dur) var(--ease);
}
.faq__list details[open] { box-shadow: var(--shadow-sm); }
.faq__list summary {
  cursor: pointer; list-style: none;
  padding: 16px 28px 16px 0; position: relative;
  font-weight: 700; font-size: 17px;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 700; color: var(--blue-600); transition: transform var(--dur) var(--ease);
}
.faq__list details[open] summary::after { content: "−"; }
.faq__list details p { color: var(--muted); padding-bottom: 18px; font-size: 16px; }

/* ---------- cta ---------- */
.cta {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff; padding-block: clamp(56px, 8vw, 88px); text-align: center;
}
.cta__inner { max-width: 640px; }
.cta h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.cta p { margin-top: 14px; font-size: 18px; color: rgba(255, 255, 255, 0.9); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }
.cta .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.cta .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.cta .btn--primary { background: #fff; color: var(--blue-700); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2); }
.cta .btn--primary:hover { background: var(--blue-50); }
.cta__note { margin-top: 22px; font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.cta__note code { background: rgba(255, 255, 255, 0.15); padding: 1px 7px; border-radius: var(--r-xs); }

/* ---------- footer ---------- */
.footer { background: #0f172a; color: #cbd5e1; padding-block: 48px 28px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer__brand .brand__name { color: #fff; font-size: 20px; }
.footer__brand p { margin-top: 10px; font-size: 14px; color: #94a3b8; }
.footer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 320px; }
.footer__brand p { flex-basis: 100%; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; align-content: flex-start; }
.footer__links a { color: #cbd5e1; font-size: 15px; transition: color var(--dur) var(--ease); }
.footer__links a:hover { color: #fff; }
.footer__bottom { padding-top: 24px; font-size: 14px; color: #94a3b8; }

/* ---------- scroll reveal（漸進增強：只有 .js 時才先隱藏） ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: var(--dur) var(--ease);
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 12px 8px; font-size: 17px; border-radius: var(--r-sm); }
  .nav__links a:hover { background: var(--bg); }
  .nav__links .btn { margin-top: 8px; }
  .nav__toggle { display: flex; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__sub { max-width: none; }
  .hero__visual { min-height: 440px; margin-top: 16px; }
  .grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding-inline: 18px; }
  .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero__cta .btn, .cta__actions .btn { flex: 1 1 100%; }
  .hero__visual { min-height: 420px; }
  .shot-phone { width: min(64%, 240px); }
  .shot-board { width: min(78%, 290px); left: -2%; bottom: 2%; }
}
