/* ============================================================
   Redwood Pizzeria — run-003
   Retro Americana, drenched pine-green mono-bold.
   Tokens are the DESIGN.md contract. Hex is the source of truth.
   ============================================================ */

:root {
  /* --- Core palette (from approved toolkit) --- */
  --color-pine: #21402E;
  --color-pine-deep: #182E22;
  --color-cream: #F2E7D0;
  --color-espresso: #2B211B;
  --color-goldenrod: #E2A52C;
  --color-rust: #BD4A2C;

  /* --- Semantic aliases --- */
  --bg: var(--color-pine);
  --bg-deep: var(--color-pine-deep);
  --bg-invert: var(--color-cream);
  --ink: var(--color-cream);
  --ink-invert: var(--color-espresso);
  --ink-muted: rgba(242, 231, 208, 0.78);
  --accent: var(--color-goldenrod);
  --accent-2: var(--color-rust);
  --rule: rgba(242, 231, 208, 0.85);
  --focus: var(--color-goldenrod);

  /* --- Type families --- */
  --font-display: "Alfa Slab One", Rockwell, Georgia, serif;
  --font-body: "Bitter", Georgia, "Times New Roman", serif;
  --font-script: "Yellowtail", "Brush Script MT", cursive;

  /* --- Type scale --- */
  --text-display: clamp(3rem, 11vw, 8.5rem);
  --text-h1: clamp(2.25rem, 6vw, 4rem);
  --text-h2: clamp(1.6rem, 3.5vw, 2.25rem);
  --text-h3: 1.25rem;
  --text-lead: 1.25rem;
  --text-body: 1.0625rem;
  --text-eyebrow: 0.8125rem;
  --text-small: 0.9375rem;

  /* --- Spacing --- */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  /* --- Layout --- */
  --maxw: 72rem;
  --section-pad: clamp(4rem, 10vw, 8rem);
  --gutter: clamp(1.25rem, 5vw, 4rem);

  /* --- Borders / radius / elevation --- */
  --rule-width: 3px;
  --rule-gap: 12px; /* total height; ~8px visible gap between the two 2px lines */
  --radius-sm: 3px;
  --shadow-sticker: 5px 5px 0 0 var(--color-espresso);

  /* --- Motion --- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur: 260ms;
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); }

h1, h2, h3 { margin: 0; }

p { margin: 0; }

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

/* ============================================================
   Helpers
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--ink-invert);
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: var(--space-md); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--text-eyebrow);
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.headline {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.0;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.headline-display { font-size: var(--text-display); line-height: 0.95; }
.headline-h1 { font-size: var(--text-h1); }

.script-tagline {
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 6.5vw, 4.25rem);
  color: var(--accent);
  line-height: 1.05;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-small);
  line-height: 1;
  padding: 0.9em 1.4em;
  min-height: 44px;
  border: var(--rule-width) solid transparent;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--accent); color: var(--ink-invert); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sticker); }
.btn-secondary:hover { background: var(--ink); color: var(--ink-invert); }

/* ============================================================
   Nav
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}
.site-nav::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--rule-gap);
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-block: var(--space-md);
}
.wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-small);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--accent); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: var(--rule-width) solid var(--rule);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
}
.nav-mobile {
  border-top: var(--rule-width) solid var(--rule);
  padding: var(--space-lg) var(--gutter) var(--space-xl);
}
.nav-links-mobile {
  list-style: none;
  margin: 0 0 var(--space-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.nav-links-mobile a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.1rem;
}

/* ============================================================
   Layout: full-width bands + two-column magazine
   ============================================================ */
.band { padding-block: var(--section-pad); }

.hero { padding-block: clamp(3rem, 9vw, 7rem); }

.magazine { padding-block: 0 var(--space-md); }

.col { display: flex; flex-direction: column; }

.band-col { padding-block: var(--space-lg); }

/* Offset anchored sections so headings clear the ~76px sticky nav on jump */
:where(#hero, #story, #menu, #on-tap, #gallery, #visit) { scroll-margin-top: 6rem; }

/* Double-rule divider between stacked sections within a column */
.col > .band-col + .band-col { position: relative; }
.col > .band-col + .band-col::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: var(--rule-gap);
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}
#on-tap::before { content: none; } /* rust block separated by margin, not a rule */

.footer {
  background: var(--bg-deep);
  position: relative;
  padding-block: clamp(1.5rem, 3vw, 2rem);
}
.footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: var(--rule-gap);
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}

/* Desktop: two columns */
@media (min-width: 960px) {
  .magazine {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }
  .col-left { padding-right: clamp(2rem, 4vw, 4rem); }
  /* keep the column gutter visually balanced */
  .col-right { padding-left: clamp(0rem, 1vw, 1rem); }
}

/* ============================================================
   Mobile nav breakpoint
   ============================================================ */
@media (max-width: 759px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   Hero (Photo Forward: full-bleed pizza banner + overlaid type)
   ============================================================ */
body { overflow-x: clip; }

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(36rem, 92vh, 54rem);
  padding-block: clamp(3rem, 8vh, 6rem);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.18); /* crop pizza closer, less background */
  z-index: 0;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* consistent, even shading overlay across the whole photo (deepened for AA over bright pizza highlights) */
  background: rgba(24, 46, 34, 0.78);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: clamp(0.9rem, 1.8vw, 1.8rem);
  text-align: center;
  text-shadow: 0 2px 6px rgba(15, 28, 20, 0.55); /* slight drop shadow on hero text */
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  font-size: 1.05rem;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: clamp(28px, 7vw, 72px);
  border-top: 3px double var(--rule); /* double rule: two thin lines */
}

.headline-display { font-size: clamp(2rem, 4.1vw, 3.25rem); letter-spacing: -0.01em; }

.hero-detail { max-width: 52rem; margin-inline: auto; }
.hero-sub {
  font-size: clamp(1.4rem, 2.1vw, 1.85rem);
  font-weight: 600;
  color: var(--color-cream);
  max-width: 44ch;
  margin-inline: auto;
  margin-top: var(--space-lg);
}
.hero-trust {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-cream);
  margin-top: var(--space-lg);
}
.hero-trust .stars { color: var(--accent); margin-right: 0.45em; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.hero-cta .btn { font-size: 1.15rem; padding: 1.1em 2.1em; text-shadow: none; }
.hero-hours {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--color-cream);
  margin-top: var(--space-lg);
}

@media (max-width: 720px) {
  .hero-scrim {
    background: rgba(24, 46, 34, 0.82);
  }
}

/* ============================================================
   Section content components (Photo Forward, no SVG)
   ============================================================ */
.lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--ink); max-width: 60ch; }
/* Section headers sit clearly below the hero display size */
.headline-h1 { font-size: clamp(1rem, 1.7vw, 1.3rem); line-height: 1.1; margin-bottom: var(--space-md); }

/* Reusable double rule: two thin lines with a tunable gap */
.rule2 {
  height: var(--rule-gap);
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  margin-block: var(--space-md);
}

/* Story */
.prose > p { margin-bottom: var(--space-sm); max-width: 56ch; font-size: 0.98rem; line-height: 1.55; color: var(--ink-muted); }
.prose > p:last-child { margin-bottom: 0; }
.badge-row {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  list-style: none; margin: var(--space-lg) 0 0; padding: 0;
}
.badge-row li {
  border: 2px solid var(--rule); border-radius: 999px;
  padding: 0.4em 0.95em;
  font-size: var(--text-small); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent);
}

/* Menu (featured pies, dotted-leader rows) */
.menu-intro { margin-bottom: var(--space-xs); }
.menu-legend { margin: 0 0 var(--space-lg); font-size: var(--text-small); color: var(--ink-muted); }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-row { padding-block: var(--space-md); border-bottom: 1px solid rgba(242, 231, 208, 0.18); }
.menu-row:first-child { padding-top: 0; }
.menu-row-head { display: flex; align-items: baseline; gap: 0.6rem; }
.menu-name { font-family: var(--font-body); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.menu-dots { flex: 1 1 auto; min-width: 1.5rem; border-bottom: 2px dotted rgba(242, 231, 208, 0.35); transform: translateY(-0.3em); }
.menu-price { font-family: var(--font-body); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu-desc { color: var(--ink-muted); font-size: var(--text-small); margin-top: 0.25rem; max-width: 48ch; }
.diet {
  display: inline-block; font-family: var(--font-body);
  font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: 0.05em 0.4em; margin-left: 0.4em; vertical-align: middle;
}
.menu-more { margin-top: var(--space-lg); color: var(--ink-muted); font-style: italic; }

/* Gallery */
/* Gallery: two offset-collage clusters split by a double rule */
.gallery-cols { display: flex; align-items: stretch; margin-top: var(--space-md); }
.gallery-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* dedicated vertical double-rule between the two photo columns (8px to photos = the line gap) */
.vrule { flex: 0 0 var(--rule-gap); align-self: stretch; border-left: 2px solid var(--rule); border-right: 2px solid var(--rule); margin-inline: 8px; }
.gallery-item { margin: 0; height: clamp(100px, 12.5vw, 145px); overflow: hidden; border: 2px solid var(--rule); background: var(--bg-deep); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur) var(--ease-out); }
.gallery-item:hover img { transform: scale(1.06); }

/* On Tap — deep-rust color block (cream text passes AA) */
#on-tap {
  background: #8a3620;
  border-radius: 10px;
  padding: var(--space-sm) var(--space-lg);
  margin-top: 0;
}
#on-tap .eyebrow { color: var(--color-cream); }
#on-tap .headline-h1 { margin-bottom: var(--space-2xs); }
.ontap-inner { display: flex; align-items: center; gap: var(--space-lg); }
.ontap-text { flex: 1 1 auto; min-width: 0; }
.ontap-figure { flex: 0 0 auto; margin: 0; width: clamp(88px, 26%, 132px); }
.ontap-figure img { width: 100%; height: auto; display: block; border: 3px solid var(--color-cream); border-radius: 8px; }
.ontap-list { list-style: none; margin: var(--space-2xs) 0 0; padding: 0; display: grid; gap: var(--space-2xs); }
.ontap-list li { font-size: 0.9rem; font-weight: 600; }

/* Visit */
.visit-info { display: grid; gap: var(--space-2xs); margin-top: var(--space-sm); }
.visit-block { line-height: 1.4; }
.visit-block a { color: var(--accent); }
.visit-label {
  display: block; font-family: var(--font-body); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--text-small);
  color: var(--accent); margin-bottom: 0.15rem;
}
.visit-note { margin-top: var(--space-md); color: var(--ink-muted); max-width: 52ch; font-size: 0.95rem; }
.visit-map { margin-top: var(--space-md); border: 2px solid var(--rule); aspect-ratio: 16 / 9; overflow: hidden; }
.visit-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visit-cta { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-md); }

/* Footer */
.footer { text-align: center; }
.footer-recap { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-lg); margin-top: var(--space-sm); }
.footer-recap p { line-height: 1.6; }
.footer-recap a { color: var(--accent); text-decoration: none; }
.footer-recap a:hover { text-decoration: underline; }
.footer-badge { margin-top: var(--space-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--text-small); color: var(--accent); }
.footer-social { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-lg); margin-top: var(--space-xs); }
.footer-social a { color: var(--ink); font-weight: 700; }
.footer-copyright { margin-top: var(--space-xs); font-size: var(--text-small); color: var(--ink-muted); }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .btn:hover { transform: none; }
}
