/* Web completa. Origen visual: el Save the Date (colores, letras, tinta).
   Los dibujos son los de la referencia, recoloreados (save-the-date/extraer-dibujos.py). */
:root {
  --cream: #F3EEE6;   /* fondo del Save the Date */
  --beige: #E9E1D3;
  --olive: #6B7048;
  --ink: #3E4132;     /* tinta del Save the Date */
  --taupe: #A89F8C;

  --serif: "Cormorant Garamond", Georgia, serif;
  --gutter: clamp(16px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin: 0; }

/* ---------- Tipografía (como el Save the Date) ---------- */
.title {                       /* como "SAVE THE DATE" */
  font-weight: 500;
  font-size: clamp(1.5rem, 4.2vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding-left: .22em;         /* compensa el espaciado final */
}
.title--left { text-align: left; padding-left: 0; }
.subtitle {                    /* como "BARCELONA" */
  font-weight: 500;
  font-size: clamp(1.12rem, 2.5vw, 1.4rem);
  letter-spacing: .3em;
  text-transform: uppercase;
  padding-left: .3em;
}
.caps {                        /* como "MÁS DETALLES PRONTO" */
  font-weight: 500;
  font-size: clamp(.8rem, 1.6vw, .95rem);
  letter-spacing: .3em;
  text-transform: uppercase;
}
.soft { color: var(--olive); }
.phrase {
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3.8vw, 2.3rem);
  text-align: center;
  line-height: 1.3;
}
.body {
  font-weight: 500;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.65;
}
.narrow { max-width: 580px; }

/* ---------- Dibujos ---------- */
.ill--sm { width: clamp(100px, 13vw, 140px); }
.ill--md { width: clamp(150px, 20vw, 210px); }
.ill--regalo { width: clamp(240px, 32vw, 340px); }
.rule { width: clamp(120px, 20vw, 220px); margin: 4px auto 6px; }
.trazo { width: clamp(70px, 9vw, 100px); margin-top: 14px; }
.trazo--largo { width: clamp(160px, 22vw, 240px); margin-top: 4px; }

/* ---------- Secciones ---------- */
.section {
  padding: clamp(64px, 10vw, 120px) var(--gutter);
  max-width: 1180px;
  margin: 0 auto;
}
.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

/* 1 · Portada */
.hero {
  min-height: min(100svh, 980px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px var(--gutter) 32px;
  max-width: 1180px;
  margin: 0 auto;
}
.hero__names {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 18px);
  width: min(100%, 900px);
}
.n-danny    { width: 36%; }
.n-amp      { width: 5.5%; margin-top: 7%; }
.n-andreina { width: 45%; margin-top: .6%; }
.hero__row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 380px) 1fr;
  align-items: center;
  gap: 24px;
  margin-top: clamp(16px, 3vw, 36px);
}
.hero__ill { width: 100%; }
.hero__side { display: flex; flex-direction: column; align-items: center; padding-top: 50px; }
.hero__date { width: clamp(150px, 20vw, 250px); }
.hero__city { width: clamp(100px, 13vw, 150px); }
.hero__countdown { margin-top: 30px; min-height: 1.4em; font-size: clamp(1.02rem, 2.2vw, 1.22rem); }

@media (max-width: 720px) {
  .hero__row { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .hero__ill { grid-column: 1 / -1; grid-row: 1; max-width: 300px; margin: 0 auto; }
  .hero__side { padding-top: 16px; }
}

/* Celular (≤ 480 px): como el Save the Date, la fecha y debajo Barcelona, centrados */
@media (max-width: 480px) {
  .hero__row { grid-template-columns: 1fr; gap: 0; }
  .hero__side { padding-top: 0; }
  .hero__side .trazo { display: none; }
  .hero__side:first-of-type { margin-top: 34px; }
  .hero__date { width: min(62vw, 250px); }
  .hero__city { width: min(36vw, 150px); margin-top: 22px; }
  .hero__countdown { margin-top: 26px; font-size: 1.08rem; letter-spacing: .26em; }
}

/* 2 · Una foto de lado, sin marco, con una línea oliva desplazada detrás */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(48px, 7vw, 104px);
}
.marco {
  position: relative;
  margin: 0;
  justify-self: end;
  width: min(100%, 440px);
}
.marco::before {                       /* cuadro oliva detrás, desplazado */
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(clamp(12px, 1.8vw, 20px), clamp(12px, 1.8vw, 20px));
  border: 1.5px solid var(--olive);
}
.marco img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 52% 50%;
}
.story__texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 420px;
}
.story__texto .phrase { margin: 0; text-align: left; }
.story__texto .rule { margin: 0; }
@media (max-width: 760px) {
  .story { grid-template-columns: 1fr; justify-items: center; }
  .marco { justify-self: center; width: min(calc(100% - 24px), 380px); }
  .story__texto { align-items: center; text-align: center; }
  .story__texto .phrase { text-align: center; }
}

/* 5 · Detalles */
.details__head { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); }
.rays { width: clamp(26px, 4vw, 40px); }
.details {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 5vw, 64px);
  margin-top: clamp(16px, 4vw, 40px);
}
.details article { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.details__ill { height: 90px; width: auto; }
.details .body { max-width: 300px; }
.details .lugar { display: block; font-weight: 500; font-size: 1.15em; margin-bottom: 4px; }
.mapa {
  margin-top: -6px;
  color: var(--olive);
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.mapa:hover, .mapa:focus-visible { color: var(--ink); outline: none; }
.mapa--btn { margin-top: 0; padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.details .dresscode { margin: 18px 0 6px; }
.details .dresscode em { font-style: italic; }

/* Popup Dress code (reutiliza .rsvp) */
.dresscode-pop { width: min(760px, calc(100vw - 32px)); }
.dresscode-pop .rsvp__title { margin-bottom: 6px; }
.dresscode-pop__sub { margin: 0 0 14px; font-style: italic; font-size: 1.3rem; color: var(--olive); }
.dresscode-pop__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin-top: 10px;
}
.dresscode-pop__grid img { display: block; width: 100%; height: auto; }
@media (max-width: 560px) {
  .dresscode-pop__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .details { grid-template-columns: 1fr; gap: 56px; }   /* en celular, un poco más de aire entre tarjetas */
}

/* 6 · Foto (mismo estilo que la de arriba: línea oliva desplazada) */
.photo-band { display: flex; justify-content: center; }
.marco--ancho { justify-self: center; width: min(calc(100% - 24px), 760px); }
.marco--ancho img { aspect-ratio: 4 / 3; object-position: 50% 55%; }

/* 8 · RSVP */
.rsvp-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
}
.rsvp-band__left { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.rsvp-band__ill { width: min(100%, 220px); margin-top: 8px; }

/* Fila de cabecera: título · onda · botón (referencia de los novios) */
.rsvp-band__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  gap: clamp(14px, 2.4vw, 28px);
}
.rsvp-band__head .title {
  flex: none;
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.2;
  letter-spacing: .16em;
}
.rsvp-band__head .title .nowrap { white-space: nowrap; }

/* Onda a pincel entre el título y el botón */
.onda {
  flex: 1 1 auto;
  min-width: 90px;
  max-width: 300px;
  height: clamp(26px, 3.4vw, 40px);
  margin-bottom: .45em;
  overflow: visible;
}
.onda path { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.onda__linea { stroke-width: 2.8; }
.onda__fina  { stroke-width: 1.2; opacity: .5; }
.trazo--movil { display: none; }

/* RSVP sin relleno, con el borde dibujado a pincel como el resto de dibujos */
.btn--trazo {
  position: relative;
  flex: none;
  margin: 0 0 .25em;
  padding: .95em 2.9em .95em 3.2em;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  border: 0;
  background: none;
  transition: color .25s, transform .25s;
}
.btn__trazo {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  overflow: visible;
  pointer-events: none;
}
.btn__trazo path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;   /* grosor real en px aunque el botón cambie de tamaño */
}
.btn__trazo .fino { stroke-width: 1.3; opacity: .45; }
.btn--trazo span { position: relative; }
.btn--trazo:hover, .btn--trazo:focus-visible {
  background: none;
  color: var(--olive);
  transform: translateY(-2px);
}
.btn--trazo:hover .btn__trazo path, .btn--trazo:focus-visible .btn__trazo path { stroke: var(--olive); }
/* gana a la regla general .btn (que va más abajo) */
.rsvp-band .btn--trazo { font-size: clamp(1.1rem, 2vw, 1.3rem); }

/* Botón pequeño "Calendario" bajo la cuenta atrás */
.cal { position: relative; margin-top: 18px; display: flex; flex-direction: column; align-items: center; }
.hero .btn--sm { margin: 0; padding: .65em 1.9em .65em 2.2em; font-size: .85rem; letter-spacing: .26em; }
.btn--sm .btn__trazo path { stroke-width: 2.4; }
.cal__menu {
  position: absolute;
  top: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 20px;
  background: var(--cream);
  border: 1px solid var(--taupe);
  box-shadow: 0 12px 30px rgba(62, 65, 50, .14);
  white-space: nowrap;
  z-index: 5;
}
.cal__menu[hidden] { display: none; }
.cal__menu a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.cal__menu a:hover, .cal__menu a:focus-visible { color: var(--olive); }

@media (max-width: 900px) and (min-width: 721px) {
  .rsvp-band__head .title { font-size: clamp(1.7rem, 3.6vw, 2.2rem); }
}
@media (max-width: 720px) {
  .rsvp-band__head { flex-direction: column; align-items: center; gap: 14px; text-align: center; }
  .rsvp-band__head .title { text-align: center; padding-left: .16em; }
  .onda { display: none; }
  .trazo--movil { display: block; margin-top: 0; }
  .btn--trazo { margin-top: 6px; }
}
.contacts { display: grid; gap: 40px; padding-bottom: 20px; }
.contact__wa { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }
.contact__wa:hover, .contact__wa:focus-visible { color: var(--olive); }
.contact__name {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 1rem;
  margin-bottom: 4px;
}
@media (max-width: 720px) {
  .rsvp-band { grid-template-columns: 1fr; }
  .rsvp-band__left { align-items: center; text-align: center; }
  .contacts { grid-template-columns: 1fr 1fr; text-align: center; }
}
@media (max-width: 480px) {
  .contacts { grid-template-columns: 1fr; gap: 24px; }
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px var(--gutter) 56px;
  text-align: center;
}
.footer__heart { width: 30px; }

/* ---------- Botones (como el RSVP del Save the Date) ---------- */
.btn {
  display: inline-block;
  margin-top: 12px;
  padding: .75em 2.4em .75em 2.7em;
  font: 500 1rem var(--serif);
  letter-spacing: .3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background .3s, color .3s;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--cream); outline: none; }
.btn:disabled { opacity: .5; cursor: wait; }

/* ---------- Animación ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Popup RSVP ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.rsvp {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  padding: 44px 24px 36px;
  border: 1px solid var(--taupe);
  background: var(--cream);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 20px 60px rgba(40, 40, 30, .25);
}
.rsvp[open] { display: flex; flex-direction: column; align-items: center; }
.rsvp::backdrop { background: rgba(62, 65, 50, .45); backdrop-filter: blur(3px); }
.rsvp__close {
  position: absolute; top: 8px; right: 10px;
  width: 40px; height: 40px;
  border: 0; background: none; color: var(--ink);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .rsvp[open] { animation: pop .35s ease both; }
  @keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
}
.rsvp__heart { width: 28px; }
.rsvp__title {
  margin: 18px 0 32px;
  font-weight: 500;
  font-size: clamp(1rem, 4vw, 1.3rem);
  text-transform: uppercase;
  letter-spacing: .3em;
  padding-left: .3em;
}
.rsvp__step { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.rsvp__step[hidden] { display: none; }
.rsvp__lead { font-size: 1.1rem; line-height: 1.45; }
.rsvp__msg { font-size: 1.35rem; line-height: 1.5; }
.rsvp__error { color: #8a4b3c; font-size: 1rem; }
.rsvp .btn { align-self: center; font-size: .95rem; }

.familia { list-style: none; margin: 0; padding: 0; text-align: left; }
.familia li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--beige);
}
.familia__nombre { font-size: 1.15rem; }
.choice { display: flex; gap: 6px; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; min-width: 48px; padding: 6px 14px; text-align: center;
  border: 1px solid var(--taupe); font-size: .95rem;
  transition: background .25s, color .25s, border-color .25s;
}
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.choice input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 3px; }

.field { display: flex; flex-direction: column; text-align: left; }
.field input {
  font: 500 1.15rem var(--serif);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--taupe);
  border-radius: 0;
  padding: 8px 2px;
  outline: none;
}
.field input::placeholder { color: var(--taupe); }
.field input:focus { border-bottom-color: var(--ink); }
.link {
  align-self: center; border: 0; background: none;
  font: inherit; font-size: .95rem; color: var(--taupe);
  text-decoration: underline; cursor: pointer;
}
.hp { position: absolute; left: -9999px; }
