/* ==========================================================================
   Estelle's Oxford — Design System
   Palette: cream + deep warm green/charcoal + brass accent (site-wide)
   The maroon/dusty-rose "1929" palette is reserved for the About page's
   back-bar section only — never used site-wide.
   ========================================================================== */

:root {
  /* Primary palette */
  --color-cream: #f4efe6;
  --color-cream-soft: #ede5d6;
  --color-charcoal: #16211c;
  --color-green-deep: #1f2e26;
  --color-green-mid: #2c3e33;
  --color-ink: #12160f;
  --color-brass: #b8925a;
  --color-brass-light: #d4b483;
  --color-brass-text: #8a6a35; /* darker than --color-brass: passes 4.5:1 on cream for small text; --color-brass stays reserved for button fills */
  --color-cream-text-on-dark: #f4efe6;
  --color-muted-on-cream: #5b5a52;
  --color-muted-on-dark: #b9c2ba;
  --color-border-on-dark: rgba(244, 239, 230, 0.16);
  --color-border-on-cream: rgba(22, 33, 28, 0.14);

  /* 1929 back-bar accent palette — About page only */
  --color-1929-maroon: #4a1420;
  --color-1929-rose: #c98a7d;

  /* Type */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-label: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;

  --max-width: 1180px;
  --max-width-wide: 1480px;
  --transition: 220ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-label);
  background: var(--color-cream);
  color: var(--color-charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--color-brass); color: var(--color-ink); }

html { scrollbar-color: var(--color-brass) var(--color-cream-soft); scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--color-cream-soft); }
::-webkit-scrollbar-thumb { background: var(--color-brass); border: 2px solid var(--color-cream-soft); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-brass-text); }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 var(--space-sm);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.75rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }

p { margin: 0 0 var(--space-sm); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (max-width: 640px) {
  .container, .container-wide { padding: 0 var(--space-sm); }
}

/* Label / eyebrow text — tracked uppercase, the "confident" system per brief */
.label {
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
}

.label-on-dark { color: var(--color-brass-light); }
.label-on-cream { color: var(--color-brass-text); }

.section {
  padding: var(--space-xl) 0;
}

.section-dark {
  background: var(--color-charcoal);
  color: var(--color-cream-text-on-dark);
}

.section-cream {
  background: var(--color-cream);
  color: var(--color-charcoal);
}

.section-soft {
  background: var(--color-cream-soft);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 2.1em;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-brass {
  background: var(--color-brass);
  color: var(--color-ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.btn-brass:hover { background: var(--color-brass-light); transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(184,146,90,0.55); }
.btn-brass:active { transform: translateY(0); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--color-cream);
  color: var(--color-cream);
}
.btn-outline-dark:hover { background: var(--color-cream); color: var(--color-charcoal); transform: translateY(-2px); }

.btn-outline-cream {
  background: transparent;
  border-color: var(--color-charcoal);
  color: var(--color-charcoal);
}
.btn-outline-cream:hover { background: var(--color-charcoal); color: var(--color-cream); transform: translateY(-2px); }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--color-brass);
  color: var(--color-ink);
  padding: 0.8em 1.4em;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}
.skip-link:focus {
  left: var(--space-sm);
  top: var(--space-sm);
}

body.lightbox-locked { overflow: hidden; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 33, 28, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-on-dark);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: 84px;
  padding: 0 var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo img { height: 104px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.74rem;
  color: var(--color-cream);
  opacity: 0.86;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { opacity: 1; border-bottom: 1px solid var(--color-brass); }
.nav-links a.btn { white-space: nowrap; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-cream);
  margin: 5px 0;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    background: var(--color-charcoal);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border-on-dark);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { white-space: normal; font-size: 0.82rem; letter-spacing: 0.12em; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--color-cream);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,22,15,0.15) 0%, rgba(18,22,15,0.78) 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* Sub-hero page banner (interior pages, shorter than homepage hero).
   Source photos are portrait (768x1024); a full-bleed wide banner forced
   a ~2.5x upscale + heavy crop via background-size:cover. Fix: a centered,
   minimally-cropped sharp photo panel, flanked by a blurred/darkened full
   version of the same photo so the banner still reads as full-bleed. */
.page-banner {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--color-cream);
  background: var(--color-charcoal, #16211c);
}
.page-banner-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(36px) brightness(0.4) saturate(0.9);
  transform: scale(1.15);
  z-index: 0;
}
.page-banner-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.page-banner-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(18,22,15,0.2) 0%, rgba(18,22,15,0.85) 100%);
}

.page-banner-tagline-off::before,
.page-banner-tagline-off::after {
  content: '';
  height: 1px;
  width: 36px;
  background: var(--color-brass);
  opacity: 0.7;
}
.page-banner h1 { font-size: clamp(2.75rem, 5.5vw, 4.5rem); }
.page-banner-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}
@media (max-width: 860px) {
  .page-banner-photo { width: 100%; }
}

/* ==========================================================================
   Cards / grids
   ========================================================================== */

.grid {
  display: grid;
  gap: var(--space-md);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--color-cream);
  border: 1px solid var(--color-border-on-cream);
  padding: var(--space-md);
}

/* Frames a third-party embed that can't be recolored to match the
   site palette — the brass strip + shadow reads as an intentional accent rather
   than a stray white box. */
.form-frame {
  max-width: 600px;
  margin-inline: auto;
  background: #f2ece0;
  padding: 16px;
  border: 3px solid var(--color-brass);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 70px -28px rgba(0,0,0,0.65);
}
.form-frame iframe { border-radius: 6px; }

/* Hours block — single source of truth, reused on Home/Location/Footer */
.hours-block {
  font-family: var(--font-label);
}
.hours-block .hours-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.55em 0;
  border-bottom: 1px solid var(--color-border-on-dark);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}
.hours-block.on-cream .hours-row { border-bottom: 1px solid var(--color-border-on-cream); }
.hours-block .hours-row:last-child { border-bottom: none; }
.hours-day { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; opacity: 0.86; }

/* ==========================================================================
   Menu card layout (Scotch Lodge "printed card" pattern)
   ========================================================================== */

.menu-section { margin-bottom: var(--space-lg); }
.menu-section-title {
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  text-align: center;
  color: var(--color-brass-text);
  margin-bottom: var(--space-md);
  position: relative;
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  padding: 0.9em 0;
  border-bottom: 1px dashed var(--color-border-on-cream);
}
.menu-item:last-child { border-bottom: none; }
.menu-item-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.menu-item-desc { font-style: italic; color: var(--color-muted-on-cream); font-size: 0.9rem; display: block; margin-top: 0.15em; }
.menu-item-price { font-family: var(--font-label); font-size: 0.95rem; white-space: nowrap; }

/* ==========================================================================
   Gallery / lightbox
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
}
@media (max-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:focus-visible { outline: 3px solid var(--color-brass); outline-offset: -3px; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18,22,15,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-md);
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: 92vw; }
.lightbox-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: 1px solid var(--color-cream);
  color: var(--color-cream);
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-ink);
  color: var(--color-muted-on-dark);
  padding: var(--space-lg) 0 var(--space-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.footer-grid > div:nth-child(3) { justify-self: end; }
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer-grid > div:nth-child(3) { justify-self: stretch; }
  .site-footer .footer-explore { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9em 1.25em; }
}
.footer-logo img { height: 68px; width: auto; margin-bottom: var(--space-sm); }
.footer-social { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); }
.footer-social a {
  width: 38px; height: 38px;
  border: 1px solid var(--color-border-on-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.footer-bottom {
  border-top: 1px solid var(--color-border-on-dark);
  padding-top: var(--space-sm);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.footer-legal a { color: var(--color-cream); opacity: 0.7; }
.footer-legal a:hover { opacity: 1; }

.footer-explore {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}
.footer-explore a {
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  color: var(--color-cream);
  opacity: 0.86;
  transition: opacity var(--transition);
}
.footer-explore a:hover { opacity: 1; }

/* ==========================================================================
   1929 back-bar accent block — About page ONLY
   ========================================================================== */

.section-1929 {
  background: var(--color-1929-maroon);
  color: var(--color-1929-rose);
}
.section-1929 .label { color: var(--color-1929-rose); opacity: 1; }
.section-1929 h2 { color: var(--color-cream); }

/* ==========================================================================
   Scroll reveal
   Default state is fully visible — JS only ever ADDS the hidden starting
   state (via .reveal-armed on <html>), and a timeout fallback in main.js
   force-shows everything if IntersectionObserver ever fails to fire. This
   means content is never at risk of staying invisible: with JS disabled,
   or on the very first paint before main.js runs, everything just renders
   normally.
   ========================================================================== */

.reveal { opacity: 1; transform: none; }
.reveal-armed .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms cubic-bezier(0.2,0.7,0.2,1), transform 800ms cubic-bezier(0.2,0.7,0.2,1);
}
.reveal-armed .reveal.is-visible { opacity: 1; transform: none; }
.reveal-armed .reveal.reveal-2 { transition-delay: 120ms; }
.reveal-armed .reveal.reveal-3 { transition-delay: 240ms; }

/* ==========================================================================
   Ornamental section divider — thin brass rule with a small centered mark,
   used sparingly between homepage sections instead of a hard color cut.
   ========================================================================== */

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
}
.section-divider::before,
.section-divider::after {
  content: '';
  height: 1px;
  width: 64px;
  background: var(--color-brass);
  opacity: 0.55;
}
.section-divider span {
  width: 7px;
  height: 7px;
  background: var(--color-brass);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.section-divider.on-dark::before,
.section-divider.on-dark::after { background: var(--color-brass-light); }
.section-divider.on-dark span { background: var(--color-brass-light); }

/* ==========================================================================
   Framed photo — gives a standalone content photo a "matted print" feel
   instead of sitting flush/bleeding into the section, on-brand with the
   brass accent used elsewhere.
   ========================================================================== */

.framed-photo {
  padding: 16px;
  background: var(--color-cream);
  border: 1px solid var(--color-brass);
  box-shadow: 0 30px 60px -24px rgba(18,22,15,0.55);
}
.framed-photo img { display: block; width: 100%; }
@media (max-width: 640px) {
  .framed-photo { padding: 10px; }
}

/* ==========================================================================
   Menu "printed card" framing
   ========================================================================== */

.menu-card {
  background: var(--color-cream);
  border: 1px solid var(--color-brass);
  outline: 1px solid var(--color-border-on-cream);
  outline-offset: -7px;
  padding: var(--space-lg) var(--space-md);
  box-shadow: 0 24px 60px -30px rgba(18,22,15,0.35);
}
@media (max-width: 640px) {
  .menu-card { padding: var(--space-md) var(--space-sm); }
}
.menu-item {
  transition: background var(--transition);
  border-radius: 2px;
}
.menu-item:hover { background: var(--color-cream-soft); }

/* ==========================================================================
   Homepage featured photo grid — one large + two stacked, avoids the
   uniform-grid "template" look of equal-sized tiles.
   ========================================================================== */

.grid-feature {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 16 / 9;
  gap: var(--space-xs);
}
.grid-feature .grid-feature-main { grid-column: 1; grid-row: 1 / span 2; }
.grid-feature .gallery-item { aspect-ratio: unset; width: 100%; height: 100%; }
@media (max-width: 780px) {
  .grid-feature { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; aspect-ratio: unset; }
  .grid-feature .grid-feature-main { grid-column: 1 / -1; grid-row: 1; aspect-ratio: 4/3; height: auto; }
  .grid-feature > .gallery-item:not(.grid-feature-main) { aspect-ratio: 1/1; height: auto; }
}

/* ==========================================================================
   Utility
   ========================================================================== */

.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-0 { margin-bottom: 0; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

.placeholder-notice {
  border: 1px dashed var(--color-brass);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.88rem;
  color: var(--color-muted-on-cream);
  background: var(--color-cream-soft);
}
