/* ============================================================
   Cocina la Baja 2026 · Festival Gastronómico
   Light-theme editorial poster aesthetic.
   Single accent: brand-blue. Secondary: brand-wine on eyebrows.
   ============================================================ */

:root {
  /* Brand palette extracted from the official 2026 poster */
  --paper:        #EAE0BD;   /* primary cream */
  --paper-soft:   #F0E8CC;   /* lighter cream for breaks */
  --paper-warm:   #E2D6AB;   /* parchment, slightly deeper */
  --paper-edge:   #D8CB9B;   /* hairline/border tone */

  --ink:          #1A1814;   /* near-black warm */
  --ink-soft:     #3D3528;   /* secondary text */
  --ink-mute:     #6B5F4A;   /* tertiary/captions */

  --blue:         #084D75;   /* primary accent — CTAs, links, focus */
  --blue-deep:    #053856;
  --blue-soft:    #1A6890;

  --wine:         #E3445C;   /* eyebrow accent only */
  --wine-deep:    #BC2D44;
  --ochre:        #B89B3A;   /* used in illustrations, occasional detail */
  --olive:        #9FA542;   /* used in illustrations, occasional detail */

  /* Type */
  --font-display: 'Anton', 'Bebas Neue', Impact, sans-serif;
  --font-body:    'DM Sans', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Scale (clamp-based) */
  --t-mega:    clamp(4.5rem, 12vw, 9rem);
  --t-display: clamp(2.75rem, 6vw, 5rem);
  --t-h2:      clamp(2rem, 4.2vw, 3.5rem);
  --t-h3:      clamp(1.25rem, 1.6vw, 1.5rem);
  --t-lead:    clamp(1.1rem, 1.4vw, 1.25rem);
  --t-body:    1rem;
  --t-meta:    0.8125rem;
  --t-eyebrow: 0.75rem;

  /* Spacing */
  --pad-x:     clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(5rem, 10vw, 9rem);
  --max:       1320px;

  /* Edges (documented system: square by default, pill on CTAs) */
  --r-pill:    999px;
}

html { color-scheme: light only; }

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

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

/* Lazy-load fade-in */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
img[loading="lazy"].is-loaded { opacity: 1; }

/* Skeleton background for image containers (visible while loading) */
.bienvenidos-photo,
.venue-photo,
.acto-photo,
.bento-cell,
.gallery-grid .g,
.festival-stack .fs {
  background: linear-gradient(90deg,
    var(--paper-warm) 0%,
    var(--paper-soft) 50%,
    var(--paper-warm) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 2.4s ease-in-out infinite;
}
.bienvenidos-photo:has(img.is-loaded),
.venue-photo:has(img.is-loaded),
.acto-photo:has(img.is-loaded),
.bento-cell:has(img.is-loaded),
.gallery-grid .g:has(img.is-loaded),
.festival-stack .fs:has(img.is-loaded) {
  background: transparent;
  animation: none;
}

@keyframes skeleton-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  img[loading="lazy"] { opacity: 1; transition: none; }
  .bienvenidos-photo,
  .venue-photo,
  .acto-photo,
  .bento-cell,
  .gallery-grid .g,
  .festival-stack .fs { animation: none; }
}

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

button, input { font: inherit; color: inherit; }

::selection { background: var(--blue); color: var(--paper-soft); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.mono { font-family: var(--font-mono); }


/* ---------- Paper grain (fixed, pointer-events:none) ---------- */
.paper-grain {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 60;
  opacity: 0.28;
  mix-blend-mode: multiply;
}


/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

h2 { font-size: var(--t-h2); color: var(--ink); }
h3 { font-size: var(--t-h3); letter-spacing: 0.02em; }

p { color: var(--ink-soft); max-width: 60ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.eyebrow--wine  { color: var(--wine); }
.eyebrow--olive { color: var(--olive); }
.eyebrow--blue  { color: var(--blue); }

.brand-name { color: var(--wine); font-weight: inherit; white-space: nowrap; }
a.brand-name:hover { color: var(--wine-deep); }


/* ---------- Buttons (the only pill-shaped element on the page) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16,1,0.3,1),
              background 0.18s ease,
              color 0.18s ease,
              border-color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--blue);
  color: var(--paper);
}
.btn-primary:hover { background: var(--blue-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-pill { /* nav CTA — smaller */
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  background: var(--wine);
  color: var(--paper);
  flex-shrink: 0;
}
.btn-pill:hover { background: var(--wine-deep); }

/* Right side group (lang + CTA) */
.nav-end {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.lang-btn {
  background: none;
  border: 0;
  padding: 0.25rem 0.2rem;
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color 0.18s ease;
  line-height: 1;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { color: var(--blue); font-weight: 700; }
.lang-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.lang-sep { color: var(--paper-edge); user-select: none; }

@media (max-width: 520px) {
  .nav-end { gap: 0.45rem; }
  .lang-switch { font-size: 0.66rem; gap: 0.25rem; }
  .lang-btn { padding: 0.2rem 0.15rem; }
}
@media (max-width: 400px) {
  .lang-switch { display: none; }
}

@media (max-width: 520px) {
  .btn-pill { padding: 0.5rem 0.85rem; font-size: 0.76rem; }
}
@media (max-width: 380px) {
  .btn-pill { padding: 0.45rem 0.75rem; font-size: 0.72rem; }
}


/* ---------- Site nav ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem var(--pad-x);
  background: rgba(234, 224, 189, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(26,24,20,0.06);
  height: 72px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.site-nav--visible { transform: translateY(0); }

.site-nav .brand img {
  height: 38px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}
@media (max-width: 640px) {
  .site-nav {
    gap: 0.75rem;
    padding-left: max(1.1rem, env(safe-area-inset-left));
    padding-right: max(1.1rem, env(safe-area-inset-right));
  }
  .site-nav .brand img { height: 28px; max-width: 150px; }
}

.site-nav nav {
  display: flex; gap: 1.8rem;
  font-size: 0.92rem;
}
.site-nav nav a {
  position: relative;
  padding: 0.25rem 0;
  color: var(--ink);
}
.site-nav nav a:hover { color: var(--blue); }
.site-nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1);
}
.site-nav nav a:hover::after { transform: scaleX(1); }

@media (max-width: 880px) {
  .site-nav nav { display: none; }
}


/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(1rem, 2.5vw, 2rem) var(--pad-x) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero .hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

/* Decorative radial glow + wood-grain wave traces */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1200px 600px at 50% 110%, rgba(8,77,117,0.06), transparent 60%);
  pointer-events: none; z-index: -2;
}

.hero-waves {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  color: var(--ochre);
  z-index: -1;
  pointer-events: none;
  translate: 0 var(--p, 0px);
  will-change: translate;
}

.section-pattern {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  translate: 0 var(--p, 0px);
  will-change: translate;
}
.bienvenidos .section-pattern { color: var(--olive); }
.actos       .section-pattern { color: var(--ochre); }
.festival    .section-pattern { color: var(--paper); }
.experiencia .section-pattern { color: var(--olive); }
.galeria     .section-pattern { color: var(--ochre); }
.venue       .section-pattern { color: var(--paper); }

/* Ensure section content stacks above patterns */
.bienvenidos > *:not(.section-pattern),
.actos > *:not(.section-pattern),
.festival > *:not(.section-pattern),
.experiencia > *:not(.section-pattern),
.galeria > *:not(.section-pattern),
.venue > *:not(.section-pattern) {
  position: relative;
  z-index: 1;
}

.ilus {
  position: absolute;
  z-index: -1;
  opacity: 0.95;
  user-select: none;
  pointer-events: none;
  height: auto;
}

.ilus--hero-left {
  left: -3vw;
  top: 4vw;
  width: clamp(260px, 32vw, 480px);
  transform: rotate(-4deg);
  translate: 0 var(--p, 0px);
  will-change: translate;
}

.ilus--hero-right {
  right: -3vw;
  bottom: -4vw;
  width: clamp(280px, 34vw, 500px);
  transform: rotate(6deg);
  opacity: 0.95;
  translate: 0 var(--p, 0px);
  will-change: translate;
}

.ilus--hero-mid {
  left: -2vw;
  bottom: 8%;
  width: clamp(220px, 26vw, 380px);
  transform: rotate(-4deg);
  opacity: 0.85;
  translate: 0 var(--p, 0px);
  will-change: translate;
}

.hero-inner {
  max-width: 920px;
  margin: 0 auto;
  gap: 1.6rem;
}

.hero-inner .eyebrow {
  margin-bottom: 0.5rem;
}

.hero-mark {
  width: clamp(260px, 48vw, 760px);
  max-width: min(86vw, 56vh);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(8,77,117,0.18));
}

.hero-date {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  color: var(--blue);
  letter-spacing: 0.04em;
  line-height: 1;
  display: flex; align-items: baseline; justify-content: center; gap: 0.35rem;
  margin-bottom: -0.4rem;
}
.hero-date .date-sep {
  color: var(--wine);
  font-size: 0.7em;
  transform: translateY(-0.2em);
}

.hero-place {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-lead {
  font-size: var(--t-lead);
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: balance;
  line-height: 1.5;
}

.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.countdown-grid {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.3rem, 0.8vw, 0.7rem);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  min-width: clamp(80px, 9vw, 120px);
}

.countdown-num {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: 1;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.countdown-label {
  font-size: 0.86rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.countdown-sep {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  line-height: 1;
  color: var(--wine);
  padding-top: 0.2em;
}

.countdown-today {
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wine);
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--wine);
  border-radius: var(--r-pill);
  animation: countdown-today-pulse 2.4s ease-in-out infinite;
}

@keyframes countdown-today-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.03); }
}

.hero-ctas {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.4rem;
  width: 100%;
  max-width: 480px;
}

@media (max-width: 520px) {
  .hero {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    max-width: 360px;
  }
  .hero-ctas .btn {
    width: 100%;
    padding: 1rem 1.4rem;
    font-size: 0.98rem;
  }
}

/* Floating asymmetric food photo accents in the hero */
.hero-photo-stack {
  position: absolute;
  right: clamp(2vw, 5vw, 5rem);
  top: 50%;
  transform: translateY(-50%);
  translate: 0 var(--p, 0px);
  will-change: translate;
  display: flex; flex-direction: column;
  gap: 1rem;
  z-index: 1;
  pointer-events: none;
}
.hero-photo-stack img {
  width: clamp(120px, 14vw, 200px);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(8,77,117,0.25),
              0 0 0 6px var(--paper),
              0 0 0 7px rgba(8,77,117,0.12);
  transform: rotate(3deg);
  animation: hero-float-1 9s ease-in-out infinite;
}
.hero-photo-stack img:nth-child(2) {
  transform: rotate(-5deg) translateX(-30%);
  animation: hero-float-2 11s ease-in-out infinite;
  margin-left: -2rem;
}

@keyframes hero-float-1 {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-10px); }
}
@keyframes hero-float-2 {
  0%, 100% { transform: rotate(-5deg) translateX(-30%) translateY(0); }
  50%      { transform: rotate(-5deg) translateX(-30%) translateY(8px); }
}

@media (max-width: 1100px) {
  .hero-photo-stack { display: none; }
}

@media (max-width: 640px) {
  .ilus--hero-left  { width: 170px; left: -22vw; top: 6vw; opacity: 0.4; }
  .ilus--hero-mid   { display: none; }
  .ilus--hero-right { width: 180px; right: -26vw; bottom: -8vw; opacity: 0.4; }
}
@media (max-width: 420px) {
  .ilus--hero-left  { width: 150px; left: -28vw; opacity: 0.35; }
  .ilus--hero-right { width: 160px; right: -32vw; opacity: 0.35; }
}


/* ---------- Sponsor strip (just below nav) ---------- */
.sponsor-strip {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: clamp(1.5rem, 3vw, 2.5rem) var(--pad-x);
  background: var(--paper);
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.sponsor-strip .strip-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  flex-wrap: wrap;
}

.sponsor-strip .strip-logos > * {
  display: flex;
  align-items: center;
}

.sponsor-strip .strip-logos img {
  max-height: clamp(34px, 3.6vw, 52px);
  max-width: 100%;
  width: auto;
  object-fit: contain;
  object-position: center;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sponsor-strip .strip-logos a:hover img,
.sponsor-strip .strip-logos > img:hover { opacity: 1; }
.sponsor-strip .strip-logos a:hover img { transform: translateY(-1px); }
.sponsor-strip .strip-logos a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

.sponsor-strip .strip-logos img[src*="dallio"] {
  max-height: clamp(28px, 2.8vw, 42px);
}

.sponsor-strip .strip-presenter a {
  display: inline-flex;
  align-items: center;
}
.sponsor-strip .strip-presenter a:hover .strip-presenter-logo { transform: translateY(-1px); }
.sponsor-strip .strip-presenter a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.strip-presenter-logo { transition: transform 0.2s ease; }

.sponsor-strip .strip-presenter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding-left: clamp(1rem, 2vw, 1.5rem);
  border-left: 1px solid var(--paper-edge);
  flex-shrink: 0;
}

.sponsor-strip .strip-presenter[hidden] { display: none; }

.strip-presenter-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  white-space: nowrap;
}

.strip-presenter-logo {
  height: clamp(40px, 4.4vw, 64px);
  width: auto;
  object-fit: contain;
}

@media (max-width: 860px) {
  .sponsor-strip { flex-direction: column; gap: 1.2rem; padding: 0.9rem 0; }
  .sponsor-strip .strip-logos { justify-content: center; gap: 1.2rem; }
  .sponsor-strip .strip-logos img { max-height: 30px; }
  .sponsor-strip .strip-logos img[src*="dallio"] { max-height: 26px; }
  .sponsor-strip .strip-presenter {
    padding-left: 0;
    padding-top: 0.8rem;
    border-left: 0;
    border-top: 1px solid var(--paper-edge);
    width: 100%;
  }
  .strip-presenter-logo { height: 44px; }
}


/* ---------- Generic section heads ---------- */
.section-head {
  max-width: 880px;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  display: flex; flex-direction: column; gap: 0.9rem;
}
.section-head--center {
  margin-left: auto; margin-right: auto;
  text-align: center; align-items: center;
}
.section-head--left { text-align: left; align-items: flex-start; }

.section-sub {
  font-size: var(--t-lead);
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: pretty;
}


/* ---------- BIENVENIDOS ---------- */
.bienvenidos {
  position: relative;
  padding: var(--section-y) var(--pad-x);
  background: var(--paper);
  overflow: hidden;
}

.bienvenidos-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.bienvenidos-text {
  display: flex; flex-direction: column;
  gap: 1.2rem;
}
.bienvenidos-text h2 {
  font-size: var(--t-h2);
  max-width: 20ch;
}
.bienvenidos-lead {
  font-size: var(--t-lead);
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 56ch;
  text-wrap: pretty;
}

.bienvenidos-photo {
  margin: 0;
  overflow: hidden;
  position: relative;
  aspect-ratio: 5 / 4;
  max-width: 480px;
  width: 100%;
  justify-self: end;
  box-shadow: 0 18px 50px rgba(8,77,117,0.22),
              0 0 0 6px var(--paper-soft);
  transform: rotate(1.5deg);
}
.bienvenidos-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.bienvenidos-photo:hover img { transform: scale(1.04); }

@media (max-width: 860px) {
  .bienvenidos-grid { grid-template-columns: 1fr; }
  .bienvenidos-photo { justify-self: stretch; max-width: none; transform: rotate(0); }
}


/* ---------- TRES ACTOS PREVIOS ---------- */
.actos {
  position: relative;
  padding: var(--section-y) var(--pad-x);
  background: var(--paper-soft);
  overflow: hidden;
}
.actos .section-head {
  max-width: var(--max);
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}

.actos-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

.acto {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.5s ease;
}
.acto:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(8,77,117,0.18);
}
.acto-photo {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.acto-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.acto:hover .acto-photo img { transform: scale(1.06); }

.acto-body {
  display: flex; flex-direction: column; gap: 0.8rem;
  padding: clamp(1.4rem, 2.4vw, 2rem);
}
.acto-num {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--wine);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.acto-num::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--wine);
  display: inline-block;
  transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}
.acto:hover .acto-num::before { width: 52px; }

.acto-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--paper-edge);
}
.acto-body p {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.96rem;
}

@media (max-width: 980px) {
  .actos-grid { grid-template-columns: 1fr 1fr; }
  .actos-grid .acto:last-child { grid-column: 1 / -1; }
  .actos-grid .acto:last-child .acto-photo { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .actos-grid {
    display: flex;
    grid-template-columns: none;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad-x);
    padding: 0.5rem var(--pad-x) 1.5rem;
    margin-inline: calc(var(--pad-x) * -1);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }
  .actos-grid::-webkit-scrollbar { display: none; }
  .actos-grid .acto {
    flex: 0 0 82%;
    max-width: 360px;
    scroll-snap-align: center;
  }
  .actos-grid .acto:last-child { grid-column: auto; }
  .actos-grid .acto:last-child .acto-photo { aspect-ratio: 4 / 3; }
}

@media (hover: none) {
  .acto:hover { transform: none; box-shadow: none; }
  .acto:hover .acto-num::before { width: 28px; }
  .acto:hover .acto-photo img { transform: none; }
}


/* ---------- FESTIVAL ---------- */
.festival {
  position: relative;
  padding: var(--section-y) var(--pad-x);
  background: var(--blue);
  color: var(--paper);
  overflow: hidden;
}
.festival::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(227,68,92,0.18), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(159,165,66,0.14), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.festival-grid {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.festival-text { display: flex; flex-direction: column; gap: 1.25rem; }
.festival-text h2 { color: var(--paper); }
.festival-text p {
  max-width: 52ch;
  color: rgba(240, 232, 204, 0.86);
}

.festival-keypoints {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.7rem;
  margin-top: 0.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(240, 232, 204, 0.22);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 232, 204, 0.7);
}

/* Three-photo asymmetric stack replacing the single photo */
.festival-stack {
  position: relative;
  height: clamp(420px, 50vw, 620px);
}
.festival-stack .fs {
  position: absolute;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.4),
              0 0 0 6px var(--paper);
  margin: 0;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.festival-stack .fs img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.fs-1 { top: 0; right: 12%; width: 62%; aspect-ratio: 4 / 5; z-index: 3; transform: rotate(2deg); }
.fs-2 { bottom: 4%; left: 0; width: 48%; aspect-ratio: 1 / 1; z-index: 2; transform: rotate(-4deg); }
.fs-3 { bottom: 16%; right: 0; width: 36%; aspect-ratio: 3 / 4; z-index: 1; transform: rotate(5deg); }

.festival-stack:hover .fs-1 { transform: rotate(2deg) translateY(-6px); }
.festival-stack:hover .fs-2 { transform: rotate(-4deg) translateY(-4px); }
.festival-stack:hover .fs-3 { transform: rotate(5deg) translateY(-8px); }

@media (max-width: 860px) {
  .festival-grid { grid-template-columns: 1fr; }
  .festival-stack { height: clamp(380px, 90vw, 480px); }
  .fs-1 { width: 70%; right: 8%; }
  .fs-2 { width: 55%; }
  .fs-3 { width: 40%; }
}


/* ---------- EXPERIENCIA (bento) ---------- */
.experiencia {
  position: relative;
  padding: var(--section-y) var(--pad-x);
  background: var(--paper);
  overflow: hidden;
}
.experiencia .section-head { margin-left: auto; margin-right: auto; max-width: 720px; text-align: center; align-items: center; }

.bento {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 280px 280px 240px;
  gap: 1rem;
}

.bento-cell {
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.6rem;
  background: var(--paper-warm);
  border: 1px solid var(--paper-edge);
}
.bento-cell .bento-body { position: relative; z-index: 2; }
.bento-cell h3 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.bento-cell p { font-size: 0.95rem; color: var(--ink-soft); max-width: 32ch; }

.bento-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Cell positions only — visual treatment depends on whether a .bento-photo is present */
.bento-cell--feature { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.bento-cell--tint    { grid-column: 3; grid-row: 1; background: var(--paper-soft); }
.bento-cell--ink     { grid-column: 3; grid-row: 2; background: var(--blue); }
.bento-cell--wide    { grid-column: 1 / span 2; grid-row: 3; }
.bento-cell--family  { grid-column: 3; grid-row: 3; background: var(--paper-warm); }

/* Text-only cells get accented headings */
.bento-cell--tint:not(:has(.bento-photo)) h3   { color: var(--wine); }
.bento-cell--ink:not(:has(.bento-photo)) h3    { color: var(--paper-soft); }
.bento-cell--ink:not(:has(.bento-photo)) p     { color: rgba(240,232,204,0.78); }
.bento-cell--family:not(:has(.bento-photo)) h3 { color: var(--olive); }

/* Any cell with a photo gets the gradient overlay + light text */
.bento-cell:has(.bento-photo)::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,77,117,0) 35%, rgba(5,56,86,0.82) 100%);
  z-index: 1;
}
.bento-cell:has(.bento-photo) h3,
.bento-cell:has(.bento-photo) p {
  color: var(--paper-soft);
}
.bento-cell:has(.bento-photo) p { color: rgba(240,232,204,0.92); }

/* Feature cell gets a larger headline since it owns the prime tile */
.bento-cell--feature:has(.bento-photo) h3 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }

/* Wide cell uses a sideways gradient so the headline reads on the left */
.bento-cell--wide:has(.bento-photo)::after {
  background: linear-gradient(90deg, rgba(5,56,86,0.78) 0%, rgba(5,56,86,0.15) 55%, rgba(5,56,86,0) 80%);
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .bento-cell,
  .bento-cell--feature,
  .bento-cell--tint,
  .bento-cell--ink,
  .bento-cell--wide,
  .bento-cell--family {
    grid-column: 1; grid-row: auto;
    min-height: 240px;
  }
}


/* ---------- GALERÍA ---------- */
.galeria {
  position: relative;
  padding: var(--section-y) var(--pad-x);
  background: var(--paper-soft);
  overflow: hidden;
}

.galeria .section-head { max-width: var(--max); margin-left: auto; margin-right: auto; }

.gallery-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0;
}
.gallery-grid .g {
  margin: 0;
  display: block;
  position: relative;
  overflow: hidden;
  line-height: 0;
  width: 100%;
}
.gallery-grid.is-justified .g { width: auto; }

.g-trigger {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  font: inherit;
  color: inherit;
}
.g-trigger img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1),
              filter 0.5s ease;
}
.gallery-grid.is-justified .g-trigger img {
  height: 100%;
  object-fit: cover;
}
.g-trigger::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(26,24,20,0.42) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.g-trigger::before {
  content: "⤢";
  position: absolute;
  top: 1rem; right: 1rem;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(26,24,20,0.55);
  color: var(--paper);
  font-size: 1rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.g-trigger:hover img,
.g-trigger:focus-visible img { transform: scale(1.05); filter: saturate(1.05); }
.g-trigger:hover::after,
.g-trigger:focus-visible::after { opacity: 1; }
.g-trigger:hover::before,
.g-trigger:focus-visible::before { opacity: 1; transform: translateY(0); }
.g-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

@media (max-width: 640px) {
  .gallery-grid {
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad-x);
    padding: 0.25rem var(--pad-x) 1.5rem;
    margin-inline: calc(var(--pad-x) * -1);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }
  .gallery-grid::-webkit-scrollbar { display: none; }
  .gallery-grid .g {
    flex: 0 0 82%;
    width: auto;
    max-width: 360px;
    aspect-ratio: 4 / 3;
    scroll-snap-align: center;
  }
  .gallery-grid .g .g-trigger {
    width: 100%;
    height: 100%;
  }
  .gallery-grid .g img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}


/* ---------- LIGHTBOX ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  overflow: hidden;
}
.lightbox:not([open]) { display: none; }
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: rgba(10,9,7,0.96);
  animation: lightbox-in 0.25s ease-out;
}
.lightbox::backdrop { background: rgba(10,9,7,0.96); }

@keyframes lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: lightbox-img-in 0.35s cubic-bezier(0.16,1,0.3,1);
}
@keyframes lightbox-img-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-btn {
  position: absolute;
  background: rgba(234,224,189,0.08);
  color: var(--paper);
  border: 1px solid rgba(234,224,189,0.18);
  width: 48px; height: 48px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.lightbox-btn:hover {
  background: rgba(234,224,189,0.22);
  border-color: rgba(234,224,189,0.4);
}
.lightbox-btn:active { transform: scale(0.94); }
.lightbox-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

.lightbox-close { top: clamp(0.8rem, 2vw, 1.5rem); right: clamp(0.8rem, 2vw, 1.5rem); }
.lightbox-prev  { left: clamp(0.8rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: clamp(0.8rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }

.lightbox-prev:active { transform: translateY(-50%) scale(0.94); }
.lightbox-next:active { transform: translateY(-50%) scale(0.94); }

.lightbox-counter {
  position: absolute;
  bottom: clamp(0.9rem, 2.5vw, 1.6rem);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(234,224,189,0.75);
  margin: 0;
}

@media (max-width: 640px) {
  .lightbox-btn { width: 42px; height: 42px; font-size: 1.4rem; }
  .lightbox-img { max-width: 96vw; max-height: 78vh; }
}


/* ---------- VENUE ---------- */
.venue {
  position: relative;
  padding: 0;
  background: var(--olive);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.venue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 70vh;
}

.venue-photo {
  position: relative;
  overflow: hidden;
}
.venue-photo img {
  width: 100%; height: 100%; object-fit: cover;
  min-height: 480px;
}

.venue-info {
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 4rem);
  display: flex; flex-direction: column; gap: 1.5rem;
  align-self: center;
  max-width: 600px;
  color: var(--paper);
}
.venue-info h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--paper);
}
.venue-info .amp {
  color: var(--wine);
  font-family: var(--font-display);
}
.venue-info p {
  max-width: 48ch;
  color: rgba(240, 232, 204, 0.88);
}

.venue-list {
  display: flex; flex-direction: column;
  gap: 1rem;
  border-top: 1px solid rgba(240, 232, 204, 0.28);
  padding-top: 1.4rem;
  margin-top: 0.5rem;
}
.venue-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: baseline;
}
.venue-list dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 232, 204, 0.7);
}
.venue-list dd { color: rgba(240, 232, 204, 0.92); }

.venue-info .btn-ghost {
  align-self: flex-start;
  margin-top: 0.5rem;
  color: var(--paper);
  border-color: var(--paper);
}
.venue-info .btn-ghost:hover {
  background: var(--paper);
  color: var(--olive);
}

@media (max-width: 980px) {
  .venue-grid { grid-template-columns: 1fr; }
  .venue-photo img { min-height: 320px; }
}
@media (max-width: 640px) {
  .venue-info { align-items: center; text-align: center; margin: 0 auto; }
  .venue-info p { margin: 0 auto; }
  .venue-info .btn-ghost { align-self: center; }
  .venue-list { width: 100%; }
  .venue-list > div { grid-template-columns: 1fr; gap: 0.2rem; text-align: center; }
}


/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--paper-warm);
  border-top: 1px solid var(--paper-edge);
  padding: clamp(3rem, 5vw, 5rem) var(--pad-x) 1.5rem;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand img {
  width: 72px; height: 72px;
  margin-bottom: 0.8rem;
}
.footer-brand p {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.footer-col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.6rem;
}
.footer-col p { color: var(--ink-soft); font-size: 0.92rem; }
.footer-col a {
  color: var(--ink);
  font-size: 0.92rem;
  transition: color 0.18s ease;
}
.footer-col a:hover { color: var(--blue); }

.footer-bottom {
  max-width: var(--max);
  margin: 3rem auto 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--paper-edge);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1.2rem;
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink-mute);
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.78;
}
.footer-credit:hover { opacity: 1; color: var(--ink); }
.footer-credit-label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
}
.footer-credit img {
  height: 24px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 640px) {
  .footer-bottom { justify-content: flex-start; }
  .footer-credit { width: 100%; justify-content: flex-start; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed var(--paper-edge); }
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}


/* ---------- Reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1),
              transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}


/* ---------- Focus styles (a11y) ---------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible { border-radius: var(--r-pill); }


/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .site-nav nav a::after { display: none; }
  .gallery-grid .g:hover img { transform: none; }
}
