:root {
  --blue: #0879ff;
  --blue-bright: #19b8ff;
  --navy: #06153e;
  --navy-deep: #020817;
  --yellow: #ffd52e;
  --orange: #ff8a16;
  --red: #f12d38;
  --white: #f7fbff;
  --ink: #061333;
  --display: "Archivo Black", sans-serif;
  --body: "Nunito", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--white); background: var(--navy-deep); font-family: var(--body); }
body.welcome-open { overflow: hidden; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }

.welcome {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 22px;
  overflow: hidden;
  background: #05113c;
  transition: opacity .7s ease, visibility .7s ease;
}
.welcome.is-leaving { opacity: 0; visibility: hidden; }
.welcome__backdrop { position: absolute; inset: -5%; background: linear-gradient(rgba(2,8,23,.35), rgba(2,8,23,.88)), url("assets/simon-portada.png") center / cover; filter: blur(4px); transform: scale(1.08); }
.welcome__speed { position: absolute; inset: 0; opacity: .3; background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg 5deg, rgba(30,182,255,.55) 5.5deg 6deg, transparent 6.5deg 14deg); animation: spin 24s linear infinite; }
.welcome__panel { position: relative; width: min(100%, 520px); padding: clamp(36px, 8vw, 62px) 24px; text-align: center; border: 3px solid var(--blue-bright); border-radius: 22px; background: rgba(3,14,46,.86); box-shadow: 0 0 0 8px rgba(255,213,46,.12), 0 0 55px rgba(18,163,255,.45); }
.welcome__panel::before, .welcome__panel::after { content: ""; position: absolute; left: 8%; width: 84%; height: 5px; border-radius: 99px; background: linear-gradient(90deg, transparent, var(--yellow), transparent); }
.welcome__panel::before { top: -4px; }
.welcome__panel::after { bottom: -4px; }
.welcome__level, .pixel-label { display: inline-block; color: var(--yellow); font-size: .72rem; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.welcome h1 { margin: 16px 0; font: 400 clamp(2.7rem, 10vw, 4.8rem)/.95 var(--display); text-transform: uppercase; text-shadow: 4px 4px 0 var(--blue), 7px 7px 0 rgba(0,0,0,.35); }
.welcome p { margin: 0 auto 28px; max-width: 340px; font-size: 1.05rem; line-height: 1.65; }
.welcome small { display: block; margin-top: 18px; color: #a8c8f5; }

.game-button { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 30px; color: var(--navy); border: 0; border-radius: 999px; background: linear-gradient(180deg, #ffe65a, #ffae19); box-shadow: 0 6px 0 #c46b00, 0 12px 28px rgba(0,0,0,.35); font-weight: 900; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; cursor: pointer; transition: transform .18s ease, filter .18s ease; }
.game-button::before { content: ""; position: absolute; inset: 5px; border: 2px solid rgba(255,255,255,.55); border-radius: inherit; }
.game-button span { position: relative; }
.game-button:hover { transform: translateY(-2px) scale(1.02); filter: saturate(1.15); }
.game-button:active { transform: translateY(4px); box-shadow: 0 2px 0 #c46b00; }
.game-button--small { min-height: 50px; padding-inline: 25px; font-size: .78rem; }

.music-toggle { position: fixed; z-index: 50; top: 17px; right: 17px; width: 54px; height: 54px; color: var(--navy); border: 3px solid white; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px var(--blue), 0 8px 25px rgba(0,0,0,.35); cursor: pointer; }
.music-toggle.is-playing span { display: inline-block; animation: pulse 1s ease-in-out infinite; }

.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; background: #051245; }
.hero__image, .hero__shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__image { object-fit: cover; object-position: center 35%; }
.hero__shade { background: linear-gradient(180deg, transparent 45%, rgba(1,7,26,.18) 62%, rgba(1,7,26,.96) 100%); }
.hero__content { position: relative; z-index: 1; width: min(100%, 720px); padding: 40px clamp(20px, 6vw, 70px) 52px; }
.hero h1 { margin: 12px 0 14px; font: 400 clamp(2.5rem, 9vw, 5.5rem)/.9 var(--display); text-transform: uppercase; text-shadow: 4px 4px 0 var(--blue), 7px 7px 0 rgba(0,0,0,.45); }
.hero h1 span { color: var(--yellow); }
.hero__content > p:not(.pixel-label) { max-width: 480px; margin: 0 0 26px; font-size: 1.1rem; font-weight: 800; }

.section { position: relative; padding: 100px clamp(22px, 7vw, 90px); overflow: hidden; }
.section h2 { margin: 10px 0 22px; font: 400 clamp(2.3rem, 7vw, 4.5rem)/1 var(--display); text-transform: uppercase; }
.section-heading { max-width: 800px; margin: 0 auto 55px; text-align: center; }

.mission { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); align-items: center; gap: 40px; background: radial-gradient(circle at 85% 50%, #0d70d7, transparent 38%), linear-gradient(135deg, #04113a, #072969); }
.mission::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(31,183,255,.55) 1px, transparent 1px), linear-gradient(90deg, rgba(31,183,255,.55) 1px, transparent 1px); background-size: 48px 48px; transform: perspective(400px) rotateX(55deg) scale(1.7); transform-origin: bottom; }
.mission__copy { position: relative; z-index: 1; }
.mission__copy > p:not(.pixel-label) { max-width: 620px; color: #d5e8ff; font-size: 1.08rem; line-height: 1.8; }
.mission__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 35px; }
.mission__stats div { padding: 18px 12px; border: 1px solid rgba(58,192,255,.45); border-radius: 12px; background: rgba(2,10,37,.45); }
.mission__stats span, .event-card__details span { display: block; margin-bottom: 6px; color: #7edaff; font-size: .65rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.mission__stats strong { color: white; font-size: .96rem; }
.mission__character { position: relative; z-index: 1; margin: 0; display: grid; place-items: center; min-height: 470px; }
.mission__character img { position: relative; z-index: 1; max-height: 550px; filter: drop-shadow(0 28px 28px rgba(0,0,0,.5)); animation: float 3.4s ease-in-out infinite; }
.energy-ring { position: absolute; width: min(80vw, 410px); aspect-ratio: 1; border: 16px solid var(--yellow); border-radius: 50%; box-shadow: inset 0 0 15px #fff2a5, 0 0 38px var(--orange), 0 0 90px rgba(255,172,27,.55); }

.countdown-section { background: linear-gradient(180deg, #f0f8ff, #d8edff); color: var(--ink); }
.countdown-section::before { content: ""; position: absolute; inset: auto -8% -150px; height: 320px; background: var(--green, #24a044); transform: skewY(-6deg); }
.countdown-section h2 { color: #06245e; }
.countdown { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 950px; margin: auto; border: 6px solid #071e5d; border-radius: 24px; overflow: hidden; background: white; box-shadow: 0 15px 0 rgba(7,30,93,.16); }
.countdown div { display: grid; place-items: center; min-height: 185px; padding: 20px 8px; }
.countdown div + div { border-left: 3px dashed #9acfff; }
.countdown strong { color: var(--blue); font: 400 clamp(2.5rem, 7vw, 5rem)/1 var(--display); text-shadow: 3px 3px 0 #c7e8ff; }
.countdown span { margin-top: 12px; color: #375483; font-size: .7rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }

.event-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr); align-items: center; gap: 25px; min-height: 760px; background: linear-gradient(150deg, #051649, #08388b 58%, #076dc5); }
.event-section::before { content: ""; position: absolute; inset: 0; opacity: .2; background: repeating-linear-gradient(125deg, transparent 0 34px, rgba(31,184,255,.5) 35px 38px, transparent 39px 72px); }
.event-card { position: relative; z-index: 1; max-width: 650px; padding: clamp(28px, 6vw, 58px); border: 3px solid #1ebeff; border-radius: 24px; background: rgba(2,10,36,.82); box-shadow: 0 0 45px rgba(25,184,255,.24); }
.event-card__date { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 22px 0; border-top: 2px solid rgba(255,255,255,.18); border-bottom: 2px solid rgba(255,255,255,.18); }
.event-card__date span { font-weight: 900; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
.event-card__date strong { color: var(--yellow); font: 400 clamp(4.8rem, 12vw, 8rem)/.8 var(--display); text-shadow: 4px 4px 0 #c66f00; }
.event-card__details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 25px 0 30px; }
.event-card__details div { padding: 17px; border-radius: 12px; background: rgba(27,158,255,.13); }
.event-character { position: relative; z-index: 1; align-self: end; margin: 0; }
.event-character img { max-height: 630px; margin-inline: auto; filter: drop-shadow(0 30px 30px rgba(0,0,0,.5)); }

.rsvp-section { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(30px, 7vw, 90px); background: radial-gradient(circle at 20% 30%, rgba(18,154,255,.35), transparent 32%), #02091e; }
.rsvp__visual { text-align: center; }
.rsvp__visual img { width: min(420px, 85%); margin: auto; filter: drop-shadow(0 0 24px rgba(255,24,230,.45)); }
.rsvp__visual > span { display: block; margin-top: 35px; color: var(--yellow); font: 400 clamp(3rem, 10vw, 6rem)/1 var(--display); transform: skewX(-8deg); text-shadow: 4px 4px 0 var(--blue); }
.rsvp__content { max-width: 650px; }
.rsvp__content > p:not(.pixel-label) { color: #c9ddff; line-height: 1.7; }
.rsvp-form { display: grid; gap: 17px; margin-top: 30px; padding: clamp(22px, 5vw, 38px); border: 2px solid #167ddf; border-radius: 20px; background: rgba(5,25,70,.82); }
.rsvp-form > label { display: grid; gap: 8px; }
.rsvp-form label > span, .rsvp-form legend { color: #9adfff; font-size: .7rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.rsvp-form input[type="text"], .rsvp-form input[type="number"] { width: 100%; height: 52px; padding: 0 15px; color: white; border: 2px solid #296fc7; border-radius: 10px; background: #030e30; outline: none; }
.rsvp-form input:focus { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,213,46,.12); }
.rsvp-form fieldset { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0; border: 0; }
.rsvp-form legend { margin-bottom: 9px; }
.answer-pill input { position: absolute; opacity: 0; pointer-events: none; }
.answer-pill span { display: grid; place-items: center; min-height: 48px; padding: 8px; border: 2px solid #286aba; border-radius: 999px; background: #061945; cursor: pointer; }
.answer-pill input:checked + span { color: #08153a; border-color: var(--yellow); background: var(--yellow); }
.form-error { min-height: 20px; margin: 0; color: #ff9ba1; font-weight: 800; }

footer { display: grid; justify-items: center; gap: 12px; padding: 55px 22px; text-align: center; background: #010615; }
footer img { width: min(290px, 70vw); margin-bottom: 16px; }
footer strong { color: var(--yellow); font: 400 1.35rem var(--display); text-transform: uppercase; }
footer span { color: #8eafd9; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.25) rotate(-8deg); } }
@keyframes float { 50% { transform: translateY(-15px) rotate(-1deg); } }

@media (max-width: 820px) {
  .welcome { padding: 16px; }
  .welcome__panel { padding: 36px 18px; }
  .hero { min-height: 100svh; }
  .hero__image { object-position: center top; }
  .hero__content { padding: 30px 20px 38px; }
  .section { padding: 78px 20px; }
  .mission, .event-section, .rsvp-section { grid-template-columns: 1fr; }
  .mission__character { min-height: 390px; }
  .mission__character img { max-height: 430px; }
  .mission__stats { grid-template-columns: 1fr; }
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .countdown div { min-height: 135px; }
  .countdown div:nth-child(3) { border-left: 0; border-top: 3px dashed #9acfff; }
  .countdown div:nth-child(4) { border-top: 3px dashed #9acfff; }
  .event-card__date { grid-template-columns: 1fr; gap: 5px; }
  .event-card__details { grid-template-columns: 1fr; }
  .event-character { order: -1; }
  .event-character img { max-height: 390px; }
  .rsvp__visual img { width: min(330px, 80%); }
}

@media (max-width: 430px) {
  .hero h1 { font-size: 2.5rem; }
  .hero__content > p:not(.pixel-label) { font-size: .95rem; }
  .countdown strong { font-size: 2.6rem; }
  .rsvp-form fieldset { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
