@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: #16130f;
  --surface: #1e1a15;
  --line: #2f2a22;
  --paper: #ece7dc;
  --muted: #978f82;
  --ember: #c97e5e;
  --max: 84rem;
  --rail: 21rem;
  --gutter: clamp(1.5rem, 4vw, 4rem);
  --pad: max(var(--gutter), calc((100vw - var(--max)) / 2));
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--paper);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25em; }
::selection { background: var(--ember); color: var(--bg); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: .9rem var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(22, 19, 15, .82);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 600; font-size: 1.02rem; letter-spacing: -.015em; }
.brand img { width: 1.6rem; height: 1.6rem; }
.brand b { font-weight: 600; }
.brand span { color: var(--muted); font-weight: 500; }
.site-header nav { display: flex; gap: 1.6rem; font-size: .78rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.site-header nav a { color: var(--muted); text-decoration: none; transition: color .18s ease; }
.site-header nav a:hover { color: var(--paper); }

/* --pad already centres the content on --max, so no max-width here:
   combining both squeezed the measure to ~56rem on a 1920px screen and
   pushed main out of alignment with the header and footer. */
main {
  width: 100%;
  margin: 0 auto;
  padding: clamp(2.5rem, 4.5vw, 4rem) var(--pad) clamp(3rem, 5vw, 4.5rem);
}

/* Typographic primitives */
.kicker {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.kicker::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Motto: salad / tomato / onion framing "We Are Legion" */
.motto { gap: .55rem; }
.garnish { letter-spacing: normal; font-size: .95em; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; }
h1 { margin: 0 0 1.2rem; font-size: clamp(2.6rem, 5.4vw, 4.8rem); line-height: .98; }
h1 em, h2 em { font-style: italic; color: var(--ember); }
.intro, .lead { max-width: 40rem; margin: 0; color: var(--muted); font-size: 1.08rem; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.hero h1 { max-width: 14ch; font-size: clamp(2.8rem, 6vw, 5.6rem); }
.hero-mark {
  justify-self: center;
  width: min(100%, 24rem);
  background: radial-gradient(closest-side, rgba(201, 126, 94, .13), transparent 72%);
}
.hero-mark img { display: block; width: 100%; height: auto; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.8rem;
  padding: .85rem 1.5rem;
  border: 1px solid var(--ember);
  border-radius: 999px;
  background: var(--ember);
  color: var(--bg);
  font: 500 .95rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.button:hover { background: transparent; color: var(--ember); }
.button:disabled { cursor: wait; opacity: .55; }
.back { display: inline-block; margin-top: 2.5rem; color: var(--muted); font-size: .9rem; text-decoration: none; }
.back:hover { color: var(--paper); }

/* Sections */
.section { margin-top: clamp(3rem, 5.5vw, 5rem); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: 1.8rem;
}
.section-head h2, .section h2 { margin: 0 0 0; max-width: 24ch; font-size: clamp(1.9rem, 3.2vw, 2.9rem); line-height: 1.04; }
.section > h2 { margin-bottom: 1.8rem; }
.section-link { color: var(--muted); font-size: .9rem; text-decoration: none; white-space: nowrap; }
.section-link:hover { color: var(--paper); }

/* Grades */
.grade-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grade { padding: 1.4rem 1.3rem 1.5rem; background: var(--surface); }
.grade--top { background: var(--surface); box-shadow: inset 0 2px 0 var(--ember); }
.grade-number { color: var(--muted); font-size: .72rem; font-weight: 500; letter-spacing: .18em; }
.grade--top .grade-number { color: var(--ember); }
.grade h3 { margin: 1.2rem 0 .45rem; font-size: 1.55rem; line-height: 1; }
.grade p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Editorial two-column pages */
.sheet {
  display: grid;
  grid-template-columns: minmax(0, var(--rail)) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5.5rem);
}
.page-head { position: sticky; top: 5.5rem; }
.page-head h1 { margin-bottom: 0; font-size: clamp(2.4rem, 3.4vw, 3.5rem); max-width: 16ch; }
.page-body { min-width: 0; }
.page-body > .lead { margin-bottom: 1.6rem; }
.page-body > p { max-width: 46rem; }
.page-body > .section:first-child { margin-top: 0; }
.sheet p:not(.kicker):not(.lead) { color: var(--paper); }

/* Pairs short blocks side by side so the editorial pages stop reading as one tall ribbon */
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 3rem; align-items: start; }
.columns > * { margin: 0; max-width: 34rem; }
.page-body > .columns { margin-bottom: 1.6rem; }

/* Listings */
.review-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.review-card { display: grid; grid-template-columns: 8rem minmax(0, 1fr) auto; align-items: baseline; gap: 1.5rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: opacity .18s ease; }
.review-card time { color: var(--muted); font-size: .82rem; }
.review-card h2 { margin: 0; max-width: none; font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.1; }
.review-card small { display: block; margin-top: .35rem; color: var(--muted); font-size: .85rem; }
.review-card .chevron { color: var(--ember); }
.review-card:hover { opacity: .62; }

/* Article */
.article .page-body .lead { margin-bottom: 1.6rem; color: var(--muted); font-size: 1.3rem; line-height: 1.45; max-width: 42rem; }

/* Finder */
.finder-box { margin: 0; padding: 1.6rem 1.75rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); }
.finder-box p { margin: 0; color: var(--muted); font-size: .95rem; }
.finder-box .button { margin-top: 1.2rem; }
.results[hidden] { display: none; }
.results { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.results h2 { margin: 0; max-width: none; padding: 1.2rem 0 .4rem; font-size: 1.45rem; }
.result-card { display: grid; grid-template-columns: 6rem minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; padding: 1.1rem 0; border-top: 1px solid var(--line); text-decoration: none; transition: opacity .18s ease; }
.result-card:hover { opacity: .62; }
.result-card strong { display: block; font-weight: 500; }
.result-card small { display: block; margin-top: .2rem; color: var(--muted); font-size: .85rem; }
.result-distance { font-family: var(--serif); font-size: 1.5rem; color: var(--ember); }
.result-card .chevron { color: var(--muted); }

/* Footer */
footer { margin-top: auto; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; padding: 1.8rem var(--pad); border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
footer .legion { color: var(--paper); letter-spacing: .16em; text-transform: uppercase; font-size: .72rem; }

@media (max-width: 1080px) {
  .sheet { grid-template-columns: 1fr; gap: 2rem; }
  .page-head { position: static; }
  .page-head h1 { max-width: 18ch; }
  .page-body > .lead { max-width: none; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-mark { justify-self: start; width: 9rem; margin-top: 2rem; }
  .grade-list { grid-template-columns: 1fr; }
  .review-card { grid-template-columns: minmax(0, 1fr) auto; }
  .review-card time { grid-column: 1 / -1; }
  .result-card { grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: .9rem; }
  .site-header nav { gap: 1rem; font-size: .7rem; }
  .columns { grid-template-columns: 1fr; gap: 1.1rem; }
  .columns > * { max-width: none; }
}
