/* =========================================================================
   KINGS HALL — EDITORIAL ARCHITECTURE
   Contemporary food editorial. Newsprint / Zinc palette.
   Structure: Bricolage Grotesque · Voice: Newsreader · Annotation: mono
   ========================================================================= */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

:root {
  /* Palette A — Newsprint / Zinc */
  --paper: #ededE8;
  --paper-raised: #f5f4f0;
  --ink: #1a1a18;
  --ink-soft: #2c2c28;
  --grey: #6b6b64;
  --grey-light: #9a9a91;
  --rule: #cfcec5;
  --rule-strong: #b8b7ac;
  --amber: #b5651d;
  --char: #1e1815;
  --char-text: #f3eee6;
  --char-grey: #a39d90;

  /* Typography — three roles */
  --face-structure: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --face-voice: 'Newsreader', Georgia, 'Times New Roman', serif;
  --face-annotation: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* Fluid scale — independent of AJAK's --step-* naming */
  --size-folio: 0.7rem;
  --size-caption: 0.78rem;
  --size-body: clamp(1rem, 0.3vw + 0.93rem, 1.1rem);
  --size-dek: clamp(1.1rem, 0.5vw + 1rem, 1.3rem);
  --size-heading: clamp(1.5rem, 1.2vw + 1.2rem, 2.1rem);
  --size-headline: clamp(2.6rem, 5vw + 1.4rem, 5.6rem);

  /* Layout */
  --edge: clamp(1.25rem, 4vw, 3.5rem);
  --rail: 1320px;
  --pace-loose: clamp(5rem, 9vw, 9rem);
  --pace-tight: clamp(2.5rem, 4vw, 4rem);

  color-scheme: light;
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face-voice);
  font-size: var(--size-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
address { font-style: normal; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

.rail {
  max-width: var(--rail);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--char-text);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-family: var(--face-annotation);
  font-size: 0.8rem;
}
.skip-link:focus {
  left: var(--edge);
  top: var(--edge);
}

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

/* -------------------------------------------------------------------------
   ANNOTATION — mono role: folios, captions, tags, prices, index numerals
   ------------------------------------------------------------------------- */
.folio,
.tag,
.caption,
.index-num,
.meta-line {
  font-family: var(--face-annotation);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--size-caption);
  color: var(--grey);
}

/* -------------------------------------------------------------------------
   MASTHEAD — static, not sticky. No .site-header, no elevate-on-scroll.
   ------------------------------------------------------------------------- */
.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
  gap: 1.5rem;
}

.masthead-mark {
  font-family: var(--face-structure);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.masthead-mark span {
  display: block;
  font-weight: 400;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  color: var(--grey);
  margin-top: 0.15rem;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.masthead-index {
  display: none;
  gap: 1.25rem;
  font-family: var(--face-annotation);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead-index a { text-decoration: none; border-bottom: 1px solid transparent; }
.masthead-index a:hover { border-bottom-color: var(--ink); }

@media (min-width: 900px) {
  .masthead-index { display: flex; }
}

/* -------------------------------------------------------------------------
   CONTENTS — corner tab + full editorial index overlay. Not a hamburger drawer.
   ------------------------------------------------------------------------- */
.contents-tab {
  position: fixed;
  left: var(--edge);
  bottom: var(--edge);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  padding: 0.65rem 1rem;
  font-family: var(--face-annotation);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.contents-tab.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.contents-tab-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.contents-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.contents-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.contents-overlay-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--edge);
  border-bottom: 1px solid var(--rule);
}

.contents-close {
  font-family: var(--face-annotation);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contents-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--edge);
  max-width: var(--rail);
  margin-inline: auto;
  width: 100%;
}

.contents-list a {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  font-family: var(--face-structure);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 500;
}

.contents-list a:first-child { border-top: 1px solid var(--rule); }

.contents-list .index-num {
  font-family: var(--face-annotation);
  font-size: 0.9rem;
  color: var(--grey);
  min-width: 2.4ch;
}

.contents-list a:hover .index-num,
.contents-list a:focus-visible .index-num { color: var(--amber); }

body.contents-open { overflow: hidden; }

/* -------------------------------------------------------------------------
   COVER — magazine-cover hero. No hero__media / hero__scrim / centered text.
   ------------------------------------------------------------------------- */
.cover {
  padding-block: var(--pace-tight) var(--pace-loose);
}

.cover-folio {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.cover-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .cover-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 4vw, 4rem);
  }
}

.cover-text { max-width: 34rem; }

.cover-mark {
  font-family: var(--face-structure);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1.75rem;
}

.cover-headline {
  font-family: var(--face-voice);
  font-weight: 500;
  font-size: var(--size-headline);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.cover-headline em {
  font-style: italic;
  font-weight: 400;
}

.cover-dek {
  font-family: var(--face-voice);
  font-style: italic;
  font-size: var(--size-dek);
  color: var(--ink-soft);
  margin-top: 1.5rem;
  max-width: 30ch;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.25rem;
}

.cover-figure { position: relative; }

.cover-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

@media (min-width: 900px) {
  .cover-figure img { aspect-ratio: 5 / 6; }
}

.cover-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
}

/* -------------------------------------------------------------------------
   ACTION — restrained editorial link/button. Never a giant pill.
   ------------------------------------------------------------------------- */
.action {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--face-structure);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.action.is-primary { background: var(--ink); color: var(--char-text); }
.action.is-primary:hover { background: var(--ink-soft); }
.action:not(.is-primary):hover { background: var(--ink); color: var(--char-text); }

.action-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--face-structure);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.15rem;
}

/* -------------------------------------------------------------------------
   RUBRIC — section marker (grotesk, structural)
   ------------------------------------------------------------------------- */
.rubric {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.rubric .index-num {
  font-family: var(--face-annotation);
  font-size: 0.8rem;
  color: var(--grey);
}

.rubric h2 {
  font-family: var(--face-structure);
  font-weight: 600;
  font-size: var(--size-heading);
  letter-spacing: -0.01em;
}

.rubric-dek {
  font-family: var(--face-voice);
  font-style: italic;
  color: var(--grey);
  max-width: 30rem;
  margin-top: 0.5rem;
}

/* -------------------------------------------------------------------------
   BREATH — full-bleed single photograph, no text
   ------------------------------------------------------------------------- */
.breath {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}

.breath img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .breath { aspect-ratio: 4 / 5; }
}

/* -------------------------------------------------------------------------
   TABLE — Today's Table. Editorial list, not a card grid.
   ------------------------------------------------------------------------- */
.table-section { padding-block: var(--pace-loose); }

.table-range {
  font-family: var(--face-annotation);
  font-size: var(--size-caption);
  color: var(--grey);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.table-list { border-top: 1px solid var(--rule); }

.table-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 700px) {
  .table-row {
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 1rem;
  }
}

.table-row:nth-child(even) { margin-inline-start: 0; }

@media (min-width: 900px) {
  .table-row:nth-child(even) { margin-inline-start: 6%; }
}

.table-name {
  font-family: var(--face-voice);
  font-weight: 500;
  font-size: 1.3rem;
  white-space: nowrap;
}

.table-leader {
  display: none;
  border-bottom: 1px dotted var(--rule-strong);
  transform: translateY(-0.35rem);
}

@media (min-width: 700px) { .table-leader { display: block; } }

.table-desc {
  font-family: var(--face-voice);
  color: var(--ink-soft);
  grid-column: 1 / -1;
  max-width: 42ch;
  margin-top: 0.15rem;
}

@media (min-width: 700px) {
  .table-desc { grid-column: 1 / 2; margin-top: 0.3rem; }
}

.table-tag {
  font-family: var(--face-annotation);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap;
}

/* -------------------------------------------------------------------------
   CROP LINE — signature filmstrip / contact sheet
   ------------------------------------------------------------------------- */
.crop-line {
  border-block: 1px solid var(--rule);
  padding-block: 1.75rem;
  overflow: hidden;
}

.crop-line-label {
  padding-inline: var(--edge);
  margin-bottom: 1.25rem;
}

.crop-track {
  display: flex;
  gap: 1px;
  width: max-content;
  will-change: transform;
}

.crop-frame {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 20vw, 240px);
  aspect-ratio: 3 / 4;
  background: var(--ink);
}

.crop-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.08) contrast(1.03);
}

.crop-frame figcaption {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  right: 0.6rem;
  font-family: var(--face-annotation);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--char-text);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .crop-track {
    animation: crop-drift 48s linear infinite;
  }
  .crop-line:hover .crop-track,
  .crop-line:focus-within .crop-track {
    animation-play-state: paused;
  }
}

@keyframes crop-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* -------------------------------------------------------------------------
   STORY — long-form editorial column, asymmetric measure, pull quote
   ------------------------------------------------------------------------- */
.story-section { padding-block: var(--pace-loose); }

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 960px) {
  .story-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 5vw, 5rem);
  }
}

.story-text {
  font-family: var(--face-voice);
  font-size: 1.15rem;
  line-height: 1.75;
  max-width: 42rem;
}

.story-text p + p { margin-top: 1.35rem; }

.story-quote {
  font-family: var(--face-voice);
  font-style: italic;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.4;
  border-left: 2px solid var(--amber);
  padding-left: 1.5rem;
  margin-block: 2rem;
  max-width: 34ch;
}

.story-quote cite {
  display: block;
  font-style: normal;
  font-family: var(--face-annotation);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 0.75rem;
}

.story-figure { align-self: start; }

.story-figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.story-aside {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--face-annotation);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
}

/* -------------------------------------------------------------------------
   SPACE — dark ground feature passage (Char direction used sparingly, tied
   to the Newsprint foundation as the one deep-contrast passage)
   ------------------------------------------------------------------------- */
.space-section {
  background: var(--char);
  color: var(--char-text);
  padding-block: var(--pace-loose);
}

.space-section .rubric h2,
.space-section .index-num { color: var(--char-text); }
.space-section .rubric-dek { color: var(--char-grey); }

.space-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 780px) {
  .space-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }
}

.space-item {
  border-top: 1px solid rgba(243,238,230,0.18);
  padding-top: 1.25rem;
}

.space-item .index-num {
  color: var(--amber);
  font-family: var(--face-annotation);
  font-size: 0.75rem;
}

.space-item h3 {
  font-family: var(--face-structure);
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.space-item p {
  font-family: var(--face-voice);
  color: var(--char-grey);
  margin-top: 0.5rem;
  max-width: 32ch;
}

/* -------------------------------------------------------------------------
   VISIT — mono data block, asymmetric, not centered
   ------------------------------------------------------------------------- */
.visit-section { padding-block: var(--pace-loose); }

.visit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .visit-grid { grid-template-columns: minmax(0,7fr) minmax(0,5fr); }
}

.visit-map { aspect-ratio: 4 / 3; border: 1px solid var(--rule); }
.visit-map iframe { width: 100%; height: 100%; border: 0; }

.visit-data {
  font-family: var(--face-annotation);
  font-size: 0.85rem;
  line-height: 1.9;
  margin-left: auto;
  max-width: 26rem;
}

.visit-data-block {
  border-top: 1px solid var(--rule);
  padding-block: 1.25rem;
}

.visit-data-block .tag { display: block; margin-bottom: 0.5rem; }

.visit-data address, .visit-data p { color: var(--ink-soft); text-transform: none; letter-spacing: normal; }

.visit-actions { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* -------------------------------------------------------------------------
   EDITORIAL FOOTER — masthead repeated small, single line. No footer-cols.
   ------------------------------------------------------------------------- */
.editorial-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem;
}

.editorial-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.editorial-footer .masthead-mark { font-size: 0.85rem; }

.editorial-footer-meta {
  font-family: var(--face-annotation);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.editorial-footer-meta a { text-decoration: none; border-bottom: 1px solid transparent; }
.editorial-footer-meta a:hover { border-bottom-color: var(--grey); }

/* -------------------------------------------------------------------------
   UNMASK — reveal system. clip-path / line-mask, not opacity+translateY.
   Progressive enhancement: content is visible by default. The hidden
   "about to reveal" state only applies once the .unmask-armed class is
   set on <html> by an early inline script — so if JS fails, is blocked,
   or never runs, nothing stays permanently invisible.
   ------------------------------------------------------------------------- */
html.unmask-armed [data-unmask] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
html.unmask-armed [data-unmask].is-unmasked { clip-path: inset(0 0 0 0); }

html.unmask-armed [data-unmask-line] { overflow: hidden; display: block; }
html.unmask-armed [data-unmask-line] > * {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
html.unmask-armed [data-unmask-line].is-unmasked > * { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html.unmask-armed [data-unmask],
  html.unmask-armed [data-unmask-line] > * {
    transition: none !important;
    clip-path: none !important;
    transform: none !important;
  }
  .crop-track { animation: none !important; }
}

/* -------------------------------------------------------------------------
   Responsive edge cases
   ------------------------------------------------------------------------- */
@media (max-width: 899px) {
  .cover-actions .action-line { order: -1; width: 100%; }
}
