/* ============================================================
   Ming Kee Porridge 民記粥 — landing page styles
   Palette: rice cream / ink / claypot terracotta / scallion jade
   ============================================================ */

:root {
  --rice: #f4eee1;
  --rice-deep: #eae0cc;
  --ink: #1e1912;
  --ink-soft: #4a4238;
  --clay: #b4531d;
  --clay-deep: #93400f;
  --jade: #43794f;
  --gold: #d9a441;
  --serif: "Fraunces", "Noto Serif SC", serif;
  --sans: "Manrope", system-ui, sans-serif;
  --zh: "Noto Serif SC", serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--rice);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--clay); color: var(--rice); }

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

a { color: inherit; }

/* ===== Preloader ===== */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem;
}
.preloader__chars { display: flex; gap: 0.5em; }
.preloader__char {
  font-family: var(--zh); font-weight: 900;
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--rice);
  opacity: 0; transform: translateY(0.4em);
}
.preloader__sub {
  color: var(--gold);
  font-size: 0.8rem; letter-spacing: 0.35em; text-transform: uppercase;
  opacity: 0;
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav--scrolled {
  background: rgba(244, 238, 225, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(30, 25, 18, 0.08);
  padding-top: 0.7rem; padding-bottom: 0.7rem;
}
.nav__brand { display: flex; align-items: baseline; gap: 0.6rem; text-decoration: none; }
.nav__zh { font-family: var(--zh); font-weight: 900; font-size: 1.35rem; color: var(--clay); }
.nav__en { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
.nav__links { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.nav__links a {
  text-decoration: none; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  position: relative; padding: 0.2em 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--clay);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  text-decoration: none; font-weight: 700; font-size: 0.85rem;
  border: 2px solid var(--ink); border-radius: 999px;
  padding: 0.45em 1.1em;
  transition: background 0.3s, color 0.3s;
}
.nav__cta:hover { background: var(--ink); color: var(--rice); }

/* ===== Buttons ===== */
.btn {
  display: inline-block; text-decoration: none;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  padding: 0.85em 1.9em; border-radius: 999px;
  transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--clay); color: var(--rice); box-shadow: 0 8px 24px rgba(180, 83, 29, 0.28); }
.btn--solid:hover { background: var(--clay-deep); }
.btn--ghost { border: 2px solid var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--rice); }
.btn--light { border: 2px solid var(--rice); color: var(--rice); }
.btn--light:hover { background: var(--rice); color: var(--ink); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  padding: 7rem clamp(1.25rem, 5vw, 4rem) 4rem;
  overflow: hidden;
}
.hero__steam {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hero__zh-vertical {
  position: absolute; top: 50%; right: clamp(0.5rem, 3vw, 2.5rem);
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.1em;
  font-family: var(--zh); font-weight: 900;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  color: rgba(180, 83, 29, 0.12);
  line-height: 1; user-select: none;
}
.hero__inner { position: relative; z-index: 2; max-width: 640px; }
.hero__eyebrow {
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--clay); margin-bottom: 1.5rem;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.2rem, 9.5vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 1.8rem;
}
.hero__line { display: block; overflow: hidden; }
.hero__word { display: inline-block; transform: translateY(110%); }
.hero__dot { color: var(--clay); }
.hero__lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-soft); max-width: 46ch; margin-bottom: 2.2rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__bowl {
  position: relative; z-index: 1;
  justify-self: center; align-self: end;
  width: min(100%, 460px);
  padding-bottom: 2rem;
}
.bowl-svg { width: 100%; height: auto; }
.hero__scrollcue {
  position: absolute; left: 50%; bottom: 1.4rem; z-index: 2;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--ink-soft); border-radius: 999px;
  display: flex; justify-content: center; padding-top: 8px;
}
.hero__scrollcue span {
  width: 4px; height: 8px; border-radius: 2px;
  background: var(--clay);
  animation: cue 1.6s infinite var(--ease-out);
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ===== Ticker ===== */
.ticker {
  background: var(--ink); color: var(--rice);
  overflow: hidden; padding: 0.9rem 0;
  border-top: 3px solid var(--clay);
  border-bottom: 3px solid var(--clay);
}
.ticker__track {
  display: flex; gap: 2.5rem; width: max-content;
  animation: ticker 30s linear infinite;
  font-family: var(--serif); font-size: 1.05rem; white-space: nowrap;
}
.ticker__track i { color: var(--gold); font-style: normal; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Shared section bits ===== */
.section-eyebrow {
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--clay); margin-bottom: 1.2rem;
}
.section-eyebrow--light { color: var(--gold); }
.section-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  line-height: 1.05; letter-spacing: -0.015em;
  margin-bottom: 2rem;
}
.section-title em { font-style: italic; color: var(--clay); }
.section-title--light { color: var(--rice); }
.section-title--light em { color: var(--gold); }

/* ===== Story ===== */
.story {
  position: relative;
  padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  background: var(--rice-deep);
}
.story__year-wrap { position: sticky; top: 20vh; align-self: start; }
.story__year {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 1; color: var(--clay);
  font-variant-numeric: tabular-nums;
  display: block;
}
.story__beats { display: flex; flex-direction: column; gap: 3rem; margin-top: 1rem; }
.story__beat {
  border-left: 3px solid var(--clay);
  padding-left: 1.5rem;
}
.story__beat h3 {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
  margin-bottom: 0.5rem; display: flex; align-items: baseline; gap: 0.8rem;
}
.story__beat h3 span {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--clay);
}
.story__beat p { color: var(--ink-soft); max-width: 52ch; }

/* ===== Craft ===== */
.craft {
  background: var(--ink); color: var(--rice);
  padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4rem);
}
.craft__head { max-width: 820px; margin-bottom: 4rem; }
.craft__steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
.craft__step {
  border-top: 1px solid rgba(244, 238, 225, 0.25);
  padding-top: 1.6rem;
}
.craft__num {
  font-family: var(--serif); font-style: italic;
  font-size: 1.1rem; color: var(--gold);
  display: block; margin-bottom: 1rem;
}
.craft__step h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.45rem; margin-bottom: 0.7rem;
}
.craft__step p { color: rgba(244, 238, 225, 0.75); font-size: 0.98rem; }
.craft__step em { color: var(--gold); }

/* ===== Menu ===== */
.menu { padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4rem); }
.menu__head { max-width: 820px; }
.menu__note {
  color: var(--ink-soft); font-weight: 600;
  margin-bottom: 3rem; font-size: 0.95rem; letter-spacing: 0.04em;
}
.menu__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
}
.dish {
  position: relative;
  background: #fdfaf2;
  border: 1px solid rgba(30, 25, 18, 0.08);
  border-radius: 18px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
  overflow: hidden;
}
.dish:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(30, 25, 18, 0.12);
  border-color: rgba(180, 83, 29, 0.35);
}
.dish:hover .dish__photo img { transform: scale(1.05); }
.dish[data-tag]::before {
  content: attr(data-tag);
  position: absolute; top: 1rem; right: 1rem; z-index: 4;
  background: var(--clay); color: var(--rice);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.3em 0.8em; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(30, 25, 18, 0.2);
}
.dish__photo { aspect-ratio: 4 / 3; border-radius: 0; }
.dish__photo img { transition: transform 0.6s var(--ease-out); }
.dish__body { padding: 1.4rem 1.5rem 1.6rem; }
.dish__zh {
  font-family: var(--zh); font-weight: 600;
  font-size: 1.05rem; color: var(--clay);
  display: block; margin-bottom: 0.5rem;
}
.dish__name {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.3rem; margin-bottom: 0.45rem; line-height: 1.2;
}
.dish__desc { color: var(--ink-soft); font-size: 0.92rem; }
.dish--cta {
  background: var(--rice-deep);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center; gap: 1rem;
  padding: 2rem 1.6rem;
}
.dish--cta p { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.3; }

/* ===== Photo component (drop-in real photos; styled placeholder until then) ===== */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 80% 15%, rgba(217, 164, 65, 0.22), transparent 60%),
    linear-gradient(135deg, var(--rice-deep) 0%, #e2d3b6 55%, #d8c39d 100%);
  isolation: isolate;
}
.photo img {
  position: relative; z-index: 2;
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.6s var(--ease-out);
}
/* while empty, keep the (absent/broken) img invisible so only the plate shows */
.photo--empty img { opacity: 0; }
/* large faint character watermark on the placeholder plate */
.photo::before {
  content: attr(data-zh);
  position: absolute; z-index: 1; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--zh); font-weight: 900;
  font-size: clamp(3rem, 9vw, 5.5rem);
  color: rgba(180, 83, 29, 0.16);
  letter-spacing: 0.05em; text-align: center;
  pointer-events: none;
}
/* art-direction tag, only while the slot is empty */
.photo--empty::after {
  content: "◉ " attr(data-shot);
  position: absolute; z-index: 3; left: 0.75rem; bottom: 0.75rem; right: 0.75rem;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--clay-deep);
  background: rgba(253, 250, 242, 0.72);
  padding: 0.4em 0.7em; border-radius: 8px;
  backdrop-filter: blur(2px);
}
.photo--empty { box-shadow: inset 0 0 0 1px rgba(180, 83, 29, 0.18); }
/* figcaption overlays a real photo; hidden on empty plates */
.photo figcaption {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1rem 0.9rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--rice); text-align: center;
  background: linear-gradient(to top, rgba(30, 25, 18, 0.72), transparent);
}
.photo--empty figcaption { display: none; }

/* Hero real-photo layer (over the illustrated bowl; removed by onerror if absent) */
.hero__photo {
  position: absolute; inset: 0; z-index: 3;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(30, 25, 18, 0.25);
}

/* Heritage photo in the story column */
.photo--heritage {
  margin-top: 1.8rem;
  aspect-ratio: 3 / 4;
  max-width: 300px;
}

/* Craft step photos */
.photo--craft {
  aspect-ratio: 4 / 5;
  margin-bottom: 1.5rem;
  background:
    radial-gradient(120% 90% at 80% 15%, rgba(217, 164, 65, 0.28), transparent 60%),
    linear-gradient(135deg, #2a2419 0%, #37301f 55%, #241f16 100%);
}
.photo--craft::before { color: rgba(217, 164, 65, 0.22); }
.photo--craft.photo--empty { box-shadow: inset 0 0 0 1px rgba(217, 164, 65, 0.18); }
.photo--craft.photo--empty::after {
  color: var(--gold);
  background: rgba(30, 25, 18, 0.55);
}

/* ===== Gallery / moments band ===== */
.gallery > .section-eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0.5rem;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 0.9rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--ink);
}
.gallery__item { border-radius: 14px; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item::before { color: rgba(244, 238, 225, 0.14); }
.gallery__item {
  background:
    radial-gradient(120% 90% at 80% 15%, rgba(217, 164, 65, 0.22), transparent 60%),
    linear-gradient(135deg, #2a2419 0%, #37301f 55%, #241f16 100%);
}
.gallery__item.photo--empty::after { color: var(--gold); background: rgba(30, 25, 18, 0.55); }

/* ===== Press ===== */
.press {
  background: var(--rice-deep);
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 5vw, 4rem);
  text-align: center;
}
.press__quote {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.4rem, 3.2vw, 2.3rem);
  line-height: 1.35; max-width: 22ch; margin: 0 auto 1.5rem;
}
.press__quote cite {
  display: block; margin-top: 1.2rem;
  font-family: var(--sans); font-style: normal;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--clay);
}
.press__logos {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6em 1.4em;
  color: var(--ink-soft); font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
}
.press__logos li { position: relative; }
.press__logos li + li::before {
  content: "·"; position: absolute; left: -0.9em; color: var(--clay);
}

/* ===== Visit ===== */
.visit {
  position: relative;
  background: var(--clay); color: var(--rice);
  padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem; align-items: center;
  overflow: hidden;
}
.visit .section-eyebrow--light { color: rgba(244, 238, 225, 0.8); }
.visit .section-title--light em { color: var(--ink); }
.visit__details {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem 2.5rem; margin: 2.2rem 0 2.5rem; max-width: 620px;
}
.visit__details dt {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(244, 238, 225, 0.7); margin-bottom: 0.35rem;
}
.visit__details dd { font-size: 1rem; line-height: 1.5; }
.visit__details a { color: var(--rice); font-weight: 700; }
.visit__mark {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: var(--zh); font-weight: 900;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 1.05;
  color: rgba(30, 25, 18, 0.18);
  user-select: none;
}

/* ===== FAQ ===== */
.faq {
  padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4rem);
  max-width: 900px;
  margin: 0 auto;
}
.faq__head { margin-bottom: 2.5rem; }
.faq__list { display: flex; flex-direction: column; gap: 0.9rem; }
.faq__item {
  background: #fdfaf2;
  border: 1px solid rgba(30, 25, 18, 0.08);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
}
.faq__item summary {
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--sans); font-weight: 700; font-size: 1.3rem;
  color: var(--clay);
  transition: transform 0.25s var(--ease-out);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  color: var(--ink-soft); font-size: 0.98rem;
  margin-top: 0.8rem; line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
  background: var(--ink); color: var(--rice);
  text-align: center;
  padding: 3rem 1.5rem;
}
.footer__brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.footer__meta { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; margin: 0.6rem 0 1.2rem; }
.footer__copy { color: rgba(244, 238, 225, 0.5); font-size: 0.8rem; }

/* ===== Reveal defaults (JS animates in) ===== */
.reveal, .reveal-hero { opacity: 0; transform: translateY(28px); }
.no-js .reveal, .no-js .reveal-hero { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__en { display: none; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 6rem;
    text-align: left;
  }
  .hero__bowl { width: min(78%, 360px); margin-top: 1rem; }
  .hero__zh-vertical { font-size: 4.5rem; right: 0.6rem; opacity: 0.9; }

  .story { grid-template-columns: 1fr; }
  .story__year-wrap { position: static; }
  .story__year { font-size: clamp(4rem, 18vw, 6rem); }

  .craft__steps { grid-template-columns: 1fr; }
  .photo--craft { aspect-ratio: 16 / 10; max-width: 420px; }
  .photo--heritage { max-width: 260px; margin-left: auto; margin-right: auto; }

  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery__item--wide { grid-column: span 2; }
  .gallery__item--tall { grid-row: span 1; }

  .visit { grid-template-columns: 1fr; }
  .visit__details { grid-template-columns: 1fr; }
  .visit__mark { flex-direction: row; gap: 0.3em; margin-top: 1rem; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
  .hero__scrollcue span { animation: none; }
  .reveal, .reveal-hero, .hero__word { opacity: 1 !important; transform: none !important; }
}
