/* =========================================================
   Invitación digital de boda — estilos
   Inspirado en invitaciones estilo talavera/papel: azul marino,
   dorado/kraft, papel rasgado, marcos en arco, tipografía caligráfica.
   Toda la paleta es editable desde :root.
========================================================= */

:root{
  --navy: #23446b;
  --navy-2: #2f5aa0;
  --navy-soft: #5b78a3;
  --cream: #faf7ef;
  --paper: #f3ede0;
  --kraft: #d8bd8a;
  --kraft-dark: #b9945c;
  --ink: #2c2a26;
  --ink-soft: #6b6258;
  --line: #e4d9c7;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(35, 68, 107, 0.12);
  --radius: 14px;
  --script: 'Pinyon Script', 'Cormorant Garamond', cursive;
  --serif: 'Playfair Display', Georgia, serif;
  --serif-italic: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;

  --tile-w-mobile: 18px;
  --tile-w-desktop: 70px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ===================== MARCO ESTILO TALAVERA ===================== */
/* Patrón de azulejo generado en SVG, repetido como marco lateral/superior/inferior */
.tile-frame{
  max-width: 720px;
  margin: 0 auto;
  background-color: var(--navy-2);
  background-image:
    linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Crect width='100' height='100' fill='%232f5aa0'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M50 4 L96 50 L50 96 L4 50 Z'/%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3C/g%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='50' cy='4' r='4'/%3E%3Ccircle cx='50' cy='96' r='4'/%3E%3Ccircle cx='4' cy='50' r='4'/%3E%3Ccircle cx='96' cy='50' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100% 100%, 90px 90px;
  padding: 0 var(--tile-w-mobile);
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px){
  .tile-frame{ padding: 0 var(--tile-w-desktop); }
}

.tile-frame > *{ position: relative; }

/* franja de azulejo visible arriba/abajo de cada bloque grande */
.hero, .countdown-section, .gifts-section, .calendar-section{
  background-color: var(--cream);
}

/* ===================== REVEAL AL HACER SCROLL ===================== */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* ===================== SECCIONES BASE ===================== */
.section{
  padding: 56px 20px;
  text-align: center;
}

.script-heading{
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(30px, 6vw, 42px);
  color: var(--navy);
  margin: 0 0 14px;
  line-height: 1.2;
}

.serif-caps{
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.55em;
  vertical-align: -2px;
}

/* ===================== HERO ===================== */
.hero{
  padding: 36px 0 0;
  text-align: center;
}

.monogram{
  width: 64px;
  height: 64px;
  margin: 24px auto 8px;
  border: 2px solid var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  font-size: 15px;
  background: var(--white);
}

.hero-card{
  background: var(--paper);
  background-image: radial-gradient(rgba(44,42,38,0.03) 1px, transparent 1px);
  background-size: 6px 6px;
  border-radius: 28px 28px 0 0;
  padding: 40px 24px 32px;
  margin-top: 8px;
}

.script-line{
  font-family: var(--script);
  font-size: clamp(20px, 4vw, 26px);
  color: var(--navy);
  margin: 0 0 4px;
}

.hero-title{
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 2px;
  font-size: clamp(26px, 6vw, 38px);
  color: var(--navy);
  margin: 0 0 24px;
}

.arch-photo{
  max-width: 340px;
  margin: 0 auto 24px;
  border-radius: 160px 160px 8px 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 6px solid var(--white);
}

.arch-photo-placeholder{
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, var(--kraft) 0%, var(--navy-2) 140%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--sans);
  font-size: 14px;
}

.date-display{
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 2px;
  font-size: clamp(18px, 3vw, 22px);
  color: var(--navy);
  margin: 0;
}

.location-display{
  font-family: var(--sans);
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin: 4px 0 0;
}

/* ===================== TORN PAPER DIVIDER ===================== */
.torn-divider{
  height: 26px;
  width: 100%;
  background-repeat: repeat-x;
  background-size: 34px 26px;
  margin: 0;
}
.torn-to-kraft{
  background-color: var(--kraft);
  background-image: linear-gradient(135deg, var(--cream) 50%, transparent 50%),
                     linear-gradient(225deg, var(--cream) 50%, transparent 50%);
  background-position: 0 0, 17px 0;
}
.torn-to-cream{
  background-color: var(--cream);
  background-image: linear-gradient(135deg, var(--kraft) 50%, transparent 50%),
                     linear-gradient(225deg, var(--kraft) 50%, transparent 50%);
  background-position: 0 0, 17px 0;
}

/* ===================== COUNTDOWN ===================== */
.countdown-section{ padding-top: 8px; padding-bottom: 40px; }

.countdown-label{
  font-family: var(--serif-italic);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.countdown{
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  background: var(--kraft);
  border-radius: 10px;
  padding: 18px 10px;
  flex-wrap: wrap;
}

.countdown-item{ display: flex; flex-direction: column; align-items: center; min-width: 56px; }

.countdown .colon{
  font-family: var(--serif);
  font-size: 26px;
  color: var(--navy);
  align-self: center;
  transform: translateY(-6px);
}

.countdown-item .num{
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 6vw, 38px);
  color: var(--navy);
  line-height: 1;
}

.countdown-item .label{
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ===================== VERSE ===================== */
.verse-section{ background: var(--cream); max-width: 560px; margin: 0 auto; }
.verse-text{
  font-family: var(--serif-italic);
  font-style: italic;
  font-size: clamp(17px, 2.6vw, 20px);
  color: var(--navy);
  line-height: 1.7;
  margin: 0 0 10px;
}
.verse-ref{ font-size: 13px; color: var(--ink-soft); margin: 0; }

/* ===================== NOMBRES / PADRES / PADRINOS ===================== */
.names-section{ background: var(--white); }

.names-heading{ font-size: clamp(38px, 9vw, 56px); margin-bottom: 24px; }

.parents-row{
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.parents-amp{ font-family: var(--script); color: var(--kraft-dark); font-size: 22px; }
.parents-names{ font-size: 14px; color: var(--navy); margin: 0; line-height: 1.5; }
.parents-label{
  font-family: var(--serif-italic);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 6px 0 28px;
}

.padrinos-row{
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.padrino-item{ max-width: 200px; }
.padrino-role{
  font-family: var(--serif-italic);
  font-style: italic;
  font-size: 13px;
  color: var(--kraft-dark);
  margin: 0 0 2px;
}
.padrino-name{ font-size: 14px; color: var(--navy); margin: 0; }

/* ===================== PHOTO BAND ===================== */
.photo-band{ width: 100%; }
.photo-band-placeholder{
  width: 100%;
  aspect-ratio: 16 / 7;
  background: linear-gradient(120deg, var(--navy-2), var(--kraft));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 13px;
}

/* ===================== DETALLES ===================== */
.details-section{ background: var(--paper); }

.detail-row{
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  margin-bottom: 36px;
  flex-wrap: wrap;
  justify-content: center;
}
.detail-row.reverse{ flex-direction: row-reverse; }

.detail-photo-placeholder{
  flex: 1 1 200px;
  max-width: 220px;
  aspect-ratio: 4 / 3;
  background: var(--navy-2);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
}

.detail-info{ flex: 1 1 220px; max-width: 280px; }
.detail-info h3{ margin: 0 0 6px; }
.detail-place{ margin: 0 0 4px; color: var(--ink); font-weight: 700; font-size: 15px; }
.detail-time{ margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; }

.btn-kraft{
  display: inline-block;
  background: var(--kraft);
  color: var(--navy);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  padding: 10px 18px;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.btn-kraft:hover{ background: var(--kraft-dark); }

.dress-block{ text-align: center; margin-top: 24px; }
.dress-code-value{
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--navy);
  display: inline-block;
  padding-bottom: 4px;
  margin: 0 0 10px;
}
.dress-note{ font-size: 13px; color: var(--ink-soft); margin: 0; }

/* ===================== FORÁNEOS ===================== */
.travel-section{ background: var(--white); }
.travel-message{ max-width: 460px; margin: 0 auto 20px; color: var(--ink-soft); }

/* ===================== REGALOS ===================== */
.gifts-section{ }
.gifts-message{ max-width: 460px; margin: 0 auto 28px; color: var(--ink); font-family: var(--serif-italic); font-style: italic; font-size: 17px; }
.gifts-row{ display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.gift-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  min-width: 180px;
}
.gift-store{ font-family: var(--script); font-size: 24px; color: var(--navy); margin: 0 0 8px; }
.gift-event{ font-size: 12px; color: var(--ink-soft); margin: 0 0 12px; }

/* ===================== GALERÍA ===================== */
.gallery-section{ background: var(--cream); max-width: none; }
.gallery{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}
.gallery-placeholder{
  aspect-ratio: 1 / 1;
  background: var(--paper);
  border: 1px dashed var(--kraft-dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 12px;
}
.gallery-note{ margin-top: 16px; font-size: 12px; color: var(--ink-soft); }
.gallery-note code{ background: var(--paper); padding: 2px 6px; border-radius: 4px; }

/* ===================== RSVP ===================== */
.rsvp-section{ background: var(--white); padding-bottom: 72px; }
.rsvp-note{ color: var(--ink-soft); margin: 0 0 28px; font-size: 14px; }

.rsvp-form{
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.field{ margin-bottom: 18px; }
.field label, .radio-field legend{
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--navy);
  margin-bottom: 6px;
}
.field input[type="text"], .field input[type="number"], .field textarea{
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 15px;
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field textarea:focus{ outline: none; border-color: var(--navy-2); }

.radio-field{ border: none; padding: 0; margin: 0 0 18px; }
.radio-option{ display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; margin-right: 18px; color: var(--ink); }

.hp-field{ position: absolute; left: -9999px; top: -9999px; }

.btn-submit{
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn-submit:hover{ background: var(--navy-2); }
.btn-submit:active{ transform: scale(0.99); }
.btn-submit:disabled{ opacity: 0.6; cursor: not-allowed; }

.form-status{ margin: 14px 0 0; font-size: 13px; min-height: 18px; }
.form-status.ok{ color: #3f7d4f; }
.form-status.error{ color: #b23b3b; }

.btn-whatsapp{
  display: block;
  max-width: 440px;
  margin: 16px auto 0;
  text-align: center;
  background: #25d366;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 13px;
  border-radius: 8px;
}

/* ===================== CALENDARIO ===================== */
.calendar-section{ padding-bottom: 56px; }
.calendar-grid{
  max-width: 320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-size: 12px;
}
.cal-dow{ font-weight: 700; color: var(--ink-soft); padding: 4px 0; }
.cal-day{ padding: 8px 0; border-radius: 6px; color: var(--ink); }
.cal-day.empty{ visibility: hidden; }
.cal-day.highlight{
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  position: relative;
}

/* ===================== FOOTER ===================== */
.site-footer{
  text-align: center;
  padding: 40px 20px 56px;
  background: var(--paper);
}
.monogram-footer{ margin-bottom: 12px; }
.footer-date{ font-family: var(--serif); font-weight: 600; letter-spacing: 2px; color: var(--navy); margin: 0; font-size: 15px; }
.footer-location{ font-size: 11px; letter-spacing: 1.5px; color: var(--ink-soft); text-transform: uppercase; margin: 4px 0 0; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 480px){
  .section{ padding: 44px 16px; }
  .detail-row{ flex-direction: column !important; text-align: center; }
  .parents-row{ flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}
