/* Fonda Mariquita — minimal contemporary, palette taken from the fonda's own signage */
:root {
  --cream: #F7F1E5;
  --paper: #FFFBF3;
  --ink: #1E1A16;
  --muted: #625A50;
  --red: #B02A2E;
  --red-dark: #8F2024;
  --green: #1D5A3A;
  --line: rgba(30, 26, 22, .14);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Yellowtail", "Brush Script MT", cursive;

  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1240px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, ol, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-stuck { background: rgba(247, 241, 229, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.brand { font: 2rem/1 var(--script); color: var(--red); text-decoration: none; }
.nav { display: none; gap: 32px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; padding: 8px 0; touch-action: manipulation; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
@media (min-width: 720px) { .nav { display: flex; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  background: var(--red); color: #fff; text-decoration: none;
  font-weight: 600; font-size: .98rem; letter-spacing: .01em;
  border-radius: 999px; border: 2px solid var(--red);
  transition: background .25s var(--ease), color .25s var(--ease), transform .15s var(--ease);
  touch-action: manipulation; -webkit-touch-callout: none; user-select: none;
}
.btn:active { transform: scale(.96); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--sm { min-height: 44px; padding: 0 22px; }

/* ---------- Type helpers ---------- */
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
h2 { font: 400 clamp(2.2rem, 5.5vw, 4.2rem)/1.05 var(--serif); letter-spacing: -.005em; }
h2 em { font-style: italic; color: var(--red); }
.section { padding: clamp(72px, 11vw, 150px) var(--gutter); max-width: var(--maxw); margin-inline: auto; }
.section__head { display: grid; gap: 14px; margin-bottom: clamp(36px, 6vw, 72px); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; max-width: var(--maxw); margin-inline: auto;
  padding: 120px var(--gutter) 56px;
  display: grid; gap: 48px; align-items: center;
}
.hero__copy { display: grid; gap: 22px; justify-items: start; }
h1 { font: 400 clamp(2.4rem, 6vw, 4rem)/1 var(--serif); letter-spacing: -.005em; display: grid; }
h1 .line { display: block; overflow: hidden; padding-bottom: .12em; }
h1 .line > span { display: block; }
h1 .script { font: clamp(5.5rem, 15vw, 10.5rem)/.95 var(--script); color: var(--red); letter-spacing: 0; margin-top: -.04em; padding: 0 .12em .12em .1em; margin-left: -.1em; }
.lede { max-width: 34ch; font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 500; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.status.is-open .dot { background: #2E9B57; box-shadow: 0 0 0 0 rgba(46,155,87,.5); animation: pulse 2.2s infinite; }
.status.is-open { color: var(--green); }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(46,155,87,0); } 100% { box-shadow: 0 0 0 0 rgba(46,155,87,0); } }

.hero__visual { position: relative; justify-self: center; width: min(100%, 440px); }
.frame {
  aspect-ratio: 4 / 5; border-radius: 999px 999px 28px 28px; overflow: hidden;
  background: var(--green);
  box-shadow: 0 30px 60px -30px rgba(29, 90, 58, .55);
}
.frame__inner {
  position: absolute; inset: -8% 0; will-change: transform;
  background:
    radial-gradient(circle at 50% 42%, rgba(247,241,229,.14) 0 22%, transparent 22.5%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 4l20 20-20 20L4 24z' fill='none' stroke='%23F7F1E5' stroke-opacity='.16' stroke-width='1.5'/%3E%3C/svg%3E"),
    var(--green);
  display: grid; place-items: center;
}
.frame__inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame__glyph { font: 13rem/1 var(--script); color: rgba(247, 241, 229, .92); transform: translateY(-4%); }
.frame__inner img ~ .frame__glyph { display: none; }

.badge { position: absolute; left: -34px; bottom: 9%; width: clamp(96px, 26vw, 128px); aspect-ratio: 1; }
.badge__bg { fill: var(--cream); }
.badge text { font: 600 9.2px var(--sans); letter-spacing: .14em; text-transform: uppercase; fill: var(--red); }
.badge__star { fill: var(--red); }
.badge { animation: spin 28s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.25fr .75fr; gap: 24px; padding-top: 100px; }
  .hero__visual { justify-self: end; }
}
@media (max-width: 480px) { .badge { left: -10px; } .hero__visual { width: min(82%, 340px); } }
section[id], main [id] { scroll-margin-top: 72px; }

/* ---------- Scroll reveal video (port of the "smooth scroll hero" effect) ---------- */
.reveal { position: relative; height: 80svh; background: var(--cream); }
.reveal__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.reveal__clip { position: absolute; inset: 0; background: #14110e; overflow: hidden; }
.reveal__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; will-change: transform; }
.reveal__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,17,14,.62), rgba(20,17,14,0) 55%); pointer-events: none; }
.reveal__caption { position: absolute; left: var(--gutter); right: var(--gutter); bottom: max(9vh, 40px); color: var(--cream); font: 400 clamp(2.4rem, 8vw, 6.5rem)/1 var(--serif); letter-spacing: 0; }
.reveal__caption span { display: block; margin-bottom: 14px; font: 600 .8rem var(--sans); letter-spacing: .18em; text-transform: uppercase; opacity: .85; }

/* When GSAP is running: pin the stage and start as a small rounded window */
.js:not(.no-anim) .reveal { height: 280vh; }
.js:not(.no-anim) .reveal__clip { clip-path: inset(25% round 28px); }
.js:not(.no-anim) .reveal__caption { opacity: 0; }
@media (max-width: 719px) { .js:not(.no-anim) .reveal { height: 220vh; } .js:not(.no-anim) .reveal__clip { clip-path: inset(14% 8% round 24px); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--red); color: var(--cream); padding: 18px 0; }
.marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; animation: slide 38s linear infinite; will-change: transform; }
.marquee__track span { font: italic 300 clamp(1.4rem, 3.4vw, 2.2rem)/1 var(--serif); white-space: nowrap; }
.marquee__track i { width: 9px; height: 9px; background: var(--cream); transform: rotate(45deg); flex: none; opacity: .7; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Menu ---------- */
.menu__grid { display: grid; gap: 22px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: clamp(26px, 4vw, 48px); }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.card h3 { font: 400 clamp(1.7rem, 3vw, 2.3rem)/1.1 var(--serif); letter-spacing: 0; }
.price { font: 400 clamp(3rem, 7vw, 5rem)/1 var(--serif); color: var(--red); letter-spacing: -.01em; }
.price span { font-size: .45em; vertical-align: top; margin-right: 2px; position: relative; top: .25em; }
.card__label { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 12px; }
.chips { display: flex; flex-wrap: wrap; row-gap: 6px; margin-bottom: 24px; font: 400 1.05rem/1.5 var(--serif); color: var(--ink); }
.chips li { position: relative; padding-right: 1.1em; }
.chips li::after { content: "·"; position: absolute; right: .32em; color: var(--green); opacity: .55; }
.chips li:last-child { padding-right: 0; }
.chips li:last-child::after { content: none; }
.chips:last-child { margin-bottom: 0; }

/* price: tabular digits so the count-up doesn't jitter */
.price { font-variant-numeric: tabular-nums; }

/* ---------- Copyable address (stamp-style feedback) ---------- */
address .copyable {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; padding: 4px 84px 4px 0; margin: 0; cursor: pointer;
  position: relative; border-radius: 6px; transition: color .2s var(--ease);
  touch-action: manipulation; -webkit-touch-callout: none; user-select: none;
}
address .copyable:active { color: var(--red); }
.copyable__tag {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%) translateX(-4px) rotate(-3deg);
  font: 600 .68rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  border: 1.5px solid currentColor; border-radius: 6px; padding: 3px 8px;
  opacity: 0; transition: opacity .2s var(--ease), transform .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  pointer-events: none; white-space: nowrap;
}
address .copyable:focus-visible .copyable__tag, address .copyable:active .copyable__tag { opacity: 1; transform: translateY(-50%) translateX(0) rotate(-3deg); }
address .copyable.is-copied .copyable__tag {
  opacity: 1; transform: translateY(-50%) translateX(0) rotate(-3deg) scale(1.04);
  color: var(--red); border-color: var(--red);
}

.dishes__hint { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); opacity: .7; margin: -4px 0 4px; }
.dishes-hover .dishes__hint { display: none; }

.dishes { counter-reset: d; }
.dish { counter-increment: d; border-bottom: 1px solid var(--line); }
.dish:last-child { border-bottom: 0; }
.dish__row {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: baseline; gap: 16px; width: 100%; padding: 15px 2px;
  font: 400 clamp(1.15rem, 2.2vw, 1.45rem)/1.25 var(--serif); color: inherit;
  transition: padding-left .3s var(--ease), color .3s var(--ease);
  touch-action: manipulation; -webkit-touch-callout: none; user-select: none;
}
.dish__row::before {
  content: counter(d, decimal-leading-zero); font: 600 .75rem var(--sans); letter-spacing: .08em;
  color: var(--red); min-width: 1.6rem; transition: opacity .3s var(--ease);
}
.dish__row:focus-visible { padding-left: 12px; color: var(--red); outline-offset: -2px; }
.dish__row:active { padding-left: 8px; color: var(--red); transition-duration: .1s; }

/* Touch / keyboard fallback: inline accordion under the row */
.dish__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.dish__panel-in { overflow: hidden; min-height: 0; }
.dish__panel img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; margin: 0 2px 18px; opacity: 0; transform: scale(.97); transition: opacity .4s var(--ease) .05s, transform .4s var(--ease) .05s; }
.dish.is-open .dish__panel { grid-template-rows: 1fr; }
.dish.is-open .dish__panel img { opacity: 1; transform: scale(1); }

/* Fine-pointer devices: rows stay flat, a floating preview follows the cursor instead */
.dishes-hover .dish__panel { display: none; }
.card--guisados .card__head { margin-bottom: 2px; }

/* Cursor-follow preview panel (desktop only, positioned by JS) */
.dish-preview {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: clamp(220px, 22vw, 300px); opacity: 0; visibility: hidden;
  transform: translate(-50%, -60%) scale(.92) rotate(-2deg);
  transition: opacity .35s var(--ease), visibility 0s linear .35s;
  will-change: transform;
}
.dish-preview.is-visible { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.dish-preview__frame { border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 28px 50px -20px rgba(30, 26, 22, .45); border: 6px solid var(--paper); background: var(--line); }
.dish-preview__frame img { width: 100%; height: 100%; object-fit: cover; }

.extras li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font: 400 1.2rem/1.25 var(--serif); }
.extras li:last-child { border-bottom: 0; }
.extras small { font: 500 .85rem var(--sans); color: var(--muted); text-align: right; }
.card--extras { background: var(--green); color: var(--cream); border-color: transparent; }
.card--extras .extras li { border-color: rgba(247, 241, 229, .22); }
.card--extras small { color: rgba(247, 241, 229, .78); }

.menu__note { margin-top: 28px; text-align: center; color: var(--muted); font-size: .95rem; }

@media (min-width: 900px) {
  .menu__grid { grid-template-columns: 1fr 1fr; grid-template-areas: "q g" "e g"; align-items: start; }
  .card--quesadillas { grid-area: q; }
  .card--guisados { grid-area: g; }
  .card--extras { grid-area: e; }
}

/* ---------- Statement ---------- */
.statement { position: relative; text-align: center; display: grid; gap: 28px; justify-items: center; perspective: 1400px; }
.statement > * { position: relative; z-index: 1; }
.statement__glow {
  position: absolute; inset: -10% -5%; z-index: 0; pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 38%), rgba(176, 42, 46, .12), transparent 62%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.statement.is-active .statement__glow { opacity: 1; }
.statement__text { font: 400 clamp(2rem, 5.4vw, 4.2rem)/1.14 var(--serif); letter-spacing: -.005em; max-width: 20ch; text-wrap: balance; transform-style: preserve-3d; will-change: transform; }
.statement__text .word {
  opacity: .2; display: inline-block; filter: blur(0px);
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.statement__sub { max-width: 52ch; color: var(--muted); font-size: 1.1rem; }

/* ---------- Visit ---------- */
.visit { background: var(--paper); max-width: none; border-top: 1px solid var(--line); }
.visit > * { max-width: var(--maxw); margin-inline: auto; }
.visit__grid { display: grid; gap: 40px; }
.visit__info { display: grid; gap: 10px; align-content: start; }
.visit__info h3 { font: 600 .78rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--green); margin-top: 22px; }
.visit__info h3:first-child { margin-top: 0; }
.visit__info address, .contact { font: 400 1.35rem/1.45 var(--serif); }
.contact a { text-decoration-color: var(--red); text-underline-offset: 4px; display: inline-block; padding-block: 6px; margin-block: -6px; touch-action: manipulation; }
.contact a:active { color: var(--red); }
.hours { border-collapse: collapse; width: 100%; max-width: 420px; font-size: 1.05rem; }
.hours tr { position: relative; }
.hours th, .hours td { position: relative; text-align: left; padding: 12px 4px; border-bottom: 1px solid var(--line); font-weight: 400; transition: padding-left .3s var(--ease), color .3s var(--ease); }
.hours td { text-align: right; font-weight: 500; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--red); font-weight: 600; }
.hours tr.is-today th::before {
  content: ""; position: absolute; left: -14px; top: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); transform: translateY(-50%); animation: pulse-dot 2.4s infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* Ember bed behind the call-to-action, like coals under a comal */
.ember-cta {
  position: relative; overflow: hidden; margin-top: 26px; border-radius: 20px;
  padding: clamp(20px, 3vw, 28px) clamp(18px, 3vw, 26px);
  background:
    radial-gradient(120% 90% at 15% 115%, rgba(255, 138, 61, .35), transparent 60%),
    radial-gradient(90% 70% at 85% 120%, rgba(176, 42, 46, .3), transparent 65%),
    linear-gradient(180deg, #1c1512, #120d0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.embers { position: absolute; inset: 0; pointer-events: none; }
.ember {
  position: absolute; left: var(--l); bottom: -6px; width: var(--s); height: var(--s);
  border-radius: 50%; background: radial-gradient(circle, #ffe2b0 0%, #ff9142 40%, #c1362f 72%, transparent 100%);
  box-shadow: 0 0 6px 1px rgba(255, 140, 60, .6);
  opacity: 0; animation: ember-rise var(--t) ease-in var(--dl) infinite;
}
@keyframes ember-rise {
  0%   { transform: translate(0, 0) scale(.7); opacity: 0; }
  12%  { opacity: 1; }
  55%  { opacity: .75; }
  100% { transform: translate(var(--dx), -84px) scale(1.15); opacity: 0; }
}
.ember-cta .visit__cta { position: relative; z-index: 1; margin-top: 0; }
.ember-cta .btn--ghost { border-color: rgba(247, 241, 229, .55); color: var(--cream); }
.ember-cta .btn--ghost:active { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.visit__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.visit__map { border-radius: 28px; overflow: hidden; min-height: 340px; border: 1px solid var(--line); background: var(--cream); }
.visit__map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; filter: saturate(.85) contrast(1.02); }
@media (min-width: 900px) { .visit__grid { grid-template-columns: .9fr 1.1fr; gap: 64px; } .visit__map { min-height: 520px; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(247, 241, 229, .78); padding: 48px var(--gutter) max(48px, env(safe-area-inset-bottom)); display: grid; gap: 10px; justify-items: center; text-align: center; font-size: .92rem; }
.footer__brand {
  font: 3rem/1 var(--script); color: var(--cream); position: relative; cursor: default;
  background-image: linear-gradient(var(--red), var(--red)); background-repeat: no-repeat;
  background-position: 0 100%; background-size: 0% 3px; transition: background-size .5s var(--ease);
  padding-bottom: .1em;
}
.footer a { color: var(--cream); text-underline-offset: 4px; transition: opacity .25s var(--ease); touch-action: manipulation; }
.footer a:active { opacity: .6; }
.back-top { display: inline-flex; align-items: center; padding: 8px 4px; margin: -8px -4px; }
.back-top span { display: inline-block; transition: transform .3s var(--ease); }

/* ---------- Animation states (only when GSAP is running) ---------- */
.js:not(.no-anim) [data-reveal],
.js:not(.no-anim) [data-hero] { opacity: 0; }
.js:not(.no-anim) h1 .line > span { opacity: 0; }
.no-anim .statement__text .word { opacity: 1; }

/* ---------- Hover-only affordances: gated so phones never get a "stuck" hover after a tap ---------- */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover::after { transform: scaleX(1); }
  .btn:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); }
  .btn--ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
  address .copyable:hover { color: var(--red); }
  address .copyable:hover .copyable__tag { opacity: 1; transform: translateY(-50%) translateX(0) rotate(-3deg); }
  .dish__row:hover { padding-left: 12px; color: var(--red); }
  .statement__text .word:hover { color: var(--red); transform: translateY(-.05em); }
  .hours tr:hover th, .hours tr:hover td { color: var(--red); }
  .hours tr:hover th { padding-left: 12px; }
  .ember-cta .btn--ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
  .footer__brand:hover { background-size: 100% 3px; }
  .footer a:hover { opacity: .75; }
  .back-top:hover span { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .badge, .status.is-open .dot, .hours tr.is-today th::before, .ember { animation: none; }
  .ember { opacity: .55; bottom: 30%; }
  * { transition-duration: .01ms !important; }
}
