/* Marti & Nacho — versión punk */
:root {
  --black: #0A0A0A;
  --panel: #0F0D0E;
  --red: #FF2E4D;
  --pink: #FF7AB6;
  --bone: #F2E9E4;
  --dim: #A89C98;

  --punk: "Rubik Distressed", "Arial Black", sans-serif;
  --type: "Special Elite", "Courier New", monospace;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }

/* Grano de fotocopia sobre todo el sitio */
.grain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; opacity: .09; mix-blend-mode: screen; }

/* Formas: cada clase define el recorte y la proporción */
.shape-heart { --clip: url(#clip-heart); --ar: 100 / 92; }
.shape-star { --clip: url(#clip-star); --ar: 1; }
.shape-moon { --clip: url(#clip-moon); --ar: 1; }
.shape-burst { --clip: url(#clip-burst); --ar: 1; }
.shape-flower { --clip: url(#clip-flower); --ar: 1; }
.shape-star5 { --clip: url(#clip-star5); --ar: 1; }

.page { min-height: 100%; display: flex; flex-direction: column; padding: 14px clamp(16px, 7vw, 120px) 18px; }

/* Barras superior e inferior */
.bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--red); font-family: var(--type); font-size: clamp(17px, 1.7vw, 22px); padding: 4px 2px 10px; }
.bar a { text-decoration: none; }
.bar__names { font-family: var(--punk); font-size: clamp(22px, 2.4vw, 32px); letter-spacing: .02em; }
.bar--bottom { padding: 12px 2px 0; font-size: 15px; }
.bar__link { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--type); color: var(--red); text-decoration: none; }
.bar__link:hover { color: var(--pink); text-decoration: underline; text-underline-offset: 4px; }

/* Marco con brillo neón */
.frame {
  position: relative;
  flex: 1;
  min-height: min(78vh, 62vw);
  border: 1.5px solid var(--red);
  background: var(--black);
  box-shadow: 0 0 0 1px rgba(255, 46, 77, .25), 0 0 34px rgba(255, 46, 77, .45), inset 0 0 60px rgba(255, 46, 77, .22);
  overflow: hidden;
}

/* Formas decorativas */
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles svg { position: absolute; color: var(--c, var(--red)); fill: currentColor; animation: float var(--t, 6s) ease-in-out var(--d, 0s) infinite alternate; filter: drop-shadow(0 0 6px currentColor); }
@keyframes float { from { transform: translateY(0) rotate(var(--r, 0deg)); } to { transform: translateY(-12px) rotate(calc(var(--r, 0deg) + 14deg)); } }

/* Enlaces con foto */
.hearts { position: absolute; inset: 0; }
.heart {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  text-decoration: none;
  transform: rotate(var(--r));
  transition: transform .45s cubic-bezier(.3, 1.5, .5, 1);
  filter: drop-shadow(0 0 1.5px var(--red)) drop-shadow(0 0 14px rgba(255, 46, 77, .45));
  z-index: 1;
}
.heart__img { position: relative; display: block; aspect-ratio: var(--ar, 1); clip-path: var(--clip); background: var(--red); overflow: hidden; }
.heart__img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.35) brightness(1.05); transition: filter .4s, transform .6s; }
.heart__img::after { content: ""; position: absolute; inset: 0; background: var(--red); mix-blend-mode: multiply; transition: opacity .4s; }
.heart__label {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 8px;
  transform: translateX(-50%) rotate(calc(var(--r) * -1.5));
  background: var(--red);
  color: var(--black);
  font-family: var(--type);
  font-size: clamp(14px, 1.3vw, 18px);
  padding: 1px 8px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s;
}
.heart:hover, .heart:focus-visible { transform: rotate(calc(var(--r) * -1)) scale(1.1); z-index: 2; outline: none; }
.heart:hover .heart__img::after, .heart:focus-visible .heart__img::after { opacity: .25; }
.heart:hover .heart__img img, .heart:focus-visible .heart__img img { filter: grayscale(.2) contrast(1.2); transform: scale(1.06); }
.heart:hover .heart__label, .heart:focus-visible .heart__label { opacity: 1; }

.heart--solid .heart__img { display: grid; place-items: center; }
.heart--solid .heart__img::after { display: none; }
.heart__text { font-family: var(--punk); color: var(--black); font-size: clamp(16px, 1.8vw, 28px); margin-top: -8%; }
.heart--solid { animation: beat 1.6s ease-in-out infinite; }
.heart--solid:hover { animation: none; }
@keyframes beat { 0%, 100% { transform: rotate(var(--r)) scale(1); } 15% { transform: rotate(var(--r)) scale(1.08); } 30% { transform: rotate(var(--r)) scale(1); } 45% { transform: rotate(var(--r)) scale(1.05); } }

.hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); font-family: var(--type); color: var(--red); opacity: .8; font-size: 15px; white-space: nowrap; animation: flicker 4s steps(1) infinite; }
@keyframes flicker { 0%, 100% { opacity: .8; } 92% { opacity: .8; } 93% { opacity: .2; } 95% { opacity: .8; } 96% { opacity: .3; } }

/* ---------- Cuadros que se abren ---------- */
.frame.is-open .hearts, .frame.is-open .hint { display: none; }
.frame.is-open .sparkles { opacity: .45; }
.panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  padding: clamp(40px, 6vh, 72px) clamp(64px, 8vw, 120px);
  overflow-y: auto;
  animation: open .4s steps(4) both;
}
.panel[hidden] { display: none; }
@keyframes open { from { opacity: 0; transform: translateX(-6px); } }
.panel__eyebrow { font-family: var(--type); font-size: 15px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 12px; }
.panel__eyebrow span { color: var(--pink); }
.panel__title { font-family: var(--punk); font-weight: 400; font-size: clamp(38px, 4.4vw, 68px); line-height: .98; color: var(--red); margin-bottom: 22px; text-shadow: 0 0 18px rgba(255, 46, 77, .45); }
.panel__text p:not(.panel__eyebrow):not(.tag) { margin-bottom: 12px; max-width: 50ch; color: var(--bone); }
.tag { display: inline-block; background: var(--pink); color: var(--black); font-family: var(--type); font-size: 15px; padding: 2px 10px; margin-top: 8px; transform: rotate(-2deg); }

/* Foto del cuadro: recortada con la forma de su sección, en duotono rojo con trama */
.panel__media {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 340px);
  aspect-ratio: var(--ar, 1);
  transform: rotate(-6deg);
  filter: drop-shadow(0 0 2px var(--red)) drop-shadow(0 0 22px rgba(255, 46, 77, .4));
}
.panel__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: var(--clip);
  filter: grayscale(1) contrast(1.6) brightness(.95) sepia(1) hue-rotate(-50deg) saturate(5);
  opacity: .9;
}
.panel__media::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: var(--clip);
  background: radial-gradient(rgba(10, 10, 10, .55) 32%, transparent 34%) 0 0 / 5px 5px;
  pointer-events: none;
}
.panel__media--tall img { object-position: center 30%; }

.facts { margin: 8px 0 20px; max-width: 52ch; }
.facts div { display: grid; grid-template-columns: 10em 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(255, 46, 77, .55); }
.facts dt { font-family: var(--type); color: var(--pink); }
.facts dd { margin: 0; }

.schedule { list-style: none; margin: 0; padding: 0; max-width: 52ch; }
.schedule li { display: grid; grid-template-columns: 4.4em 1fr; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed rgba(255, 46, 77, .55); font-size: 18px; }
.schedule time { font-family: var(--punk); color: var(--red); font-size: 24px; }

.btn { display: inline-block; border: 1.5px solid var(--red); color: var(--red); background: transparent; padding: 8px 18px; font-family: var(--type); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover, .btn--solid { background: var(--red); color: var(--black); }
.btn--solid:hover { background: var(--pink); border-color: var(--pink); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Formulario */
.panel__form { display: grid; gap: 18px; border: 1.5px solid var(--red); padding: clamp(20px, 3vw, 32px); box-shadow: 0 0 24px rgba(255, 46, 77, .3); background: rgba(10, 10, 10, .85); }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-family: var(--type); font-size: 15px; color: var(--pink); padding: 0; margin-bottom: 6px; }
.field input { font: inherit; border: 0; border-bottom: 1.5px solid rgba(255, 46, 77, .6); background: transparent; padding: 6px 0; border-radius: 0; color: var(--bone); }
.field input::placeholder { color: #6E6462; }
.field input:focus { outline: none; border-bottom-color: var(--pink); }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; border: 1.5px solid var(--red); padding: 6px 16px; cursor: pointer; color: var(--red); font-family: var(--type); }
.choice input:checked + span { background: var(--red); color: var(--black); }
.choice input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }
.if-yes { display: grid; gap: 18px; }
.if-yes[hidden] { display: none; }
.panel__form .btn { justify-self: start; }
.form__status { min-height: 1.4em; color: var(--pink); font-family: var(--type); }

/* Flechas: estrellas a los lados */
.pager[hidden] { display: none; }
.pager__btn { position: absolute; top: 50%; z-index: 3; width: 50px; height: 50px; transform: translateY(-50%); display: grid; place-items: center; text-decoration: none; transition: transform .25s; }
.pager__btn svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--red); filter: drop-shadow(0 0 8px rgba(255, 46, 77, .7)); }
.pager__btn span { position: relative; color: var(--black); font-size: 22px; font-weight: 600; line-height: 1; margin-top: -3px; }
.pager__prev { left: 14px; }
.pager__next { right: 14px; }
.pager__btn:hover { transform: translateY(-50%) rotate(45deg) scale(1.15); }
.pager__close { position: absolute; top: 14px; right: 18px; z-index: 3; font-family: var(--type); color: var(--red); text-decoration: none; }
.pager__close::before { content: "← "; }
.pager__close:hover { color: var(--pink); }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  .page { padding-inline: 12px; }
  .frame { min-height: 0; }
  .hearts { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 18px; padding: 28px 22px 64px; }
  .heart { position: relative; left: auto; top: auto; width: 100%; }
  .heart:nth-child(odd) { margin-top: 18px; }
  .heart--solid { grid-column: 1 / -1; justify-self: center; width: 50%; margin-top: 0 !important; }
  .heart__label { opacity: 1; font-size: 15px; }
  .panel { position: relative; inset: auto; grid-template-columns: 1fr; padding: 56px 22px 80px; overflow: visible; }
  .panel__media { order: -1; width: 62%; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .pager__btn { top: auto; bottom: 14px; transform: none; }
  .pager__btn:hover { transform: rotate(45deg) scale(1.1); }
  .pager__prev { left: 20px; }
  .pager__next { right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .sparkles svg, .heart--solid, .hint { animation: none; }
  .panel { animation: none; }
}

/* La luna deja visible la parte izquierda de la foto */
.shape-moon img { object-position: 28% center; }
