/* ═══════════════════════════════════════════════════════════
   Wedding Invitation — Jhair & Keyla
   Aesthetic: White minimal · Sage green · Script + Bold sans
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Montserrat:wght@300;400;600;700&family=Lora:ital,wght@0,400;1,400&display=swap');

:root {
  --white:      #ffffff;
  --bg:         #f7f5f2;
  --bg-alt:     #f0ede8;
  --sage:       #7a8c74;
  --sage-dark:  #5e6e58;
  --sage-light: #9aaa94;
  --sage-pale:  #e8ede6;
  --text:       #2d2d2d;
  --text-mid:   #555555;
  --text-light: #888888;
  --border:     #e0dbd4;
  --font-script: 'Great Vibes', cursive;
  --font-title:  'Montserrat', sans-serif;
  --font-body:   'Lora', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  background: #c2cfc0;
  min-height: 100%;
  padding: 16px;
}

body {
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 4px 32px rgba(0,0,0,.14);
  min-height: calc(100vh - 32px);
  border-radius: 6px;
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero { position: relative; width: 100%; }

.hero__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #c8b8a8;
}

.hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.28);
}

.hero__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.hero__names {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 12vw, 4.2rem);
  color: white;
  line-height: 1.1;
  margin-bottom: 8px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.hero__tagline {
  font-family: var(--font-title);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .35em;
  color: rgba(255,255,255,.92);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero__chevron {
  animation: bounce 2s ease infinite;
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* ── PLAYER ────────────────────────────────────────────────── */
.player-section {
  background: var(--white);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0ede8;
  border-radius: 50px;
  padding: 10px 16px;
}

.player-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text); padding: 0; flex-shrink: 0;
  display: flex; align-items: center;
}
.player-btn:hover { color: var(--sage); }

.player-time {
  font-family: var(--font-title);
  font-size: .68rem; color: var(--text-mid);
  white-space: nowrap; flex-shrink: 0;
}

.player-track {
  flex: 1; height: 3px;
  background: #ccc;
  border-radius: 3px;
  position: relative; cursor: pointer;
}
.player-fill {
  height: 100%; width: 0%;
  background: var(--text);
  border-radius: 3px;
  transition: width .1s linear;
}
.player-thumb {
  position: absolute; top: 50%; right: 0;
  transform: translate(50%, -50%);
  width: 12px; height: 12px;
  border-radius: 50%; background: var(--text);
  pointer-events: none;
}

.player-vol, .player-more {
  background: none; border: none; cursor: pointer;
  color: var(--text-mid); flex-shrink: 0;
  display: flex; align-items: center; padding: 0;
}
.player-vol:hover, .player-more:hover { color: var(--text); }

/* ── SECTIONS GENÉRICO ─────────────────────────────────────── */
.section {
  padding: 48px 28px;
  text-align: center;
  background: var(--white);
}
.section + .section { border-top: 1px solid var(--border); }

/* ── BIENVENIDA ────────────────────────────────────────────── */
.welcome-section { padding: 40px 28px 36px; }

.script-title {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.15;
}

.welcome-text {
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 320px;
  margin: 0 auto;
}

/* ── COUNTDOWN ─────────────────────────────────────────────── */
.countdown-section { background: var(--white); padding: 20px 28px 36px; }

.countdown {
  display: flex; align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
  margin-bottom: 8px;
  width: 100%;
}

.cd-item { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }

.cd-circle {
  width: clamp(58px, 18vw, 76px);
  height: clamp(58px, 18vw, 76px);
  border-radius: 50%;
  background: var(--sage);
  display: flex; align-items: center; justify-content: center;
}
.cd-circle span {
  font-family: var(--font-title);
  font-size: clamp(1rem, 4.5vw, 1.5rem); font-weight: 700;
  color: white; line-height: 1;
}

.cd-label {
  font-family: var(--font-title);
  font-size: clamp(.48rem, 1.8vw, .6rem); font-weight: 600;
  letter-spacing: .12em; color: var(--text-mid);
  text-transform: uppercase; text-align: center;
}

.calendar-btn-wrap { display: none; }

/* ── BOTONES ───────────────────────────────────────────────── */
.btn-sage {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sage);
  color: white;
  font-family: var(--font-title);
  font-size: .68rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  padding: 14px 36px;
  border-radius: 4px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-sage:hover { background: var(--sage-dark); transform: translateY(-1px); }
.btn-sage.btn-full { width: 100%; justify-content: center; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: white;
  color: var(--text-mid);
  font-family: var(--font-title);
  font-size: .68rem; font-weight: 500;
  letter-spacing: .1em;
  padding: 12px 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color .2s, color .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.btn-outline:hover { border-color: var(--sage); color: var(--sage); }

/* ── EVENTOS (Ceremonia / Celebración) ─────────────────────── */
.event-section { padding: 48px 28px; }
.event-section--alt { background: var(--bg-alt); }

.event-icon { margin-bottom: 16px; color: var(--text); }
.event-icon svg { display: block; margin: 0 auto; }

.event-title {
  font-family: var(--font-title);
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: .12em; color: var(--text);
  text-transform: uppercase;
  margin-bottom: 12px; line-height: 1.3;
}

.event-place {
  font-family: var(--font-body);
  font-size: 1rem; color: var(--text-mid);
  margin-bottom: 4px;
}
.event-sub {
  font-family: var(--font-body);
  font-style: italic; font-size: .9rem;
  color: var(--text-light); margin-bottom: 16px;
}

.event-datetime {
  display: flex; align-items: center;
  justify-content: center; gap: 24px;
  margin: 0 auto 16px; max-width: 280px;
}
.event-date, .event-time {
  font-family: var(--font-title);
  font-size: 1.4rem; font-weight: 300;
  color: var(--text); letter-spacing: .05em;
}
.event-time small {
  font-size: .65rem; font-weight: 400;
  color: var(--text-mid); letter-spacing: .1em;
  vertical-align: super; margin-left: 2px;
}
.event-divider {
  width: 1px; height: 36px;
  background: var(--border);
}

.event-address {
  font-family: var(--font-body);
  font-size: .88rem; color: var(--text-mid);
  margin-bottom: 24px; line-height: 1.6;
}

/* ── DRESS CODE ────────────────────────────────────────────── */
.dresscode-section { background: var(--white); }

.dresscode-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 24px auto 16px;
}

.dresscode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dresscode-item__role {
  font-family: var(--font-title);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-light);
}

.dresscode-item__look {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  font-style: italic;
}

.dresscode-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.dresscode-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fdf8f0;
  border: 1px solid #e8d8b8;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 auto;
  max-width: 340px;
  text-align: left;
  color: var(--text-mid);
}

.dresscode-warning p {
  font-family: var(--font-body);
  font-size: .82rem;
  line-height: 1.55;
}

.dresscode-warning svg {
  color: #b07030;
}

/* ── GALERÍA ───────────────────────────────────────────────── */
.gallery-section {
  padding: 0 0 32px;
  background: var(--sage);
  border-top: 1px solid var(--border);
}

/* Encabezado de galería */
.gallery-header {
  text-align: center;
  padding: 44px 28px 32px;
  background: var(--sage);
}

.gallery-script-title {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 2px 16px rgba(0,0,0,.12);
}

.gallery-subtitle {
  font-family: var(--font-body);
  font-size: .9rem;
  color: rgba(255,255,255,.82);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-camera-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  color: rgba(255,255,255,.9);
  margin-bottom: 4px;
}

.carousel-wrapper {
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 0 24px;
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  border-radius: 2px;
  border-top: 14px solid #fff;
  border-left: 14px solid #fff;
  border-right: 14px solid #fff;
  border-bottom: 44px solid #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-bottom: 4px;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .25s, transform .25s;
}
.carousel-dot--active {
  background: rgba(255,255,255,.95);
  transform: scale(1.3);
}

/* ── REGALOS ───────────────────────────────────────────────── */
.gifts-section { background: var(--bg-alt); }

.gifts-text {
  font-family: var(--font-body);
  font-size: .95rem; color: var(--text-mid);
  line-height: 1.8; margin-bottom: 24px;
  max-width: 320px; margin-left: auto; margin-right: auto;
}

/* ── CONFIRMAR ASISTENCIA ──────────────────────────────────── */
.confirm-section { background: var(--white); }

.attend-question {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.attend-question__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: .03em;
}

.attend-question__label svg {
  color: var(--sage);
  flex-shrink: 0;
}

.confirm-intro {
  font-family: var(--font-body);
  font-size: .95rem; color: var(--text-mid);
  line-height: 1.7; margin-bottom: 28px;
}

/* Radio buttons */
.radio-group {
  display: flex; gap: 28px; justify-content: center;
  margin-bottom: 24px; flex-wrap: wrap;
}
.radio-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-title); font-size: .82rem;
  color: var(--text-mid); cursor: pointer;
}
.radio-label input[type="radio"] { display: none; }
.radio-custom {
  width: 18px; height: 18px;
  border-radius: 50%; border: 1.5px solid var(--text-light);
  flex-shrink: 0; transition: border-color .2s;
  position: relative;
}
.radio-label input:checked + .radio-custom {
  border-color: var(--sage);
}
.radio-label input:checked + .radio-custom::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 9px; height: 9px;
  border-radius: 50%; background: var(--sage);
}

/* Form inputs */
.confirm-form { text-align: left; max-width: 420px; margin: 0 auto; }

.form-input {
  display: block; width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  padding: 13px 16px;
  font-family: var(--font-body); font-size: .95rem;
  color: var(--text); outline: none;
  transition: border-color .2s;
  margin-bottom: 12px;
  appearance: none;
}
.form-input:focus { border-color: var(--sage); }
.form-input::placeholder { color: var(--text-light); }
.form-input option { background: white; }
.form-textarea { resize: vertical; min-height: 100px; margin-bottom: 20px; }

.form-msg {
  text-align: center; margin-top: 14px;
  padding: 12px 16px; border-radius: 4px;
  font-family: var(--font-title); font-size: .78rem;
}
.form-msg--success { background: #edf5eb; color: #3a6b34; border: 1px solid #b8d9b4; }
.form-msg--error   { background: #fdf0f0; color: #8b2222; border: 1px solid #e0a0a0; }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 48px 28px 56px;
}
.footer-closing {
  font-family: var(--font-script);
  font-size: 2.8rem; color: var(--text);
  margin-bottom: 6px; line-height: 1.2;
}
.footer-names {
  font-family: var(--font-script);
  font-size: 1.8rem; color: var(--text-mid);
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Responsive max width override ────────────────────────── */
@media (min-width: 481px) {
  body { border-radius: 0; }
}
@media (max-width: 360px) {
  .cd-circle { width: 62px; height: 62px; }
  .cd-circle span { font-size: 1.2rem; }
  .countdown { gap: 10px; }
  .hero__names { font-size: 2.4rem; }
}

/* & en hero names — usa Montserrat para evitar el glifo especial de Great Vibes */
.hero__names .amp {
  font-family: var(--font-script);
  font-size: 100%;
}

/* ── Mensaje chips ── */
.msg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.msg-chip {
  background: #f2efe8;
  border: 1px solid #d8d3c8;
  border-radius: 20px;
  padding: 6px 13px;
  font-size: .74rem;
  font-family: var(--font-body);
  color: #666;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
  line-height: 1.3;
}
.msg-chip:hover {
  background: #e8e3d8;
  border-color: #b8b3a8;
  color: #444;
}
.msg-chip--active {
  background: #5a7a5a;
  border-color: #5a7a5a;
  color: #fff;
}
