/* ─────────────────────────────────────────────
   Casa Luna — Cocina Mexicana
   Palette: warm clay, cream, deep adobe, ember
   Type:    Fraunces (display) + Satoshi (text)
   ───────────────────────────────────────────── */

:root {
  /* Color */
  --cream:        #f7f1e6;
  --cream-2:      #ede3cf;
  --paper:        #fbf7ef;
  --ink:          #2a1d14;
  --ink-soft:     #5a463a;
  --muted:        #8a7866;
  --clay:         #c0532b;     /* primary accent — terracotta */
  --clay-deep:    #9a3f1f;
  --ember:        #d97a3b;
  --olive:        #6e6b3a;
  --line:         rgba(42, 29, 20, 0.12);

  /* Type scale (compact, informational) */
  --text-xs:   clamp(12px, 0.78vw + 0.5rem, 13px);
  --text-sm:   clamp(13px, 0.85vw + 0.55rem, 14.5px);
  --text-base: clamp(15px, 1vw + 0.6rem, 16.5px);
  --text-lg:   clamp(18px, 1.3vw + 0.7rem, 20px);
  --text-xl:   clamp(24px, 2vw + 0.5rem, 32px);
  --text-2xl:  clamp(34px, 3.6vw + 0.5rem, 52px);
  --text-hero: clamp(44px, 6vw + 0.5rem, 88px);

  /* Spacing */
  --gut: clamp(20px, 5vw, 80px);
  --section-y: clamp(64px, 9vw, 140px);

  /* Easing */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* Display headings */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "opsz" 144;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--ink);
}

h2 { font-size: var(--text-2xl); letter-spacing: -0.02em; }
h3 { font-size: var(--text-lg); font-weight: 600; }
h4 { font-size: var(--text-sm); font-weight: 600; }

.eyebrow {
  font-family: 'Satoshi', sans-serif;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--clay);
  font-weight: 500;
  margin-bottom: 14px;
}

/* ───────── HEADER ───────── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 239, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.header--scrolled {
  border-bottom-color: var(--line);
  background: rgba(251, 247, 239, 0.95);
}
.header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px var(--gut);
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--clay-deep);
  flex-shrink: 0;
}
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo__sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: 3px;
}
.nav {
  display: flex; gap: 28px;
  margin-left: auto;
}
.nav a {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  transition: color .2s var(--ease);
}
.nav a:hover { color: var(--clay); }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  height: 1.5px; width: 0; background: var(--clay);
  transition: width .3s var(--ease);
}
.nav a:hover::after { width: 100%; }

.header__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clay-deep);
  border: 1.5px solid var(--clay);
  border-radius: 999px;
  transition: all .2s var(--ease);
}
.header__cta:hover { background: var(--clay); color: var(--paper); }

.nav__toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px;
  flex-direction: column; justify-content: center; gap: 5px;
  margin-left: auto;
}
.nav__toggle span {
  display: block; width: 22px; height: 1.5px; background: var(--ink);
  transition: transform .25s var(--ease), opacity .25s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ───────── HERO ───────── */
.hero {
  position: relative;
  min-height: clamp(560px, 86vh, 820px);
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
  filter: saturate(1.05) contrast(1.02);
  animation: heroDrift 24s ease-in-out infinite alternate;
}
@keyframes heroDrift { to { transform: scale(1.06); } }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,10,5,0.55) 0%, rgba(20,10,5,0.35) 35%, rgba(20,10,5,0.7) 100%),
    linear-gradient(90deg, rgba(20,10,5,0.6) 0%, rgba(20,10,5,0.1) 60%);
}
.hero__content {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 80px var(--gut);
  color: var(--paper);
}
.hero .eyebrow { color: var(--ember); }
.hero__title {
  font-size: var(--text-hero);
  color: var(--paper);
  max-width: 12ch;
  margin-bottom: 22px;
  font-weight: 400;
}
.hero__title em {
  color: var(--ember);
  font-style: italic;
  font-weight: 500;
}
.hero__lede {
  max-width: 50ch;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: rgba(247, 241, 230, 0.88);
  margin-bottom: 36px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s var(--ease);
  border: 1.5px solid transparent;
  font-family: inherit;
}
.btn--primary { background: var(--clay); color: var(--paper); border-color: var(--clay); }
.btn--primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--paper); border-color: rgba(247,241,230,0.5); }
.btn--ghost:hover { background: rgba(247,241,230,0.12); border-color: var(--paper); }

.hero__meta {
  display: flex; gap: 48px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(247, 241, 230, 0.25);
  max-width: 640px;
}
.hero__meta > div {
  display: flex; flex-direction: column; gap: 4px;
}
.hero__meta span {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ember);
}
.hero__meta strong { font-size: var(--text-sm); font-weight: 500; color: var(--paper); }

/* ───────── STORY ───────── */
.story {
  padding: var(--section-y) var(--gut);
  max-width: 1280px;
  margin: 0 auto;
}
.story__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.story__copy h2 { margin-bottom: 24px; max-width: 14ch; }
.story__copy p {
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 46ch;
}
.story__image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 30px 60px -20px rgba(42, 29, 20, 0.35);
}
.story__image img { width: 100%; height: 100%; object-fit: cover; }
.story__image::after {
  content: '';
  position: absolute; inset: 12px;
  border: 1px solid rgba(247, 241, 230, 0.4);
  pointer-events: none;
}

/* ───────── GALLERY / CAROUSEL ───────── */
.gallery {
  background: var(--cream);
  padding: var(--section-y) 0;
  border-block: 1px solid var(--line);
}
.gallery__head {
  max-width: 1280px;
  margin: 0 auto 56px;
  padding: 0 var(--gut);
}
.gallery__head h2 { max-width: 10ch; }

.carousel {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gut);
}
.carousel__track {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 30px 60px -25px rgba(42, 29, 20, 0.4);
}
.carousel__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
.carousel__slide[data-active] {
  opacity: 1;
  pointer-events: auto;
}
.carousel__slide img {
  width: 100%; height: 100%; object-fit: cover;
}
.carousel__slide figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 28px 24px;
  background: linear-gradient(to top, rgba(20,10,5,0.85), transparent);
  color: var(--paper);
  font-size: var(--text-sm);
  font-family: 'Fraunces', serif;
  font-style: italic;
  letter-spacing: 0.01em;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(251, 247, 239, 0.95);
  color: var(--ink);
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .2s var(--ease), background .2s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.carousel__btn:hover { background: var(--paper); transform: translateY(-50%) scale(1.08); }
.carousel__btn--prev { left: calc(var(--gut) - 8px); }
.carousel__btn--next { right: calc(var(--gut) - 8px); }

.carousel__dots {
  display: flex; justify-content: center; gap: 10px;
  margin-top: 28px;
}
.carousel__dots button {
  width: 28px; height: 3px;
  border: none; cursor: pointer;
  background: rgba(42, 29, 20, 0.2);
  transition: background .2s;
  padding: 0;
}
.carousel__dots button[aria-current="true"] {
  background: var(--clay);
}

/* ───────── MENU ───────── */
.menu {
  padding: var(--section-y) var(--gut);
  max-width: 980px;
  margin: 0 auto;
}
.menu__head { text-align: center; margin-bottom: 56px; }
.menu__head h2 { margin-bottom: 16px; }
.menu__note {
  color: var(--muted);
  font-size: var(--text-sm);
  max-width: 52ch;
  margin: 0 auto;
}
.menu__list { display: flex; flex-direction: column; gap: 0; }

.menu-section {
  border-top: 1px solid var(--line);
}
.menu-section:last-child { border-bottom: 1px solid var(--line); }

.menu-section summary {
  list-style: none;
  cursor: pointer;
  padding: 28px 0;
  display: grid;
  grid-template-columns: 48px 1fr 28px;
  align-items: center;
  gap: 20px;
  transition: padding-left .3s var(--ease);
}
.menu-section summary::-webkit-details-marker { display: none; }
.menu-section summary:hover { padding-left: 6px; }

.menu-section__num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: var(--text-base);
  color: var(--clay);
  font-weight: 500;
}
.menu-section__title {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.menu-section__chev {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--clay);
  transition: transform .35s var(--ease);
  display: grid; place-items: center;
  width: 28px; height: 28px;
  line-height: 1;
}
.menu-section[open] .menu-section__chev {
  transform: rotate(45deg);
}

.menu-section__body {
  padding: 8px 0 36px 68px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 48px;
  animation: slideDown .45s var(--ease);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.menu-section__intro {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: var(--text-sm);
  font-style: italic;
  font-family: 'Fraunces', serif;
  margin-bottom: 4px;
}

.dish__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.dish__head h3 {
  font-size: var(--text-base);
  font-family: 'Satoshi', sans-serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.dish__head::after {
  content: '';
  flex: 1;
  border-bottom: 1px dotted var(--line);
  transform: translateY(-3px);
}
.dish__price {
  font-family: 'Fraunces', serif;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--clay);
  flex-shrink: 0;
}
.dish p {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ───────── VISIT ───────── */
.visit {
  background: var(--ink);
  color: var(--paper);
  padding: var(--section-y) var(--gut);
}
.visit__grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.visit h2 { color: var(--paper); margin-bottom: 40px; }
.visit .eyebrow { color: var(--ember); }
.visit__block { margin-bottom: 32px; }
.visit__block h3 {
  font-family: 'Satoshi', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ember);
  margin-bottom: 8px;
  font-weight: 600;
}
.visit__block p {
  font-size: var(--text-lg);
  font-family: 'Fraunces', serif;
  line-height: 1.4;
  color: var(--paper);
}
.visit__block a { color: var(--paper); }
.visit__block a:hover { color: var(--ember); }

.link-arrow {
  display: inline-block;
  margin-top: 10px;
  font-family: 'Satoshi', sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ember);
  transition: gap .25s, transform .25s;
}
.link-arrow:hover { color: var(--paper); }

.hours {
  width: 100%;
  font-size: var(--text-sm);
  border-collapse: collapse;
  margin-top: 6px;
  font-family: 'Satoshi', sans-serif;
}
.hours td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(247, 241, 230, 0.12);
  color: rgba(247, 241, 230, 0.85);
}
.hours td:last-child { text-align: right; color: var(--paper); }
.hours em { color: var(--ember); font-family: 'Fraunces', serif; }

.visit__actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.visit__map { position: relative; }
.map-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
}
.map-card__img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: sepia(0.15) saturate(1.1) brightness(0.85);
}
.map-card__img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(192, 83, 43, 0.35), rgba(20, 10, 5, 0.5));
}
.map-card__pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: var(--clay);
  color: var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(192, 83, 43, 0.25), 0 12px 30px rgba(0,0,0,0.4);
  animation: pinPulse 2.2s ease-in-out infinite;
}
@keyframes pinPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(192, 83, 43, 0.25), 0 12px 30px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 0 14px rgba(192, 83, 43, 0.08), 0 12px 30px rgba(0,0,0,0.4); }
}

/* ───────── FOOTER ───────── */
.footer {
  background: #1a110b;
  color: rgba(247, 241, 230, 0.7);
  padding: 56px var(--gut) 24px;
  font-size: var(--text-sm);
}
.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(247, 241, 230, 0.1);
}
.footer__brand .logo__name {
  color: var(--paper);
  font-size: 22px;
  display: block;
  margin-bottom: 6px;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer__cols h4 {
  font-family: 'Satoshi', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ember);
  margin-bottom: 10px;
}
.footer__cols a:hover { color: var(--ember); }
.footer__base {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: var(--text-xs);
  color: rgba(247, 241, 230, 0.5);
}

/* ───────── RESPONSIVE ───────── */
@media (max-width: 880px) {
  .nav, .header__cta { display: none; }
  .nav__toggle { display: flex; }
  .header__inner { gap: 12px; }

  .nav--open {
    display: flex;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    padding: 32px var(--gut);
    gap: 18px;
    border-top: 1px solid var(--line);
  }
  .nav--open a { font-size: var(--text-xl); font-family: 'Fraunces', serif; }

  .story__grid,
  .visit__grid {
    grid-template-columns: 1fr;
  }
  .story__image { aspect-ratio: 4 / 3; }
  .map-card { aspect-ratio: 16/10; }

  .menu-section__body {
    grid-template-columns: 1fr;
    padding-left: 0;
    gap: 22px;
  }
  .menu-section summary { grid-template-columns: 36px 1fr 24px; gap: 14px; }
  .menu-section__title { font-size: 22px; }

  .carousel__btn--prev { left: 8px; }
  .carousel__btn--next { right: 8px; }
  .carousel__btn { width: 40px; height: 40px; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .footer__base { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .hero__meta { gap: 20px; }
  .hero__meta > div { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
