/* ============================================================
   Direction A — Festive Mercado
   Warm cream + vibrant sun/fiesta/teal accents
   Bold serif headlines, decorative ribbons, layered photos
   ============================================================ */

:root {
  /* Palette (overwritten by applyPalette()) */
  --sun: #F5B81C;
  --fiesta: #E63A1A;
  --accent: #1FA9B5;
  --deep: #1B2C5B;
  --ink: #1a1208;

  /* Surfaces */
  --cream: #fbf2e1;
  --cream-2: #f6e7c8;
  --cream-edge: #f0d9a8;
  --paper: #fffaf0;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 2px 4px rgba(60,30,10,.04), 0 10px 30px rgba(60,30,10,.08);
  --shadow-deep: 0 6px 12px rgba(60,30,10,.10), 0 30px 60px rgba(60,30,10,.18);

  --serif: "DM Serif Display", "Playfair Display", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --script: "Caveat", cursive;

  --max: 1140px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.dir-a {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(900px 600px at 90% -10%, color-mix(in oklab, var(--sun) 25%, transparent) 0%, transparent 60%),
    radial-gradient(700px 500px at -10% 20%, color-mix(in oklab, var(--fiesta) 15%, transparent) 0%, transparent 60%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* =================== TOPBAR =================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 14px 32px;
  background: color-mix(in oklab, var(--cream) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 8%, transparent);
}
.topbar-brand img { height: 44px; }
.topbar-nav {
  display: flex; gap: 28px;
  justify-content: center;
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
}
.topbar-nav a {
  color: var(--ink); opacity: 0.78;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: opacity .15s, border-color .15s;
}
.topbar-nav a:hover { opacity: 1; border-bottom-color: var(--fiesta); }

.topbar-order {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--fiesta);
  color: #fff;
  font-weight: 700; font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px color-mix(in oklab, var(--fiesta) 35%, transparent);
  white-space: nowrap;
}
.topbar-order .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--sun) 40%, transparent);
}
.topbar-order:hover { transform: translateY(-1px); }

/* =================== HERO =================== */
.hero {
  position: relative;
  padding: 60px 32px 80px;
  overflow: hidden;
}

/* Marquee ribbon */
.hero-ribbon {
  position: absolute; top: 18px; left: 0; right: 0;
  display: flex; gap: 28px;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: color-mix(in oklab, var(--ink) 60%, transparent);
  text-transform: uppercase;
  padding: 8px 0;
  border-top: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  background: color-mix(in oklab, var(--cream-2) 50%, transparent);
}
.hero-ribbon span:nth-child(odd) { color: var(--fiesta); }

.hero-grid {
  max-width: var(--max);
  margin: 80px auto 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em;
  color: color-mix(in oklab, var(--ink) 70%, transparent);
}
.hero-eyebrow-pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 7.2vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--ink);
}
.hero-title em {
  color: var(--fiesta);
  font-style: italic;
  position: relative;
}
.hero-title em::after {
  content: "";
  position: absolute; left: -2%; right: -2%; bottom: -2px;
  height: 10px;
  background: var(--sun);
  z-index: -1;
  border-radius: 2px;
  transform: rotate(-1deg);
}
.hero-amp {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 17px;
  max-width: 460px;
  margin: 0 0 28px;
  color: color-mix(in oklab, var(--ink) 78%, transparent);
}

.hero-cta {
  display: flex; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
  border: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 6px 20px color-mix(in oklab, var(--ink) 30%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--fiesta); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid color-mix(in oklab, var(--ink) 20%, transparent);
}
.btn-ghost:hover { background: var(--paper); }

.hero-meta {
  display: flex; gap: 32px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
}
.hero-meta strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--ink) 55%, transparent);
  font-weight: 700;
  margin-bottom: 4px;
}
.hero-meta span, .hero-meta a {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}

/* Hero photo stage */
.hero-stage {
  position: relative;
  height: 520px;
}
.hero-photo {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep);
  transition: transform .3s;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-a {
  width: 70%; height: 380px;
  top: 0; right: 0;
  transform: rotate(2deg);
}
.hero-photo-b {
  width: 52%; height: 280px;
  bottom: 0; left: 0;
  transform: rotate(-3deg);
  border: 6px solid var(--cream);
  z-index: 2;
}
.hero-photo-c {
  width: 40%; height: 180px;
  top: 38%; right: -4%;
  transform: rotate(4deg);
  z-index: 3;
  border: 5px solid var(--cream);
}
.hero-photo:hover { transform: rotate(0); }

.hero-burst {
  position: absolute;
  top: -20px; left: -10px;
  width: 110px; height: 110px;
  color: var(--sun);
  z-index: 4;
  animation: spin 28s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-stamp {
  position: absolute;
  bottom: 30px; right: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--fiesta);
  color: var(--cream);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: var(--serif);
  text-align: center;
  z-index: 5;
  transform: rotate(-8deg);
  box-shadow: var(--shadow-deep);
  border: 3px dashed color-mix(in oklab, var(--cream) 50%, var(--fiesta));
}
.hero-stamp .stamp-top {
  font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}
.hero-stamp .stamp-big {
  font-size: 32px; line-height: 1;
  margin: 4px 0;
}
.hero-stamp .stamp-bot {
  font-size: 9px; letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* =================== SECTIONS =================== */
.section { padding: 90px 32px; }
.section-head {
  max-width: var(--max);
  margin: 0 auto 48px;
}
.section-eyebrow {
  display: inline-block;
  font-family: var(--script);
  font-size: 24px;
  color: var(--fiesta);
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  max-width: 18ch;
}
.section-title em { color: var(--fiesta); font-style: italic; }
.section-lede {
  font-size: 17px;
  max-width: 50ch;
  color: color-mix(in oklab, var(--ink) 70%, transparent);
}

/* =================== DISHES =================== */
.dishes { background: linear-gradient(180deg, transparent 0, color-mix(in oklab, var(--cream-2) 70%, transparent) 100%); }

.dish-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.dish {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.dish:hover { transform: translateY(-4px); box-shadow: var(--shadow-deep); }
.dish-img { height: 220px; overflow: hidden; }
.dish-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.dish:hover .dish-img img { transform: scale(1.04); }
.dish-body {
  padding: 22px 24px 24px;
  display: flex; flex-direction: column;
  gap: 8px; flex: 1;
}
.dish-tag {
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.dish h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  margin: 0;
}
.dish p {
  font-size: 14.5px;
  color: color-mix(in oklab, var(--ink) 72%, transparent);
  margin: 0;
  flex: 1;
}
.dish-price {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--fiesta);
  margin-top: 6px;
}
.dish-promo {
  background: var(--ink);
  color: var(--cream);
  padding: 0;
}
.dish-promo .dish-body {
  padding: 32px;
  justify-content: center;
}
.dish-promo .dish-tag { color: var(--sun); }
.dish-promo h3 { color: var(--cream); font-size: 32px; }
.dish-promo p { color: color-mix(in oklab, var(--cream) 80%, transparent); }
.dish-link {
  color: var(--sun);
  font-weight: 600;
  margin-top: 8px;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}

/* =================== MENU EXPLORER =================== */
.menu { background: var(--cream-2); }
.menu-head { margin-bottom: 32px; }

.menu-explorer {
  max-width: var(--max);
  margin: 0 auto;
}

.menu-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  padding: 8px;
  background: var(--paper);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  justify-content: center;
}
.menu-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: none;
  background: transparent;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: color-mix(in oklab, var(--ink) 75%, transparent);
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.menu-pill:hover { color: var(--ink); }
.menu-pill.is-active {
  background: var(--ink);
  color: var(--cream);
}
.menu-pill-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in oklab, currentColor 12%, transparent);
}
.menu-pill.is-active .menu-pill-count {
  background: color-mix(in oklab, var(--sun) 90%, transparent);
  color: var(--ink);
}

.menu-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 56px;
}
.menu-item {
  padding: 18px 0;
  border-bottom: 1px dashed color-mix(in oklab, var(--ink) 18%, transparent);
}
.menu-item-head {
  display: flex; align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.menu-item-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.1;
  margin: 0;
  flex: 0 0 auto;
}
.menu-item-dot {
  flex: 1 1 auto;
  height: 1px;
  border-bottom: 2px dotted color-mix(in oklab, var(--ink) 25%, transparent);
  margin: 0 4px;
  transform: translateY(-4px);
}
.menu-item-price {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--fiesta);
  flex: 0 0 auto;
}
.menu-item-desc {
  font-size: 14px;
  line-height: 1.5;
  color: color-mix(in oklab, var(--ink) 65%, transparent);
  margin: 0;
  max-width: 50ch;
}

/* =================== GALLERY =================== */
.gallery-section {
  background:
    radial-gradient(400px 200px at 80% 100%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 70%),
    var(--cream);
}
.gallery {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 140px;
}
.gallery-tile {
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform .25s, box-shadow .25s;
}
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-deep); }
.gallery-tile:hover img { transform: scale(1.05); }

/* Asymmetric mosaic */
.gallery-tile:nth-child(1)  { grid-column: span 3; grid-row: span 2; }
.gallery-tile:nth-child(2)  { grid-column: span 2; }
.gallery-tile:nth-child(3)  { grid-column: span 1; }
.gallery-tile:nth-child(4)  { grid-column: span 2; }
.gallery-tile:nth-child(5)  { grid-column: span 2; grid-row: span 2; }
.gallery-tile:nth-child(6)  { grid-column: span 2; }
.gallery-tile:nth-child(7)  { grid-column: span 2; }
.gallery-tile:nth-child(8)  { grid-column: span 2; }
.gallery-tile:nth-child(9)  { grid-column: span 2; }
.gallery-tile:nth-child(10) { grid-column: span 3; grid-row: span 2; }
.gallery-tile:nth-child(11) { grid-column: span 3; }
.gallery-tile:nth-child(12) { grid-column: span 3; }
.gallery-tile:nth-child(13) { grid-column: span 2; }
.gallery-tile:nth-child(14) { grid-column: span 2; }
.gallery-tile:nth-child(15) { grid-column: span 2; }
.gallery-tile:nth-child(16) { grid-column: span 3; }
.gallery-tile:nth-child(17) { grid-column: span 3; }
.gallery-tile:nth-child(18) { grid-column: span 2; }
.gallery-tile:nth-child(19) { grid-column: span 2; }
.gallery-tile:nth-child(20) { grid-column: span 2; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20,12,4,0.92);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px);
}
.lightbox-figure {
  margin: 0;
  max-width: 80vw;
  max-height: 82vh;
  display: flex; flex-direction: column; gap: 14px;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 80px rgba(0,0,0,.5);
}
.lightbox-figure figcaption {
  text-align: center;
  color: color-mix(in oklab, #fff 80%, transparent);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lightbox-close { top: 24px; right: 24px; font-size: 22px; }
.lightbox-prev  { left: 24px; top: 50%; transform: translateY(-50%); font-size: 32px; }
.lightbox-next  { right: 24px; top: 50%; transform: translateY(-50%); font-size: 32px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.2); }

/* =================== VISIT =================== */
.visit {
  background: var(--ink);
  color: var(--cream);
  position: relative;
}
.visit .section-eyebrow { color: var(--sun); }
.visit .section-title { color: var(--cream); }
.visit .section-title em { color: var(--sun); }

.visit-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: stretch;
}
.visit-info { display: flex; flex-direction: column; gap: 22px; }
.visit-block {}
.visit-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
  font-weight: 700;
  margin-bottom: 8px;
}
.visit-address, .visit-phone {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.2;
  color: var(--cream);
  display: block;
  transition: color .15s;
}
.visit-address:hover, .visit-phone:hover { color: var(--sun); }

.hours-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 2px;
}
.hours-row {
  display: flex; align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  font-size: 14.5px;
}
.hours-day { font-weight: 500; min-width: 90px; }
.hours-dots {
  flex: 1 1 auto;
  border-bottom: 1px dotted color-mix(in oklab, var(--cream) 25%, transparent);
  transform: translateY(-4px);
}
.hours-time {
  font-family: var(--serif);
  color: color-mix(in oklab, var(--cream) 85%, transparent);
}
.hours-row.is-today { color: var(--sun); }
.hours-row.is-today .hours-day { font-weight: 700; }
.hours-row.is-today .hours-time { color: var(--sun); }
.hours-pip {
  margin-left: 10px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--sun);
  color: var(--ink);
  padding: 3px 8px;
  border-radius: 999px;
}

.visit-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 12px;
}
.visit .btn-primary {
  background: var(--fiesta);
  color: var(--cream);
}
.visit .btn-primary:hover { background: var(--sun); color: var(--ink); }
.visit .btn-ghost {
  border-color: color-mix(in oklab, var(--cream) 30%, transparent);
  color: var(--cream);
}
.visit .btn-ghost:hover { background: color-mix(in oklab, var(--cream) 10%, transparent); }

.visit-map {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  box-shadow: var(--shadow-deep);
}
.visit-map iframe { filter: saturate(0.85) contrast(1.05); }
.visit-map-pin {
  position: absolute;
  bottom: 18px; left: 18px;
  pointer-events: none;
}
.pin-card {
  background: var(--paper);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-deep);
  border-left: 4px solid var(--fiesta);
}
.pin-name { font-family: var(--serif); font-size: 17px; line-height: 1; }
.pin-sub  { font-size: 12px; color: color-mix(in oklab, var(--ink) 65%, transparent); margin-top: 4px; }

/* =================== FOOTER =================== */
.footer {
  background: var(--cream-2);
  color: var(--ink);
  padding: 56px 32px 28px;
  border-top: 1px solid color-mix(in oklab, var(--ink) 8%, transparent);
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
}
.footer-brand img { height: 78px; margin-bottom: 14px; }
.footer-brand p {
  font-size: 14.5px;
  max-width: 28ch;
  color: color-mix(in oklab, var(--ink) 70%, transparent);
}
.footer-col { font-size: 14.5px; line-height: 1.6; }
.footer-col a { display: inline-block; color: var(--fiesta); font-weight: 600; }
.footer-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--ink) 55%, transparent);
  font-weight: 700;
  margin-bottom: 10px;
}
.footer-bar {
  max-width: var(--max);
  margin: 18px auto 0;
  display: flex; justify-content: space-between;
  font-size: 12.5px;
  color: color-mix(in oklab, var(--ink) 55%, transparent);
}

/* =================== FLOATING ORDER =================== */
.float-order {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--fiesta);
  color: var(--cream);
  border-radius: 999px;
  padding: 14px 22px 14px 18px;
  box-shadow: 0 10px 30px color-mix(in oklab, var(--fiesta) 35%, transparent), 0 2px 6px rgba(0,0,0,.15);
  transition: transform .15s, box-shadow .15s;
}
.float-order:hover { transform: translateY(-2px); }
.float-order-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
}
.float-order-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.float-order-text strong { font-size: 15px; font-weight: 700; }
.float-order-text em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: color-mix(in oklab, var(--cream) 80%, transparent);
}
