/* ============================================================
   Resonancias · Almudena & Iñaki
   Estilo: tintas planas, ilustración sencilla, sin serifas.
   Botones: amarillo (normal), coral (acción principal) y contorno (secundario).
   ============================================================ */

:root {
  --night: #1c1a45;
  --night-2: #262358;
  --night-3: #3a3680;
  --paper: #fff3e0;
  --paper-2: #f7e4c4;
  --cream: #fff3e0;
  --ink: #1c1a45;

  --coral: #ff6b4a;   /* acento decorativo, nunca en botones */
  --sun: #ffc93c;
  --sky: #7fd1f5;
  --lilac: #b7a4ff;

  --primary: var(--sun);
  --secondary: var(--sky);

  --io: var(--sun);
  --europa: var(--sky);
  --ganimedes: var(--lilac);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 20px;
  color-scheme: dark;
}

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

html {
  background: var(--night);
  color: var(--cream);
  font-family: var(--font);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body { background: var(--night); line-height: 1.6; font-size: clamp(16px, .45vw + 14.5px, 18px); }
body.is-portada { height: 100dvh; overflow: hidden; overscroll-behavior: none; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

/* Colores por bloque */
.on-night { --fg: var(--cream); --muted: #bdb8e8; --line: rgba(255, 243, 224, .16); --sh: #0d0c26; --field: var(--night-2); --field-line: var(--night-3); background: var(--night); color: var(--fg); }
.on-paper { --fg: var(--ink); --muted: #5d5988; --line: rgba(28, 26, 69, .18); --sh: var(--ink); --field: #fff; --field-line: rgba(28, 26, 69, .25); background: var(--paper); color: var(--fg); }

/* Titulares */
.display { font-family: var(--font); font-weight: 800; letter-spacing: -.035em; }

/* ---------- Botones: principal y secundario ---------- */
.btn {
  --bg: var(--sun); --tx: var(--ink); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.4em; border-radius: 999px;
  border: 2px solid var(--bd); background: var(--bg); color: var(--tx);
  font: 700 .95rem/1.1 var(--font); letter-spacing: .02em; text-decoration: none;
  box-shadow: 4px 4px 0 var(--sh, var(--ink));
  cursor: pointer; transition: transform .12s, box-shadow .12s, background .15s, color .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--sh, var(--ink)); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--sh, var(--ink)); }
.btn--coral { --bg: var(--coral); --bd: var(--ink); }
.btn--ghost { --bg: transparent; --tx: var(--fg); --bd: var(--fg); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Portada / hero ---------- */
.hero {
  position: relative;
  height: 100dvh; min-height: 640px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "text" "orbit" "foot";
  padding: max(28px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  overflow: hidden; isolation: isolate;
}
body.is-portada .hero { min-height: 0; }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero__text { grid-area: text; text-align: center; min-width: 0; }
.orbit-anchor { grid-area: orbit; min-height: 180px; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 40px; }
.hero__foot { grid-area: foot; text-align: center; min-width: 0; }

.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .32em; color: var(--sun); padding-left: .32em; }
h1 { font-size: clamp(2.5rem, 12.6vw, 7rem); line-height: .95; margin: .12em 0 .1em; }
.names { font-size: clamp(1.15rem, 2.8vw, 1.6rem); font-weight: 600; line-height: 1.2; }
.names .amp { color: var(--coral); }
.message { margin: 1rem auto 0; max-width: 28ch; font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 500; line-height: 1.4; }
.when { display: inline-block; margin-top: .7rem; color: var(--sun); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.when:hover { color: var(--cream); }

.countdown { display: flex; justify-content: center; gap: clamp(14px, 3vw, 26px); margin-top: 1rem; }
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 2.4ch; }
.countdown__num { font: 800 clamp(1.5rem, 3.4vw, 2.1rem)/1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.countdown__lbl { font-size: .66rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }
.countdown__now { font: 800 1.6rem var(--font); color: var(--sun); }

.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 1.3rem; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 13px; }
.eq i { width: 3px; height: 5px; background: currentColor; border-radius: 2px; }
.listen[aria-pressed="true"] .eq i { animation: eq .8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.27s !important; }
.eq i:nth-child(3) { animation-delay: -.54s !important; }
@keyframes eq { from { height: 3px; } to { height: 13px; } }
.listen[aria-pressed="true"] { --bg: var(--sun); --tx: var(--ink); --bd: var(--ink); }

.legend { list-style: none; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; font-size: .82rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .45em; white-space: nowrap; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.legend b { font-weight: 700; color: var(--fg); }
.private-note { margin-top: .8rem; font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--muted); text-decoration: none; font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.scroll-cue svg { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .hero {
    grid-template-columns: minmax(420px, 1fr) 1.25fr;
    grid-template-rows: 1fr auto;
    grid-template-areas: "text orbit" "foot orbit";
    padding: 48px clamp(32px, 5vw, 88px);
    column-gap: 24px;
  }
  .hero__text { align-self: center; }
  .hero h1 { font-size: clamp(3.4rem, 6.4vw, 7rem); }
  .orbit-anchor { min-height: 0; }
}

/* ---------- Secciones ---------- */
.section { position: relative; }
.wrap { max-width: 1140px; margin: 0 auto; padding: clamp(76px, 10vw, 132px) 16px; }
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--coral); }
h2 { font-size: clamp(2.2rem, 5.6vw, 3.8rem); line-height: 1.02; margin: .3em 0 .5em; text-wrap: balance; }
h3 { font-weight: 700; }
.lead { font-size: 1.15em; max-width: 58ch; }
.prose { max-width: 58ch; }
.prose p + p { margin-top: 1em; }
.prose strong { font-weight: 700; }
.ph { text-decoration: underline dashed var(--coral) 1.5px; text-underline-offset: .2em; cursor: help; }

/* Zigzag */
.split { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 80px; } }

/* Historia: fotos */
.photos { position: relative; aspect-ratio: 4 / 3.3; max-width: 600px; width: 100%; margin: 0 auto; }
.photo {
  position: absolute; width: 42%;
  background: #fff; padding: 9px 9px 0; border: 2px solid var(--ink); border-radius: 8px;
  box-shadow: 6px 6px 0 var(--ink);
  transform: translateY(var(--py, 0px)) rotate(var(--rot));
  transition: box-shadow .2s;
}
.photo:hover { z-index: 5; box-shadow: 9px 9px 0 var(--ink); }
.photo:nth-child(1) { --rot: -7deg; left: 0; top: 12%; }
.photo:nth-child(2) { --rot: 3deg; left: 29%; top: 2%; z-index: 2; }
.photo:nth-child(3) { --rot: -3deg; left: 58%; top: 16%; }
.photo__img {
  aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden;
  background: var(--c); color: var(--t, var(--cream));
  display: grid; place-items: center; align-content: center; gap: .2rem; text-align: center;
}
.photo__img img { width: 100%; height: 100%; object-fit: cover; }
.photo__img b { font: 800 clamp(1.6rem, 4.6vw, 2.6rem)/1 var(--font); letter-spacing: -.03em; }
.photo__img small { font-size: .72rem; font-weight: 500; opacity: .7; }
.photo figcaption { color: var(--ink); font-size: clamp(.78rem, 1.6vw, .92rem); font-weight: 700; line-height: 1.25; text-align: center; padding: 9px 4px 11px; }

/* 40 · 20 · 10 con los colores de las lunas, sin perfil */
.big-nums { display: flex; gap: .3em; font: 800 clamp(2.6rem, 6vw, 3.8rem)/1 var(--font); letter-spacing: -.04em; margin-bottom: .3em; }
.big-nums span:nth-child(1) { color: var(--io); }
.big-nums span:nth-child(2) { color: var(--europa); }
.big-nums span:nth-child(3) { color: var(--ganimedes); }

.aside { margin-top: 1.8em; padding: 18px 20px; border: 2px solid var(--fg); border-radius: 16px; background: var(--paper-2); max-width: 58ch; font-size: .95em; }
.aside strong { font-weight: 800; }

/* Cuándo y dónde */
.facts { display: grid; gap: 22px; margin-top: 8px; }
.fact h3 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; }
.fact p { color: var(--muted); }
.fact .label { font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--sun); margin-bottom: .2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Ilustración tipo carátula de disco */
.cover {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; margin: 0 auto;
  background: var(--coral); color: var(--ink); overflow: hidden;
  border: 2px solid var(--ink); border-radius: 6px; box-shadow: 8px 8px 0 var(--sh);
  display: grid; grid-template-rows: auto 1fr auto; padding: clamp(18px, 4%, 28px);
}
.cover__rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover__top, .cover__bottom { position: relative; display: flex; justify-content: space-between; gap: 12px; font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.cover__day { position: relative; align-self: end; margin-bottom: .12em; font: 800 clamp(7rem, 26vw, 12rem)/.8 var(--font); letter-spacing: -.06em; }
.cover__month { display: block; font-size: .22em; letter-spacing: .06em; margin-top: .12em; text-transform: uppercase; }

/* Programa: lista sencilla con filetes */
.program { list-style: none; padding: 0; margin-top: 44px; border-top: 2px solid var(--fg); }
.program li { display: grid; grid-template-columns: 5.4rem 1fr; gap: 6px 18px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.program time { font: 800 1.7rem/1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--coral); }
.program h3 { font-size: 1.35rem; line-height: 1.2; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1em .6em; letter-spacing: -.02em; }
.program h3 small { font-size: .85rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.program p { margin-top: .25em; max-width: 60ch; }
.program-note { margin-top: 26px; font-size: .9rem; color: var(--muted); max-width: 62ch; }
@media (min-width: 720px) {
  .program li { grid-template-columns: 9rem 1fr; padding: 28px 0; }
  .program time { font-size: 2.3rem; }
}

/* Formulario */
.rsvp-wrap { max-width: 720px; margin: 0 auto; }
.rsvp { margin-top: 36px; }
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.3rem; }
.field > label, .legend-label { font-size: .92rem; font-weight: 600; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--fg);
  background: var(--field); border: 2px solid var(--field-line); border-radius: 14px;
  padding: .8em 1em; transition: border-color .15s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--primary) 50%), linear-gradient(135deg, var(--primary) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.row-2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } }

fieldset { border: 0; padding: 0; min-width: 0; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: .45rem; }
.choice label {
  position: relative; display: flex; flex-direction: column; gap: .1rem;
  padding: 16px 18px; border: 2px solid var(--field-line); border-radius: 16px; cursor: pointer;
  background: var(--field); transition: border-color .15s, background .15s;
}
.choice label:hover { border-color: var(--primary); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .big { font: 800 1.2rem/1.2 var(--font); letter-spacing: -.02em; }
.choice .small { font-size: .8rem; color: var(--muted); }
.choice label:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--ink); }
.choice label:has(input:checked) .small { color: var(--ink); opacity: .75; }
.choice label:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: .8rem; }
.form-foot small { color: var(--muted); }
.form-status { min-height: 1.5em; margin-top: .8rem; color: var(--coral); font-weight: 600; }

.rsvp-done { margin-top: 36px; padding: 36px 26px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--sun); color: var(--ink); text-align: center; box-shadow: 6px 6px 0 var(--sh); }
.rsvp-done h3 { font: 800 clamp(1.6rem, 4vw, 2.2rem)/1.1 var(--font); letter-spacing: -.03em; }
.rsvp-done p { margin-top: .7em; }
.rsvp-done .btn { --sh: var(--ink); --bg: var(--cream); --tx: var(--ink); --bd: var(--ink); }
.rsvp-done .demo { font-size: .8rem; opacity: .7; }
.rsvp-done .btn { margin-top: 1.4rem; }

/* Notas al programa (info + preguntas) */
.notes { margin-top: 32px; max-width: 800px; }
.notes details { border-top: 2px solid var(--ink); }
.notes details:last-child { border-bottom: 2px solid var(--ink); }
.notes summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-size: clamp(1.05rem, 2.3vw, 1.25rem); font-weight: 700; line-height: 1.3; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--coral); color: var(--ink); border: 2px solid var(--ink); font: 800 1.1rem/1 var(--font);
  transition: rotate .2s;
}
.notes details[open] summary::after { rotate: 45deg; }
.notes details > div { padding: 0 0 22px; max-width: 62ch; }
.notes details > div p + p { margin-top: .7em; }
.notes a { color: var(--ink); font-weight: 600; }

/* Footer */
.footer { text-align: center; padding: 56px 16px 44px; }
.footer .sig { font-size: 1.6rem; }
.footer .sig .amp { color: var(--coral); }
.footer .tiny { margin-top: .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .3em; color: var(--sun); }

/* Aparición al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1.15); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue svg, .listen[aria-pressed="true"] .eq i { animation: none; }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
