/* ==========================================================================
   Black Olive — design tokens (see DESIGN.md)
   ========================================================================== */

:root {
  --olive: #8a9a5b;
  --forest-deep: #1f3a33;
  --ink: #0e1512;
  --cream: #f8f6f0;
  --cream-muted: #e7e3d8;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 112px;

  --radius-sm: 2px;
  --radius-md: 4px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 88px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 500;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--cream);
  color: var(--ink);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--olive);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(248, 246, 240, 0.55);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(248, 246, 240, 0.1);
  border-color: var(--cream);
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background-color 0.4s var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(31, 58, 51, 0.92);
}

.header-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand-emblem {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
}

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

.main-nav a:not(.btn) {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-muted);
  padding: 4px 0;
  position: relative;
  transition: color 0.3s var(--ease-out);
}

.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

.main-nav a:not(.btn):hover,
.main-nav a:not(.btn):focus-visible {
  color: var(--cream);
}
.main-nav a:not(.btn):hover::after,
.main-nav a:not(.btn):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta { display: none; }
.header-cta { flex-shrink: 0; padding: 14px 28px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--cream);
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

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

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.08);
  opacity: 0;
  animation: heroBgIn 1.6s var(--ease-out) forwards;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(14, 21, 18, 0.88) 0%, rgba(14, 21, 18, 0.62) 42%, rgba(31, 58, 51, 0.35) 75%),
    linear-gradient(180deg, rgba(14, 21, 18, 0.35) 0%, rgba(14, 21, 18, 0.1) 30%, rgba(14, 21, 18, 0.55) 100%);
}

@keyframes heroBgIn {
  from { opacity: 0; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}

.hero-inner {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--header-h) + var(--space-lg)) var(--space-lg) var(--space-lg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-lg);
  flex: 1;
}

.hero-content { max-width: 560px; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 var(--space-sm);
}

.hero-title {
  font-size: clamp(2.75rem, 5.2vw, 5.25rem);
  line-height: 1.05;
  color: var(--cream);
  margin-bottom: var(--space-md);
}

.hero-desc {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--cream-muted);
  max-width: 46ch;
  margin: 0 0 var(--space-lg);
}

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

/* Dish visual --------------------------------------------------------- */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dish-frame {
  position: relative;
  width: clamp(280px, 32vw, 560px);
  aspect-ratio: 1 / 1;
  isolation: isolate;
}

.dish-frame::before {
  content: '';
  position: absolute;
  inset: -4%;
  background: radial-gradient(circle at 48% 42%, var(--forest-deep) 0%, var(--ink) 68%);
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 54%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 48%, #000 54%, transparent 72%);
  z-index: 0;
}

.dish-frame::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4%;
  width: 68%;
  height: 16%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 72%);
  filter: blur(10px);
  z-index: 1;
}

.dish-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 58%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 48%, #000 58%, transparent 76%);
  z-index: 2;
}

.dish-leaf {
  position: absolute;
  width: 46%;
  height: auto;
  opacity: 0.16;
  filter: saturate(0.9);
  z-index: 0;
}
.dish-leaf--a {
  top: -6%;
  left: -8%;
  transform: rotate(-18deg);
}
.dish-leaf--b {
  bottom: -8%;
  right: -10%;
  transform: rotate(162deg);
  width: 38%;
}

/* Scroll cue ------------------------------------------------------------ */

.scroll-cue {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 44px;
  background: rgba(248, 246, 240, 0.3);
  z-index: 2;
  overflow: hidden;
}
.scroll-cue span {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--cream);
  animation: scrollCue 1.8s var(--ease-out) infinite;
}
@keyframes scrollCue {
  0% { transform: translateY(0); }
  100% { transform: translateY(200%); }
}

/* ==========================================================================
   Entrance reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 0.9s var(--ease-out) forwards;
  animation-delay: var(--reveal-delay, 0s);
}
.reveal-from-right {
  transform: translateX(36px);
  animation-name: revealRight;
}

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes revealRight {
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-bg-img { animation: none !important; opacity: 1 !important; transform: none !important; }
  .scroll-cue span { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .main-nav { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(340px, 82vw);
    padding: var(--space-lg) var(--space-lg);
    background: rgba(14, 21, 18, 0.98);
    border-left: 1px solid rgba(248, 246, 240, 0.12);
    overflow-y: auto;
  }
  .main-nav.is-open .nav-cta { display: inline-flex; margin-top: var(--space-sm); }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: calc(var(--header-h) + var(--space-md));
    gap: var(--space-md);
    text-align: left;
  }
  .hero-visual { order: 2; }
  .hero-content { order: 1; max-width: none; }
  .dish-frame { width: clamp(220px, 58vw, 320px); margin: 0 auto; }
  .hero-desc { max-width: 60ch; }
}

@media (max-width: 640px) {
  .header-inner { padding: 0 var(--space-sm); }
  .hero-inner { padding-left: var(--space-sm); padding-right: var(--space-sm); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .scroll-cue { display: none; }
}

/* ==========================================================================
   Shared section primitives
   ========================================================================== */

section[id] { scroll-margin-top: var(--header-h); }

.section-title {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.12;
  color: var(--cream);
  margin: 0 0 var(--space-md);
}

/* ==========================================================================
   About
   ========================================================================== */

.about {
  background: var(--forest-deep);
  padding: var(--space-xl) 0;
}

.about-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: center;
}

.about-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-content { max-width: 560px; }

.about-text {
  color: var(--cream-muted);
  max-width: 60ch;
  margin: 0 0 var(--space-sm);
}

.team {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(248, 246, 240, 0.15);
}

.team-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 var(--space-sm);
}

.team-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.team-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-sm);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(248, 246, 240, 0.08);
}

.team-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream);
}

.team-role {
  color: var(--cream-muted);
  font-size: 0.875rem;
}

@media (max-width: 1000px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
  .about-visual img { aspect-ratio: 16 / 10; }
  .about-content { max-width: none; }
}

/* ==========================================================================
   Menu
   ========================================================================== */

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

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

.menu-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-lg);
}
.menu-heading .eyebrow, .menu-heading .section-title { margin-left: auto; margin-right: auto; }

.menu-intro {
  color: var(--cream-muted);
}

.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(248, 246, 240, 0.15);
}

.menu-tab {
  background: none;
  border: none;
  padding: 8px 2px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.3s var(--ease-out);
}
.menu-tab::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -9px;
  height: 1px;
  background: var(--olive);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out);
}
.menu-tab:hover { color: var(--cream); }
.menu-tab.is-active { color: var(--cream); }
.menu-tab.is-active::after { transform: scaleX(1); }

.menu-panel[hidden] { display: none; }

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: var(--space-xl);
}

.menu-list li {
  break-inside: avoid;
  margin-bottom: var(--space-md);
}

.menu-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
}

.menu-item-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream);
}

.menu-item-price {
  flex-shrink: 0;
  color: var(--olive);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.menu-item-desc {
  margin: 4px 0 0;
  color: var(--cream-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .menu-list { columns: 1; }
  .menu-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .menu-tab { flex-shrink: 0; }
}

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

.gallery {
  background: var(--forest-deep);
  padding: var(--space-xl) 0;
}

.gallery-heading {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-lg);
  text-align: center;
}

.gallery-grid {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  columns: 3 260px;
  column-gap: var(--space-sm);
}

.gallery-grid img {
  width: 100%;
  display: block;
  margin-bottom: var(--space-sm);
  break-inside: avoid;
  filter: saturate(0.96);
  transition: transform 0.6s var(--ease-out), filter 0.6s var(--ease-out);
}

.gallery-grid img:hover { transform: scale(1.015); filter: saturate(1.05); }

@media (max-width: 640px) {
  .gallery-grid { columns: 2 160px; }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  background: var(--ink);
  padding: var(--space-xl) 0;
}

.contact-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}

.contact-lede {
  color: var(--cream-muted);
  max-width: 46ch;
  margin: 0 0 var(--space-lg);
}

.contact-details {
  display: grid;
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
}

.contact-details dt {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 4px;
}

.contact-details dd {
  margin: 0;
  color: var(--cream);
  font-size: 1.05rem;
  line-height: 1.5;
}

.contact-details a { border-bottom: 1px solid rgba(248, 246, 240, 0.3); transition: border-color 0.3s var(--ease-out); }
.contact-details a:hover { border-color: var(--cream); }

.contact-map {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--forest-deep);
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.25) contrast(1.05);
}

@media (max-width: 1000px) {
  .contact-inner { grid-template-columns: 1fr; }
  .contact-map { aspect-ratio: 16 / 10; }
}

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

.site-footer {
  background: var(--forest-deep);
  border-top: 1px solid rgba(248, 246, 240, 0.1);
  padding: var(--space-md) 0;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-copy {
  color: var(--cream-muted);
  font-size: 0.875rem;
  margin: 0;
}

.footer-social {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.footer-social:hover { color: var(--cream); border-color: var(--cream); }
