/* ============================================================
   SISTA DUMPLING — Concept D "Paper & Steam"
   Editorial menu-zine art direction.
   Official brand fonts: Bild Poster + Bild Variable.
   Accent face: Instrument Serif (SIL OFL).
   Palette: official Sista brand colors, reduced to a
   paper / ink / vermillion spot-color system.
   ============================================================ */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Bild Poster";
  src: url("../assets/fonts/bild-poster-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Bild Poster";
  src: url("../assets/fonts/bild-poster-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Bild";
  src: url("../assets/fonts/bild-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --paper: #f7f2ea;
  --paper-deep: #efe8db;
  --ink: #1b1712;
  --ink-soft: #5d554c;
  --red: #d1441e;
  --maroon: #38201a;
  --cream-text: #f4ede1;

  --rule: 1px solid rgba(27, 23, 18, 0.16);
  --rule-strong: 2px solid var(--ink);
  --rule-cream: 1px solid rgba(244, 237, 225, 0.35);

  --font-display: "Bild Poster", "Arial Narrow", sans-serif;
  --font-body: "Bild", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-cjk: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;

  --content-max: 1600px;
  --gutter: 1.25rem;
  --header-h: 4.25rem;
}

@media (min-width: 768px) {
  :root {
    --gutter: 2.5rem;
  }
}

/* ---------- Reset / base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p, dl, dd, figure {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--red);
  color: var(--cream-text);
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.on-dark :focus-visible,
.site-footer :focus-visible,
.happy :focus-visible,
.closing :focus-visible {
  outline-color: var(--cream-text);
}

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Shared type pieces ---------- */

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--red);
  letter-spacing: 0;
}

h1 em, h2 em {
  font-size: 1.04em;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: var(--rule);
  padding-top: 0.8rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.plate-caption {
  border-top: var(--rule);
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  font-family: var(--font-cjk);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.plate-caption--cream {
  border-top-color: rgba(244, 237, 225, 0.35);
  color: rgba(244, 237, 225, 0.75);
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  line-height: 1.3;
  max-width: 30ch;
}

.hero__note {
  margin-top: -1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Links & buttons ---------- */

.block-link {
  display: inline-block;
  background: var(--ink);
  color: var(--cream-text);
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 1rem 1.9rem;
  transition: background-color 0.25s ease;
}

.block-link:hover {
  background: var(--red);
}

.block-link--cream {
  background: var(--cream-text);
  color: var(--ink);
}

.block-link--cream:hover {
  background: var(--red);
  color: var(--cream-text);
}

.text-link {
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
  transition: color 0.25s ease;
}

.text-link:hover {
  color: var(--red);
}

.text-link--big {
  font-size: 1.25rem;
}

.text-link--cream {
  color: var(--cream-text);
}

.text-link--cream:hover {
  color: var(--cream-text);
  text-decoration-color: var(--red);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--rule);
}

.bar {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand img {
  height: 2.4rem;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--red);
}

.site-nav__num {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--red);
  margin-right: 0.4em;
}

.site-nav__cta {
  border: 1px solid var(--ink);
  padding: 0.65rem 1.2rem;
}

.site-nav__cta:hover {
  background: var(--ink);
  color: var(--cream-text);
}

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
}

.mobile-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: var(--rule-strong);
  padding: 0.5rem var(--gutter) 1.5rem;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-panel a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  padding: 0.9rem 0;
  border-bottom: var(--rule);
}

.mobile-panel a span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--red);
}

.mobile-panel__cta {
  border-bottom: none !important;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  font-size: 1.25rem !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--cream-text);
  padding: 0.75rem 1.25rem;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Hero ---------- */

.hero__inner {
  position: relative;
  padding-top: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.1rem, 11vw, 10.5rem);
  line-height: 0.94;
  letter-spacing: -0.015em;
  margin: clamp(1.5rem, 4vw, 3rem) 0 0;
}

.hero__title-line {
  display: block;
}

.hero__lower {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(2.5rem, 5.5vw, 4rem);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.hero__media {
  max-width: 34rem;
}

.spine {
  display: none;
  position: absolute;
  top: clamp(4rem, 10vw, 8rem);
  right: calc(var(--gutter) * 0.5);
  writing-mode: vertical-rl;
  font-family: var(--font-cjk);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  letter-spacing: 0.6em;
  color: var(--red);
}

/* ---------- Sections & chapters ---------- */

.section {
  padding-block: clamp(3.5rem, 9vw, 8.5rem);
}

.chapter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  border-top: var(--rule-strong);
  padding-top: 1.2rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.chapter__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.5vw, 3.25rem);
  line-height: 0.9;
  color: var(--red);
}

.chapter__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.chapter__note {
  grid-column: 2;
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* ---------- Menu index ---------- */

.menu__body {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
}

.menu-row {
  border-top: var(--rule);
}

.menu-row:last-child {
  border-bottom: var(--rule);
}

.menu-row summary {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.1rem, 2.5vw, 1.8rem) 0;
  cursor: pointer;
  list-style: none;
}

.menu-row summary::-webkit-details-marker {
  display: none;
}

.menu-row__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--red);
  min-width: 2em;
}

.menu-row__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}

.menu-row summary:hover .menu-row__name,
.menu-row summary:focus-visible .menu-row__name {
  color: var(--red);
}

.menu-row__hint {
  margin-left: auto;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-soft);
  transition: transform 0.3s ease;
}

.menu-row[open] .menu-row__hint {
  transform: rotate(45deg);
}

.menu-row__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
  padding: 0 0 1.5rem;
}

.menu-row__desc {
  max-width: 44ch;
  color: var(--ink-soft);
}

.menu-row__tag {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.menu-row__media {
  padding-bottom: 1.5rem;
}

.menu-row__media img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.menu__pane {
  display: none;
}

.menu__cta {
  margin-top: clamp(2rem, 5vw, 4rem);
  text-align: right;
}

/* ---------- Story ---------- */

.story__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.story__copy .chapter__num {
  margin-bottom: 1rem;
}

.story__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

#story-title {
  margin-bottom: 1.8rem;
}

.story__text {
  max-width: 46ch;
  color: var(--ink-soft);
  display: grid;
  gap: 1.2rem;
}

.story__media {
  max-width: 34rem;
  justify-self: start;
}

/* ---------- Craft ---------- */

.craft__list {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.craft-step__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--red);
  border-top: var(--rule);
  padding-top: 1rem;
  margin-bottom: 0.75rem;
}

.craft-step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.craft-step__text {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  max-width: 34ch;
  margin-bottom: 1.5rem;
}

.craft-step__media img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Happy hour spread ---------- */

.happy {
  background: var(--red);
  color: var(--cream-text);
  padding-block: clamp(3.5rem, 9vw, 8rem);
}

.happy__meta {
  border-top-color: rgba(244, 237, 225, 0.4);
  color: rgba(244, 237, 225, 0.85);
}

.happy__meta span:last-child {
  font-family: var(--font-cjk);
  letter-spacing: 0.3em;
}

.happy__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  margin: clamp(1.5rem, 4vw, 3rem) 0;
}

.happy__title em {
  color: var(--ink);
}

.happy__lede {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  max-width: 34ch;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.happy__media img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: var(--rule-cream);
}

/* ---------- People / community ---------- */

.people .wrap:first-child {
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.chapter--inline {
  border-top: var(--rule-strong);
}

.people__strip {
  display: flex;
  gap: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: max(var(--gutter), calc((100% - var(--content-max)) / 2 + var(--gutter)));
  padding-bottom: 1rem;
  scrollbar-width: thin;
}

.people__strip:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.people__frame {
  flex: 0 0 auto;
  width: clamp(220px, 26vw, 340px);
  scroll-snap-align: start;
}

.people__frame img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.people__end {
  flex: 0 0 auto;
  width: clamp(220px, 26vw, 340px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--rule-strong);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.1;
  text-align: center;
  scroll-snap-align: start;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.people__end:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--cream-text);
}

/* ---------- Visit / two doors ---------- */

.visit__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.door {
  border-top: var(--rule-strong);
  padding-top: 1.2rem;
}

.door__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.door__row {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) 1fr;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: var(--rule);
}

.door__row dt {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.2em;
}

.door__row dd a {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  margin-right: 1.25em;
}

.door__row dd a:hover {
  color: var(--red);
}

.door__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* ---------- Closing spread ---------- */

.closing {
  background: var(--ink);
  color: var(--cream-text);
  padding-block: clamp(3.5rem, 9vw, 8rem);
}

.closing__meta {
  border-top-color: rgba(244, 237, 225, 0.4);
  color: rgba(244, 237, 225, 0.85);
}

.closing__meta span:last-child {
  font-family: var(--font-cjk);
  letter-spacing: 0.3em;
}

.closing__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  margin: clamp(1.5rem, 4vw, 3rem) 0;
}

.closing__title em {
  color: var(--red);
}

.closing__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.closing__media {
  max-width: 30rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--maroon);
  color: var(--cream-text);
  padding-block: clamp(3rem, 6vw, 5rem) 1.5rem;
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: var(--rule-cream);
}

.site-footer__brand img {
  height: 3rem;
  width: auto;
}

.site-footer__tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  margin-top: 1rem;
}

.site-footer__cols {
  display: grid;
  gap: 2rem;
}

.site-footer__cols .meta-line {
  border-top-color: rgba(244, 237, 225, 0.4);
  color: rgba(244, 237, 225, 0.75);
  margin-bottom: 1rem;
}

.site-footer__cols li {
  padding: 0.2rem 0;
  font-size: 0.9375rem;
}

.site-footer__cols a {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.site-footer__cols a:hover {
  color: #f0b8a6;
}

.site-footer__legal {
  padding-top: 1.25rem;
  font-size: 0.8125rem;
  color: rgba(244, 237, 225, 0.7);
  font-family: var(--font-cjk);
  letter-spacing: 0.1em;
}

/* ---------- Reveal motion (JS-gated) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (min-width: 768px) {
  .site-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 4rem;
  }
}

@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .visit__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hero__lower {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: end;
  }

  .hero__media {
    max-width: none;
    margin-right: calc(var(--gutter) * -1);
  }

  .hero__media img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }

  .spine {
    display: block;
  }

  .menu__body {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: start;
  }

  .menu__pane {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

  .menu__pane-frame img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    width: 100%;
    transition: opacity 0.25s ease;
  }

  .menu__pane-frame img.is-fading {
    opacity: 0;
  }

  /* On desktop the per-row photos live in the sticky pane instead */
  .menu-row__media {
    display: none;
  }

  .story__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: start;
  }

  .story__media {
    justify-self: end;
    margin-right: calc(var(--gutter) * -1);
    max-width: none;
  }

  .story__media img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }

  .craft__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .craft-step:nth-child(2) {
    transform: translateY(clamp(1.5rem, 4vw, 3.5rem));
  }

  .closing__inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    column-gap: clamp(2rem, 5vw, 6rem);
    align-items: end;
  }

  .closing__meta {
    grid-column: 1 / -1;
  }

  .closing__media {
    max-width: none;
    margin-right: calc(var(--gutter) * -1);
  }

  .closing__media img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }
}

/* ---------- Mobile spacing: community strip -> visit ---------- */

@media (max-width: 767px) {
  .people {
    padding-bottom: 0;
  }

  .visit {
    padding-top: 2.5rem;
  }
}

/* ---------- Mobile header ---------- */

@media (max-width: 899px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-block;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .menu__pane-frame img,
  .block-link,
  .menu-row__name,
  .menu-row__hint,
  .people__end {
    transition: none;
  }
}
