/* ==========================================================
   Mafalda & Jeff · 03 · 10 · 2026
   Paleta exacta de Mafalda · serif limpio (DM Serif Display + Cormorant Garamond)
   ========================================================== */

:root {
  /* Paleta de Mafalda — usar variando por sección */
  --moss: #2c3424;        /* deep forest — dark backgrounds, footer */
  --cypress: #4c583e;     /* dark mid green — Regalo */
  --olive: #768064;       /* mid green — accents, dividers */
  --cedar: #959581;       /* warm tan-green — minor accents */
  --aloe: #daded8;        /* lightest pale green — Planning */

  /* Cremas y papel */
  --paper: #faf6ed;       /* warm cream — Story */
  --cream: #f1eadd;
  --ink: #1f1d18;

  /* Acentos cálidos */
  --rust: #a64d2e;
  --gold: #b89761;

  /* Tipografías */
  --font-display: "DM Serif Display", "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Cormorant Garamond", "Times New Roman", serif;

  /* Layout */
  --maxw: 1100px;
  --gutter: clamp(1.1rem, 4vw, 2.4rem);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

/* Grano sutil de papel sobre toda la página */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------
   NAV
   ---------------------------------------------------------- */
.nav {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0.85rem 1rem;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: clamp(0.5rem, 2.6vw, 1.6rem);
  background: rgba(250, 246, 237, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border: 1px solid rgba(44, 52, 36, 0.12);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  pointer-events: auto;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.7rem, 1.6vw, 0.82rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moss);
  box-shadow: 0 10px 40px -20px rgba(44, 52, 36, 0.35);
}

.nav a {
  color: inherit;
  text-decoration: none;
  position: relative;
  padding: 0.2rem 0.1rem;
  transition: color 0.3s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.35s ease, left 0.35s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--rust);
}

.nav a:hover::after,
.nav a.is-active::after {
  width: 100%;
  left: 0;
}

.nav.on-dark ul {
  background: rgba(44, 52, 36, 0.4);
  border-color: rgba(218, 222, 216, 0.3);
  color: var(--paper);
}

.nav.on-dark a:hover,
.nav.on-dark a.is-active {
  color: var(--paper);
  opacity: 0.85;
}

/* ----------------------------------------------------------
   HERO
   ---------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  background: var(--moss);
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image: url("assets/hero.jpeg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  transform: scale(1.06);
  animation: heroDrift 24s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  to {
    transform: scale(1.12) translateY(-2%);
  }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(44, 52, 36, 0.18) 0%,
    rgba(44, 52, 36, 0) 30%,
    rgba(44, 52, 36, 0) 60%,
    rgba(44, 52, 36, 0.5) 100%
  );
}

.hero-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--paper);
  padding: 0 1.2rem;
}

.hero--photo-has-text .hero-overlay {
  display: none;
}

.scroll-cue {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0) + 1.6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.85;
  text-decoration: none;
  animation: fadeUp 1.4s ease 1.6s both;
}

.cue-line {
  width: 1px;
  height: 38px;
  background: var(--paper);
  transform-origin: top;
  animation: cueLine 2.4s ease infinite;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
  to {
    opacity: 0.85;
    transform: translate(-50%, 0);
  }
}

@keyframes cueLine {
  0%,
  100% {
    transform: scaleY(0);
  }
  45% {
    transform: scaleY(1);
  }
  55% {
    transform: scaleY(1);
    transform-origin: top;
  }
  56% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ----------------------------------------------------------
   STORY  · cream paper background
   ---------------------------------------------------------- */
.story {
  background: var(--paper);
  padding: clamp(5.5rem, 14vw, 10rem) var(--gutter);
  text-align: center;
  position: relative;
}

.story::before,
.story::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: clamp(2.5rem, 6vw, 4rem);
  background: var(--olive);
  opacity: 0.45;
  transform: translateX(-50%);
}

.story::before {
  top: 0;
}

.story::after {
  bottom: 0;
}

.kicker {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.7vw, 1rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 1.6rem;
}

.story-headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: 1;
  color: var(--moss);
  margin-bottom: 1.8rem;
  letter-spacing: -0.01em;
}

.story-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  max-width: 620px;
  margin: 0 auto 2.4rem;
  color: var(--cypress);
  line-height: 1.7;
}

.story-body em {
  color: var(--rust);
  font-weight: 400;
}

.story-meta {
  font-family: var(--font-body);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--olive);
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  font-weight: 500;
}

.story-meta .dot {
  font-size: 1.1em;
  line-height: 0;
  opacity: 0.6;
}

/* ----------------------------------------------------------
   PLANNING · Aloe pale green background
   ---------------------------------------------------------- */
.planning {
  background: var(--aloe);
  padding: clamp(5rem, 12vw, 9rem) var(--gutter);
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 5rem);
  color: var(--moss);
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.section-title.light {
  color: var(--paper);
}

.section-sub {
  text-align: center;
  font-family: var(--font-body);
  color: var(--cypress);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  letter-spacing: 0.05em;
  margin-bottom: clamp(3rem, 7vw, 4.5rem);
  opacity: 0.85;
}

.timeline {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.event {
  width: 100%;
  text-align: center;
  padding: 0 1rem;
}

.event-time {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 1.55rem);
  color: var(--rust);
  margin-bottom: 1.2rem;
  letter-spacing: 0.04em;
}

.event-illustration-wrap {
  width: clamp(110px, 18vw, 150px);
  height: clamp(110px, 18vw, 150px);
  margin: 0 auto 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-illustration {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.92;
  transition: transform 0.5s ease;
}

.event:hover .event-illustration {
  transform: scale(1.04) rotate(-1deg);
}

.event-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--moss);
  margin-bottom: 0.6rem;
  line-height: 1.05;
  letter-spacing: -0.005em;
}

.event-venue {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--cypress);
  margin-bottom: 1.2rem;
}

.event-link {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--moss);
  text-decoration: none;
  border: 1px solid var(--moss);
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s ease;
}

.event-link:hover {
  background: var(--moss);
  color: var(--aloe);
  transform: translateY(-1px);
}

/* Flecha curva entre eventos · color moss, hand-drawn vibe */
.event-arrow {
  display: block;
  color: var(--moss);
  opacity: 0.85;
}

.event-arrow--v {
  width: clamp(56px, 12vw, 80px);
  height: clamp(80px, 18vw, 120px);
  margin: 1.4rem auto;
}

.event-arrow--h {
  display: none;
}

/* Layout especial cuando hay sólo 2 eventos: lado a lado en desktop */
.timeline--two {
  max-width: 880px;
}

@media (min-width: 760px) {
  .timeline--two {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  .timeline--two .event {
    flex: 1 1 0;
    max-width: 380px;
    padding: 1rem 2rem;
  }
  .event-arrow--v {
    display: none;
  }
  .event-arrow--h {
    display: block;
    width: clamp(90px, 12vw, 130px);
    height: clamp(56px, 8vw, 80px);
    margin: 0 0.4rem;
    flex-shrink: 0;
  }
}

/* ----------------------------------------------------------
   COUNTDOWN · Pazo de Cea como fondo + contador en vivo
   ---------------------------------------------------------- */
.countdown {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--moss);
}

.vs-image {
  position: absolute;
  inset: 0;
  background-image: url("assets/Pazo de Cea.jpeg");
  background-size: cover;
  background-position: center;
  /* Inicia bastante zoom-in y se va alejando lentamente. Con `alternate`
     vuelve a acercarse, dando sensación de respiración infinita sin saltos. */
  transform: scale(1.22);
  animation: countdownZoomOut 32s ease-in-out infinite alternate;
}

@keyframes countdownZoomOut {
  to {
    transform: scale(1.02) translateY(-1.5%);
  }
}

.vs-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(44, 52, 36, 0.6) 0%,
    rgba(44, 52, 36, 0.4) 35%,
    rgba(44, 52, 36, 0.4) 60%,
    rgba(44, 52, 36, 0.7) 100%
  );
}

.countdown-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--paper);
  padding: clamp(4rem, 10vw, 6rem) 1.2rem;
}

.countdown-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: clamp(1.6rem, 4vw, 2.4rem);
}

.countdown-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.5rem, 2vw, 2.2rem);
  align-items: end;
  max-width: 720px;
  width: 100%;
  padding: 0;
  margin: 0;
}

.countdown-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.countdown-grid li + li::before {
  content: "·";
  position: absolute;
  left: calc(-1 * clamp(0.5rem, 2vw, 2.2rem) / 2);
  top: 0.3em;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 4rem);
  color: rgba(250, 246, 237, 0.4);
  line-height: 1;
}

.cd-num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 9vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.cd-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.62rem, 1.4vw, 0.78rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper);
  margin-top: clamp(0.5rem, 1.5vw, 0.85rem);
}

.countdown-date {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 1.5vw, 0.88rem);
  color: var(--paper);
  margin-top: clamp(2rem, 4.5vw, 2.8rem);
  padding-top: clamp(1.2rem, 3vw, 1.6rem);
  border-top: 1px solid rgba(250, 246, 237, 0.4);
}

/* ----------------------------------------------------------
   ASISTENCIA · Moss (deep dark)
   ---------------------------------------------------------- */
.asistencia {
  background: var(--moss);
  color: var(--paper);
  padding: clamp(5rem, 12vw, 9rem) var(--gutter);
  position: relative;
  overflow: hidden;
}

.asistencia::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 60%;
  background: radial-gradient(
    ellipse at top,
    rgba(184, 151, 97, 0.07) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.asistencia-inner {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.asistencia-intro {
  text-align: center;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin: 0 auto clamp(2.8rem, 5vw, 3.6rem);
  color: rgba(218, 222, 216, 0.82);
  max-width: 460px;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: rgba(218, 222, 216, 0.04);
  border: 1px solid rgba(218, 222, 216, 0.32);
  border-radius: 6px;
  padding: 0.95rem 1.1rem;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: 1rem;
  color: var(--paper);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(218, 222, 216, 0.5);
  font-family: var(--font-body);
  font-style: normal;
}

.field select {
  cursor: pointer;
  color: rgba(218, 222, 216, 0.5);
  font-style: normal;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23daded8' stroke-width='1.4'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 12px;
  padding-right: 2.6rem;
}

.field select:valid {
  color: var(--paper);
}

.field select option {
  background: var(--moss);
  color: var(--paper);
  font-style: normal;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--aloe);
  background: rgba(218, 222, 216, 0.07);
}

.field input:invalid:not(:placeholder-shown) {
  border-color: rgba(232, 179, 154, 0.65);
}

.submit-btn {
  margin: 1.4rem auto 0;
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 1rem 3.4rem;
  border: 1px solid var(--paper);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s ease,
    letter-spacing 0.35s ease;
  display: inline-block;
}

.submit-btn:hover {
  background: var(--paper);
  color: var(--moss);
  letter-spacing: 0.5em;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  text-align: center;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 1rem;
  color: var(--aloe);
  min-height: 1.4em;
  margin-top: 0.6rem;
  letter-spacing: 0.02em;
}

.form-status.success {
  color: #d6e7c5;
}

.form-status.error {
  color: #e8b39a;
}

.contact-divider {
  text-align: center;
  font-family: var(--font-body);
  font-style: normal;
  color: var(--paper);
  font-size: 0.78rem;
  margin: clamp(2.8rem, 6vw, 3.8rem) 0 1.4rem;
  opacity: 0.7;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 400;
}

.contact-buttons {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--paper);
  text-decoration: none;
  padding: 0.85rem 2rem;
  border: 1px solid rgba(218, 222, 216, 0.4);
  border-radius: 6px;
  transition: background 0.35s ease, border-color 0.35s ease,
    transform 0.35s ease;
}

.wa-btn:hover {
  border-color: var(--paper);
  background: rgba(218, 222, 216, 0.1);
  transform: translateY(-1px);
}

.wa-icon {
  width: 1.35em;
  height: 1.35em;
  flex-shrink: 0;
  display: block;
}

/* ----------------------------------------------------------
   REGALO · Cypress (dark mid green)
   ---------------------------------------------------------- */
.regalo {
  background: var(--cypress);
  color: var(--paper);
  padding: clamp(5rem, 12vw, 9rem) var(--gutter);
  text-align: center;
}

.regalo .section-title {
  margin-bottom: clamp(1.8rem, 4vw, 2.4rem);
}

.regalo-text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  max-width: 600px;
  margin: 0 auto clamp(2.8rem, 5vw, 3.4rem);
  color: rgba(250, 246, 237, 0.88);
  line-height: 1.7;
}

.regalo-card {
  max-width: 480px;
  margin: 0 auto;
  background: rgba(250, 246, 237, 0.06);
  padding: 2.6rem 1.8rem;
  border: 1px solid rgba(218, 222, 216, 0.28);
  border-radius: 8px;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.regalo-card::before,
.regalo-card::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(218, 222, 216, 0.5);
}

.regalo-card::before {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}

.regalo-card::after {
  bottom: 10px;
  right: 10px;
  border-left: 0;
  border-top: 0;
}

.regalo-label {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: rgba(218, 222, 216, 0.75);
  margin-bottom: 0.9rem;
}

.regalo-iban {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  letter-spacing: 0.06em;
  color: var(--paper);
  word-break: break-word;
  font-weight: 400;
}

.regalo-thanks {
  font-family: var(--font-body);
  color: rgba(250, 246, 237, 0.8);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  margin-top: clamp(2.5rem, 5vw, 3.2rem);
  letter-spacing: 0.04em;
}

/* ----------------------------------------------------------
   FOOTER · Moss
   ---------------------------------------------------------- */
.footer {
  background: var(--moss);
  color: var(--paper);
  text-align: center;
  padding: clamp(2.8rem, 6vw, 3.8rem) var(--gutter)
    calc(env(safe-area-inset-bottom, 0) + 2rem);
}

.footer-monogram {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2rem);
  letter-spacing: 0.4em;
  margin-bottom: 0.6rem;
}

.footer-monogram span {
  opacity: 0.65;
  margin: 0 0.1em;
}

.footer-date {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.4em;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--paper);
}

/* ----------------------------------------------------------
   REVEAL ON SCROLL · entrada limpia, stagger y parallax sutil
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition:
      opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: calc(var(--reveal-i, 0) * 90ms);
    will-change: opacity, transform;
  }

  .reveal.in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  /* Reveal-loop: variante bidireccional para los sub-elementos del
     timeline. Entra y sale cada vez que cruza el viewport. */
  .reveal-loop {
    opacity: 0;
    transform: translate3d(0, 36px, 0);
    transition:
      opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: calc(var(--reveal-i, 0) * 130ms);
    will-change: opacity, transform;
  }
  .reveal-loop.in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  /* La flecha curva no usa fade/slide: se dibuja sola con stroke-dashoffset.
     JS escribe --len (longitud real del path) y --rest-offset (positivo o
     negativo según dirección del scroll). */
  .event-arrow.reveal-loop {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .event-arrow path {
    stroke-dasharray: var(--len, 320);
    stroke-dashoffset: var(--rest-offset, var(--len, 320));
    transition: stroke-dashoffset 1.3s cubic-bezier(0.65, 0, 0.35, 1);
  }
  .event-arrow.in path {
    stroke-dashoffset: 0;
  }

  /* Hero parallax: JS escribe --parallax-y, se aplica a la posición
     del fondo para no chocar con la animación heroDrift del transform */
  .hero-image {
    background-position: center calc(30% + var(--parallax-y, 0px));
    will-change: background-position;
  }
}

/* ----------------------------------------------------------
   RESPONSIVE TUNING
   ---------------------------------------------------------- */
@media (max-width: 480px) {
  .nav ul {
    padding: 0.5rem 0.85rem;
    letter-spacing: 0.16em;
  }
}

@media (min-width: 760px) {
  .hero-image {
    background-position: center 25%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image,
  .vs-image {
    animation: none;
  }
  .cue-line {
    animation: none;
  }
  .event:hover .event-illustration {
    transform: none;
  }
}

/* ----------------------------------------------------------
   Honeypot anti-bot (oculto a humanos, accesible a bots)
   ---------------------------------------------------------- */
.hp-field {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ----------------------------------------------------------
   IBAN reveal · botón único, sin borde, con shimmer suave
   ---------------------------------------------------------- */
.iban-reveal {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.6rem 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--paper);
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.25s ease;
}

.iban-reveal:focus-visible {
  outline: 2px solid rgba(250, 246, 237, 0.55);
  outline-offset: 8px;
  border-radius: 4px;
}

.iban-reveal__value {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--paper);
  word-break: break-word;
  text-align: center;
  user-select: all;
  transition: letter-spacing 0.5s ease, opacity 0.4s ease;
}

/* Estado oculto: dots con shimmer */
.iban-reveal[data-state="masked"] .iban-reveal__value {
  color: rgba(250, 246, 237, 0.55);
  background: linear-gradient(
    100deg,
    rgba(250, 246, 237, 0.45) 30%,
    rgba(250, 246, 237, 0.95) 50%,
    rgba(250, 246, 237, 0.45) 70%
  );
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ibanShimmer 3.4s ease-in-out infinite;
}

@keyframes ibanShimmer {
  0%   { background-position: 220% 0; }
  100% { background-position: -120% 0; }
}

/* Hint con flecha sutil */
.iban-reveal__hint {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(218, 222, 216, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.iban-reveal__hint::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* Hover/active feedback */
@media (hover: hover) {
  .iban-reveal:hover .iban-reveal__hint {
    color: var(--paper);
  }
}

.iban-reveal:active {
  opacity: 0.75;
}

/* Estado revelado / copiado */
.iban-reveal[data-state="revealed"] .iban-reveal__value,
.iban-reveal[data-state="copied"] .iban-reveal__value {
  animation: ibanRevealIn 0.5s ease-out;
}

.iban-reveal[data-state="copied"] .iban-reveal__hint {
  color: var(--paper);
}

@keyframes ibanRevealIn {
  0% {
    opacity: 0;
    letter-spacing: 0.4em;
  }
  100% {
    opacity: 1;
    letter-spacing: 0.18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iban-reveal[data-state="masked"] .iban-reveal__value,
  .iban-reveal[data-state="revealed"] .iban-reveal__value,
  .iban-reveal[data-state="copied"] .iban-reveal__value {
    animation: none;
    -webkit-text-fill-color: rgba(250, 246, 237, 0.55);
  }
}

/* WhatsApp como <button>: anula estilos nativos del UA del navegador */
button.wa-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--paper);
  font: inherit;
  cursor: pointer;
  /* heredamos border y border-radius de la regla .wa-btn */
}
