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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Oswald', sans-serif;
  background: #efece4;
  color: #141414;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: #f4c518;
  color: #141414;
}

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

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-25%); }
}

.marquee {
  overflow: hidden;
  background: #141414;
  color: #efece4;
  white-space: nowrap;
}

.marquee__inner {
  display: inline-block;
  white-space: nowrap;
  padding: 11px 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.14em;
  animation: marquee 26s linear infinite;
}

.marquee__star { color: #f4c518; }
.marquee__wave { color: #25d04b; }
.marquee__dot { color: #8a3ff0; }

/* El asterisco (U+2733) tiene presentación emoji por defecto en iOS: Safari lo
   pintaba como el emoji ✳️ (recuadro verde) ignorando el color CSS. Ya forzamos
   el glifo de texto con el selector U+FE0E en el HTML; esto lo refuerza en los
   navegadores que soportan la propiedad. */
.marquee__star,
.marquee__dot,
.save-date__star,
.section-header__icon,
.terms-list__star,
.rsvp-submit__star {
  font-variant-emoji: text;
}

/* Sections */
.section {
  padding: clamp(40px, 6vw, 84px) clamp(14px, 3vw, 40px);
}

.section--hero {
  padding: clamp(20px, 4vw, 56px) clamp(14px, 3vw, 40px);
}

.section--dark {
  background: #141414;
  color: #efece4;
  border-top: 8px solid #141414;
}

.section--yellow {
  background: #f4c518;
  color: #141414;
  border-top: 8px solid #141414;
  
}

.section--magenta {
  background: #c0297a;
  color: #fff;
  border-top: 8px solid #141414;
  
}

.section--purple {
  background: #8a3ff0;
  color: #fff;
  border-top: 8px solid #141414;
}

.section--green {
  background: #25d04b;
  color: #141414;
  border-top: 8px solid #141414;
  border-bottom: 8px solid #141414;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

/* Hero */
.hero__title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.hero__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(58px, 13.5vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.hero__star {
  color: #f4c518;
  font-size: clamp(28px, 5vw, 64px);
  line-height: 0.8;
  margin-top: 6px;
}

/* Save the date bar */
.save-date {
  background: #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2.5vw, 28px);
  padding: clamp(12px, 1.6vw, 18px) clamp(14px, 3vw, 22px);
  margin-top: clamp(14px, 2vw, 22px);
}

.save-date__star {
  color: #f4c518;
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1;
}

.save-date__text {
  color: #efece4;
  font-weight: 600;
  font-size: clamp(22px, 4.4vw, 52px);
  letter-spacing: 0.08em;
  text-align: center;
}

/* Names grid */
.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.6vw, 30px);
  margin-top: clamp(18px, 2.6vw, 30px);
  align-items: stretch;
}

.hero__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero__label {
  margin: 0 0 2px;
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: 0.06em;
}

.hero__names {
  margin: 0;
  color: #9d1c1c;
  font-weight: 700;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.86;
  letter-spacing: -0.01em;
}

.hero__location {
  margin: 0;
  font-weight: 700;
  font-size: clamp(40px, 7vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.hero__date-box {
  margin-top: 18px;
  background: #141414;
  color: #efece4;
  display: inline-block;
  padding: 8px clamp(14px, 2vw, 22px);
}

.hero__date {
  font-weight: 700;
  font-size: clamp(40px, 7.2vw, 92px);
  line-height: 1;
  letter-spacing: 0.01em;
}

/* Photo placeholders */
.photo-placeholder {
  position: relative;
  border: 7px solid #141414;
  overflow: hidden;
}

.photo-placeholder--main {
  background: #8a3ff0;
  min-height: clamp(280px, 42vw, 460px);
}

.photo-placeholder--green {
  background: #25d04b;
  aspect-ratio: 4/3;
}

.photo-placeholder--yellow {
  background: #d9a900;
  aspect-ratio: 4/3;
}

.photo-placeholder--pink {
  background: #c0297a;
  aspect-ratio: 4/3;
}

.photo-placeholder__overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(48deg, rgba(0,0,0,0.20) 0 16px, rgba(0,0,0,0) 16px 32px);
}

.photo-placeholder__overlay--small {
  background: repeating-linear-gradient(48deg, rgba(0,0,0,0.18) 0 14px, rgba(0,0,0,0) 14px 28px);
}

.photo-placeholder__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #fff;
  background: #141414;
  padding: 5px 9px;
}

.photo-placeholder__label--small {
  left: 10px;
  bottom: 10px;
  font-size: 11px;
  padding: 4px 8px;
}

.photo-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder--yellow img {
  object-position: top;
}

/* Photo strip */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin-top: clamp(14px, 2vw, 22px);
}

/* Section headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.section-header__icon {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}

.section-header__icon--yellow { color: #f4c518; }
.section-header__icon--pink { color: #c0297a; }
.section-header__icon--green { color: #25d04b; }

.section-header__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(40px, 8.5vw, 108px);
  line-height: 0.86;
  letter-spacing: -0.01em;
}

.section-header__subtitle {
  margin: 6px 0 clamp(24px, 4vw, 44px);
  font-weight: 400;
  font-size: clamp(17px, 2.2vw, 24px);
  color: #b8b4aa;
  letter-spacing: 0.04em;
}

.section-header__description {
  margin: 30px 0 clamp(22px, 3.4vw, 38px);
  font-weight: 400;
  font-size: clamp(17px, 2.2vw, 24px);
  max-width: 960px;
  line-height: 1.4;
}

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(10px, 2vw, 22px);
}

.countdown__item {
  border: 6px solid;
  padding: clamp(14px, 2vw, 26px) 10px;
  text-align: center;
}

.countdown__item--days {
  background: #efece4;
  color: #141414;
  border-color: #efece4;
}

.countdown__item--hours {
  background: #8a3ff0;
  color: #fff;
  border-color: #8a3ff0;
}

.countdown__item--minutes {
  background: #c0297a;
  color: #fff;
  border-color: #c0297a;
}

.countdown__item--seconds {
  background: #25d04b;
  color: #141414;
  border-color: #25d04b;
}

.countdown__number {
  font-weight: 700;
  font-size: clamp(54px, 9vw, 116px);
  line-height: 0.85;
}

.countdown__label {
  font-weight: 600;
  font-size: clamp(14px, 1.6vw, 20px);
  letter-spacing: 0.16em;
  margin-top: 6px;
}

/* Info cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
  margin-bottom: clamp(20px, 3vw, 32px);
}

.info-card {
  border: 6px solid #141414;
  padding: clamp(16px, 2vw, 24px);
}

.info-card__label {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #9d1c1c;
}

.info-card__value {
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* Tarjeta con fondo sólido (bote), pensada para ir sobre secciones de color */
.info-card--solid {
  background: #efece4;
  color: #141414;
}

/* Nº de cuenta / IBAN en monoespaciada, como un ticket */
.info-card__value--mono {
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0.04em;
  word-break: break-word;
}

/* IBAN pulsable: parece el valor de la tarjeta, pero copia al portapapeles */
.iban-copy {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.iban-copy .info-card__value--mono {
  margin-top: 4px;
  transition: color 0.2s;
}

.iban-copy:hover .info-card__value--mono {
  color: #9d1c1c;
}

.iban-copy__hint {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #9d1c1c;
  transition: color 0.2s;
}

/* Estado "copiado": pista en verde, como el resto de confirmaciones */
.iban-copy.is-copied .iban-copy__hint {
  color: #1a7a2e;
}

.iban-copy:focus-visible {
  outline: 3px solid #8a3ff0;
  outline-offset: 4px;
}

/* Teléfonos de contacto: enlaces tel: con el subrayado marcado del estilo */
.contact-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 3px solid currentColor;
  transition: color 0.2s;
}

.contact-link:hover {
  color: #9d1c1c;
}

.contact-link:focus-visible {
  outline: 3px solid #8a3ff0;
  outline-offset: 2px;
}

/* Map */
.map-frame {
  border: 8px solid #141414;
  line-height: 0;
}

.map-frame iframe {
  width: 100%;
  height: clamp(320px, 46vw, 520px);
  border: 0;
  display: block;
}

/* Travel cards */
.travel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.travel-card {
  background: #efece4;
  border: 6px solid #141414;
  padding: clamp(18px, 2.4vw, 28px);
}

.travel-card__title {
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: 0.02em;
}

.travel-card__text {
  margin: 10px 0 0;
  font-weight: 400;
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.45;
}

/* RSVP Form */
.rsvp-frame {
  border: 8px solid #141414;
  background: #efece4;
  padding: clamp(8px, 1.4vw, 14px);
}

.rsvp-embed-notice {
  background: #141414;
  color: #efece4;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rsvp-embed-notice__icon {
  color: #25d04b;
}

.rsvp-preview {
  padding: clamp(18px, 3vw, 40px) clamp(14px, 2.4vw, 34px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 26px);
}

.rsvp-field__label {
  display: block;
  font-weight: 600;
  font-size: clamp(17px, 2vw, 22px);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.rsvp-field__optional {
  font-weight: 400;
  font-size: 0.8em;
  opacity: 0.7;
}

.rsvp-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rsvp-option {
  border: 3px solid #141414;
  padding: 8px 18px;
  font-weight: 600;
  font-size: clamp(15px, 1.8vw, 18px);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.rsvp-option:hover {
  background: #141414;
  color: #efece4;
}

.rsvp-option--selected {
  background: #25d04b;
}

.rsvp-input {
  border: 3px solid #141414;
  padding: 12px 14px;
  font-weight: 400;
  font-size: clamp(15px, 1.8vw, 18px);
  font-family: ui-monospace, Menlo, monospace;
  background: #efece4;
  width: 100%;
}

.rsvp-input::placeholder {
  color: #8a857a;
}

.rsvp-input--small {
  max-width: 160px;
}

.rsvp-autocomplete {
  position: relative;
}

.rsvp-autocomplete__list {
  position: absolute;
  top: calc(100% - 3px);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  background: #efece4;
  border: 3px solid #141414;
}

.rsvp-autocomplete__list[hidden] {
  display: none;
}

.rsvp-autocomplete__option {
  padding: 10px 14px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: clamp(15px, 1.8vw, 18px);
  cursor: pointer;
  border-bottom: 1px solid rgba(20, 20, 20, 0.15);
}

.rsvp-autocomplete__option:last-child {
  border-bottom: none;
}

.rsvp-autocomplete__option--active,
.rsvp-autocomplete__option:hover {
  background: #141414;
  color: #efece4;
}

.rsvp-submit {
  background: #141414;
  color: #efece4;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.rsvp-submit:hover:not(:disabled) {
  background: #333;
}

.rsvp-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.rsvp-submit__star {
  color: #f4c518;
}

.rsvp-submit__text {
  font-weight: 600;
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: 0.06em;
  font-family: 'Oswald', sans-serif;
}

.rsvp-note {
  margin: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: #8a857a;
}

.rsvp-note:empty {
  display: none;
}

.rsvp-note--ok {
  color: #1a7a2e;
  font-weight: 600;
}

.rsvp-note--error {
  color: #9d1c1c;
  font-weight: 600;
}

/* Terms list */
.terms-list {
  list-style: none;
  margin: 30px 0 clamp(22px, 3.4vw, 38px);
  padding: 0;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vw, 16px);
}

.terms-list__item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-weight: 400;
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.4;
}

.terms-list__star {
  color: #9d1c1c;
  font-weight: 700;
  flex-shrink: 0;
}

/* Video */
.video-frame {
  border: 8px solid #141414;
  background: #141414;
  line-height: 0;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Footer */
.footer {
  background: #141414;
  color: #efece4;
  padding: clamp(28px, 4vw, 52px) clamp(14px, 3vw, 40px);
  border-top: 8px solid #141414;
}

.footer__content {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 30px);
  flex-wrap: wrap;
}

.footer__wave {
  color: #25d04b;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.1em;
}

.footer__url {
  font-weight: 700;
  font-size: clamp(26px, 5vw, 58px);
  letter-spacing: 0.02em;
}

.footer__tagline {
  text-align: center;
  margin: 14px 0 0;
  color: #7d7a72;
  font-weight: 300;
  font-size: clamp(14px, 1.6vw, 17px);
  letter-spacing: 0.06em;
}

/* ==========================================================================
   MÓVIL — la mayoría de la gente ve la web aquí, así que se cuida el detalle.
   La idea: que se lea como un flyer de festival que llevas en la mano —
   bloques de color a sangre, tipografía condensada grande y ritmo vertical.
   ========================================================================== */
@media (max-width: 640px) {
  /* Un poco más de margen lateral para que los marcos negros respiren */
  .section,
  .section--hero,
  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Aire entre el marquee y el titular para que no vaya pegado */
  .section--hero {
    padding-top: 32px;
  }

  .hero__title {
    font-size: clamp(64px, 17vw, 92px);
  }

  /* La barra "SAVE THE DATE" con más presencia y separada del título */
  .save-date {
    margin-top: 18px;
    padding: 15px 16px;
  }

  /* Nombres y fecha con separación clara entre bloques al apilarse */
  .hero__grid {
    gap: 22px;
  }

  .hero__date-box {
    margin-top: 14px;
  }

  /* Foto principal de la pareja: algo más baja y centrada.
     Usamos altura explícita en vez de fiar el alto solo a `aspect-ratio`: en
     Safari de iOS este contenedor (ítem de grid estirado cuyo único contenido
     es la <img> en position:absolute) se quedaba a 0 de alto y la foto no se
     veía. Con altura fija y el mismo ratio 6/5 se garantiza en todos los
     navegadores. Ancho del contenedor = 100vw menos el padding lateral (36px). */
  .photo-placeholder--main {
    min-height: 0;
    height: calc((100vw - 36px) * 5 / 6);
    border-width: 6px;
  }

  .photo-placeholder--main img {
    object-position: center;
  }

  /* Fotos pequeñas: gato y perro en una fila de dos, y la ría a lo ancho
     debajo como banner (más baja que la foto de los novios). */
  .photo-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
  }

  .photo-strip .photo-placeholder {
    aspect-ratio: 1 / 1;
    border-width: 4px;
  }

  .photo-strip .photo-placeholder--pink {
    grid-column: 1 / -1;
    aspect-ratio: 5 / 2;
  }

  .photo-strip .photo-placeholder--pink img {
    object-position: center;
  }

  /* Countdown 2×2 con tiles más compactas */
  .countdown {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .countdown__item {
    padding: 18px 8px;
  }

  .countdown__number {
    font-size: clamp(48px, 15vw, 72px);
  }

  /* Encabezados de sección: icono debajo del título en vez de al lado,
     para que los títulos grandes ocupen todo el ancho sin cortarse raro */
  .section-header {
    gap: 8px;
  }

  /* Opciones del RSVP a todo el ancho y con target táctil cómodo (>=44px) */
  .rsvp-option {
    flex: 1 1 0;
    text-align: center;
    padding: 13px 14px;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rsvp-input {
    padding: 14px;
  }

  /* CTA de enviar: botón grande a todo el ancho, imposible de fallar */
  .rsvp-submit {
    width: 100%;
    align-self: stretch;
    justify-content: center;
    padding: 17px 24px;
  }
}

/* Pantallas muy estrechas: que nada se desborde */
@media (max-width: 360px) {
  .hero__title {
    font-size: clamp(54px, 16vw, 64px);
  }

  .save-date__text {
    font-size: 20px;
  }
}

/* Suelo de calidad: respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .marquee__inner {
    animation: none;
  }
}

/* Foco visible por teclado en los controles interactivos */
.rsvp-input:focus-visible,
.rsvp-submit:focus-visible,
.rsvp-option:focus-visible {
  outline: 3px solid #8a3ff0;
  outline-offset: 2px;
}
