/* recipehub.io — warm, appetizing, bold. Same brand as the app: coral→orange, Poppins headings.
   Classes used by lib/share-page.js (shared recipes) and the legal pages are kept: wrap, narrow, site-header, brand,
   site-footer, doc, lead, recipe-hero, lang-switch, meta, pill, credit, ingredients, qty, steps, step-time, cta, badge. */
:root {
  --bg: #FFF8F3;
  --bg-2: #FFEFE6;
  --surface: #FFFFFF;
  --text: #1C1B22;
  --muted: #6B6560;
  --line: #F0E2D8;
  --primary: #F0483E;
  --primary-ink: #C9302A;
  --orange: #FF8A3D;
  --sun: #FFC857;
  --herb: #2F8F5B;
  --primary-soft: #FDE9E4;
  --grad: linear-gradient(135deg, #FF8A3D 0%, #F0483E 100%);
  --shadow: 0 30px 60px -28px rgba(124, 38, 20, .38);
  --radius: 22px;
  --font-display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "Noto Sans SC", "PingFang TC", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15121A; --bg-2: #1E1922; --surface: #221D27; --text: #F5EFEA; --muted: #ABA29B; --line: #352E3B;
    --primary: #FF5A4E; --primary-ink: #FF7A6F; --primary-soft: #3A2220; --shadow: 0 30px 60px -28px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font-body); overflow-x: hidden; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--primary-ink);
  background: var(--primary-soft); padding: 6px 14px; border-radius: 999px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(240,72,62,.18); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header -------------------------------------------------------------------------------------------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.header-bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.header-bar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.15rem var(--font-display); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.site-header nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--text); }
.nav-links { display: flex; gap: 22px; }
@media (max-width: 720px) { .nav-links { display: none; } }
.lang { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button { font: 600 .8rem var(--font-body); border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* Buttons ------------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 1rem var(--font-body); text-decoration: none;
  padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 14px 30px -12px rgba(240,72,62,.65); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.store { display: inline-flex; align-items: center; gap: 12px; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 14px; text-decoration: none; }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store small { display: block; font-size: .7rem; opacity: .75; line-height: 1.1; }
.store strong { display: block; font: 600 1.05rem var(--font-display); line-height: 1.2; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-weight: 600; text-decoration: none; }
.badge.soft { background: var(--primary-soft); color: var(--primary); }

/* Hero ---------------------------------------------------------------------------------------------- */
.hero { position: relative; padding: 48px 0 40px; }
.hero::before { content: ""; position: absolute; inset: -120px -20vw auto -20vw; height: 760px; z-index: -1;
  background:
    radial-gradient(40% 50% at 78% 35%, rgba(255,138,61,.35), transparent 70%),
    radial-gradient(35% 45% at 20% 10%, rgba(255,200,87,.30), transparent 70%),
    radial-gradient(30% 40% at 60% 85%, rgba(240,72,62,.18), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--muted); max-width: 32em; margin: 0 0 28px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 18px; color: var(--muted); font-size: .92rem; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 24px; } }

/* Phones -------------------------------------------------------------------------------------------- */
.phone { position: relative; width: 270px; aspect-ratio: 390 / 844; padding: 10px; border-radius: 46px; background: #121115;
  box-shadow: var(--shadow), inset 0 0 0 2px #2a2830; }
/* The top strip is the status bar, so the notch never covers the app's content. */
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 37px; padding-top: 34px; background: #FBF8F6; }
.phone::after { content: ""; position: absolute; top: 18px; left: 50%; width: 82px; height: 22px; margin-left: -41px; border-radius: 12px; background: #121115; }
.hero-stage { position: relative; height: 600px; display: grid; place-items: center; }
.hero-stage .phone.back { position: absolute; transform: translate(-58%, 26px) rotate(-8deg) scale(.88); opacity: .95; }
.hero-stage .phone.front { position: absolute; transform: translate(26%, 0) rotate(5deg); }
@media (max-width: 880px) { .hero-stage { height: 520px; } .phone { width: 230px; } }
@media (max-width: 420px) { .hero-stage .phone.back { transform: translate(-40%, 26px) rotate(-8deg) scale(.82); } .hero-stage .phone.front { transform: translate(18%, 0) rotate(5deg); } }

.chip-float { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: .9rem; box-shadow: 0 18px 36px -20px rgba(0,0,0,.35);
  white-space: nowrap; animation: bob 6s ease-in-out infinite; }
.chip-float .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .85rem; color: #fff; }
.chip-float.c1 { top: 40px; left: 0; } .chip-float.c1 .ico { background: #D62976; }
.chip-float.c2 { top: 230px; right: -6px; animation-delay: -2s; } .chip-float.c2 .ico { background: var(--herb); }
.chip-float.c3 { bottom: 120px; left: -6px; animation-delay: -4s; } .chip-float.c3 .ico { background: var(--orange); }
.chip-float.c4 { bottom: 26px; right: 18px; animation-delay: -1s; } .chip-float.c4 .ico { background: var(--primary); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 420px) { .chip-float { font-size: .78rem; padding: 8px 10px; } .chip-float.c2 { right: 0; } }

/* Marquee ------------------------------------------------------------------------------------------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding: 18px 0; margin-top: 8px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: slide 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.src { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line);
  font-weight: 600; white-space: nowrap; }
.src i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections ------------------------------------------------------------------------------------------ */
section { scroll-margin-top: 80px; }
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; overflow: hidden; }
.step-card::before { counter-increment: s; content: counter(s); position: absolute; right: 18px; top: -10px; font: 800 7rem/1 var(--font-display);
  color: var(--primary-soft); z-index: 0; }
.step-card > * { position: relative; }
.step-card .icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: var(--grad); color: #fff; margin-bottom: 18px; }
.step-card p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps-3 { grid-template-columns: 1fr; } }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; }
.feature.flip .feature-media { order: -1; }
.feature-media { display: grid; place-items: center; position: relative; }
.feature-media::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; z-index: -1; filter: blur(10px);
  background: radial-gradient(circle, rgba(255,138,61,.28), transparent 65%); }
.feature-text p { color: var(--muted); font-size: 1.08rem; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  background: var(--primary-soft); color: var(--primary); margin-top: 2px; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 32px; padding: 32px 0; } .feature.flip .feature-media { order: 0; } }

.translate-demo { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.translate-demo .lang-tag { font-size: .8rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; }
.translate-demo .title { font: 700 1.35rem/1.3 var(--font-display); min-height: 1.3em; transition: opacity .35s, transform .35s; }
.translate-demo .title.out { opacity: 0; transform: translateY(8px); }
.watch-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 700;
  font-size: .9rem; padding: 6px 14px; border-radius: 999px; }

/* Hong Kong band ------------------------------------------------------------------------------------ */
.hk { position: relative; overflow: hidden; border-radius: 32px; padding: 64px 48px; background: var(--text); color: var(--bg); display: grid;
  grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.hk::after { content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%; background: var(--grad); opacity: .9; filter: blur(4px); }
.hk > * { position: relative; z-index: 1; }
.hk p { color: color-mix(in srgb, var(--bg) 78%, transparent); font-size: 1.08rem; }
.hk .big { font: 800 clamp(2.4rem, 6vw, 4rem)/1.1 var(--font-display); text-align: right; }
.hk .big small { display: block; font: 500 1rem var(--font-body); opacity: .85; margin-top: 8px; }
@media (max-width: 760px) { .hk { grid-template-columns: 1fr; padding: 44px 26px; } .hk .big { text-align: left; } }

/* FAQ ----------------------------------------------------------------------------------------------- */
.faq { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0;
  font: 600 1.05rem var(--font-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* Final CTA ----------------------------------------------------------------------------------------- */
.final { text-align: center; border-radius: 36px; padding: 72px 24px; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.final::before { content: "🍜 🥟 🍳 🥗 🍝 🌮 🍰 🍤"; position: absolute; inset: auto 0 18px; font-size: 1.6rem; letter-spacing: 1.2rem; opacity: .35; white-space: nowrap; }
.final h2 { color: #fff; max-width: 16em; margin: 0 auto .4em; }
.final p { opacity: .92; font-size: 1.1rem; margin: 0 0 28px; }
.final .store { background: #fff; color: var(--text); }

/* Reveal on scroll ---------------------------------------------------------------------------------- */
/* Only hidden when JavaScript runs (html.js), so the page never stays blank without it. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .chip-float, .marquee-track { animation: none; }
  .translate-demo .title { transition: none; }
}

/* Footer -------------------------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: .92rem; margin-top: 64px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer a { color: var(--muted); }

/* Legal / support documents ------------------------------------------------------------------------- */
.doc { padding: 32px 0 40px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.45rem; margin-top: 2em; }
.doc h3 { margin-top: 1.6em; }
.doc .updated { color: var(--muted); font-size: .95rem; }
.doc li { margin: .35em 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--surface); border-radius: 14px; overflow: hidden; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-2); }
.callout { background: var(--primary-soft); border-radius: var(--radius); padding: 16px 20px; margin: 1.2em 0; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* Shared recipe page -------------------------------------------------------------------------------- */
.recipe-hero { aspect-ratio: 16 / 10; border-radius: 28px; overflow: hidden; background: var(--line); margin: 12px 0 24px; box-shadow: var(--shadow); }
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 20px; }
.pill { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 500; }
.credit { color: var(--muted); font-size: .95rem; }
.ingredients { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.ingredients li { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.ingredients li:last-child { border-bottom: 0; }
.ingredients .qty { font-weight: 700; min-width: 5.5em; }
.steps { padding-left: 1.3em; }
.steps li { margin: .8em 0; padding-left: .3em; }
.steps li::marker { font-weight: 700; color: var(--primary); }
.step-time { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px; background: var(--primary-soft); text-decoration: none; font-size: .85rem; font-weight: 600; }
.cta { position: sticky; bottom: 16px; margin: 32px 0; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: 0 12px 30px -18px rgba(0,0,0,.35); }
.lang-switch { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; font-size: .9rem; }
.lang-switch a { text-decoration: none; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.lang-switch a[aria-current="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
