/* Mariangel XV — estilos propios, sin frameworks. Todo se sirve desde /assets. */

/* ---------- Fuentes (locales) ---------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/InstrumentSerif-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/InstrumentSerif-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Sacramento";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Sacramento-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/WorkSans-normal.woff2") format("woff2");
}

/* ---------- Paleta ---------- */
:root {
  --ocean: oklch(0.55 0.075 235);
  --ocean-deep: oklch(0.36 0.07 240);
  --sand: oklch(0.93 0.028 45);
  --sand-deep: oklch(0.87 0.045 40);
  --cream: oklch(0.975 0.012 80);
  --coral: oklch(0.7 0.13 32);

  --ink-85: color-mix(in oklab, var(--ocean-deep) 85%, transparent);
  --ink-80: color-mix(in oklab, var(--ocean-deep) 80%, transparent);
  --ink-70: color-mix(in oklab, var(--ocean-deep) 70%, transparent);
  --ink-60: color-mix(in oklab, var(--ocean-deep) 60%, transparent);
  --ink-25: color-mix(in oklab, var(--ocean-deep) 25%, transparent);
  --ink-15: color-mix(in oklab, var(--ocean-deep) 15%, transparent);
  --ink-10: color-mix(in oklab, var(--ocean-deep) 10%, transparent);

  --font-display: "Instrument Serif", Georgia, serif;
  --font-sans: "Work Sans", system-ui, sans-serif;
  --font-script: "Sacramento", cursive;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--cream);
  color: var(--ocean-deep);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
ul {
  list-style: none;
  padding: 0;
}
[hidden] {
  display: none !important;
}

/* ---------- Tipografía ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.coral {
  color: var(--coral);
}
.cream {
  color: var(--cream);
}
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 8vw, 5rem);
  line-height: 1;
  margin-top: 0.75rem;
}
.lead {
  margin-top: 1.5rem;
  max-width: 36rem;
  color: var(--ink-80);
}
.link-line {
  display: inline-block;
  border-bottom: 1px solid var(--ink-25);
  padding-bottom: 0.25rem;
}

/* ---------- Botones ---------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2.25rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: all 0.35s ease;
}
.btn-primary {
  background: var(--coral);
  color: var(--cream);
  border: 0;
}
.btn-primary:hover {
  background: var(--ocean-deep);
}
.btn-ghost {
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--ocean-deep) 35%, transparent);
  color: var(--ocean-deep);
}
.btn-ghost:hover {
  background: var(--ink-10);
}
.btn-primary:disabled,
.btn-ghost:disabled {
  opacity: 0.6;
  cursor: default;
}
.mt-btn {
  margin-top: 2.5rem;
}

/* ---------- Layout ---------- */
.section {
  padding: 7rem 1.5rem;
}
.wrap {
  margin: 0 auto;
  max-width: 64rem;
}
.wrap-lg {
  margin: 0 auto;
  max-width: 72rem;
}
.bg-sand {
  background: var(--sand);
}
.bg-sand-deep {
  background: var(--sand-deep);
}
.bg-cream {
  background: var(--cream);
}
.bg-ocean-deep {
  background: var(--ocean-deep);
}
.center {
  text-align: center;
}

/* Textura de puntos sobre fondos con foto */
.grain {
  position: relative;
  overflow: hidden;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(
    color-mix(in oklab, var(--ocean-deep) 12%, transparent) 0.5px,
    transparent 0.5px
  );
  background-size: 3px 3px;
}
.bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.veil-cream {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--cream) 60%, transparent);
}
.veil-ocean {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--ocean-deep) 70%, transparent);
}

/* ---------- Encabezado ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--ink-10);
  background: color-mix(in oklab, var(--cream) 90%, transparent);
  backdrop-filter: blur(8px);
}
.topbar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 auto;
  max-width: 72rem;
  padding: 1rem 1.5rem;
}
.countdown {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.countdown > div {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}
.countdown b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown span {
  color: var(--ink-60);
}
.topbar-cta {
  border-bottom: 1px solid var(--coral);
  padding-bottom: 0.25rem;
  color: var(--coral);
  display: none;
}
@media (min-width: 640px) {
  .topbar-cta {
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  min-height: 92svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem;
  text-align: center;
}
.hero-badge {
  position: absolute;
  left: 1.5rem;
  top: 2rem;
  z-index: 1;
}
@media (min-width: 640px) {
  .hero-badge {
    left: 2.5rem;
  }
}
.hero-in {
  position: relative;
  z-index: 1;
  max-width: 48rem;
}
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 3.6vw, 2.1rem);
  line-height: 1.3;
}
.hero-name {
  margin-top: 1rem;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(4.5rem, 20vw, 11rem);
  line-height: 0.8;
}
.hero-date {
  margin-top: 2rem;
}
.hero-where {
  margin-top: 0.75rem;
  color: var(--ink-80);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* ---------- Detalles ---------- */
.details-grid {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--ink-25);
  padding-top: 3rem;
}
@media (min-width: 768px) {
  .details-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.big {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.25rem;
  line-height: 1.1;
}
.details-grid p:last-child,
.details-grid .sub {
  margin-top: 0.75rem;
  color: var(--ink-80);
}

/* ---------- Playlist ---------- */
.songs {
  margin-top: 3rem;
}
.songs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  border-top: 1px solid color-mix(in oklab, var(--cream) 20%, transparent);
  padding: 1.5rem 0;
}
.songs .n {
  width: 2rem;
}
.songs .t {
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1;
  color: var(--cream);
}
.songs .a {
  color: color-mix(in oklab, var(--cream) 70%, transparent);
}

/* ---------- Dress code ---------- */
.dress {
  display: grid;
  align-items: center;
  gap: 3.5rem;
  margin: 0 auto;
  max-width: 72rem;
}
@media (min-width: 768px) {
  .dress {
    grid-template-columns: 1fr 1fr;
  }
}
.dress img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.looks {
  min-width: 0;
}
.look {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 0.75rem;
}
.look:not([hidden]) {
  animation: look-in 0.5s ease;
}
.dress .look img {
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}
.look img:nth-child(2) {
  margin-top: 2.5rem;
}
@keyframes look-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.tab {
  border: 1px solid color-mix(in oklab, var(--ocean-deep) 30%, transparent);
  border-radius: 999px;
  background: transparent;
  padding: 0.75rem 1.25rem;
  transition: background-color 0.2s, color 0.2s;
}
.tab[aria-selected="true"] {
  background: var(--ocean-deep);
  color: var(--cream);
  border-color: var(--ocean-deep);
}
.tip {
  margin-top: 1.5rem;
}
.tip-2 {
  margin-top: 0.5rem;
  color: var(--ink-70);
}

/* ---------- Formulario RSVP ---------- */
.rsvp {
  margin: 3rem auto 0;
  max-width: 36rem;
  text-align: left;
}
.rsvp label,
.rsvp fieldset {
  display: block;
  margin-top: 2rem;
  border: 0;
  padding: 0;
}
.rsvp label:first-child {
  margin-top: 0;
}
.rsvp .eyebrow {
  color: var(--ink-70);
}
.field {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  border: 0;
  border-bottom: 1px solid var(--ink-25);
  border-radius: 0;
  background: transparent;
  padding: 0 0 0.5rem;
  font-size: 1rem;
  outline: none;
}
.field::placeholder {
  color: color-mix(in oklab, var(--ocean-deep) 40%, transparent);
}
.field:focus {
  border-bottom-color: var(--coral);
}
.choices {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.choice {
  border: 1px solid var(--ink-25);
  border-radius: 999px;
  background: transparent;
  padding: 0.75rem 1.25rem;
  color: var(--ink-70);
  transition: background-color 0.2s, color 0.2s;
}
.choice[aria-pressed="true"] {
  background: var(--ocean-deep);
  border-color: var(--ocean-deep);
  color: var(--cream);
}
.rsvp-submit {
  margin-top: 2.5rem;
  text-align: center;
}
.note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-60);
}
.error {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--coral);
}
.thanks {
  margin: 3rem auto 0;
  max-width: 36rem;
}
.thanks p:first-child {
  font-family: var(--font-display);
  font-size: 1.875rem;
}
.thanks p:last-child {
  margin-top: 0.75rem;
  color: var(--ink-70);
}

/* ---------- Cierre ---------- */
.closing {
  padding: 11rem 1.5rem 8rem;
  text-align: center;
}
.closing-in {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 42rem;
}
.closing h2 {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 0.95;
  color: var(--cream);
}
.closing .script {
  margin-top: 3.5rem;
  font-size: 3rem;
  color: var(--cream);
}

/* ---------- Fotomatón ---------- */
.page-hero {
  padding: 6rem 1.5rem;
}
.page-hero-in {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 64rem;
}
.page-hero h1 {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 7rem);
  line-height: 0.85;
  color: var(--cream);
}
.hero-split {
  display: grid;
  align-items: center;
  gap: 2.5rem;
}
@media (min-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr 22rem;
    gap: 4rem;
  }
}
.page-hero .eyebrow {
  color: color-mix(in oklab, var(--cream) 85%, transparent);
}
.page-hero .back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid color-mix(in oklab, var(--cream) 45%, transparent);
  border-radius: 999px;
  padding: 0.65rem 1.25rem 0.65rem 1rem;
  color: var(--cream);
  transition: background-color 0.3s;
}
.page-hero .back:hover {
  background: color-mix(in oklab, var(--cream) 14%, transparent);
}
.page-hero .back svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s;
}
.page-hero .back:hover svg {
  transform: translateX(-4px);
}
.page-hero p.intro {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: color-mix(in oklab, var(--cream) 90%, transparent);
}
.steps {
  display: grid;
  gap: 2.5rem;
  margin: 0 auto;
  max-width: 72rem;
}
@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step {
  border-top: 1px solid var(--ink-25);
  padding-top: 1.5rem;
}
.step h2 {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.875rem;
  line-height: 1.15;
}
.step p:last-child {
  margin-top: 0.75rem;
  color: var(--ink-80);
}

.booth {
  width: 100%;
  max-width: 22rem;
  justify-self: center;
}
.viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream);
}
.viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
/* Toda el área es un botón: un clic abre el selector para subir una foto */
.viewfinder-idle {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--ink-25);
  background: transparent;
  padding: 0 1.5rem;
  text-align: center;
  transition: background-color 0.3s;
}
.viewfinder-idle:hover {
  background: var(--sand);
}
.viewfinder-idle svg {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.5rem;
  fill: none;
  stroke: var(--ocean-deep);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.viewfinder-idle .t {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ocean-deep);
}
.viewfinder-idle .d {
  margin-top: 0.375rem;
  max-width: 15rem;
  font-size: 0.75rem;
  color: var(--ink-80);
}
.booth-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.booth-actions .btn-primary,
.booth-actions .btn-ghost {
  padding: 0.65rem 1.25rem;
  font-size: 0.65rem;
}
.booth-actions .btn-ghost {
  border-color: color-mix(in oklab, var(--cream) 55%, transparent);
  color: var(--cream);
}
.booth-actions .btn-ghost:hover {
  background: color-mix(in oklab, var(--cream) 14%, transparent);
}

/* ---------- Galería (masonry) ---------- */
.wall-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--ink-15);
  padding-bottom: 1.5rem;
}
.wall-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1;
}
.wall-head .eyebrow {
  color: var(--ink-60);
}
.wall-empty {
  margin-top: 2rem;
  max-width: 28rem;
  color: var(--ink-70);
}
/* Filas justificadas: fotomaton.js fija el ancho/alto de cada foto para que cada fila llene
   todo el ancho sin dejar huecos. Las horizontales salen más anchas que las verticales. */
.wall {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) {
  .wall {
    gap: 1rem;
  }
}
.photo {
  position: relative;
  flex: none;
  overflow: hidden;
  background: var(--sand);
}
.photo button {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  padding: 0;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s;
}
.photo button:hover img {
  transform: scale(1.04);
}
.uploading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, var(--ocean-deep) 40%, transparent);
  color: var(--cream);
}
.photo .err {
  position: absolute;
  inset: auto 0 0 0;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--coral);
}
.linkbtn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink-60);
}
.linkbtn:hover {
  color: var(--coral);
}
.more {
  margin-top: 2.5rem;
  text-align: center;
}

/* ---------- Visor de foto (popup) ---------- */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  background: color-mix(in oklab, var(--ocean-deep) 94%, black);
  padding: 0;
  color: var(--cream);
}
.lightbox[open] {
  display: grid;
  grid-template-rows: 100dvh;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}
.lightbox::backdrop {
  background: black;
}
.lb-stage {
  grid-column: 2;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 0 1.5rem;
}
.lb-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  /* alto de la ventana menos el espacio de la barra superior y de la info/descarga */
  max-height: calc(100dvh - 10rem);
  object-fit: contain;
}
.lb-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  padding: 0 1rem;
}
.lb-info .eyebrow {
  color: color-mix(in oklab, var(--cream) 75%, transparent);
}
.lb-info .btn-primary {
  padding: 0.7rem 1.5rem;
}
.lb-nav,
.lb-close {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: color-mix(in oklab, var(--cream) 12%, transparent);
  color: var(--cream);
  transition: background-color 0.2s;
}
.lb-nav {
  margin: 0 0.75rem;
}
.lb-nav:hover,
.lb-close:hover {
  background: color-mix(in oklab, var(--cream) 25%, transparent);
}
.lb-nav svg,
.lb-close svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lb-nav[hidden] {
  display: block;
  visibility: hidden;
}
.lb-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}
@media (max-width: 639px) {
  .lightbox[open] {
    grid-template-columns: 1fr;
  }
  .lb-stage {
    grid-column: 1;
  }
  .lb-nav {
    position: absolute;
    top: 50%;
    margin: -1.5rem 0 0;
    background: color-mix(in oklab, black 45%, transparent);
  }
  .lb-prev {
    left: 0.5rem;
  }
  .lb-next {
    right: 0.5rem;
  }
}

.outro {
  padding: 5rem 1.5rem;
  text-align: center;
}
.outro p {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.15;
  color: var(--cream);
}
.outro .btn-primary {
  margin-top: 2.5rem;
}

/* ---------- Admin ---------- */
.admin {
  margin: 0 auto;
  min-height: 100vh;
  max-width: 56rem;
  padding: 4rem 1.5rem;
}
.admin h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.25rem;
}
.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.admin-top .btn-ghost {
  padding: 0.7rem 1.5rem;
}
.admin .tabs {
  margin-top: 2rem;
}
.admin-login {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.admin-login .field {
  margin: 0;
  max-width: 20rem;
  padding: 0.5rem 0.25rem;
}
.admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.table-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
th,
td {
  padding: 0.5rem 1rem 0.5rem 0;
  border-bottom: 1px solid var(--ink-10);
}
th {
  border-bottom-color: var(--ink-25);
  color: var(--ink-60);
  font-weight: 500;
}

/* ---------- Parallax (hero y cierre) ---------- */
/* La imagen es más alta que su sección para poder desplazarse sin dejar huecos (home.js la mueve). */
.bg-photo.parallax {
  top: -35%;
  height: 170%;
  will-change: transform;
}

/* ---------- Olas ---------- */
.hero {
  padding-bottom: 9rem;
}
.waves {
  position: absolute;
  inset: auto 0 -1px 0;
  z-index: 1;
  height: clamp(6rem, 15vw, 11rem);
  overflow: hidden;
  pointer-events: none;
}
.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  animation: wave-drift 18s linear infinite;
}
.wave path {
  fill: var(--sand);
}
.wave-1 {
  opacity: 0.5;
  height: 100%;
  animation-duration: 26s;
}
.wave-2 {
  opacity: 0.8;
  height: 80%;
  animation-duration: 18s;
  animation-direction: reverse;
}
.wave-3 {
  opacity: 1;
  height: 55%;
  animation-duration: 12s;
}
@keyframes wave-drift {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Botón de música ---------- */
.music-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: var(--cream);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.25);
  transition: background-color 0.3s, transform 0.3s;
}
.music-btn:hover {
  background: var(--ocean-deep);
  transform: scale(1.06);
}
.music-btn svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}
.music-btn .ico-on,
.music-btn[aria-pressed="true"] .ico-off {
  display: none;
}
.music-btn[aria-pressed="true"] .ico-on {
  display: block;
}
/* Anillo que late mientras suena */
.music-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--coral);
  opacity: 0;
  pointer-events: none;
}
.music-btn[aria-pressed="true"]::after {
  animation: music-pulse 2s ease-out infinite;
}
@keyframes music-pulse {
  from {
    opacity: 0.8;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave,
  .music-btn::after {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Olas arriba del cierre ---------- */
.waves-top {
  inset: -1px 0 auto 0;
  transform: scaleY(-1);
}
.waves-top .wave path {
  fill: var(--cream);
}

/* ---------- Pantalla de bienvenida ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--ocean-deep);
  text-align: center;
  transition: opacity 0.5s ease;
}
.gate.out {
  opacity: 0;
  pointer-events: none;
}
body.locked {
  overflow: hidden;
}
.gate-in {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}
.gate-name {
  font-size: clamp(4.5rem, 20vw, 8rem);
  line-height: 0.9;
  color: var(--cream);
}
.gate-text {
  margin-top: 2.5rem;
  color: color-mix(in oklab, var(--cream) 90%, transparent);
}
.gate-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.gate-ghost {
  border-color: color-mix(in oklab, var(--cream) 50%, transparent);
  color: var(--cream);
}
.gate-ghost:hover {
  background: color-mix(in oklab, var(--cream) 12%, transparent);
}

/* ---------- Playlist: botones y popups ---------- */
.playlist-actions .btn-ghost {
  gap: 0.4rem;
}
.playlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.modal {
  width: min(92vw, 28rem);
  max-height: 88dvh;
  margin: auto;
  border: 0;
  background: var(--cream);
  padding: 0;
  color: var(--ocean-deep);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.4);
}
.modal::backdrop {
  background: color-mix(in oklab, var(--ocean-deep) 70%, transparent);
  backdrop-filter: blur(3px);
}
.modal-in {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
}
.modal h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.1;
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: var(--sand);
}
.modal-close:hover {
  background: var(--sand-deep);
}
.modal-close svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.modal-form label {
  display: block;
  margin-top: 1.5rem;
}
.modal-form label:first-of-type {
  margin-top: 1.25rem;
}
.modal-form .eyebrow {
  color: var(--ink-70);
}
.modal-submit {
  width: 100%;
  margin-top: 1.75rem;
}
.ok {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ocean);
}
.modal-scroll {
  max-height: 55dvh;
  margin-top: 1.25rem;
  overflow-y: auto;
}
.song-list {
  margin-top: 0.5rem;
}
.song-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.125rem 1rem;
  border-top: 1px solid var(--ink-10);
  padding: 0.7rem 0;
}
.song-list .t {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.1;
}
.song-list .a {
  color: var(--ink-60);
}
.admin-h2 {
  margin-top: 3rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
}

/* ---------- Admin: fotos ---------- */
.admin-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.admin-photo {
  font-size: 0.75rem;
  color: var(--ink-60);
}
.admin-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--sand);
}
.admin-photo span {
  display: block;
  margin-top: 0.4rem;
}
.photo-del {
  margin-top: 0.4rem;
  border: 1px solid var(--coral);
  border-radius: 999px;
  background: transparent;
  padding: 0.4rem 0.9rem;
  color: var(--coral);
  font-size: 0.62rem;
  transition: background-color 0.2s, color 0.2s;
}
.photo-del:hover:not(:disabled) {
  background: var(--coral);
  color: var(--cream);
}
.photo-del:disabled {
  opacity: 0.5;
}
td .photo-del {
  margin: 0;
  white-space: nowrap;
}
