/* =========================================================
   Letícia & Leonardo — Site do casamento
   ========================================================= */

:root {
  --cream: #f8f4ec;
  --cream-alt: #f1ead9;
  --paper: #fffdf9;
  --ink: #34302a;
  --ink-soft: #6b6155;
  --gold: #a9822f;
  --gold-light: #c9a44f;
  --gold-line: rgba(169, 130, 47, 0.35);
  --serenity: #a9c7d8;

  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-body: "Cormorant Garamond", "Georgia", serif;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

p { margin: 0 0 1em; }

a { color: inherit; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow { max-width: 760px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 236, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gold-line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(201, 164, 79, 0.12), transparent 60%),
    var(--cream);
  padding: 56px 24px 64px;
}

.hero-inner {
  width: 100%;
  max-width: 640px;
  min-width: 0;
}

.hero-logo {
  width: 88px;
  margin: 0 auto 16px;
  opacity: 0.92;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 14px;
}

.hero-names {
  font-size: clamp(44px, 8vw, 78px);
  line-height: 1.1;
  color: var(--ink);
}

.hero-names .amp {
  color: var(--gold-light);
  font-style: italic;
  padding: 0 10px;
}

.hero-date {
  margin-top: 18px;
  font-size: 22px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.hero-photos-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px auto 0;
  width: 100%;
  max-width: 602px;
}

.hero-photo {
  flex: 1 1 0;
  min-width: 0;
  max-width: 190px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(52, 48, 42, 0.2);
}

.countdown {
  display: flex;
  gap: 16px;
  margin: 32px auto 0;
  width: 100%;
  max-width: 602px;
}

.countdown-item {
  flex: 1 1 0;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  min-width: 0;
  padding: 14px 8px;
}

.countdown-number {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--gold);
}

.countdown-label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: 2px;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}


/* ---------- Sections (general) ---------- */
.section {
  padding: 72px 0;
  /* Compensa o header fixo ao navegar pelas âncoras do menu */
  scroll-margin-top: 68px;
}
.section.alt {
  background: var(--cream-alt);
}

.kicker {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 18px;
}

.section-lead {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--ink-soft);
  font-size: 22px;
}

/* ---------- Welcome / história ---------- */
.welcome p {
  font-size: 23px;
}
.welcome .highlight {
  font-style: italic;
  color: var(--gold);
  font-size: 24px;
}
.welcome .signature {
  margin-top: 32px;
  font-family: var(--font-display);
  font-size: 24px;
}

.divider {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.divider-img {
  width: 84px;
  opacity: 0.85;
  filter: drop-shadow(0 6px 14px rgba(52, 48, 42, 0.18));
}

/* ---------- Cerimônia & Recepção ---------- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 40px;
  margin-top: 20px;
}

.event-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  overflow: hidden;
}

.event-card-img {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.event-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(52, 48, 42, 0.55);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.event-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 28px;
}

.event-card-body h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.event-tag {
  display: inline-block;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.event-place {
  color: var(--ink-soft);
  font-size: 20px;
  margin-bottom: 14px;
}

.event-note {
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.map-embed {
  margin-top: auto;
  margin-bottom: 18px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gold-line);
}
.map-embed iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 17px;
  letter-spacing: 0.03em;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--gold);
  color: var(--paper);
}
.btn-primary:hover { background: var(--gold-light); }
.btn-primary:disabled {
  background: #d9cfb8;
  color: #8a8271;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--paper); }

.btn-ghost {
  background: transparent;
  border-color: var(--gold-line);
  color: var(--ink-soft);
}
.btn-ghost:disabled { cursor: not-allowed; opacity: 0.7; }

/* ---------- Traje ---------- */
.dresscode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 12px;
}
.dresscode-card {
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  padding: 28px;
}
.dresscode-card h3 {
  margin-bottom: 12px;
  font-size: 24px;
}
.dresscode-card .note {
  font-size: 17px;
  color: var(--ink-soft);
  border-top: 1px dashed var(--gold-line);
  padding-top: 12px;
  margin-top: 14px;
}

/* ---------- Paleta de cores ---------- */
.palette-block {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px dashed var(--gold-line);
}

.palette-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.palette-divider {
  align-self: stretch;
  width: 1px;
  background: var(--gold-line);
}

.palette-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 76px;
}

.swatch-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--swatch-color);
  border: 1px solid rgba(52, 48, 42, 0.15);
  box-shadow: 0 3px 8px rgba(52, 48, 42, 0.1);
  position: relative;
}

.swatch-name {
  font-size: 15px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.3;
}

/* Tons reservados à noiva: círculo "riscado" para indicar "evitar" */
.swatch-item.forbidden .swatch-circle::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1.2px),
    rgba(123, 45, 30, 0.6) calc(50% - 1.2px),
    rgba(123, 45, 30, 0.6) calc(50% + 1.2px),
    transparent calc(50% + 1.2px)
  );
}
.swatch-item.forbidden .swatch-name {
  color: #8a4a3a;
}

/* ---------- Presentes / marketplace ---------- */
.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.gift-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}

.gift-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto 16px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cream-alt);
}

.gift-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-card h3 {
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 8px;
  min-height: 52px;
}

.gift-price {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 16px;
}

.gift-card .btn {
  margin-top: auto;
}

/* ---------- Paginação da lista de presentes ---------- */
.gift-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.pager-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--gold-line);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 17px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.pager-btn:hover:not(:disabled) {
  background: var(--cream-alt);
  color: var(--ink);
}

.pager-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--paper);
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 56px 24px 40px;
  background: var(--ink);
  color: var(--cream-alt);
}
.footer-logo {
  width: 56px;
  margin: 0 auto 16px;
  filter: brightness(0) invert(1) opacity(0.85);
}
.footer-fine {
  font-size: 15px;
  color: rgba(248, 244, 236, 0.6);
}

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 860px) {
  .dresscode-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .palette-row { gap: 28px; }
  .palette-divider { display: none; }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--gold-line);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }

  .section { padding: 48px 0; }

  .countdown {
    gap: 10px;
  }
  .countdown-item {
    padding: 10px 4px;
  }
  .countdown-number { font-size: 26px; }

  .hero-photos-row { gap: 10px; }
}

/* ---------- Utilitário (deve vencer no cascade) ---------- */
.centered { text-align: center; }

/* ---------- Abertura do convite ---------- */
body.intro-locked { overflow: hidden; }

.intro-envelope {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-alt) 100%);
  transition: opacity 0.7s ease 0.7s, transform 0.7s ease 0.7s;
}

.intro-envelope::before {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px solid var(--gold-line);
  pointer-events: none;
}

.intro-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px;
  text-align: center;
}

.intro-hint { transition: opacity 0.5s ease, transform 0.5s ease; }

.intro-hint {
  margin: 0;
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
}

/* ---- Envelope ---- */
.envelope {
  position: relative;
  width: min(86vw, 420px);
  aspect-ratio: 3 / 2;
  perspective: 1400px;
}

.envelope-shadow {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow: 0 26px 46px rgba(52, 48, 42, 0.22);
}

.envelope-body {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  overflow: hidden;
  z-index: 1;
}

.envelope-crease {
  position: absolute;
  bottom: 0;
  width: 75%;
  height: 100%;
  border-top: 1px solid var(--gold-line);
}

.envelope-crease-left {
  left: -18%;
  transform-origin: top right;
  transform: rotate(31deg);
}

.envelope-crease-right {
  right: -18%;
  transform-origin: top left;
  transform: rotate(-31deg);
}

.envelope-names {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  margin: 0;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(18px, 4.2vw, 24px);
  text-align: center;
  color: var(--ink);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 58%;
  z-index: 3;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.45, 0.05, 0.15, 1) 0.15s;
}

.envelope-flap-face {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden;
  border-radius: 8px 8px 0 0;
}

.envelope-flap-front {
  background: var(--cream-alt);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}

.envelope-flap-back {
  background: var(--cream);
  transform: rotateX(180deg);
}

.envelope-seal {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 28%, var(--gold-light), var(--gold) 70%);
  box-shadow: 0 12px 26px rgba(169, 130, 47, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  animation: intro-seal-pulse 2.4s ease-in-out infinite;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.envelope-seal-logo {
  width: 52%;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

@keyframes intro-seal-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.06); }
}

/* ---- Estado "abrindo" ---- */
.intro-envelope.opening .envelope-seal {
  transform: translate(-50%, -50%) scale(0.15);
  opacity: 0;
  animation: none;
}

.intro-envelope.opening .envelope-flap {
  transform: rotateX(-165deg);
}

.intro-envelope.opening .envelope-names,
.intro-envelope.opening .intro-hint {
  opacity: 0;
  transform: translateY(-10px);
}

.intro-envelope.opening { opacity: 0; transform: scale(1.04); pointer-events: none; }

.intro-envelope.intro-hidden { display: none; }

@media (max-width: 720px) {
  .envelope-seal { width: 84px; height: 84px; }
  .intro-hint { font-size: 18px; }
}
