/* =========================================================
   Ember & Oak Restaurant — Global Stylesheet
   ========================================================= */

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  /* Colors */
  --c-espresso:   #110808;
  --c-primary:    #8C3030;
  --c-amber:      #C9A84C;
  --c-gold:       #E5C876;
  --c-cream:      #FDF8F2;
  --c-bg:         #FAF4EB;
  --c-bg-alt:     #F0E8DA;
  --c-sage:       #4F7A5F;
  --c-text:       #1A0A0A;
  --c-text-muted: #7A5050;
  --c-success:    #22C55E;
  --c-error:      #EF4444;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(17,8,8,.08);
  --shadow-md: 0 4px 16px rgba(17,8,8,.12);
  --shadow-lg: 0 12px 40px rgba(17,8,8,.16);
  --shadow-xl: 0 24px 64px rgba(17,8,8,.20);

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   14px;
  --radius-lg:   24px;
  --radius-pill: 999px;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 6rem;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 280ms cubic-bezier(.4,0,.2,1);
  --t-slow: 500ms cubic-bezier(.4,0,.2,1);

  /* Z-index */
  --z-navbar: 1000;
  --z-modal:  2000;
  --z-toast:  3000;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--c-primary);
  line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.price-tag {
  font-family: 'Dancing Script', cursive;
  color: var(--c-amber);
  font-size: 1.25rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-amber);
  margin-bottom: var(--space-xs);
}

.section-heading {
  margin-bottom: var(--space-xs);
}

.section-subheading {
  color: var(--c-text-muted);
  font-size: 1.0625rem;
  max-width: 50ch;
  margin: 0 auto var(--space-lg);
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--c-espresso);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.section-sub {
  color: var(--c-text-muted);
  font-size: 1.0625rem;
  max-width: 52ch;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

/* ── Page Load Progress Bar ─────────────────────────────── */
#page-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0;
  height: 3px;
  background: var(--c-amber);
  z-index: calc(var(--z-toast) + 1);
  transition: width 0.4s ease;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-base), color var(--t-base);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--c-amber);
  color: var(--c-espresso);
  border-color: var(--c-amber);
}
.btn-primary:hover {
  background: var(--c-gold);
  border-color: var(--c-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,.4);
}

.btn-outline {
  background: transparent;
  color: var(--c-amber);
  border-color: var(--c-amber);
}
.btn-outline:hover {
  background: var(--c-amber);
  color: var(--c-espresso);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,.3);
}

.btn-outline-light {
  background: transparent;
  color: var(--c-cream);
  border-color: rgba(253,248,242,.6);
}
.btn-outline-light:hover {
  background: rgba(253,248,242,.15);
  border-color: var(--c-cream);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--c-text-muted);
  border-color: transparent;
  padding: 0.5rem 1rem;
}
.btn-ghost:hover { color: var(--c-primary); }

.btn:active { transform: translateY(0) scale(0.98); }
.btn:focus-visible {
  outline: 2px solid var(--c-amber);
  outline-offset: 3px;
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 70px;
  background: var(--c-espresso);
  display: flex;
  align-items: center;
  z-index: var(--z-navbar);
  transition: height var(--t-base), box-shadow var(--t-base);
}

.navbar.scrolled {
  height: 60px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.nav-container, .nav-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.375rem;
  font-style: italic;
  font-weight: 700;
  color: var(--c-cream);
  white-space: nowrap;
  transition: color var(--t-fast);
}
.nav-logo:hover { color: var(--c-gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  color: rgba(253,248,242,.8);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--t-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--c-amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--c-cream);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta {
  margin-left: var(--space-sm);
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: calc(var(--z-navbar) + 1);
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-cream);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-fast);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--c-espresso);
  z-index: calc(var(--z-navbar) - 1);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  opacity: 0;
  transition: opacity var(--t-slow);
}
.nav-overlay.open { opacity: 1; }
.nav-overlay a {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  color: var(--c-cream);
  transition: color var(--t-fast);
}
.nav-overlay a:hover { color: var(--c-amber); }

.nav-overlay-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(253,248,242,.3);
  color: var(--c-cream);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.nav-overlay-close:hover {
  background: rgba(253,248,242,.1);
  border-color: var(--c-amber);
  color: var(--c-amber);
}

/* ── Section Layout ──────────────────────────────────────── */
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--c-bg-alt); }
.section-cream { background: var(--c-cream); }
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.section-header { text-align: center; margin-bottom: var(--space-lg); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--c-cream);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ── Scroll Reveal (progressive enhancement — visible without JS) ── */
.reveal {
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
}
.js-reveal .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Toast Notifications ─────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  pointer-events: none;
}

.toast {
  background: var(--c-espresso);
  color: var(--c-cream);
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 260px;
  max-width: 360px;
  pointer-events: auto;
  animation: toastIn var(--t-slow) forwards;
  border-left: 4px solid var(--c-amber);
}
.toast.success { border-left-color: var(--c-success); }
.toast.error   { border-left-color: var(--c-error); }
.toast.hide    { animation: toastOut var(--t-base) forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--c-espresso);
  color: var(--c-cream);
  padding: var(--space-xl) 0 0;
  border-top: 1px solid rgba(242,192,96,.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 700;
  color: var(--c-cream);
  margin-bottom: var(--space-sm);
}

.footer-tagline {
  color: rgba(253,248,242,.6);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  max-width: 28ch;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-social a {
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  background: rgba(253,248,242,.08);
  border: 1px solid rgba(253,248,242,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(253,248,242,.7);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.footer-social a:hover {
  background: var(--c-amber);
  color: var(--c-espresso);
  transform: translateY(-2px);
}

.footer-heading,
.site-footer h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--c-gold);
  margin-bottom: var(--space-sm);
}

.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  color: rgba(253,248,242,.65);
  font-size: 0.9rem;
  transition: color var(--t-fast), padding-left var(--t-fast);
}
.footer-links a:hover {
  color: var(--c-cream);
  padding-left: 4px;
}

.footer-contact-item {
  color: rgba(253,248,242,.65);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid rgba(253,248,242,.1);
  padding: var(--space-sm) 0;
  text-align: center;
  color: rgba(253,248,242,.4);
  font-size: 0.8125rem;
}

/* ── Mini Hero Strip (sub-pages) ─────────────────────────── */
.page-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-lg);
  margin-top: 70px;
  background: var(--c-espresso);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,14,6,.4) 0%, rgba(26,14,6,.85) 100%);
}

.page-hero-content,
.page-hero .container {
  position: relative;
  z-index: 2;
  color: var(--c-cream);
}

.page-hero-content h1,
.page-hero .container h1 { color: var(--c-cream); margin-bottom: 0.5rem; }
.page-hero .container p  { color: rgba(253,248,242,.85); }
.page-hero-breadcrumb {
  color: rgba(253,248,242,.6);
  font-size: 0.875rem;
}
.page-hero-breadcrumb a { color: var(--c-amber); }
.page-hero-breadcrumb a:hover { text-decoration: underline; }

/* ── Form Elements ───────────────────────────────────────── */
.form-group { margin-bottom: var(--space-sm); }

.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--c-bg);
  border: 1.5px solid rgba(107,63,37,.2);
  border-radius: var(--radius-md);
  color: var(--c-text);
  font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control::placeholder { color: var(--c-text-muted); opacity: 0.6; }
.form-control:focus {
  outline: none;
  border-color: var(--c-amber);
  box-shadow: 0 0 0 3px rgba(232,151,62,.15);
}
.form-control.error {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

textarea.form-control { resize: vertical; min-height: 130px; }

.field-error {
  display: block;
  color: var(--c-error);
  font-size: 0.8125rem;
  margin-top: 0.3rem;
  min-height: 1.1em;
}

/* ── Utility ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--c-text-muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.stack { display: flex; flex-direction: column; gap: var(--space-sm); }

/* ── Responsive ──────────────────────────────────────────── */
/* TV / Large screen (1400px+) */
@media (min-width: 1400px) {
  .container { max-width: 1480px; }
  .grid-3 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* Laptop (1024px) */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

/* Tablet (768px) */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: var(--space-lg) 0; }
  /* Ensure minimum 44px touch targets on buttons */
  .btn { min-height: 44px; padding: 0.75rem 1.5rem; }
  .btn-sm { min-height: 38px; padding: 0.5rem 1rem; }
  /* Toast full-width on smaller screens */
  #toast-container { left: var(--space-sm); right: var(--space-sm); }
  .toast { min-width: 0; max-width: 100%; }
}

/* Large mobile (480px) */
@media (max-width: 480px) {
  .container { padding: 0 var(--space-sm); }
  h1 { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  h2 { font-size: clamp(1.3rem, 5vw, 1.8rem); }
}

/* ── Accessibility ───────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--c-amber);
  outline-offset: 3px;
}
