/* ==========================================================================
   食跡 Moments — landing site styles · FIELD JOURNAL (食跡手帖)
   Retheme 2026-08-03: paper + ink + celadon + ONE sacred vermilion (the seal).
   Tokens mirror the app's journal theme (DESIGN.md / src/index.css
   [data-theme="journal"]). The one rule that makes it work: --seal is stamp
   ink only — it appears on rating numerals, the 再 chop, and the single
   verdict-commit CTA. Never on chrome, links, or nav. Celadon does the work.
   Legal pages (privacy.html / terms.html) share this sheet: .topbar, .legal,
   .btn, .langtoggle, .lang-* keep their class names and inherit the paper look.
   ========================================================================== */

:root {
  /* Surfaces — rice paper, never pure white */
  --paper: #F4EFE4;
  --card: #FDFAF2;
  --background: var(--paper);
  --foreground: #2B2823;        /* ink */
  --muted-foreground: #6B6254;  /* ink-soft (AA) */
  --border: #DED4C2;            /* hairlines / perforation */
  --lacquer: #251E17;          /* warm dark paper — footer (never charcoal) */

  /* Brand */
  --primary: #3E6151;          /* celadon-deep — buttons, links, active (AA on paper) */
  --primary-hover: #33513F;
  --celadon: #7C9A8E;          /* soft celadon — trail, togetherness, accents */
  --seal: #C0392B;             /* STAMP INK ONLY — ratings, 再 chop, verdict CTA */
  --seal-ink: #FDFAF2;         /* text on a filled seal */

  --success: #3D7A46;
  --ring: var(--celadon);

  /* Type — Latin FIRST so Latin never renders in the CJK face */
  --font-serif: "Fraunces", "Noto Serif TC", Georgia, serif;
  --font-sans: "Instrument Sans", "Noto Sans TC", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "SFMono-Regular", monospace;

  --radius: 10px;
  --radius-lg: 14px;
  --radius-img: 20px;
  --shadow-card: 0 1px 2px rgba(43, 40, 35, 0.06);
  --shadow-elevated: 0 14px 40px rgba(43, 40, 35, 0.16);

  --maxw: 1120px;
}

/* --- Reset / 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; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.45rem); }
p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--muted { background: var(--card); }
.center { text-align: center; }
.center .lede, .center .eyebrow { margin-inline: auto; }

/* Eyebrow — mono, celadon. Used sparingly (taste rule: ≤1 per 3 sections). */
.eyebrow {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--primary);
  margin: 0 0 .8rem;
}
.lede { font-size: 1.15rem; color: var(--muted-foreground); max-width: 54ch; }

/* --- Perforation rule (the signature divider) ----------------------------- */
.perf {
  height: 2px; border: 0; margin: 0;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--seal) 30%, var(--border)) 1.4px, transparent 1.6px);
  background-size: 13px 2px; background-repeat: repeat-x; background-position: center;
}
.trace { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .5rem 0; }
.trace::before, .trace::after {
  content: ""; height: 0; flex: 1; max-width: 180px;
  border-top: 2px dotted color-mix(in srgb, var(--celadon) 55%, var(--border));
}
.trace svg { width: 20px; height: 20px; color: var(--seal); flex: none; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 600;
  padding: .9rem 1.7rem; border-radius: 9999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, opacity .15s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
/* --stamp: the ONE sanctioned use of seal on a control — a verdict-commit CTA.
   It presses like a stamp (scale-down + micro-rotation settle). */
.btn--stamp { background: var(--seal); color: var(--seal-ink); }
.btn--stamp:hover { background: color-mix(in srgb, var(--seal) 90%, #000); }
.btn--stamp:active { animation: stamp-commit 360ms cubic-bezier(.2,1.3,.5,1); }
/* --primary: celadon — the working CTA for everything that isn't a verdict */
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { background: transparent; color: var(--muted-foreground); border-color: var(--border); }
.btn--ghost:hover { background: color-mix(in srgb, var(--celadon) 12%, transparent); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

@keyframes stamp-commit {
  0%   { transform: scale(.9) rotate(-1.5deg); }
  60%  { transform: scale(1.02) rotate(.5deg); }
  100% { transform: scale(1) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .btn--stamp:active { animation: none; }
}

/* --- Top bar (paper, single line ≤72px) ----------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--foreground); }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 22%; }
.brand b { font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; }
.topbar__spacer { flex: 1; }
.navlink { color: var(--muted-foreground); font-weight: 500; font-size: .95rem; }
.topbar .navlink { display: none; }
@media (min-width: 760px) { .topbar .navlink { display: inline; } }

/* Language toggle */
.langtoggle { display: inline-flex; border: 1px solid var(--border); border-radius: 9999px; overflow: hidden; background: var(--card); }
.langtoggle button {
  font: inherit; font-size: .85rem; font-weight: 600; border: 0; background: transparent;
  color: var(--muted-foreground); padding: .35rem .75rem; cursor: pointer;
}
.langtoggle button[aria-pressed="true"] { background: var(--primary); color: #fff; }

/* --- Hero (paper — the moment card is the hero, not a red box) ------------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 7vw, 5rem); }
/* faint celadon trace arc wandering the paper */
.hero::before {
  content: ""; position: absolute; right: -8%; top: -20%; width: 620px; height: 620px;
  border: 1.5px solid color-mix(in srgb, var(--celadon) 40%, transparent);
  border-radius: 50%; opacity: .5; pointer-events: none;
}
.hero__inner { position: relative; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { color: var(--foreground); max-width: 12ch; }
.hero h1 .seal-word { color: var(--seal); }   /* the ONE headline accent = the verdict word */
.hero__sub { font-size: 1.2rem; color: var(--muted-foreground); max-width: 44ch; margin-top: .2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero__note { margin-top: 1.1rem; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; color: color-mix(in srgb, var(--muted-foreground) 80%, transparent); }

/* --- The moment card artifact (taped, rotated, registration-marked) ------- */
.mcard-wrap { display: grid; place-items: center; }
.mcard {
  position: relative; width: 100%; max-width: 340px;
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated); transform: rotate(2.5deg);
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .mcard { animation: card-settle 700ms cubic-bezier(.2,1,.4,1) both; }
}
@keyframes card-settle { 0% { transform: rotate(6deg) translateY(14px); opacity: 0; } 100% { transform: rotate(2.5deg) translateY(0); opacity: 1; } }
.mcard__photo {
  position: relative; aspect-ratio: 4 / 3;
  background: radial-gradient(120% 130% at 45% 40%, #EDC77A 0%, #B4823F 52%, #45301C 100%);
}
.mcard__reg { position: absolute; top: 12px; left: 14px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; color: rgba(255,255,255,.9); }
/* outlined seal straddling the photo/paper seam */
.mcard__seal {
  position: absolute; right: 18px; bottom: -34px; width: 68px; height: 68px;
  border: 3px solid var(--seal); border-radius: 50%;
  display: grid; place-content: center; text-align: center; background: transparent;
}
.mcard__seal b { font-family: var(--font-serif); font-weight: 600; font-size: 1.4rem; color: var(--seal); line-height: 1; }
.mcard__seal span { font-family: var(--font-sans); font-size: .55rem; color: var(--seal); letter-spacing: .05em; }
.mcard__band { padding: 1.15rem 1.15rem 1.25rem; position: relative; }
.mcard__band h3 { font-size: 1.4rem; margin: 0; }
.mcard__band .en { font-family: var(--font-serif); font-weight: 600; font-size: .8rem; color: color-mix(in srgb, var(--foreground) 60%, var(--paper)); margin: .1rem 0 .5rem; }
.mcard__band .note { font-family: var(--font-serif); font-weight: 500; font-size: .9rem; color: var(--foreground); margin: 0 0 .8rem; }
.mcard__meta { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--muted-foreground); }
.mcard__chop {
  position: absolute; right: 1.15rem; bottom: 1.1rem; width: 30px; height: 30px;
  border: 2px solid var(--seal); border-radius: 5px; display: grid; place-content: center;
}
.mcard__chop b { font-family: var(--font-serif); font-weight: 600; font-size: .95rem; color: var(--seal); }
/* corner tape */
.mcard::before {
  content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  width: 96px; height: 26px; background: color-mix(in srgb, var(--celadon) 30%, #fff);
  opacity: .55; z-index: 2;
}

/* --- Clarity strip (replaces the three equal feature cards) ---------------- */
.clarity { display: grid; gap: 1.5rem; text-align: center; }
@media (min-width: 720px) { .clarity { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; } }
.clarity__step h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.clarity__step p { color: var(--muted-foreground); margin: 0; font-size: .97rem; }
.clarity__arrow { color: var(--celadon); font-size: 1.4rem; display: none; }
@media (min-width: 720px) { .clarity__arrow { display: block; } }

/* --- How-it-works (alternating rows, capped at 2) ------------------------- */
.steps { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); margin-top: 3rem; }
.step { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 820px) {
  .step { grid-template-columns: 1fr 1fr; }
  .step:nth-child(even) .step__media { order: 2; }
}
.step__num {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 9999px;
  background: var(--celadon); color: #fff; font-weight: 700; font-size: 1rem; margin-bottom: .9rem;
  font-family: var(--font-mono);
}
.step h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.step p { color: var(--muted-foreground); }
/* taped-snapshot media frame — the frame does the work so any image looks right */
.snap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-img); padding: 12px; box-shadow: var(--shadow-card); transform: rotate(-1.4deg); }
.snap:nth-child(even) { transform: rotate(1.4deg); }
.snap > * { border-radius: 12px; aspect-ratio: 4 / 3; width: 100%; background: radial-gradient(120% 130% at 50% 40%, #DDE7DF 0%, #A9BFB3 100%); display: block; }

/* --- Share-card showcase (the site doubles as the card window) ------------ */
.showcase { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 780px) { .showcase { grid-template-columns: repeat(3, 1fr); } }
.showcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem; box-shadow: var(--shadow-card); }
.showcard__label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--celadon); margin-bottom: .7rem; }
.showcard__frame { border-radius: 12px; aspect-ratio: 4 / 5; background: radial-gradient(120% 130% at 50% 38%, #EDC77A 0%, #B4823F 55%, #45301C 100%); }

/* --- Beta / signup -------------------------------------------------------- */
.betacard {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-card);
}
.betalist { list-style: none; counter-reset: s; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1.2rem; }
.betalist li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.betalist li::before {
  counter-increment: s; content: counter(s);
  width: 2rem; height: 2rem; border-radius: 9999px; background: var(--celadon); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem; font-family: var(--font-mono);
}
.betalist h3 { font-family: var(--font-sans); font-weight: 700; font-size: 1.05rem; margin: .15rem 0 .2rem; }
.betalist p { margin: 0; color: var(--muted-foreground); font-size: .97rem; }
.signup { max-width: 560px; margin-inline: auto; }
.field { margin-bottom: 1rem; text-align: left; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field input[type="email"], .field input[type="text"] {
  width: 100%; font: inherit; padding: .8rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card); color: var(--foreground);
}
.field input:focus { outline: 3px solid var(--ring); outline-offset: 1px; border-color: var(--celadon); }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--muted-foreground); text-align: left; }
.consent input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--primary); flex: none; }
.formnote { font-size: .85rem; color: var(--muted-foreground); margin-top: 1rem; }
.form-status { margin-top: 1rem; font-weight: 600; min-height: 1.4em; }
.form-status[data-state="ok"] { color: var(--success); }
.form-status[data-state="err"] { color: var(--seal); }
.callout {
  margin-top: 1.5rem; padding: 1rem 1.2rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--celadon) 14%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--celadon) 40%, var(--border)); font-size: .95rem;
}

/* --- Contact cards -------------------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.contact-grid { grid-template-columns: 1fr; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-card);
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--muted-foreground); margin: 0; font-size: .97rem; }

/* --- Footer (deep warm paper — NOT charcoal; stays in the world) ---------- */
.footer { background: var(--lacquer); color: #D8CFC2; padding: 0 0 2.5rem; }
.footer .perf { opacity: .5; }
.footer__body { padding-top: 3rem; }
.footer a { color: #EAE1D4; }
.footer__top { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer__top { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer .brand b { color: #F4EFE4; font-family: var(--font-serif); }
.footer__tag { font-family: var(--font-serif); font-weight: 500; color: #A79A88; margin-top: .5rem; font-size: .95rem; }
.footer h4 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #8B7F6E; margin: 0 0 .8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #3A322A; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .03em; color: #8B7F6E; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: space-between; }

/* --- Legal pages (retheme to paper; classes preserved) -------------------- */
.legal { max-width: 800px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 700; margin-top: 1.4rem; }
.legal p, .legal li { color: color-mix(in srgb, var(--foreground) 92%, var(--paper)); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal .updated { color: var(--muted-foreground); font-size: .92rem; }
/* Governing-language + effective-date note. Was .draft-banner in --warning yellow,
   left over from when these pages were drafts — it read as "unfinished document"
   to anyone opening the privacy policy. Renamed with the markup; the celadon tint
   from the Field Journal retheme is the de-alarmed styling. */
.legal-note {
  background: color-mix(in srgb, var(--celadon) 16%, var(--card));
  border: 1px solid color-mix(in srgb, var(--celadon) 45%, var(--border));
  border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.5rem 0 2rem; font-size: .95rem;
}
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.legal th, .legal td { border: 1px solid var(--border); padding: .6rem .7rem; text-align: left; vertical-align: top; }
.legal th { background: var(--card); font-family: var(--font-sans); }

/* --- i18n toggle visibility ---------------------------------------------- */
html[data-lang="en"] .lang-zh { display: none; }
html[data-lang="zh"] .lang-en { display: none; }
[lang="zh-Hant"] { letter-spacing: .01em; }

/* --- utilities ------------------------------------------------------------ */
.mt-0 { margin-top: 0; }
/* Reveal-on-scroll — but only HIDE when JS is present to bring them back, so a
   no-JS load (or a crawler) shows the content fully instead of blank. */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Real imagery (added 2026-08-03) -------------------------------------- */
/* Hero moment-card photo: real food shot fills the photo band; reg mark + seal
   sit above it (later in the DOM). */
.mcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* How-it-works snaps: real app screenshots are portrait; show the top of the
   screen in a taped frame (higher specificity than .snap > * so this wins). */
.snap { max-width: 340px; margin-inline: auto; }
.snap img { border-radius: 12px; aspect-ratio: 3 / 4; width: 100%; object-fit: cover; object-position: center top; display: block; background: none; }

/* --- Share-card mockups (postcard / polaroid / ticket) — never empty ------ */
.mock { border-radius: 12px; overflow: hidden; text-align: left; }
.mock__photo { aspect-ratio: 4 / 3; background-size: cover; background-position: center; position: relative; }
/* B · Postcard */
.mock--postcard { background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.mock--postcard .mock__seal {
  position: absolute; right: 12px; bottom: -18px; width: 42px; height: 42px;
  border: 2.5px solid var(--seal); border-radius: 50%; display: grid; place-content: center;
  font-family: var(--font-serif); font-weight: 600; color: var(--seal); font-size: .95rem;
  background: color-mix(in srgb, var(--card) 85%, transparent);
}
.mock--postcard .mock__band { padding: 1.5rem .9rem 1rem; }
.mock--postcard .mock__band b { font-family: var(--font-serif); font-weight: 600; display: block; color: var(--foreground); }
.mock--postcard .mock__band span { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--muted-foreground); }
/* F · Polaroid */
.mock--polaroid { background: #fff; padding: 11px 11px 0; border: 1px solid var(--border); box-shadow: var(--shadow-card); transform: rotate(-1.5deg); }
.mock--polaroid .mock__photo { border-radius: 4px; }
.mock--polaroid .mock__cap { font-family: var(--font-serif); font-weight: 500; font-size: .82rem; color: var(--foreground); padding: .6rem .2rem .8rem; margin: 0; }
/* H · Ticket */
.mock--ticket { background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.mock--ticket .mock__thead { background: var(--celadon); color: #fff; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em; padding: .5rem .7rem; }
.mock--ticket .mock__photo--sm { aspect-ratio: 16 / 9; }
.mock--ticket .mock__stub { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem; border-top: 2px dotted var(--border); font-family: var(--font-mono); font-size: .66rem; color: var(--muted-foreground); }
.mock--ticket .mock__stub b { font-family: var(--font-serif); color: var(--seal); border: 1.5px solid var(--seal); border-radius: 4px; padding: 0 .35rem; }
