/* ==========================================================================
   CARS DISNEY PIXAR · RADIATOR SPRINGS VIP INVITATION STYLESHEET
   ========================================================================== */

:root {
  --cars-red: #dc2626;
  --cars-red-dark: #991b1b;
  --cars-red-light: #ef4444;
  --cars-yellow: #facc15;
  --cars-gold: #ca8a04;
  --cars-orange: #ea580c;
  --cars-turquoise: #06b6d4;
  --cars-asphalt: #0f172a;
  --cars-slate: #1e293b;
  --cars-white: #ffffff;
  --cars-card-bg: #ffffff;
  --cars-text-main: #0f172a;
  --cars-text-muted: #475569;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --font-race: 'Bangers', cursive, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-card: 0 16px 36px -8px rgba(15, 23, 42, 0.35);
  --shadow-glow: 0 0 25px rgba(250, 204, 21, 0.45);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--cars-asphalt);
  color: var(--cars-text-main);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  background-color: var(--cars-asphalt);
  min-height: 100vh;
  position: relative;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.skip {
  position: absolute;
  top: -100px;
  left: 10px;
  background: var(--cars-red);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip:focus {
  top: 10px;
}

/* Confetti Canvas */
.confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 900;
}

/* ==========================================================================
   INTRO & SOBRE 3D INTERACTIVO
   ========================================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cars-asphalt);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro.is-unveiling {
  opacity: 0.2;
}

.intro.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.intro-sky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65) saturate(1.2);
}

.intro-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.25) 0%, rgba(15, 23, 42, 0.75) 100%);
}

.intro-floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.floater {
  position: absolute;
  font-size: 2rem;
  animation: floatUp 10s infinite linear;
  opacity: 0.65;
}

.f1 { left: 8%; bottom: -10%; animation-duration: 8s; font-size: 2.2rem; }
.f2 { left: 25%; bottom: -10%; animation-duration: 11s; animation-delay: 2s; font-size: 1.8rem; }
.f3 { left: 50%; bottom: -10%; animation-duration: 9s; animation-delay: 1s; font-size: 2.4rem; }
.f4 { left: 75%; bottom: -10%; animation-duration: 12s; animation-delay: 3s; font-size: 2rem; }
.f5 { left: 90%; bottom: -10%; animation-duration: 10s; animation-delay: 4s; font-size: 2rem; }
.f6 { left: 40%; bottom: -10%; animation-duration: 7s; animation-delay: 5s; font-size: 2.2rem; }

@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  15% { opacity: 0.85; }
  85% { opacity: 0.85; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

.intro-stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
  padding: 16px;
}

.intro-heading {
  text-align: center;
  margin-bottom: 20px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.intro.is-opening .intro-heading,
.intro.is-opening .intro-actions {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.intro-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--cars-yellow), var(--cars-gold));
  color: var(--cars-asphalt);
  font-family: var(--font-race);
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  margin-bottom: 8px;
}

.intro-kicker {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   3D ENVELOPE STRUCT
   ========================================================================== */

.envelope {
  position: relative;
  width: 320px;
  height: 220px;
  perspective: 1200px;
  margin-bottom: 24px;
  cursor: pointer;
  overflow: visible;
}

@media (min-width: 400px) {
  .envelope {
    width: 350px;
    height: 240px;
  }
}

.envelope-shadow {
  position: absolute;
  bottom: -15px;
  left: 5%;
  width: 90%;
  height: 25px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 2;
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fff6df 0%, #f3ddb0 100%);
  border-radius: 12px;
  border: 2px solid #b45309;
  z-index: 3;
}

/* Solapa superior realista */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 132px;
  transform-origin: top center;
  transform-style: preserve-3d;
  z-index: 7;
}

.envelope.is-open .envelope-flap {
  animation: carsFlapOpen 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Se levanta hasta casi vertical. Si pasa de 90° la punta queda hacia arriba. */
@keyframes carsFlapOpen {
  0% { transform: rotateX(0deg); }
  100% { transform: rotateX(86deg); }
}

.flap-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.flap-outer {
  background: linear-gradient(180deg, #b91c1c 0%, #dc2626 60%, #991b1b 100%);
  border-top: 2px solid var(--cars-yellow);
}

.flap-liner {
  transform: rotateX(180deg);
  background:
    repeating-linear-gradient(45deg, #fff7d6 0 8px, #f6d36b 8px 16px);
  border-bottom: 2px solid #ca8a04;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
}

/* Frente del sobre */
.envelope-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #991b1b 0%, #dc2626 40%, #b91c1c 100%);
  border-radius: 12px;
  border: 2px solid #ef4444;
  clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 50% 55%);
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 16px;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.2);
}

.stamp {
  background: #ffffff;
  border: 2px dashed #dc2626;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
  color: #dc2626;
  font-family: var(--font-heading);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.stamp em {
  display: block;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 1px;
}

.stamp span {
  font-size: 1.35rem;
  font-family: var(--font-race);
  line-height: 1;
}

.stamp small {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
}

.envelope-address {
  text-align: right;
  color: #ffffff;
}

.address-to {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--cars-yellow);
}

.address-name {
  font-family: var(--font-race);
  font-size: 1.05rem;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.address-from {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

/* Sello de cera Copa Pistón 3D */
.seal {
  position: absolute;
  top: 105px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #eab308 50%, #854d0e 100%);
  border: 3px solid #fef08a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 0 15px rgba(250, 204, 21, 0.6);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: sealPulse 2.4s infinite ease-in-out;
}

.seal:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 25px rgba(250, 204, 21, 0.9);
}

.envelope.is-open .seal {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes sealPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(250, 204, 21, 0.4); }
  50% { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 28px rgba(250, 204, 21, 0.85); }
}

.seal-emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.seal-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.seal-stars {
  font-family: var(--font-race);
  font-size: 0.65rem;
  color: #713f12;
  font-weight: 900;
  letter-spacing: 1px;
}

.seal-hint {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--cars-yellow);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}

/* Ranura: deja salir la tarjeta por arriba y la mantiene detrás del bolsillo */
.letter-slot {
  position: absolute;
  left: 0;
  right: 0;
  top: -210px;
  bottom: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.letter-peek {
  position: absolute;
  top: 300px;
  left: 22px;
  right: 22px;
  height: 280px;
  background: var(--cars-card-bg);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 2px solid var(--cars-yellow);
}

.envelope.is-open .letter-peek {
  animation: carsLetterOut 1.15s 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes carsLetterOut {
  0% { transform: translateY(0); }
  100% { transform: translateY(-250px); }
}

.card-inner {
  padding: 10px 12px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.card-badge-row {
  margin-bottom: 6px;
}

.card-tag {
  display: inline-block;
  background: var(--cars-red);
  color: #ffffff;
  font-family: var(--font-race);
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.card-photo-hero {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 4px auto 4px;
}

.card-photo-hero img[data-bind="foto"] {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--cars-yellow);
}

.photo-speed-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed var(--cars-red);
  animation: spinSlow 12s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Buddy de la foto en la tarjeta VIP */
.card-photo-buddy {
  position: absolute;
  bottom: -6px;
  right: -32px;
  width: 52px;
  height: auto;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}

.photo-age-tag {
  position: absolute;
  top: -4px;
  left: -12px;
  background: var(--cars-yellow);
  color: var(--cars-asphalt);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-race);
  font-size: 0.85rem;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.photo-age-tag small {
  font-size: 0.45rem;
  font-weight: 800;
}

.card-kicker {
  font-size: 0.75rem;
  color: var(--cars-text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.card-hero-name {
  font-family: var(--font-race);
  font-size: 1.55rem;
  color: var(--cars-red);
  letter-spacing: 1px;
  margin: 2px 0;
}

.card-details-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--cars-slate);
}

.card-action-bar {
  margin-top: auto;
  padding-top: 6px;
}

.card-action-hint {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--cars-red);
}

/* Botones de acción del intro */
.intro-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--cars-yellow) 0%, var(--cars-gold) 100%);
  color: var(--cars-asphalt);
  font-family: var(--font-race);
  font-size: 1.3rem;
  letter-spacing: 1.5px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(250, 204, 21, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.65);
}

.intro-skip {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  text-decoration: underline;
  padding: 6px;
}

/* ==========================================================================
   PÁGINA PRINCIPAL & SECCIONES CON PARALLAX
   ========================================================================== */

.page {
  position: relative;
  z-index: 100;
}

.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 16px;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.parallax-bg img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* Overlay translúcido suave: se aprecian perfectamente los fondos de Radiator Springs */
.section-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.40) 0%, rgba(15, 23, 42, 0.46) 100%);
  backdrop-filter: blur(1.5px);
}

.container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */

.hero {
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}

.hero-top-badge {
  width: 130px;
  height: auto;
  margin-bottom: 6px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}

.hero-tag {
  background: linear-gradient(135deg, var(--cars-yellow), var(--cars-gold));
  color: var(--cars-asphalt);
  font-family: var(--font-race);
  font-size: 1.05rem;
  letter-spacing: 2px;
  padding: 4px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero-photo-wrap {
  position: relative;
  width: 228px;
  height: 228px;
  margin: 8px auto 14px;
}

.hero-photo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--cars-red) 0%, var(--cars-yellow) 50%, var(--cars-red) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(250, 204, 21, 0.4);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #ffffff;
}

.hero-age-badge {
  position: absolute;
  top: 2px;
  right: -8px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--cars-yellow);
  color: var(--cars-asphalt);
  border: 3px solid #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-race);
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.hero-age-badge small {
  font-size: 0.55rem;
  font-weight: 900;
}

/* Rayo McQueen junto a la foto principal */
.photo-buddy {
  position: absolute;
  bottom: -8px;
  right: -54px;
  width: 148px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
  animation: carIdle 3.2s ease-in-out infinite;
}

@keyframes carIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-pretitle {
  color: var(--cars-yellow);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.hero-title {
  font-family: var(--font-race);
  font-size: 4rem;
  line-height: 1;
  color: #ffffff;
  letter-spacing: 3px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8), 0 0 25px rgba(220, 38, 38, 0.6);
  margin: 4px 0 8px;
}

.hero-subtitle {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  margin-bottom: 14px;
}

.hero-subtitle strong {
  color: var(--cars-yellow);
}

.pit-board {
  width: min(100%, 440px);
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.pit-row {
  display: grid;
  grid-template-columns: 26px 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  text-align: left;
}

.pit-row + .pit-row {
  border-top: 1px solid rgba(250, 204, 21, 0.2);
}

.pit-ico {
  font-size: 1rem;
  line-height: 1;
  text-align: center;
}

.pit-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.pit-row strong {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--cars-yellow);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 12;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-race);
  font-size: 1.15rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.scroll-hint i {
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--cars-yellow);
  border-bottom: 3px solid var(--cars-yellow);
  transform: rotate(45deg);
  animation: hintBounce 1.3s ease-in-out infinite;
}

@keyframes hintBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(3px, 3px); }
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-race);
  font-size: 1.15rem;
  letter-spacing: 1px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cars-yellow), var(--cars-gold));
  color: var(--cars-asphalt);
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.45);
}

.secondary-btn {
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  border: 2px solid var(--cars-yellow);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.cta-btn:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   CONTENT CARDS & COMPANION BUDDIES
   ========================================================================== */

.content-card {
  position: relative;
  background: var(--cars-card-bg);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  border: 3px solid var(--cars-yellow);
}

.card-header-racing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.flag-icon {
  font-size: 1.3rem;
}

.card-kicker-racing {
  font-family: var(--font-race);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  color: var(--cars-red);
}

.card-title-main {
  font-family: var(--font-race);
  font-size: 1.95rem;
  color: var(--cars-asphalt);
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 16px;
  line-height: 1.1;
}

/* Buddy Floating Companions */
.buddy {
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.55));
  animation: carIdle 3.5s ease-in-out infinite;
}

.buddy-left {
  position: absolute;
  top: -45px;
  left: -20px;
  width: 140px;
  z-index: 20;
}

.buddy-right {
  position: absolute;
  top: -45px;
  right: -20px;
  width: 140px;
  z-index: 20;
}

.buddy-group {
  display: flex;
  align-items: flex-end;
}

.buddy-mini {
  width: 65px;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  margin-left: -25px;
  z-index: 21;
}

@media (max-width: 640px) {
  .buddy-left {
    position: relative;
    top: auto;
    left: auto;
    margin: 0 auto -20px;
    width: 120px;
  }
  .buddy-right {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 auto -20px;
    width: 120px;
  }
  .buddy-group {
    justify-content: center;
  }
}

/* ==========================================================================
   2. SECCIÓN CARTA (MATE)
   ========================================================================== */

.speech-bubble-mate {
  background: #fef3c7;
  border-left: 4px solid var(--cars-gold);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #78350f;
}

.speech-bubble-mate strong {
  color: #92400e;
}

.letter-body-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--cars-text-muted);
  margin-bottom: 20px;
}

.letter-body-text p + p {
  margin-top: 10px;
}

.racing-quote-box {
  background: linear-gradient(135deg, var(--cars-asphalt), var(--cars-slate));
  color: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--cars-yellow);
}

.racing-quote-bolt {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 4px;
}

.racing-quote-text {
  font-family: var(--font-race);
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: var(--cars-yellow);
}

.racing-quote-author {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

/* ==========================================================================
   3. SECCIÓN CUÁNDO (COUNTDOWN & CALENDAR)
   ========================================================================== */

.when-date-badge {
  text-align: center;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.when-day-name {
  display: block;
  font-family: var(--font-race);
  font-size: 1.2rem;
  color: var(--cars-red);
  letter-spacing: 1.5px;
}

.when-day-num {
  font-family: var(--font-race);
  font-size: 4.5rem;
  line-height: 0.95;
  color: var(--cars-asphalt);
}

.when-month {
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--cars-text-muted);
  letter-spacing: 1px;
}

.schedule-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.schedule-pill {
  background: #f1f5f9;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  text-align: center;
  flex: 1;
}

.pill-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cars-text-muted);
}

.pill-time {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--cars-red);
}

.schedule-separator {
  font-size: 1.2rem;
  color: var(--cars-gold);
  font-weight: 900;
}

/* Countdown */
.countdown-wrap {
  text-align: center;
  background: linear-gradient(135deg, var(--cars-asphalt), var(--cars-slate));
  padding: 18px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 2px solid var(--cars-yellow);
}

.countdown-title {
  color: var(--cars-yellow);
  font-family: var(--font-race);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.countdown-boxes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cd-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  min-width: 54px;
}

.cd-number {
  display: block;
  font-family: var(--font-race);
  font-size: 1.7rem;
  color: #ffffff;
  line-height: 1;
}

.cd-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--cars-yellow);
  margin-top: 2px;
}

.cd-colon {
  font-family: var(--font-race);
  font-size: 1.4rem;
  color: var(--cars-yellow);
}

.cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--cars-red);
  color: #ffffff;
  font-family: var(--font-race);
  font-size: 1.15rem;
  letter-spacing: 1px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.cal-btn:hover {
  transform: translateY(-2px);
  background: var(--cars-red-dark);
}

/* ==========================================================================
   4. SECCIÓN DÓNDE (VENUE & MAPS)
   ========================================================================== */

.venue-showcase {
  text-align: center;
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 18px 14px;
  margin-bottom: 18px;
}

.venue-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cars-yellow), var(--cars-gold));
  color: var(--cars-asphalt);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.venue-name {
  font-family: var(--font-race);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.venue-address {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--cars-asphalt);
}

.venue-extra {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cars-red);
  margin-top: 2px;
}

.venue-city {
  font-size: 0.85rem;
  color: var(--cars-text-muted);
  margin-top: 4px;
}

.venue-note-card {
  display: flex;
  gap: 10px;
  background: #fef2f2;
  border-left: 4px solid var(--cars-red);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #7f1d1d;
}

.map-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.map-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-race);
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-align: center;
  transition: transform 0.2s ease;
}

.gmaps-btn {
  background: var(--cars-red);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.copy-btn {
  background: var(--cars-slate);
  color: #ffffff;
  border: 1px solid var(--cars-yellow);
}

.map-btn:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   5. SECCIÓN NOTAS (PIT CREW & VIP PASSES)
   ========================================================================== */

.tips-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.tip-item {
  display: flex;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  align-items: flex-start;
}

.tip-icon-wrap {
  font-size: 1.8rem;
  line-height: 1;
}

.tip-content strong {
  display: block;
  font-size: 0.95rem;
  color: var(--cars-asphalt);
  margin-bottom: 2px;
}

.tip-content p {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--cars-text-muted);
}

.rsvp-callout {
  text-align: center;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  padding: 20px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--cars-yellow);
}

.rsvp-callout-text {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.rsvp-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  background: #22c55e;
  color: #ffffff;
  font-family: var(--font-race);
  font-size: 1.2rem;
  letter-spacing: 1px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rsvp-wa-btn svg {
  width: 22px;
  height: 22px;
}

.rsvp-wa-btn:hover {
  transform: translateY(-2px);
  background: #16a34a;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */

.footer-race {
  position: relative;
  background: #0b0f19;
  color: #ffffff;
  padding: 50px 16px 35px;
  overflow: hidden;
  text-align: center;
  border-top: 3px solid var(--cars-yellow);
}

.footer-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bubble-char {
  position: absolute;
  bottom: -20px;
  width: 55px;
  opacity: 0.45;
  animation: floatBubble 12s infinite linear;
}

.b1 { left: 10%; animation-duration: 11s; }
.b2 { left: 35%; animation-duration: 14s; animation-delay: 2s; }
.b3 { left: 65%; animation-duration: 10s; animation-delay: 1s; }
.b4 { left: 88%; animation-duration: 13s; animation-delay: 4s; }

@keyframes floatBubble {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 0.5; }
  80% { opacity: 0.5; }
  100% { transform: translateY(-300px); opacity: 0; }
}

.footer-inner {
  position: relative;
  z-index: 5;
  max-width: 500px;
  margin: 0 auto;
}

.footer-badge-center {
  margin-bottom: 12px;
}

.footer-logo-img {
  width: 140px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.footer-main-text {
  font-family: var(--font-race);
  font-size: 1.35rem;
  color: var(--cars-yellow);
  letter-spacing: 1.5px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.footer-sub-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

/* ==========================================================================
   FLOATING MUSIC TOGGLE & SOUNDWAVES
   ========================================================================== */

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(250, 204, 21, 0.9);
  background: rgba(15, 23, 42, 0.82);
  color: var(--cars-yellow);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  z-index: 400;
  display: none;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.is-open .music-toggle {
  display: grid;
}

.music-toggle:hover {
  transform: scale(1.06);
}

.music-note {
  width: 22px;
  height: 22px;
}

.music-waves {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.music-waves span {
  width: 3px;
  border-radius: 3px;
  background: currentColor;
}

.music-waves span:nth-child(1) { height: 6px; }
.music-waves span:nth-child(2) { height: 14px; }
.music-waves span:nth-child(3) { height: 9px; }

.music-toggle.is-on {
  background: linear-gradient(160deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(250, 204, 21, 0.16);
}

.music-toggle.is-on .music-note {
  display: none;
}

.music-toggle.is-on .music-waves {
  display: flex;
}

.music-toggle.is-on .music-waves span {
  animation: waveBar 0.75s ease-in-out infinite alternate;
}

.music-toggle.is-on .music-waves span:nth-child(2) { animation-delay: 0.16s; }
.music-toggle.is-on .music-waves span:nth-child(3) { animation-delay: 0.32s; }

@keyframes waveBar {
  0% { height: 4px; }
  100% { height: 15px; }
}

/* Barra fija de celular: Ubicación y WhatsApp */
.mobile-cta {
  display: none;
}

@media (max-width: 768px) {
  body.is-open .mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 450;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, 0.94);
    border-top: 2px solid var(--cars-yellow);
    backdrop-filter: blur(12px);
  }

  .mobile-cta a {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-family: var(--font-race);
    font-size: 1.15rem;
    letter-spacing: 1px;
    text-decoration: none;
    background: var(--cars-slate);
    color: #ffffff;
    border: 1px solid var(--cars-yellow);
  }

  .mobile-cta a.accent {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
  }

  body.is-open .music-toggle {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    bottom: auto;
    left: auto;
  }

  body.is-open .toast {
    bottom: calc(132px + env(safe-area-inset-bottom));
  }

  body.is-open .hero {
    padding-top: 24px;
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  body.is-open .hero-photo-wrap {
    width: 206px;
    height: 206px;
    margin-bottom: 8px;
  }

  body.is-open .hero-title {
    font-size: 3.2rem;
  }

  body.is-open .photo-buddy {
    width: 124px;
    right: -36px;
    bottom: -4px;
  }

  body.is-open .scroll-hint {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  body.is-open .footer-race {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--cars-asphalt);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--cars-yellow);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 600;
}

.toast.show,
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
