/* ============================================================
   Ember & Oak — styles.css
   Tokens → Reset → Layout → Components → Motion
   ============================================================ */

/* ── 1. DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Color palette */
  --color-base:       #0f0d0b;
  --color-surface:    #1a1713;
  --color-text:       #e8e0d4;
  --color-text-muted: #9a8f82;
  --color-accent:     #c8924a;
  --color-border:     #2e2922;
  --color-overlay:    rgba(15, 13, 11, 0.72);

  /* Type scale */
  --fs-xs:      0.75rem;
  --fs-sm:      0.875rem;
  --fs-base:    1rem;
  --fs-md:      1.25rem;
  --fs-lg:      1.75rem;
  --fs-xl:      2.5rem;
  --fs-display: 4rem;

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

  /* Easing */
  --ease-out-soft: cubic-bezier(0.25, 0, 0.1, 1);

  /* Derived */
  --nav-height: 72px;
  --radius-sm:  4px;
  --radius-md:  8px;
  --transition-base: 0.28s var(--ease-out-soft);
}

/* ── 2. RESET / BASE ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-base);
  color: var(--color-text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', ui-serif, serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* SVG grain filter (applied via filter: url on pseudo-elements) */
.grain-filter {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none;
}

/* ── 3. NAVIGATION ───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  background: transparent;
  transition: background var(--transition-base),
              backdrop-filter var(--transition-base),
              border-bottom var(--transition-base);
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.nav__wordmark {
  font-family: 'Georgia', ui-serif, serif;
  font-style: italic;
  font-size: var(--fs-md);
  letter-spacing: 0.04em;
  color: var(--color-text);
  line-height: 1;
}

.nav__wordmark .amp {
  color: var(--color-accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-left: auto;
}

.nav__link {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--transition-base);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--color-accent);
  transition: right var(--transition-base);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-text);
  outline: none;
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  right: 0;
}

.nav__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* ── 4. HERO ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh; /* fallback */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* Ember glow: deep charcoal center, warm amber rising from bottom */
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 110%,
      rgba(200, 146, 74, 0.28) 0%,
      rgba(140, 80, 20, 0.12) 40%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 40% at 50% 100%,
      rgba(200, 146, 74, 0.15) 0%,
      transparent 60%
    ),
    linear-gradient(
      180deg,
      #0f0d0b 0%,
      #141109 60%,
      #1c1208 100%
    );
}

/* Subtle grain overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

/* Bottom gradient fade to base */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--color-base));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  max-width: 800px;
  width: 100%;
}

.hero__title {
  font-family: 'Georgia', ui-serif, serif;
  font-size: clamp(var(--fs-xl), 8vw, var(--fs-display));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  animation: fadeUp 0.9s var(--ease-out-soft) both;
}

.hero__tagline {
  font-size: var(--fs-md);
  font-weight: 300;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
  animation: fadeUp 0.9s var(--ease-out-soft) 0.18s both;
}

.hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  animation: fadeUp 0.9s var(--ease-out-soft) 0.34s both;
}

/* Gold accent rule below hero heading */
.hero__rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--color-accent);
  margin: 0 auto var(--space-md);
  animation: fadeUp 0.9s var(--ease-out-soft) 0.1s both;
}

/* ── 5. ABOUT ────────────────────────────────────────────── */
.about {
  padding: var(--space-2xl) var(--space-lg);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.about__eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 400;
}

.about__heading {
  font-family: 'Georgia', ui-serif, serif;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.about__text p {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-sm);
}

.about__text p:last-child {
  margin-bottom: 0;
}

.about__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 70% 80% at 40% 60%,
      rgba(200, 146, 74, 0.18) 0%,
      rgba(140, 80, 20, 0.08) 50%,
      transparent 80%
    ),
    linear-gradient(160deg, #1a1410 0%, #0f0d0b 100%);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__monogram {
  opacity: 0.25;
}

/* ── 6. SECTION WRAPPER ──────────────────────────────────── */
.section {
  padding: var(--space-2xl) var(--space-lg);
}

.section__container {
  max-width: 1100px;
  margin: 0 auto;
}

.section__eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 400;
  text-align: center;
}

.section__heading {
  font-family: 'Georgia', ui-serif, serif;
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* ── 7. MENU ─────────────────────────────────────────────── */
.menu-page {
  padding-top: var(--nav-height);
}

.menu-intro {
  text-align: center;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  max-width: 640px;
  margin: 0 auto;
}

.menu-intro p {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  font-weight: 300;
  line-height: 1.65;
}

.menu-section {
  padding: var(--space-xl) var(--space-lg);
  max-width: 1100px;
  margin: 0 auto;
}

.menu-section__heading {
  font-family: 'Georgia', ui-serif, serif;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  text-align: center;
  position: relative;
}

.menu-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-accent),
    transparent
  );
  margin: 0 0 var(--space-xl);
  border: none;
  opacity: 0.6;
}

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

.menu-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4),
              0 4px 12px rgba(200, 146, 74, 0.08);
  border-color: rgba(200, 146, 74, 0.3);
}

.menu-card__name {
  font-family: 'Georgia', ui-serif, serif;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.menu-card__desc {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
}

.menu-card__price {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  margin-top: var(--space-xs);
}

/* ── 8. PAGE HERO (interior pages) ──────────────────────── */
.page-hero {
  min-height: 36vh;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--space-lg) var(--space-xl);
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 120%,
      rgba(200, 146, 74, 0.2) 0%,
      transparent 65%
    ),
    linear-gradient(180deg, #0f0d0b 0%, #141109 100%);
  padding-top: var(--nav-height);
}

.page-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.page-hero__title {
  font-family: 'Georgia', ui-serif, serif;
  font-size: clamp(var(--fs-xl), 6vw, var(--fs-display));
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.page-hero__sub {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  font-weight: 300;
}

/* ── 9. RESERVATION FORM ─────────────────────────────────── */
.reservations-wrap {
  padding: var(--space-xl) var(--space-lg) var(--space-2xl);
  display: flex;
  justify-content: center;
}

.reservation-form {
  width: 100%;
  max-width: 560px;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 400;
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px var(--space-sm);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  font-weight: 300;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  min-height: 44px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(154, 143, 130, 0.5);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 146, 74, 0.15);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a8f82' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-select option {
  background: var(--color-surface);
  color: var(--color-text);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-error {
  display: block;
  font-size: var(--fs-xs);
  color: #e07060;
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.form-submit {
  margin-top: var(--space-lg);
}

.form-notice {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-sm);
  line-height: 1.5;
}

/* Date/time input styling */
input[type="date"],
input[type="time"],
input[type="number"] {
  color-scheme: dark;
}

/* ── 10. BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 14px var(--space-lg);
  min-height: 48px;
  transition: background var(--transition-base),
              color var(--transition-base),
              transform var(--transition-base),
              box-shadow var(--transition-base);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-base);
}

.btn--primary:hover {
  background: #d9a55e;
  box-shadow: 0 8px 24px rgba(200, 146, 74, 0.3);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(200, 146, 74, 0.06);
}

.btn--full {
  width: 100%;
}

/* ── 11. FOOTER ──────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  background: var(--color-surface);
}

.footer__logo {
  margin: 0 auto var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.footer__wordmark {
  font-family: 'Georgia', ui-serif, serif;
  font-style: italic;
  font-size: var(--fs-base);
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.footer__wordmark .amp {
  color: var(--color-accent);
}

.footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.footer__link {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.footer__link:hover {
  color: var(--color-accent);
}

.footer__copy {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  opacity: 0.6;
}

.footer__address {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  font-style: normal;
  opacity: 0.7;
}

.footer__divider {
  width: 40px;
  height: 1px;
  background: var(--color-accent);
  margin: var(--space-sm) auto;
  opacity: 0.4;
}

/* ── 12. SCROLL REVEAL ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-soft),
              transform 0.7s var(--ease-out-soft);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger via delay utilities */
.reveal--d1 { transition-delay: 0.08s; }
.reveal--d2 { transition-delay: 0.16s; }
.reveal--d3 { transition-delay: 0.24s; }
.reveal--d4 { transition-delay: 0.32s; }

/* ── 13. KEYFRAMES ───────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.18;
  }
  50% {
    opacity: 0.28;
  }
}

/* Ember glow ambient animation on hero */
.hero__glow {
  position: absolute;
  bottom: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(200, 146, 74, 0.22) 0%,
    transparent 70%
  );
  animation: pulseGlow 4s ease-in-out infinite;
  pointer-events: none;
}

/* ── 14. PREFERS-REDUCED-MOTION GUARD ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__title,
  .hero__tagline,
  .hero__cta,
  .hero__rule {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ── 15. RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__visual {
    aspect-ratio: 16 / 9;
    order: -1;
  }

  .nav {
    padding: 0 var(--space-sm);
  }

  .nav__links {
    gap: var(--space-md);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --space-2xl: 3.5rem;
    --space-xl: 2.5rem;
  }

  .nav__links {
    gap: var(--space-sm);
  }

  .nav__link {
    font-size: var(--fs-xs);
  }

  .hero__inner {
    padding: var(--space-xl) var(--space-sm);
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
  }

  .btn {
    width: 100%;
  }

  .about,
  .section,
  .menu-section,
  .reservations-wrap {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .page-hero {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .footer {
    padding: var(--space-xl) var(--space-sm);
  }
}

/* ── 16. UTILITY CLASSES ─────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-accent {
  color: var(--color-accent);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }