/* ═══════════════════════════════════════════════════════════════
   CONVITE · SOFIA · 15 ANOS
   Tema: The Vampire Diaries — preto profundo, vermelho sangue,
   delicado e romântico. Rosas em line-art, tipografia serifada.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Preto e prata como cores principais; vermelho apenas em detalhes */
  --bg: #0a0a0b;
  --bg-2: #161619;
  --panel: rgba(22, 22, 26, 0.55);
  --line: rgba(201, 204, 212, 0.35);
  --line-soft: rgba(201, 204, 212, 0.12);
  --red: #a41224; /* detalhe */
  --red-bright: #d81e3c; /* detalhe */
  --red-deep: #5c0a16; /* detalhe */
  --silver: #c9ccd4;
  --silver-bright: #eceef2;
  --rose: #c9ccd4; /* prata (alias mantido por compatibilidade) */
  --text: #f2f2f4;
  --muted: #9a9aa2;

  --font-title: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", cursive;
  --font-body: "Jost", "Segoe UI", sans-serif;

  --shadow-deep: 0 18px 50px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 800px at 50% -10%, var(--bg-2) 0%, transparent 60%),
    radial-gradient(900px 700px at 100% 100%, rgba(92, 10, 22, 0.18) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

a { color: var(--rose); }

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--red); color: var(--text); }

/* ── Partículas ─────────────────────────────────────────────── */
#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Overlay de entrada (splash única — sempre com música) ──── */
body:not(.entered) {
  overflow: hidden; /* trava o scroll enquanto a splash estiver aberta */
}
#entryOverlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  transition: opacity 1s ease, visibility 1s ease;
}
#entryOverlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.entry-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 50% 0%, rgba(92, 10, 22, 0.4) 0%, transparent 60%),
    #060203; /* opaco: nada do site aparece atrás durante a entrada */
}
.entry-content {
  position: relative;
  text-align: center;
  max-width: 560px;
  padding: clamp(2rem, 6vh, 3.5rem) 1.5rem;
}
.entry-kicker {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--muted);
}
.entry-name {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(4.5rem, 15vw, 8rem);
  line-height: 1.3; /* folga para as descidas longas da caligrafia */
  color: var(--silver-bright);
  text-shadow: 0 0 50px rgba(201, 204, 212, 0.28);
}
.entry-sub {
  margin: 1rem 0 1.4rem;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--rose);
}
.entry-ornament { justify-content: center; margin-bottom: 1.4rem; }
.entry-phrase {
  margin: 0 0 2rem;
  font-family: var(--font-title);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}
.entry-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

/* ── Ornamento divisor ──────────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.ornament .line {
  height: 1px;
  flex: 0 1 120px;
  background: linear-gradient(to right, transparent, var(--line), transparent);
}
.ornament .diamond {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--red);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(216, 30, 60, 0.7);
}

/* ── Nav ────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  padding-top: calc(0.9rem + env(safe-area-inset-top));
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line-soft);
}
.nav-logo {
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--rose);
}

/* ── Player invisível (a música toca sem controles) ─────────── */
.yt-music-host {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ── Seções ─────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) 1.5rem;
}
.section-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 0.6rem;
  color: var(--text);
}
.section-kicker {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

/* ── Vídeo de fundo (topo) ──────────────────────────────────── */
.video-top {
  --vt-h: min(64vh, 620px);
  position: relative;
  z-index: 2;
  height: var(--vt-h);
  min-height: 300px;
  overflow: hidden;
}
.video-top iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, calc(var(--vt-h) * 1.7778));
  aspect-ratio: 16 / 9;
  height: auto;
  pointer-events: none;
}
.video-top video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.video-top-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0.55) 0%,
    rgba(10, 10, 11, 0.18) 35%,
    rgba(10, 10, 11, 0.72) 78%,
    #0a0a0b 100%
  );
}
.video-top-curve {
  position: absolute;
  bottom: -1px;
  left: 0;
  z-index: 2;
  width: 100%;
  height: clamp(46px, 8vw, 90px);
}

/* ── Capa ───────────────────────────────────────────────────── */
#hero {
  min-height: auto;
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 1rem;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero-kicker {
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--rose);
}
.hero-name {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(4.8rem, 16vw, 10rem);
  line-height: 1.3; /* folga para as descidas longas da caligrafia (f, j) */
  color: var(--silver-bright);
  text-shadow: 0 0 60px rgba(201, 204, 212, 0.25);
}
.hero-ornament { justify-content: center; margin: 1.9rem 0 1.7rem; }
.hero-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(1.4rem, 4vw, 2rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text);
}
.hero-date {
  margin: 1rem 0 0;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
}
.hero-photo {
  margin: 2.4rem auto 0;
  width: min(240px, 60vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px rgba(10, 10, 11, 0.7), 0 0 40px rgba(201, 204, 212, 0.3);
}
.hero-photo figcaption {
  margin-top: 0.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
}
.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-top: 2.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}
.scroll-hint:hover { color: var(--rose); }
.scroll-hint svg { width: 18px; height: 18px; animation: floatDown 2.4s ease-in-out infinite; }
@keyframes floatDown {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ── Rosas line-art decorativas ─────────────────────────────── */
.rose {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  width: clamp(180px, 30vw, 340px);
  height: auto;
}
.rose-tl { top: -20px; left: -30px; }
.rose-br {
  bottom: -20px;
  right: -30px;
  transform: rotate(180deg);
}

/* ── Botões ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.85rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, transform 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  border: 1px solid var(--red);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(164, 18, 36, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--red-bright) 0%, var(--red) 100%);
  border-color: var(--red-bright);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--rose);
}
.btn-ghost:hover { border-color: var(--rose); background: rgba(226, 173, 184, 0.06); }

/* ── Detalhes ───────────────────────────────────────────────── */
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.4rem;
}
.detail-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(6px);
  padding: 2rem 1.6rem;
  text-align: center;
  transition: border-color 0.4s ease, transform 0.4s ease;
}
.detail-card:hover {
  border-color: var(--line);
  transform: translateY(-4px);
}
.detail-icon {
  width: 30px;
  height: 30px;
  color: var(--red-bright);
  margin-bottom: 0.9rem;
}
.detail-card h3 {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0 0 0.5rem;
  color: var(--rose);
}
.detail-card p { margin: 0; font-size: 0.98rem; }
.detail-address {
  margin-top: 0.5rem !important;
  font-size: 0.88rem !important;
  color: var(--muted);
}
.detail-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.detail-link:hover { color: var(--red-bright); border-color: var(--red-bright); }
.detail-extra {
  text-align: center;
  margin: 1.6rem 0 0;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
}

/* ── Contagem regressiva ────────────────────────────────────── */
#contagem { text-align: center; }
.count-grid {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.4rem);
  margin-top: 2rem;
  flex-wrap: wrap;
}
.count-unit {
  min-width: 84px;
  padding: 1.1rem 0.6rem;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}
.count-num {
  display: block;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.1;
  color: var(--silver-bright);
  font-variant-numeric: tabular-nums;
}
.count-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
}
.count-message {
  margin-top: 1.6rem;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--rose);
}

/* ── Convite afetivo ────────────────────────────────────────── */
#convite { text-align: center; }
.convite-wrap { max-width: 640px; margin: 0 auto; }
.convite-ornament { justify-content: center; margin-bottom: 2rem; }
.convite-text {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(1.3rem, 3.4vw, 1.8rem);
  line-height: 1.8;
  color: var(--text);
  margin: 0;
}
.convite-text::first-letter {
  font-family: var(--font-script);
  font-size: 2.4em;
  color: var(--red-bright);
  line-height: 0.8;
}

/* ── Memórias (quando houver conteúdo) ──────────────────────── */
.memorias-grid { display: grid; gap: 3rem; margin-top: 2.6rem; }
.memory-item { display: grid; gap: 1.2rem; align-items: center; }
@media (min-width: 769px) {
  .memory-item { grid-template-columns: 1fr 1fr; }
  .memory-item:nth-child(even) .memory-photo { order: 2; }
}
.memory-photo {
  padding: 0;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  cursor: zoom-in;
  display: block;
  width: 100%;
}
.memory-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.memory-text h3 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.6rem;
  margin: 0 0 0.6rem;
  color: var(--rose);
}
.memory-text p { margin: 0; color: var(--muted); }

#lightbox {
  border: 1px solid var(--line-soft);
  background: rgba(6, 2, 3, 0.96);
  padding: 1rem;
  max-width: min(92vw, 900px);
}
#lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }
#lightbox img { max-height: 78vh; width: auto; margin: 0 auto; }
#lightboxClose { margin-top: 0.8rem; }

/* ── Confirmação ────────────────────────────────────────────── */
#rsvp { text-align: center; }
.rsvp-final {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  color: var(--red-bright);
  margin: 1.2rem 0 0.4rem;
}
.rsvp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2rem;
}
.pending-note {
  margin: 1.6rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Rodapé ─────────────────────────────────────────────────── */
#footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3.5rem 1.5rem calc(3rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
}
.footer-ornament { justify-content: center; margin-bottom: 1.4rem; }
.footer-name {
  font-family: var(--font-title);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin: 0 0 0.4rem;
}
.footer-credits {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* ── Revelação ao rolar ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.revealed { opacity: 1; transform: none; }

/* ── Movimento reduzido ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .details-grid { grid-template-columns: 1fr; }
  .hero-photo { width: min(200px, 56vw); }
  .rose { width: clamp(150px, 40vw, 220px); }
}
@media (max-width: 480px) {
  .section { padding-left: 1.1rem; padding-right: 1.1rem; }
  .count-unit { min-width: 72px; }
  .rsvp-actions { flex-direction: column; align-items: stretch; }
}
/* ── Presentes ──────────────────────────────────────────────── */
#presentes { text-align: center; }
.presentes-note {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.05rem;
}
.presentes-panel {
  max-width: 560px;
  margin: 1.8rem auto 0;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}
.presentes-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 44px;
  padding: 0.9rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--rose);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.presentes-toggle:hover { color: var(--red-bright); }
.presentes-toggle .chev { width: 14px; height: 14px; transition: transform 0.3s ease; }
.presentes-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.presentes-list {
  margin: 0;
  padding: 0.4rem 1.8rem 1.4rem;
  list-style: none;
  text-align: center;
}
.presentes-list li {
  padding: 1.05rem 0;
  border-bottom: 1px dashed var(--line-soft);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--muted);
}
.presentes-list li:last-child { border-bottom: none; }
.presentes-cat {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose);
}
.presentes-cat::before {
  content: "◆";
  font-size: 0.55em;
  color: var(--red-bright);
  vertical-align: 0.18em;
  margin-right: 0.65em;
  opacity: 0.85;
}
.presentes-item {
  display: block;
  font-family: var(--font-title);
  font-size: 1.18rem;
  letter-spacing: 0.03em;
  color: var(--text);
}

/* ── Pétalas do CTA ─────────────────────────────────────────── */
.petal {
  position: fixed;
  z-index: 60;
  width: 9px;
  height: 9px;
  pointer-events: none;
  background: radial-gradient(circle at 30% 30%, var(--red-bright), var(--red-deep));
  border-radius: 60% 0 60% 0;
  animation: petalFloat 1.3s ease-out forwards;
}
@keyframes petalFloat {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(0, -70px) rotate(200deg) scale(0.3); opacity: 0; }
}


/* ── Botão de música (canto inferior direito) ──────────────── */
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 55;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 10, 11, 0.72);
  color: var(--silver);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.6s ease 0.9s,
    transform 0.6s ease 0.9s,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}
body.entered .music-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.music-toggle:hover {
  border-color: var(--red-bright);
  color: var(--silver-bright);
  box-shadow: 0 0 18px rgba(216, 30, 60, 0.28);
}
.music-toggle .ic { width: 20px; height: 20px; display: block; }
.music-toggle .ic-off { display: none; }
.music-toggle.is-muted { color: var(--muted); }
.music-toggle.is-muted .ic-on { display: none; }
.music-toggle.is-muted .ic-off { display: block; }
.music-toggle.is-muted:hover { border-color: var(--line); color: var(--silver); }
@media (prefers-reduced-motion: reduce) {
  .music-toggle {
    transition: opacity 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    transform: none;
  }
}
