/* Fogón: styles.
   Palette from the kitchen itself: the night over the patio, kraft paper from the colmado,
   embers, ripe plátano, soot, and the navy rim of the enamel (peltre) plates.
   Reasons are written in PROJECT.md. */

:root {
  --night: #10292B;      /* patio at night, behind the fire */
  --night-2: #17383A;
  --kraft: #D8C29D;      /* butcher / colmado paper */
  --kraft-2: #CBB389;
  --soot: #231A14;       /* hollín */
  --brasa: #E8742A;      /* ember, used on dark grounds */
  --brasa-deep: #8E3512; /* ember on paper, large text only */
  --platano: #F2C14E;
  --peltre: #1D3557;     /* navy rim of enamel plates, and the blue door */
  --enamel: #EFE8DA;

  --font-display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --font-text: "Literata", Georgia, serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--kraft);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--platano); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--platano); color: var(--soot); padding: .7rem 1rem; }
.skip:focus { top: 1rem; }

/* ---------- Greenhouse ribbon ---------- */
.ribbon {
  margin: 0;
  background: var(--platano);
  color: var(--soot);
  font-family: var(--font-display);
  font-size: .8125rem;
  font-variation-settings: "wdth" 85;
  text-align: left;
  padding: 0 var(--gutter);
}
.ribbon a { display: inline-block; padding: .6rem 0; min-height: 44px; line-height: 1.6; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; gap: 1rem;
  padding: .5rem var(--gutter);
  position: relative; z-index: 5;
}
.wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem;
  font-variation-settings: "wdth" 75; text-decoration: none; color: var(--kraft);
  padding: .4rem 0; margin-right: auto;
}
.top nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem 1.4rem; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-family: var(--font-display); font-size: 1rem; }
.top nav a:hover { color: var(--platano); }
.top nav .nav-book { color: var(--brasa); }
.langs { display: flex; }
.langs button {
  min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--kraft);
  font: 600 .85rem var(--font-display); cursor: pointer; opacity: .65;
}
.langs button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--brasa); text-decoration-thickness: 2px; }

@media (max-width: 760px) {
  .top nav li:not(:last-child) { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: .8rem 1.5rem;
  background: var(--brasa); color: var(--soot);
  font: 700 1.05rem var(--font-display); text-decoration: none;
  border: 0; border-radius: 999px 999px 999px 6px; cursor: pointer;
  box-shadow: 0 4px 0 var(--brasa-deep);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--brasa-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brasa-deep); }
.link { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 4px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(88svh, 52rem);
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(9rem, 22vw, 6rem);
  isolation: isolate;
  overflow-x: clip; /* the fogón may hang over the right edge and into the next section */
}
.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 60%; z-index: -2;
  background: radial-gradient(60% 70% at 70% 100%, rgba(232, 116, 42, .28), transparent 70%);
}
.hero-inner { position: relative; max-width: 62rem; }
.hero-lede, .hero-actions, .hero-hours { position: relative; z-index: 3; }
.hero-kicker { font-style: italic; font-size: 1.05rem; color: var(--platano); margin-bottom: .5rem; }
.hero-title {
  font-size: clamp(8rem, 34vw, 22rem);
  font-weight: 800; font-variation-settings: "wdth" 75, "opsz" 96;
  line-height: .78; letter-spacing: -.035em; margin: 0 0 .18em -.04em;
  color: var(--kraft);
}
.hero-lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.5; max-width: 30rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin: 2rem 0 1.5rem; }
.hero-hours { font-size: .95rem; opacity: .85; max-width: 24rem; }
.hero-fogon {
  position: absolute; z-index: 2;
  right: clamp(-3rem, -2vw, 0rem); bottom: -1.5rem;
  width: clamp(15rem, 40vw, 38rem); height: auto;
  pointer-events: none;
}
@media (min-width: 1000px) {
  .hero-fogon { width: clamp(22rem, 34vw, 34rem); bottom: 1.5rem; right: var(--gutter); }
}
@media (max-width: 760px) {
  .hero-fogon { width: 15.5rem; right: -1.5rem; bottom: -3.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .flames path { transform-box: fill-box; transform-origin: 50% 100%; animation: lick 1.6s ease-in-out infinite alternate; }
  .flames path:nth-child(2n) { animation-duration: 1.1s; animation-delay: -.4s; }
  .flames path:nth-child(3n) { animation-duration: 1.9s; }
  .steam path { animation: rise 4s ease-in-out infinite; }
  .steam path:nth-child(2) { animation-delay: -1.3s; }
  .steam path:nth-child(3) { animation-delay: -2.6s; }
}
@keyframes lick { from { transform: scaleY(.88) skewX(-3deg); } to { transform: scaleY(1.08) skewX(3deg); } }
@keyframes rise { 0% { opacity: 0; transform: translateY(14px); } 40% { opacity: .6; } 100% { opacity: 0; transform: translateY(-26px); } }

/* ---------- the tale ---------- */
.tale {
  background: var(--kraft); color: var(--soot);
  padding: clamp(6rem, 12vw, 10rem) var(--gutter) clamp(4rem, 9vw, 8rem);
  display: grid; gap: 3rem;
}
.tale-head h2 { font-size: clamp(3rem, 9vw, 6.5rem); font-variation-settings: "wdth" 75; font-weight: 800; color: var(--brasa-deep); }
.tale-head p { font-style: italic; margin-top: 1rem; max-width: 20rem; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(3rem, 7vw, 5.5rem); }
.chapter { max-width: var(--measure); }
.ch-num { font-style: italic; font-size: 1rem; margin-bottom: .4rem; }
.chapter h3 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-variation-settings: "wdth" 85; margin-bottom: 1rem; }
.chapter p:last-child { margin: 0; font-size: 1.1rem; line-height: 1.7; }
.chapter-quote { max-width: 46rem; }
.chapter-quote blockquote { margin: 0; }
.chapter-quote p {
  font-family: var(--font-display); font-weight: 700; font-variation-settings: "wdth" 80;
  font-size: clamp(2.3rem, 6vw, 4.6rem) !important; line-height: 1 !important; letter-spacing: -.02em;
  color: var(--brasa-deep); margin: 0 0 1rem !important;
}
.chapter-quote footer { font-style: italic; max-width: 22rem; }

@media (min-width: 900px) {
  .tale { grid-template-columns: 4fr 8fr; column-gap: 4rem; }
  .tale-head { position: sticky; top: 2rem; align-self: start; }
  .chapter:nth-child(1) { margin-left: 0; }
  .chapter:nth-child(2) { margin-left: 22%; }
  .chapter-quote { margin-left: -8%; }
  .chapter:nth-child(4) { margin-left: 10%; }
  .chapter:nth-child(5) { margin-left: 30%; }
}

/* ---------- menu (plates) ---------- */
.menu { background: var(--night); padding-top: clamp(4rem, 9vw, 7rem); }
.menu-head { padding: 0 var(--gutter); max-width: 44rem; }
.menu-head h2 { font-size: clamp(3rem, 9vw, 6.5rem); font-variation-settings: "wdth" 75; font-weight: 800; color: var(--brasa); margin-bottom: 1.25rem; }
.menu-price { font-family: var(--font-display); font-size: 1.15rem; color: var(--platano); }

/* Static layout (no JS, or reduced motion): a plain list of plates. */
.courses { list-style: none; margin: 0; padding: 3rem var(--gutter) 5rem; display: grid; gap: 4rem; }
.course { display: grid; gap: 1.5rem; align-items: center; }
.plate { margin: 0; width: min(100%, 26rem); }
.plate img { width: 100%; height: auto; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .45)); }
.course-n { font-style: italic; color: var(--platano); margin-bottom: .4rem; }
.course-text h3 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-variation-settings: "wdth" 85; margin-bottom: .9rem; }
.course-text p:last-child { max-width: 28rem; margin: 0; }
.stack-count { display: none; }
@media (min-width: 760px) {
  .course { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem; }
  .course:nth-child(even) .plate { order: 2; justify-self: end; }
}

/* Stack mode: the plates turn one by one in 3D (enabled by JS). */
.stack-on .stack { position: relative; }
.stack-on .stack-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  perspective: 1500px; perspective-origin: 50% 35%;
}
.stack-on .courses { position: absolute; inset: 0; padding: 0; display: block; }
.stack-on .course {
  position: absolute; inset: 0; display: grid;
  grid-template-rows: 58% 42%; grid-template-columns: 100%; gap: 0;
  pointer-events: none; transform-style: preserve-3d;
}
.stack-on .plate {
  align-self: center; justify-self: center; order: 0 !important;
  width: min(76vw, 44svh, 34rem);
  transform-style: preserve-3d; will-change: transform, opacity;
  backface-visibility: hidden;
}
.stack-on .course-text {
  align-self: start; padding: 0 var(--gutter);
  opacity: 0; transform: translateY(14px); transition: none;
}
.stack-on .course.is-active .course-text { opacity: 1; transform: none; pointer-events: auto; transition: opacity .4s .05s, transform .4s .05s; }
.stack-on .course-text h3 { font-size: clamp(1.8rem, 7vw, 3.4rem); margin-bottom: .5rem; }
.stack-on .course-text p:last-child { font-size: 1rem; line-height: 1.5; }
.stack-on .stack-count {
  display: block; position: absolute; right: var(--gutter); top: 1.25rem; margin: 0;
  font: 700 1rem var(--font-display); color: var(--platano);
}
@media (min-width: 760px) {
  .stack-on .course { grid-template-rows: 100%; grid-template-columns: 56% 44%; align-items: center; }
  .stack-on .plate { width: min(42vw, 66svh, 36rem); }
  .stack-on .course-text { align-self: center; padding: 0 var(--gutter) 0 0; max-width: 30rem; }
  .stack-on .stack-count { top: auto; bottom: 2rem; }
}
@media (max-width: 759px) and (max-height: 640px) {
  .stack-on .course-text p:last-child { font-size: .92rem; }
}

/* ---------- carta + week ---------- */
.carta {
  background: var(--kraft); color: var(--soot);
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  display: grid; gap: 3.5rem;
}
.carta h2 { font-size: clamp(2.4rem, 6vw, 4rem); font-variation-settings: "wdth" 80; }
.carta-note { font-style: italic; margin-top: .8rem; }
.dishes { margin: 2rem 0 0; }
.dishes div { display: flex; align-items: baseline; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid rgba(35, 26, 20, .25); }
.dishes dt { flex: 1 1 auto; }
.dishes dd { margin: 0; font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.dishes div::after { content: none; }

.week {
  background: var(--enamel);
  border: 9px solid var(--peltre);
  border-radius: 2.2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  align-self: start;
  position: relative;
  transform: rotate(-1.2deg);
}
.week::before, .week::after { /* the enamel chips */
  content: ""; position: absolute; width: 12px; height: 9px; background: var(--soot); border-radius: 50% 40% 60% 45%;
}
.week::before { top: -9px; right: 22%; }
.week::after { bottom: 18%; left: -9px; }
.week h2 { color: var(--peltre); margin-bottom: 1.25rem; }
.days { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.day { display: grid; gap: .2rem; padding: .9rem 0; border-top: 1px dashed rgba(29, 53, 87, .4); }
.day .d { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--peltre); }
.day.off span:last-child { font-style: italic; }
.day.sun .d { color: var(--brasa-deep); }
.week-foot { margin: 0; font-style: italic; font-size: .95rem; }
@media (min-width: 900px) {
  .carta { grid-template-columns: 7fr 5fr; column-gap: 5rem; }
  .week { margin-top: 5rem; }
}

/* ---------- booking ---------- */
.book {
  background: var(--peltre); color: var(--enamel);
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  display: grid; gap: 3rem;
}
.book .ch-num { color: var(--platano); }
.book h2 { font-size: clamp(2.6rem, 7vw, 5rem); font-variation-settings: "wdth" 75; font-weight: 800; margin-bottom: 1.25rem; color: var(--enamel); }
.book-copy p { max-width: 30rem; }
.demo { font-size: .92rem; border-left: 3px solid var(--platano); padding-left: .9rem; }
.book-form { display: grid; gap: 1.25rem; max-width: 34rem; }
.field { display: grid; gap: .4rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field legend { font-family: var(--font-display); font-weight: 600; font-size: 1rem; padding: 0; margin-bottom: .4rem; }
.field input[type="date"], .field input[type="text"], .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .7rem .9rem;
  font: 1rem var(--font-text); color: var(--soot);
  background: var(--enamel); border: 2px solid var(--enamel); border-radius: 10px;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--platano); outline-offset: 2px; }
.party-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.party-row label, .opt { position: relative; cursor: pointer; }
.party-row input, .opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.party-row span {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
  border: 3px solid var(--enamel); font: 700 1.05rem var(--font-display);
  transition: background .15s, color .15s;
}
.party-row input:checked + span { background: var(--enamel); color: var(--peltre); box-shadow: inset 0 0 0 4px var(--peltre), 0 0 0 0 var(--enamel); }
.party-row input:focus-visible + span, .opt input:focus-visible + span { outline: 3px solid var(--platano); outline-offset: 3px; }
.which { display: flex; flex-wrap: wrap; gap: .5rem; }
.which legend { width: 100%; }
.opt span { display: inline-flex; align-items: center; min-height: 48px; padding: .5rem 1.1rem; border: 2px solid var(--enamel); border-radius: 999px; }
.opt input:checked + span { background: var(--enamel); color: var(--peltre); }
.form-error { color: var(--soot); background: var(--platano); padding: .6rem .9rem; border-radius: 8px; margin: 0; }
.btn-wide { justify-self: start; }
@media (min-width: 900px) {
  .book { grid-template-columns: 5fr 6fr; column-gap: 5rem; }
}

/* ---------- editorial footer ---------- */
.foot { padding: clamp(4rem, 9vw, 7rem) var(--gutter) 2rem; background: var(--night); }
.fin { font-style: italic; font-size: clamp(1.2rem, 2.4vw, 1.6rem); max-width: 30rem; }
.foot-mark {
  font-family: var(--font-display); font-weight: 800; font-variation-settings: "wdth" 75, "opsz" 96;
  font-size: clamp(6rem, 33vw, 30rem); line-height: .75; letter-spacing: -.045em;
  color: var(--brasa); margin: 2rem 0 3rem -.05em;
}
.foot-cols { display: grid; gap: 2rem; border-top: 1px solid rgba(216, 194, 157, .3); padding-top: 2rem; }
.foot h2 { font-size: 1.15rem; color: var(--platano); margin-bottom: .6rem; }
.foot-cols p { max-width: 22rem; }
.contact { list-style: none; margin: 0; padding: 0; }
.contact a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 4px; }
.colophon { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 3rem 0 0; font-size: .9rem; opacity: .85; }
.colophon a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; }
@media (min-width: 760px) { .foot-cols { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 404 ---------- */
.lost { min-height: 80svh; padding: 4rem var(--gutter); display: grid; align-content: center; gap: 1rem; }
.lost h1 { font-size: clamp(3rem, 12vw, 8rem); font-variation-settings: "wdth" 75; font-weight: 800; color: var(--brasa); }
.lost p { max-width: 28rem; font-size: 1.15rem; }
.lost .btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* warm light from below the pass, only in stack mode */
.stack-on .stack-stage { background: radial-gradient(48% 55% at 28% 62%, rgba(232, 116, 42, .14), transparent 70%); }
@media (max-width: 759px) { .stack-on .stack-stage { background: radial-gradient(70% 40% at 50% 36%, rgba(232, 116, 42, .14), transparent 70%); } }
