/* ═══════════════════════════════════════════════════════════════════════════
   Anniversary 50 — Carlo & Lillina
   Mobile-first · Responsive · Elegant Gold/Cream theme
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────────────── */

:root {
  --gold:            #C9A84C;
  --gold-dark:       #a8852e;
  --gold-light:      #e8d49a;
  --gold-ultra:      #faf3e0;
  --cream:           #FDF9F2;
  --cream-dark:      #F4EAD8;
  --cream-deeper:    #E9D9BE;
  --text:            #28190e;
  --text-light:      #7a6a55;
  --text-muted:      #b0a090;
  --white:           #ffffff;
  --dark:            #1e1208;
  --dark-mid:        #3a2510;
  --shadow-soft:     0 2px 20px rgba(80, 50, 10, 0.07);
  --shadow-card:     0 2px 14px rgba(80, 50, 10, 0.09);
  --shadow-lifted:   0 8px 36px rgba(80, 50, 10, 0.13);
  --radius:          18px;
  --radius-sm:       12px;
  --radius-xs:       8px;
  --border:          1px solid rgba(201, 168, 76, 0.22);
  --transition:      0.22s ease;
  --touch-min:       48px;
  --px:              20px;
  --px-md:           32px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 2 L38 20 L20 38 L2 20 Z' fill='none' stroke='%23C9A84C' stroke-width='0.28' stroke-opacity='0.15'/%3E%3C/svg%3E");
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a, button, label, select, input, textarea {
  -webkit-tap-highlight-color: transparent;
}

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

/* ── Typography ────────────────────────────────────────────────────────── */

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }

/* ── Scroll Animations ─────────────────────────────────────────────────── */

.fade-in-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in-section.visible { opacity: 1; transform: translateY(0); }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  background-color: var(--dark);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 2 L38 20 L20 38 L2 20 Z' fill='none' stroke='%23C9A84C' stroke-width='0.3' stroke-opacity='0.08'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #1e1208 0%, #2d1a0a 50%, #1a0f06 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
}
.hero-bg-glow--tl {
  width: 560px; height: 560px; top: -200px; left: -160px;
  background: radial-gradient(circle, rgba(201,168,76,0.10) 0%, transparent 65%);
}
.hero-bg-glow--br {
  width: 480px; height: 480px; bottom: -180px; right: -140px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 65%);
}

.hero-inner {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 64px var(--px) 28px;
}

.hero-top-ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 20px;
}
.ornament-line {
  display: block; width: 56px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.6), transparent);
}
.ornament-diamond { color: var(--gold); font-size: 0.85rem; opacity: 0.7; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 50px; padding: 7px 20px; margin-bottom: 18px;
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
}
.hero-tag-icon { font-size: 0.7rem; opacity: 0.85; }

.hero-years {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.75rem, 2.5vw, 0.9rem); font-weight: 600;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: rgba(201,168,76,0.5); margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(3rem, 14vw, 6.5rem);
  font-weight: 700; color: var(--cream);
  margin-bottom: 10px; letter-spacing: -0.02em; line-height: 1;
  text-shadow: 0 2px 40px rgba(201,168,76,0.12);
}
.hero h1 .ampersand {
  color: var(--gold); font-style: italic; font-weight: 400; font-size: 1.15em;
}

.hero .subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.1rem, 4.5vw, 1.9rem);
  font-style: italic; color: var(--gold-light);
  font-weight: 300; margin-bottom: 26px; letter-spacing: 0.06em;
}

.hero-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 20px;
  width: 100%; max-width: 320px;
}
.divider-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.45));
}
.hero-divider .divider-line:last-child {
  background: linear-gradient(90deg, rgba(201,168,76,0.45), transparent);
}
.divider-center { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.divider-dot  { color: var(--gold); font-size: 0.5rem; opacity: 0.5; }
.divider-rose { color: var(--gold); font-size: 1rem; opacity: 0.85; }

.hero .date-line {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 4px;
  font-size: clamp(0.82rem, 2.8vw, 0.98rem);
  color: rgba(253,249,242,0.55); font-weight: 400;
  letter-spacing: 0.12em; margin-bottom: 14px;
}
.date-icon { font-size: 0.85em; }
.date-sep  { opacity: 0.35; }

.hero-tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(0.92rem, 3.2vw, 1.15rem);
  font-style: italic; color: rgba(232,212,154,0.5);
  font-weight: 300; max-width: 440px; line-height: 1.65; margin-bottom: 36px;
}

/* Countdown dentro l'hero */
.hero-countdown {
  width: 100%; max-width: 520px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: var(--radius); padding: 22px 16px;
}

.countdown-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold-light);
  margin-bottom: 14px; opacity: 0.75;
}

.countdown {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: nowrap;
}

.countdown-box {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: var(--radius-xs);
  padding: 10px 6px; flex: 1; max-width: 80px;
}

.countdown-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 5.5vw, 2.2rem);
  font-weight: 700; color: var(--gold); line-height: 1; letter-spacing: -0.03em;
}

.countdown-unit {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(232,212,154,0.6); margin-top: 4px;
}

.countdown-sep {
  font-family: 'Playfair Display', serif; font-size: 1.4rem;
  font-weight: 700; color: var(--gold); opacity: 0.3;
  line-height: 1; margin-bottom: 16px; flex-shrink: 0;
}

/* Freccia scroll */
.hero-scroll-hint {
  position: relative; z-index: 1; padding: 14px 0 18px; text-align: center;
}
.scroll-arrow {
  display: inline-block; font-size: 1.6rem;
  color: rgba(201,168,76,0.4);
  animation: scrollBounce 2s ease-in-out infinite; line-height: 1; cursor: pointer;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(7px); opacity: 0.7; }
}

/* ── Section wrapper ───────────────────────────────────────────────────── */

section { max-width: 800px; margin: 0 auto; padding: 56px var(--px); }

/* ── Section title ─────────────────────────────────────────────────────── */

.section-title {
  display: flex; align-items: center; gap: 14px;
  font-size: clamp(1.15rem, 4vw, 1.65rem); font-weight: 600;
  color: var(--text); text-align: center; justify-content: center;
  margin-bottom: 36px; white-space: nowrap;
}
.section-title-line {
  display: block; flex: 1; max-width: 70px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light));
}
.section-title > span:last-child {
  background: linear-gradient(90deg, var(--gold-light), transparent);
}

/* ── Message ──────────────────────────────────────────────────────────── */

.message { padding-top: 52px; padding-bottom: 52px; }

.message-inner {
  background: var(--white); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); padding: 40px var(--px-md);
  text-align: center; position: relative;
}
.message-inner::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 56px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 0 0 3px 3px;
}

.message-ornament { color: var(--gold); font-size: 0.9rem; letter-spacing: 10px; margin-bottom: 22px; opacity: 0.65; }

.message-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1rem, 3.5vw, 1.22rem);
  font-style: italic; color: var(--text-light); line-height: 1.95; font-weight: 300;
}
.message-text--secondary { margin-top: 18px; font-size: clamp(0.92rem, 3vw, 1.08rem); color: var(--text-muted); }

.message-signature {
  margin-top: 28px; font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem; font-style: italic; color: var(--gold-dark); letter-spacing: 0.05em;
}

/* ── Details ──────────────────────────────────────────────────────────── */

.details { background: var(--cream-dark); max-width: 100%; padding: 56px var(--px); }
.details > * { max-width: 800px; margin-left: auto; margin-right: auto; }

.detail-cards { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 800px; margin: 0 auto; }

.detail-card {
  background: var(--white); border-radius: var(--radius); padding: 28px 22px;
  box-shadow: var(--shadow-card); text-align: center; border: var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.detail-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lifted); border-color: rgba(201, 168, 76, 0.45); }

.detail-card-icon { font-size: 2rem; margin-bottom: 12px; display: block; line-height: 1; }
.detail-card h3 {
  font-size: 0.7rem; font-family: 'Inter', sans-serif; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 10px;
}
.detail-main { font-family: 'Playfair Display', Georgia, serif; font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.detail-sub { font-size: 0.88rem; color: var(--text-light); line-height: 1.5; margin-bottom: 12px; }

.detail-map-link {
  display: inline-block; font-size: 0.84rem; font-weight: 600;
  color: var(--gold-dark); text-decoration: none;
  border-bottom: 1px solid var(--gold-light); padding: 4px 0 6px;
  transition: border-color var(--transition), color var(--transition);
}
.detail-map-link:hover { color: var(--gold); border-color: var(--gold); }

/* ── RSVP ─────────────────────────────────────────────────────────────── */

.rsvp-outer { padding-top: 56px; padding-bottom: 72px; }

.rsvp-deadline {
  text-align: center; font-size: 0.88rem; color: var(--text-light);
  margin-bottom: 28px; line-height: 1.5;
}
.rsvp-deadline strong { color: var(--gold-dark); font-weight: 600; }

.rsvp-section {
  background: var(--white); border-radius: var(--radius); padding: 36px var(--px);
  box-shadow: var(--shadow-lifted); max-width: 560px; margin: 0 auto; border: var(--border);
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.05em; color: var(--text); margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; min-height: var(--touch-min); padding: 12px 16px;
  background: var(--cream); border: 1.5px solid var(--cream-deeper);
  border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit;
  color: var(--text); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none; -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px; cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.14);
  background: var(--white);
}

.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; padding-top: 14px; }

/* Consiglio field — highlighted */
.consiglio-group input {
  border-color: rgba(201, 168, 76, 0.4);
  background: linear-gradient(135deg, var(--cream) 0%, var(--gold-ultra) 100%);
}
.consiglio-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
  background: var(--white);
}

.label-hint {
  font-size: 0.72rem; font-weight: 400; font-style: italic;
  color: var(--gold-dark); letter-spacing: 0; margin-left: 6px; opacity: 0.85;
}

/* Radio */
.radio-group { display: flex; gap: 10px; }
.radio-option { flex: 1; position: relative; }
.radio-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

.radio-option label {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-align: center; min-height: var(--touch-min); padding: 12px 8px;
  background: var(--cream); border: 2px solid var(--cream-deeper);
  border-radius: var(--radius-sm); cursor: pointer; font-weight: 600;
  font-size: 0.9rem; transition: all var(--transition);
  line-height: 1.3; margin-bottom: 0; letter-spacing: 0;
}
.radio-icon { font-size: 1.1rem; flex-shrink: 0; }
.radio-option input:checked + label {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white);
  box-shadow: 0 3px 14px rgba(168, 133, 46, 0.32);
}

/* Guest fields */
.guest-fields {
  display: none; background: var(--cream); border-radius: var(--radius-sm);
  padding: 18px 18px 2px; margin-bottom: 20px; border: var(--border);
}
.guest-fields.visible { display: block; }
.guest-fields-header {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--cream-deeper);
}

/* Submit */
.btn-submit {
  width: 100%; min-height: var(--touch-min); padding: 14px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white); border: none; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 600; font-family: inherit; letter-spacing: 0.05em;
  cursor: pointer; transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(168, 133, 46, 0.3); margin-top: 6px;
  -webkit-user-select: none; user-select: none;
}
.btn-submit:hover { opacity: 0.91; transform: translateY(-2px); box-shadow: 0 6px 22px rgba(168, 133, 46, 0.42); }
.btn-submit:active { transform: translateY(0); opacity: 0.85; }
.btn-submit:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; transform: none; opacity: 1; }

/* ── Muro dei Consigli ────────────────────────────────────────────────── */

.wishes-section {
  background: linear-gradient(180deg, var(--dark) 0%, var(--dark-mid) 100%);
  max-width: 100%; padding: 64px var(--px);
}
.wishes-section > * { max-width: 860px; margin-left: auto; margin-right: auto; }

/* Override section-title colori per sfondo scuro */
.wishes-section .section-title { color: var(--gold-light); }
.wishes-section .section-title-line { background: linear-gradient(90deg, transparent, rgba(201,168,76,0.4)); }
.wishes-section .section-title > span:last-child { background: linear-gradient(90deg, rgba(201,168,76,0.4), transparent); }

.wishes-subtitle {
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-size: 1rem;
  color: rgba(232, 212, 154, 0.7); margin-bottom: 40px;
  max-width: 860px; margin-left: auto; margin-right: auto;
}

.wishes-grid {
  max-width: 860px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Carta singola del consiglio */
.wish-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius);
  padding: 28px 24px 22px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.wish-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.45);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Virgolette decorative */
.wish-card::before {
  content: '\275D';
  position: absolute; top: 14px; left: 18px;
  font-family: Georgia, serif; font-size: 2.6rem;
  color: var(--gold); line-height: 1; opacity: 0.35;
}

.wish-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-size: 1.05rem;
  color: rgba(253, 249, 242, 0.88);
  line-height: 1.8; margin-bottom: 14px;
  padding-top: 20px;
}

.wish-name {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); opacity: 0.85;
}

/* Stato vuoto / caricamento */
.wishes-empty {
  text-align: center; padding: 56px 24px;
  border: 2px dashed rgba(201, 168, 76, 0.2);
  border-radius: var(--radius);
}
.wishes-empty p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; color: rgba(232, 212, 154, 0.55); font-size: 1.05rem;
}

/* Card "sii il primo" — invito speciale */
.wishes-cta {
  text-align: center; padding: 40px 28px;
  border: 2px dashed rgba(201, 168, 76, 0.25);
  border-radius: var(--radius);
}
.wishes-cta-icon { font-size: 2rem; margin-bottom: 12px; display: block; opacity: 0.5; }
.wishes-cta p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-size: 1.1rem;
  color: rgba(232, 212, 154, 0.65); line-height: 1.6;
}

/* Nuova card appena aggiunta — highlight */
.wish-card.wish-new {
  animation: wishAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  border-color: rgba(201, 168, 76, 0.6);
}
@keyframes wishAppear {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Quiz ─────────────────────────────────────────────────────────────── */

.quiz-section { text-align: center; }

.quiz-intro {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-size: 1.05rem; color: var(--text-light); margin-bottom: 28px;
}

.quiz-card {
  background: var(--white); border-radius: var(--radius); border: var(--border);
  box-shadow: var(--shadow-card); padding: 28px 20px; max-width: 540px;
  margin: 0 auto; text-align: left;
}

.quiz-progress {
  width: 100%; height: 4px; background: var(--cream-deeper);
  border-radius: 4px; margin-bottom: 18px; overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  border-radius: 4px; transition: width 0.4s ease; width: 20%;
}

.quiz-counter {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-dark); margin-bottom: 14px;
}

.quiz-question {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 600; color: var(--text); line-height: 1.45; margin-bottom: 22px;
}

.quiz-options { display: flex; flex-direction: column; gap: 8px; }

.quiz-btn {
  width: 100%; min-height: var(--touch-min); padding: 13px 16px;
  background: var(--cream); border: 1.5px solid var(--cream-deeper);
  border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit;
  font-weight: 500; color: var(--text); text-align: left; cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform 0.15s;
}
.quiz-btn:hover:not(:disabled) { border-color: var(--gold); background: var(--gold-ultra); transform: translateX(4px); }
.quiz-btn:active:not(:disabled) { transform: translateX(2px); }
.quiz-btn.correct { background: #e6f9ef; border-color: #27ae60; color: #1a6e3c; font-weight: 600; }
.quiz-btn.wrong   { background: #fff2f2; border-color: #e74c3c; color: #c0392b; }
.quiz-btn:disabled { cursor: default; }

.quiz-result { text-align: center; padding: 12px 0 4px; }
.quiz-result-emoji { font-size: 2.8rem; margin-bottom: 10px; display: block; }
.quiz-result-score { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; font-weight: 700; color: var(--gold-dark); margin-bottom: 8px; }
.quiz-result-msg { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 1.05rem; color: var(--text-light); margin-bottom: 22px; line-height: 1.5; }

.quiz-replay-btn {
  min-height: var(--touch-min); padding: 12px 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white); border: none; border-radius: var(--radius-sm);
  font-size: 0.92rem; font-weight: 600; font-family: inherit; cursor: pointer;
  box-shadow: 0 3px 12px rgba(168, 133, 46, 0.28);
  transition: opacity var(--transition), transform var(--transition);
}
.quiz-replay-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Video Section ─────────────────────────────────────────────────────── */

.video-section { text-align: center; }

.video-placeholder {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  border-radius: var(--radius); aspect-ratio: 16 / 7; max-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; border: 1px solid rgba(201, 168, 76, 0.18);
  cursor: pointer; transition: border-color 0.3s;
}
.video-placeholder:hover { border-color: rgba(201, 168, 76, 0.5); }

.video-play-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--gold); color: var(--white); font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  padding-left: 4px; animation: pulse 2.4s ease-in-out infinite;
  transition: transform var(--transition);
}
.video-placeholder:hover .video-play-btn { transform: scale(1.08); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.45); }
  50%       { box-shadow: 0 0 0 14px rgba(201, 168, 76, 0); }
}

.video-caption {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-size: 0.95rem; color: var(--gold-light); opacity: 0.75;
}

/* ── Gallery ──────────────────────────────────────────────────────────── */

.gallery-section { background: var(--cream-dark); max-width: 100%; padding: 56px var(--px); }
.gallery-section > * { max-width: 800px; margin-left: auto; margin-right: auto; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; max-width: 800px; margin: 0 auto;
}
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-xs); transition: transform 0.3s ease; }
.gallery-grid img:hover { transform: scale(1.04); }

.gallery-placeholder {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 52px 24px; background: var(--white);
  border-radius: var(--radius); border: 2px dashed var(--cream-deeper);
}
.gallery-placeholder-icon { font-size: 2.2rem; opacity: 0.4; }
.gallery-placeholder p { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; color: var(--text-muted); font-size: 1rem; }

/* ── Overlay ──────────────────────────────────────────────────────────── */

.overlay {
  position: fixed; inset: 0; background: rgba(20, 10, 2, 0.65);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease; padding: var(--px);
}
.overlay.active { opacity: 1; pointer-events: auto; }

.overlay-content {
  background: var(--white); border-radius: var(--radius); padding: 48px 32px;
  text-align: center; max-width: 400px; width: 100%;
  transform: scale(0.88) translateY(20px);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-lifted);
}
.overlay.active .overlay-content { transform: scale(1) translateY(0); }

.overlay-icon {
  width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white); font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; box-shadow: 0 4px 16px rgba(168, 133, 46, 0.3);
}
.overlay-content h3 { font-size: 1.5rem; margin-bottom: 10px; color: var(--text); }
.overlay-content p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 26px; line-height: 1.65; }

.btn-close {
  min-height: var(--touch-min); padding: 12px 36px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white); border: none; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 3px 12px rgba(168, 133, 46, 0.28);
}
.btn-close:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-close:active { transform: translateY(0); opacity: 0.8; }

/* ── Form error ───────────────────────────────────────────────────────── */

.form-error {
  background: #fff2f2; color: #c0392b; padding: 13px 16px;
  border-radius: var(--radius-sm); font-size: 0.87rem; margin-bottom: 18px;
  display: none; border: 1px solid #f5c6c6; line-height: 1.5;
}
.form-error.visible { display: block; }

/* ── Footer ───────────────────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 48px var(--px) calc(40px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  border-top: 1px solid var(--cream-deeper);
}
.footer-ornament { color: var(--gold); font-size: 1rem; letter-spacing: 10px; margin-bottom: 14px; opacity: 0.6; }
.footer-names { font-family: 'Playfair Display', Georgia, serif; font-size: 1.35rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.footer-years { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 0.98rem; font-style: italic; color: var(--gold-dark); margin-bottom: 10px; }
.footer-note { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; }

/* ── Confetti Canvas ──────────────────────────────────────────────────── */

#confetti-canvas {
  position: fixed; inset: 0; pointer-events: none;
  z-index: 999; width: 100%; height: 100%; display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 379px) {
  .countdown-box { padding: 8px 6px; }
  .countdown-sep { font-size: 1.2rem; }
  .section-title { white-space: normal; text-align: center; font-size: 1.05rem; }
  .section-title-line { max-width: 36px; }
  .message-inner { padding: 32px 16px; }
  .rsvp-section { padding: 28px 14px; }
  .quiz-card { padding: 22px 14px; }
  .hero-inner { padding: 48px 14px 24px; }
  .hero-tag { font-size: 0.58rem; padding: 6px 14px; gap: 5px; }
}

@media (min-width: 480px) {
  :root { --px: 24px; }
  .detail-cards { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .wishes-grid { grid-template-columns: repeat(2, 1fr); }
  .rsvp-section { padding: 40px 28px; }
  .hero-countdown { max-width: 420px; }
}

@media (min-width: 640px) {
  :root { --px: 32px; --px-md: 48px; }
  .detail-cards { grid-template-columns: 1fr 1fr 1fr; }
  .rsvp-section { padding: 48px 44px; }
  .quiz-card { padding: 32px 36px; }
  .hero-inner { padding: 72px var(--px) 32px; }
}

@media (min-width: 900px) {
  :root { --px: 40px; }
  .hero-inner { padding: 88px var(--px) 36px; }
  .countdown-box { padding: 14px 18px; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .wishes-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-card { padding: 36px 28px; }
}

@media (hover: none) {
  .detail-card:hover, .wish-card:hover,
  .btn-submit:hover, .btn-close:hover,
  .quiz-btn:hover, .quiz-replay-btn:hover {
    transform: none; box-shadow: var(--shadow-card); opacity: 1;
  }
  .quiz-btn:active:not(:disabled) { background: var(--gold-ultra); border-color: var(--gold); }
  .btn-submit:active { opacity: 0.85; transform: scale(0.98); }
}
