/* =========================================================================
   Levante Street Food — Landing single-page
   Scroll continuo: vertical → horizontal pinneado → vertical → horizontal → vertical
   ========================================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-canvas);
  color: var(--fg-1);
  font-family: var(--font-body);
  overflow-x: hidden;
}

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

/* ==================== TOP NAV ==================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 40px;
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  /* mix-blend-mode keeps text readable over any section color */
  color: var(--blanco);
  mix-blend-mode: difference;
  pointer-events: none;
  transition: background 400ms var(--ease-out), padding 350ms var(--ease-out),
              backdrop-filter 400ms var(--ease-out), border-color 400ms var(--ease-out);
}

/* Banner state — appears after hero is scrolled past */
.nav--scrolled {
  background: rgba(17, 16, 14, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  mix-blend-mode: normal;
  color: var(--crema-brisa);
  padding: 12px 40px;
  border-bottom: 1px solid rgba(245, 237, 216, 0.08);
}
.nav--scrolled .nav__links a { color: var(--crema-brisa); }
.nav--scrolled .lang-btn { color: var(--crema-brisa); }
.nav > * { pointer-events: auto; }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: inherit; text-decoration: none; opacity: 0.85; transition: opacity 220ms var(--ease-out); }
.nav__links a:hover { opacity: 1; }

/* ==================== PROGRESS RAIL (right side) ==================== */
.rail {
  position: fixed; right: 28px; top: 50%; transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--font-body); font-size: 9px; letter-spacing: 0.28em;
  text-transform: uppercase;
}
.rail__item {
  display: flex; align-items: center; gap: 10px;
  color: var(--negro-canos); opacity: 0.4;
  transition: opacity 320ms var(--ease-out), color 320ms var(--ease-out);
  cursor: pointer;
}
.rail__item.is-active { opacity: 1; }
.rail__item.is-dark { color: var(--crema-brisa); }
.rail__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  transition: transform 320ms var(--ease-out);
}
.rail__item.is-active .rail__dot { transform: scale(2); }
.rail__label { white-space: nowrap; }

/* ==================== SCROLL HINT ==================== */
.hint {
  position: fixed; bottom: 24px; right: 80px; left: auto; transform: none;
  z-index: 30;
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--negro-canos);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  transition: opacity 420ms var(--ease-out);
}
.hint__line {
  width: 1px; height: 36px; background: currentColor; opacity: 0.6;
  animation: hintLine 1.8s var(--ease-out) infinite;
}
@keyframes hintLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 0.6; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 0.6; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ==================== GENERIC SECTION ==================== */
.section {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 0 60px;
  overflow: hidden;
}
.section__pageNum {
  position: absolute; top: 80px; left: 40px;
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.28em;
  text-transform: uppercase; opacity: 0.55;
  z-index: 3;
}
.eyebrow {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--terracota-atardecer);
  display: inline-block;
}

/* ==================== 01 · HERO ==================== */
.hero {
  background: var(--blanco);
  cursor: default;
}

/* Large centered logo */
.hero__logo-large {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  will-change: transform, opacity;
}
.hero__logo-large img {
  width: min(56vw, 520px);
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Nav logo — clickable back-to-top, hidden until scroll starts */
.nav__brand a { text-decoration: none; display: flex; align-items: center; }
.nav__brand img {
  height: 36px; filter: invert(1); opacity: 0;
  transition: opacity 400ms var(--ease-out), filter 400ms var(--ease-out);
}
/* Banner: white logo on dark background — no invert needed */
.nav--scrolled .nav__brand img { opacity: 1; filter: none; }
/* hint: on white hero, mix-blend inverts white→black, logo also inverts fine */

.btn {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 18px 36px; border-radius: 999px;
  border: none; cursor: pointer;
  transition: transform 220ms var(--ease-out), background 220ms var(--ease-out);
  text-decoration: none; display: inline-block;
}
.btn:active { transform: scale(0.97); }
.btn--terracota { background: var(--terracota-atardecer); color: var(--crema-brisa); }
.btn--terracota:hover { background: var(--terracota-dark); }
.btn--ghost {
  background: transparent; color: var(--crema-brisa);
  border: 1px solid rgba(245,237,216,0.5);
}
.btn--ghost:hover { background: rgba(245,237,216,0.1); }

/* ==================== 02 · MANIFESTO (transition vertical) ==================== */
.manifesto {
  background: var(--crema-brisa); color: var(--negro-canos);
  text-align: center;
}
.manifesto__inner {
  max-width: 880px;
}
.manifesto__lead {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 400; line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 24px 0;
}
.manifesto__lead em {
  font-family: var(--font-editorial);
  font-style: italic;
  color: var(--verde-levante);
}
.manifesto__rule {
  width: 1px; height: 64px; background: var(--negro-canos);
  margin: 32px auto;
  opacity: 0.3;
}

/* ==================== HORIZONTAL #1: SABORES DEL MUNDO ==================== */
/* The pinned outer wrapper sets viewport height; inner track is wider than viewport */
.h-pin {
  position: relative;
  width: 100vw; height: 100vh;
  overflow: hidden;
}
.h-track {
  display: flex; align-items: stretch;
  height: 100%;
  /* width set inline by JS based on # of panels */
  will-change: transform;
}
.h-panel {
  flex: 0 0 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  padding: 80px 80px 80px 100px;
  position: relative;
}
.h-panel__num {
  position: absolute; top: 80px; left: 100px;
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; opacity: 0.5;
}
.h-panel__left {
  display: flex; flex-direction: column; justify-content: center;
  padding-right: 60px;
}
.h-panel__icon {
  width: 88px; height: 88px;
  background: rgba(0,0,0,0.05);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px;
}
.h-panel__icon img { width: 52px; height: 52px; }
.h-panel__country {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--terracota-atardecer);
  margin-bottom: 14px;
}
.h-panel__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 110px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.h-panel__title em {
  font-family: var(--font-editorial); font-style: italic; font-weight: 400;
  display: block;
}
.h-panel__desc {
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  max-width: 460px;
  margin: 0 0 32px;
  opacity: 0.78;
}
.h-panel__flag {
  display: inline-flex; gap: 16px; align-items: center;
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.28em;
  text-transform: uppercase; opacity: 0.6;
}
.h-panel__flag .em { font-size: 22px; }

.h-panel__right {
  display: flex; flex-direction: column; justify-content: center;
  gap: 18px;
  border-left: 1px solid rgba(0,0,0,0.12);
  padding-left: 60px;
}
.h-panel__right.on-dark { border-left-color: rgba(245,237,216,0.18); }

.dish {
  display: flex; gap: 24px; padding: 18px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.dish.on-dark { border-bottom-color: rgba(245,237,216,0.14); }
.dish__body { flex: 1; }
.dish__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.dish__name {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em;
}
.dish__star {
  font-family: var(--font-body); font-size: 9px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--terracota-atardecer);
  background: rgba(196,89,58,0.12); padding: 4px 10px; border-radius: 999px;
}
.dish__desc {
  font-family: var(--font-body); font-size: 14px; line-height: 1.55;
  opacity: 0.7;
}
.dish__price {
  font-family: var(--font-editorial); font-style: italic;
  font-size: 26px; color: var(--verde-levante);
  white-space: nowrap;
}
.dish.on-dark .dish__price { color: var(--arena-mediterranea); }

/* Panel color variants */
.h-panel--crema { background: var(--crema-brisa); color: var(--negro-canos); }
.h-panel--verde { background: var(--verde-levante); color: var(--crema-brisa); }
.h-panel--verde .h-panel__num,
.h-panel--verde .h-panel__country,
.h-panel--verde .h-panel__flag { opacity: 0.85; color: var(--crema-brisa); }
.h-panel--verde .h-panel__country { color: var(--arena-soft); }
.h-panel--verde .h-panel__icon { background: rgba(255,255,255,0.12); }
.h-panel--verde .h-panel__icon img { filter: brightness(0) invert(1); }
.h-panel--negro { background: var(--negro-canos); color: var(--crema-brisa); }
.h-panel--negro .h-panel__icon { background: rgba(245,237,216,0.08); }
.h-panel--terracota { background: var(--terracota-atardecer); color: var(--crema-brisa); }
.h-panel--terracota .h-panel__country { color: var(--negro-canos); }
.h-panel--terracota .h-panel__icon { background: rgba(0,0,0,0.12); }
.h-panel--terracota .h-panel__icon img { filter: brightness(0) invert(1); }
.h-panel--terracota .dish__price { color: var(--negro-canos); }
.h-panel--terracota .dish { border-bottom-color: rgba(0,0,0,0.18); }

/* Big section intro panel — first panel of horizontal track */
.h-intro {
  flex: 0 0 100vw; height: 100vh;
  background: var(--negro-canos); color: var(--crema-brisa);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 80px 100px;
  text-align: center; position: relative;
}
.h-intro__num {
  position: absolute; top: 80px; left: 100px;
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; opacity: 0.55;
}
.h-intro__eyebrow {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--terracota-atardecer);
  margin-bottom: 28px;
}
.h-intro__title {
  font-family: var(--font-display);
  font-size: clamp(60px, 8vw, 140px);
  font-weight: 700; line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  max-width: 14ch;
}
.h-intro__title em {
  font-family: var(--font-editorial); font-style: italic; font-weight: 400;
  color: var(--arena-soft);
}
.h-intro__lede {
  font-family: var(--font-body); font-size: 18px; line-height: 1.65;
  max-width: 600px; opacity: 0.78;
}
.h-intro__arrow {
  position: absolute; bottom: 60px; right: 100px;
  font-family: var(--font-body); font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 16px;
  opacity: 0.7;
}
.h-intro__arrow svg { width: 80px; height: 12px; }

/* ==================== HORIZONTAL #2: TIMELINE ==================== */
.t-pin {
  position: relative; width: 100vw; height: 100vh;
  overflow: hidden;
  background: var(--negro-canos); color: var(--crema-brisa);
}
.t-pin .section__pageNum { color: var(--crema-brisa); opacity: 0.55; }
.t-pin__head {
  position: absolute; top: 80px; left: 0; right: 0;
  text-align: center; padding: 0 80px;
  z-index: 5;
}
.t-pin__eyebrow {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--terracota-atardecer);
  margin: 12px 0 6px;
}
.t-pin__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 700; letter-spacing: -0.02em;
  margin: 0;
}
.t-pin__title em {
  font-family: var(--font-editorial); font-style: italic; font-weight: 400;
  color: var(--arena-soft);
}

.t-track {
  position: absolute; top: 50%; left: 0;
  display: flex; align-items: center;
  height: 60vh;
  transform: translateY(-50%);
  will-change: transform;
}

/* horizontal road line */
.t-road {
  position: absolute; top: 50%; left: 0;
  height: 2px; background: var(--arena-mediterranea);
  width: 100%;
  opacity: 0.4;
  transform: translateY(-50%);
}
.t-road::after {
  content: ''; position: absolute; top: -3px; left: 0; right: 0; height: 8px;
  background-image: repeating-linear-gradient(90deg,
    var(--terracota-atardecer) 0, var(--terracota-atardecer) 18px,
    transparent 18px, transparent 60px);
  opacity: 0.7;
}

.t-stop {
  flex: 0 0 60vw; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
  padding: 0 40px;
}
.t-stop__year {
  font-family: var(--font-display);
  font-size: clamp(80px, 12vw, 200px);
  font-weight: 700; line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--verde-levante);
  margin: 0;
}
.t-stop__year em {
  font-family: var(--font-editorial); font-style: italic; font-weight: 400;
  color: var(--arena-soft);
}
.t-stop__pin {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--terracota-atardecer);
  margin: 18px 0;
  box-shadow: 0 0 0 6px rgba(196,89,58,0.18);
}
.t-stop__label {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--arena-soft);
  margin: 0 0 12px;
}
.t-stop__text {
  font-family: var(--font-editorial); font-style: italic;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  text-align: center; max-width: 32ch;
  opacity: 0.88;
}

/* progress bar at bottom of timeline section */
.t-progress {
  position: absolute; bottom: 60px; left: 80px; right: 80px;
  height: 1px; background: rgba(245,237,216,0.18);
}
.t-progress__fill {
  height: 100%; background: var(--terracota-atardecer);
  width: 0%; transform-origin: left;
  transition: width 60ms linear;
}
.t-progress__label {
  position: absolute; bottom: 76px; left: 80px;
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.28em;
  text-transform: uppercase; opacity: 0.6;
}

/* ==================== 04 · QUOTE INTERSTITIAL ==================== */
.quote-section {
  background: var(--crema-brisa);
  text-align: center;
  padding: 120px 60px;
}
.quote-section__rule {
  width: 1px; height: 80px; background: var(--negro-canos);
  margin: 0 auto 32px; opacity: 0.3;
}
.quote-section__quote {
  font-family: var(--font-editorial); font-style: italic;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.18;
  max-width: 22ch;
  margin: 0 auto 24px;
  color: var(--negro-canos);
}
.quote-section__sig {
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; opacity: 0.6;
  margin-top: 32px;
}

/* ==================== 05 · CONTACT ==================== */
.contact {
  background: var(--verde-levante); color: var(--crema-brisa);
  padding: 120px 80px 80px;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
}
.contact__inner {
  max-width: 1240px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px;
}
.contact__pageNum { color: var(--crema-brisa); opacity: 0.55; }
.contact__eyebrow {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--arena-soft); margin-bottom: 28px;
}
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6.5vw, 96px);
  font-weight: 700; line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
}
.contact__title em {
  font-family: var(--font-editorial); font-style: italic; font-weight: 400;
  color: var(--arena-soft);
  display: block;
}
.contact__lede {
  font-family: var(--font-body); font-size: 18px; line-height: 1.7;
  opacity: 0.85; max-width: 460px; margin-bottom: 40px;
}

.contact__info { display: flex; flex-direction: column; gap: 32px; }
.info-block {
  border-top: 1px solid rgba(245,237,216,0.18);
  padding-top: 20px;
}
.info-block__label {
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; opacity: 0.7; margin-bottom: 12px;
}
.info-block__value {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.info-block__sub {
  font-family: var(--font-editorial); font-style: italic; font-size: 16px;
  opacity: 0.78; margin-top: 6px;
}

/* footer strip */
.footer {
  background: var(--negro-canos); color: var(--crema-brisa);
  padding: 48px 60px;
  font-family: var(--font-body); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { height: 38px; }
.footer__copy { opacity: 0.6; }
.footer__social { display: flex; gap: 18px; }
.footer__social a { color: inherit; opacity: 0.7; transition: opacity 220ms; text-decoration: none; }
.footer__social a:hover { opacity: 1; }

/* ==================== TYPE-IN REVEALS (set initial states) ==================== */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal-x { opacity: 0; transform: translateX(24px); }

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-x { opacity: 1; transform: none; }
  .hint__line { animation: none; }
}

/* ==================== HAMBURGER BUTTON ==================== */
.nav__hamburger {
  display: none; /* hidden on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  pointer-events: auto;
  flex-shrink: 0;
  color: inherit;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 280ms var(--ease-out), opacity 200ms var(--ease-out);
}
/* Hamburger → X when menu is open */
.nav.is-open .nav__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__hamburger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Disable blend mode so the dark overlay renders correctly */
.nav.is-open { mix-blend-mode: normal; color: var(--crema-brisa); }

/* ==================== MOBILE TWEAKS ==================== */
@media (max-width: 880px) {
  .nav { padding: 14px 20px; }
  .nav__hamburger { display: flex; }
  /* Mobile overlay — hidden by default, opened via .nav.is-open */
  .nav__links {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    background: rgba(17, 16, 14, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 18px;
    letter-spacing: 0.15em;
    color: var(--crema-brisa);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 300ms var(--ease-out), visibility 0s linear 300ms;
  }
  .nav.is-open .nav__links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 300ms var(--ease-out), visibility 0s linear 0s;
  }
  .nav__links a { color: var(--crema-brisa); opacity: 0.85; font-size: 18px; }
  .nav__links a:hover { opacity: 1; }
  .rail { right: 14px; }
  .rail__label { display: none; }
  .section, .h-intro, .h-panel, .contact { padding-left: 24px; padding-right: 24px; }
  .h-panel { grid-template-columns: 1fr; gap: 32px; padding: 80px 24px; }
  .h-panel__right { border-left: none; padding-left: 0; border-top: 1px solid rgba(0,0,0,0.12); padding-top: 24px; }
  .h-panel__num, .h-intro__num { left: 24px; }
  .h-intro__arrow { right: 24px; }
  .contact__inner { grid-template-columns: 1fr; gap: 40px; }
  .t-stop { flex: 0 0 80vw; }
  .t-progress { left: 24px; right: 24px; }
  .t-progress__label { left: 24px; }
}
