/* ============================================================
   VARIÁVEIS GLOBAIS
   ============================================================ */
:root {
  /* Paleta */
  --sage:        #5B6B52;
  --sage-light:  #C5C9B5;
  --nude:        #D5BEAF;
  --fendi:       #D3BBA5;
  --cream:       #FFF6EE;
  --sky:         #d8e8f0;
  --warm-bg:     #f7f3ee;
  --hero-bg-a:   #f0f4f2;

  /* Texto */
  --ink:         #2A2A28;
  --ink-mid:     #5A5248;
  --ink-faint:   #9A8E85;

  /* Tipografia */
  --script:   'Pinyon Script', cursive;
  --serif:    'Cormorant Garamond', Georgia, serif;
  --sans:     'Josefin Sans', sans-serif;

  /* Layout */
  --header-h:  64px;
  --max-w:     960px;
  --section-v: clamp(100px, 12vw, 140px);

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   RESET MÍNIMO
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
address   { font-style: normal; }
a         { color: inherit; text-decoration: none; }
ul        { list-style: none; }
em        { font-style: italic; }

/* ============================================================
   SCROLL REVEAL
   Cada elemento com .reveal começa invisível e sobe suavemente.
   O JS aplica .visible e usa data-delay para escalonar grupos.
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity  0.85s var(--ease),
    transform 0.85s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   TIPOGRAFIA COMUM DE SEÇÃO
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

/* nude (#D5BEAF) em fundos claros = ratio ~1.7:1, ilegível.
   ink-mid (#5A5248) = ratio ~5.2:1, legível e ainda discreto. */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 0.7rem;
}
.eyebrow--light { color: rgba(197,201,181,0.95); }

.section-title {
  font-family: var(--script);
  font-size: clamp(3rem, 7vw, 4.8rem);
  font-weight: 400;
  color: var(--sage);
  line-height: 1.1;
}
.section-title--light { color: var(--cream); }

.section-rule {
  width: 40px;
  height: 1px;
  background: var(--nude);
  margin: 1rem auto 0;
}
.section-rule--light { background: rgba(213,190,175,0.45); }

.section-subtitle {
  margin-top: 0.8rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ============================================================
   BOTÕES
   ============================================================ */

/* Outline: eventos / mapa */
.btn-outline {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.65rem 1.6rem;
  border: 1px solid var(--sage);
  color: var(--sage);
  border-radius: 2px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn-outline:hover {
  background: var(--sage);
  color: var(--cream);
}

/* Primary: formulário */
.btn-primary {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.9rem 2.4rem;
  background: var(--sage);
  color: var(--cream);
  border: 1.5px solid var(--sage);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.35s, border-color 0.35s, transform 0.15s;
}
.btn-primary:hover  { background: #4a5843; border-color: #4a5843; }
.btn-primary:active { transform: scale(0.97); }

/* Gift (footer): borda branca */
.btn-gift {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.8rem 2.2rem;
  border: 1px solid rgba(255,246,238,0.55);
  color: var(--cream);
  border-radius: 2px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn-gift:hover {
  background: var(--cream);
  color: var(--sage);
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255, 246, 238, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(197,201,181,0.3);
  z-index: 1000;
  transition: transform 0.45s var(--ease), box-shadow 0.3s;
}
#site-header.hidden   { transform: translateY(-100%); }
#site-header.scrolled { box-shadow: 0 4px 24px rgba(91,107,82,0.07); }

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logotipo "IT" em Pinyon Script no header */
.nav-logo {
  font-family: var(--script);
  font-size: 2rem;
  color: var(--sage);
  line-height: 1;
  flex-shrink: 0;
}

/* Links de navegação */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2.2vw, 2.2rem);
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.3s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--sage); }

/* "Dar Presente" destacado com borda */
.nav-presente {
  border: 1px solid var(--sage) !important;
  padding: 0.38rem 1rem !important;
  border-radius: 2px;
  color: var(--sage) !important;
  transition: background 0.35s, color 0.35s !important;
}
.nav-presente:hover {
  background: var(--sage) !important;
  color: var(--cream) !important;
}

/* Hamburguer mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--sage);
  border-radius: 1px;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   SEÇÃO 1 — HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  /* SEM align-items: center — o default stretch deixa a church-wrap
     esticar naturalmente até as bordas. O monograma é centralizado
     individualmente com margin: 0 auto abaixo. */
  padding-top: calc(var(--header-h) + 3rem);
  background: linear-gradient(160deg, var(--hero-bg-a) 0%, var(--cream) 55%);
  overflow: hidden;
}

/* Monograma: darken é superior ao multiply para imagens com fundo branco —
   mostra apenas pixels mais escuros que o fundo, sem multiplicar nem degradar
   anti-aliasing. translateZ(0) força renderização full-res na GPU. */
.hero-monogram {
  display: block;
  width: 180px;
  margin: 0 auto;               /* centraliza sem align-items no pai */
  mix-blend-mode: darken;
  transform: translateZ(0);
  flex-shrink: 0;
}

/* Animação do monograma: só transform, sem opacity — preserva mix-blend-mode */
.hero-mono-anim {
  animation: heroSlideDown 1s var(--ease) both;
}
@keyframes heroSlideDown {
  from { transform: translateY(-16px); }
  to   { transform: translateY(0);     }
}

/* Área de conteúdo textual — sem position/z-index para não criar stacking context */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 2rem 3rem;
  width: 100%;
}

/* Animação dos demais elementos do hero: opacity + transform */
.hero-anim {
  opacity: 0;
  animation: heroFadeUp 1s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* Nomes principais */
.hero-names {
  font-family: var(--script);
  font-size: clamp(3.6rem, 10vw, 6.5rem);
  font-weight: 400;
  color: var(--sage);
  line-height: 1.05;
  margin-bottom: 1.4rem;
}
.hero-names em {
  color: var(--nude);
  font-size: 0.88em;
}

/* Data — cor subiu de ink-faint (#9A8E85, ratio 2.3:1) para ink-mid (#5A5248, ratio ~5.2:1) */
.hero-date {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.5rem;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 1.2rem;
}

/* Linha horizontal fina entre data e local */
.hero-rule {
  width: 48px;
  height: 1px;
  background: var(--nude);
  margin: 0 auto 1.2rem;
}

/* Local */
.hero-location {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mid);
  letter-spacing: 0.04em;
}

/* Church wrap: altura fixa necessária para object-fit:cover funcionar.
   Sem max-width ou align-self override — com flex default:stretch no pai
   este elemento se estica naturalmente até as duas bordas laterais da tela. */
.hero-church-wrap {
  position: relative;
  width: 100%;
  height: clamp(260px, 44vh, 480px);
  overflow: hidden;
  flex-shrink: 0;
  margin-top: auto;
}

/* object-fit:cover preenche o container de borda a borda, cobrindo qualquer
   padding branco que exista dentro do arquivo PNG.
   height:130% dá margem vertical para o translateY do parallax não expor fundo. */
.hero-church-img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center bottom;
  will-change: transform;
}

/* Gradiente usa #FFF6EE literal para casar com exatamente o fundo do hero no ponto de junção */
.hero-church-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to bottom, #FFF6EE, transparent);
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   SEÇÃO 2 — COUNTDOWN
   ============================================================ */
#countdown {
  background: var(--sage);
  padding: 100px 2rem;
  text-align: center;
}

/* Frase acima: Pinyon Script, estilo editorial */
.countdown-phrase {
  font-family: var(--script);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 400;
  color: rgba(255,246,238,0.7);
  margin-bottom: 3rem;
}

/* Grid dos quatro blocos + separadores — nunca quebra linha */
.countdown-grid {
  display: flex;
  align-items: baseline;     /* números e separadores compartilham a mesma linha de base */
  justify-content: center;
  gap: clamp(0.8rem, 2.5vw, 2.8rem);
  flex-wrap: nowrap;         /* mantém layout em linha única em qualquer viewport */
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Números: Cormorant Garamond gigante */
.countdown-num {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;            /* mínimo 3 dígitos — necessário para "dias" (000–498) */
  text-align: center;
}

/* Labels minúsculas abaixo dos números */
.countdown-lbl {
  font-family: var(--sans);
  font-size: 0.56rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sage-light);
}

/* Separador · — baseline-aligned naturalmente com os números, sem override */
.countdown-sep {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 300;
  color: var(--sage-light);
  opacity: 0.4;
  line-height: 1;
  user-select: none;
  padding-bottom: 0.5rem;    /* empurra o · para cima do baseline, alinhando ao centro visual dos números */
}

/* Data abaixo do grid */
.countdown-date {
  margin-top: 2.8rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sage-light);
  opacity: 0.65;
}

/* ============================================================
   SEÇÃO 3 — NOSSA HISTÓRIA
   ============================================================ */
#historia {
  background: var(--warm-bg);
  padding: var(--section-v) 2rem;
}

/* -------- TIMELINE -------- */
.timeline {
  position: relative;
  padding: 1rem 0;
}

/* Linha vertical central */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--nude) 12%, var(--nude) 88%, transparent);
  transform: translateX(-50%);
}

/* Item da timeline: grid 3 colunas (esq | centro | dir) */
.timeline-item {
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  padding: 2.5rem 0;
}

/* Coluna central com o ponto — sem padding-top para o dot alinhar com o tl-year */
.tl-middle {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--sage);
  background: var(--warm-bg);
  flex-shrink: 0;
}

/* Conteúdo da esquerda — alinhado à direita */
.tl-content {
  padding: 0 2.5rem;
  text-align: right;
}

/* Conteúdo da direita — padding explícito (não depende de herança silenciosa) */
.tl-content--right {
  padding: 0 2.5rem;
  text-align: left;
}

.tl-year {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 0.5rem;
}

.tl-heading {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  font-style: italic;
  color: var(--sage);
  margin-bottom: 0.7rem;
  line-height: 1.2;
}

.tl-text {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.85;
}

/* ============================================================
   SEÇÃO 4 — O GRANDE DIA
   ============================================================ */
#grande-dia {
  background: var(--cream);
  padding: var(--section-v) 2rem;
}

/* Cards lado a lado */
.event-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 3vw, 2.5rem);
}

.event-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--nude);
  border-radius: 2px;
  transition: border-color 0.4s, transform 0.4s var(--ease);
}
.event-card:hover {
  border-color: var(--sage);
  transform: translateY(-4px);
}

/* Cerimônia: acento no topo, ícone maior e mais presente — hierarquia emocional */
.event-card--ceremony {
  border-top: 3px solid var(--nude);
}
.event-card--ceremony .event-icon {
  width: 40px;
  height: 40px;
  opacity: 0.8;
}
.event-card--ceremony .event-name {
  font-size: clamp(1rem, 4.5vw, 2.2rem);
}

/* Ícone SVG minimalista */
.event-icon {
  width: 32px;
  height: 32px;
  color: var(--sage);
  opacity: 0.6;
  margin-bottom: 1rem;
}

/* Ícone PNG externo: filter aproxima o preto ao sage verde do site */
.event-icon--img {
  width: 40px;
  height: 40px;
  opacity: 1;
}
.event-icon--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(37%) sepia(18%) saturate(519%) hue-rotate(62deg) brightness(93%) contrast(88%);
}

/* sage-light (#C5C9B5) sobre cream tinha ratio ~1.4:1 — ilegível.
   sage (#5B6B52) sobre cream = ~5.9:1, mantém a identidade de cor. */
.event-type {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.5rem;
}

/* clamp mais agressivo: 1rem mínimo evita quebra catastrófica em Pinyon Script.
   overflow-wrap garante quebra entre palavras antes de quebrar dentro delas. */
.event-name {
  font-family: var(--serif);
  font-size: clamp(1rem, 4.5vw, 2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--sage);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
}

/* margin-top cria separação visual entre bloco identidade (tipo + nome)
   e bloco logística (horário + endereço) */
.event-time {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mid);
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

/* ink-mid em vez de ink-faint: endereço é info crítica, contraste passa de 2.4:1 para 5.2:1 */
.event-address {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  line-height: 2;
}

/* Botão ancorado na base do card — alinha "Ver no Mapa" nos dois cards independente do conteúdo */
.event-card .btn-outline {
  margin-top: auto;
}

/* ============================================================
   SEÇÃO 5 — DRESS CODE
   ============================================================ */
#dresscode {
  background: var(--sage);
  padding: var(--section-v) 2rem;
}

.dresscode-inner { max-width: 680px; }

/* "Esporte Fino" — Josefin Sans weight 100 */
.dresscode-subtitle {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 100;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,246,238,0.75);
}

/* Botões "Guia Homens / Guia Mulheres" */
.dresscode-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.btn-dc {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.75rem 2.2rem;
  border: 1px solid rgba(255,246,238,0.7);
  color: var(--cream);
  background: transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn-dc:hover,
.btn-dc.active {
  background: var(--cream);
  color: var(--sage);
}

/* Painéis expansíveis — max-height 0 → auto via JS + classe .open */
.dc-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  text-align: center;
  padding: 0 1rem;
  margin-top: 0;
  transition:
    max-height 0.65s var(--ease),
    opacity    0.5s  var(--ease),
    padding    0.5s  var(--ease),
    margin-top 0.5s  var(--ease);
}
.dc-panel.open {
  max-height: 700px;
  opacity: 1;
  padding: 2.5rem 1rem 0.5rem;
  margin-top: 2rem;
}

.dc-panel-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 1rem;
}

.dc-panel-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255,246,238,0.85);
  line-height: 1.95;
  margin-bottom: 2rem;
}

.dc-palette {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.dc-palette-label {
  font-family: var(--sans);
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(197,201,181,0.82);
  margin-bottom: 1.8rem;
}

.dc-humor {
  font-family: var(--serif);
  font-size: 0.92rem;
  color: rgba(255,246,238,0.55);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.btn-dc-ref {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.75rem 2rem;
  border: 1px solid rgba(255,246,238,0.55);
  color: var(--cream);
  border-radius: 2px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn-dc-ref:hover {
  background: var(--cream);
  color: var(--sage);
}

/* Swatch — usado no index e nas páginas dc */
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid rgba(255,246,238,0.25);
  transition: transform 0.2s;
  cursor: default;
}
.swatch:hover { transform: scale(1.15); }

/* ============================================================
   PÁGINAS DRESS CODE — dress-code-homens / dress-code-mulheres
   ============================================================ */
.dc-page {
  background: var(--warm-bg);
}

/* Header simples */
.dc-page-header {
  position: sticky;
  top: 0;
  background: rgba(247,243,238,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(197,201,181,0.3);
  z-index: 100;
}

.dc-page-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dc-back {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.3s;
  min-width: 110px;
}
.dc-back:hover { color: var(--sage); }

.dc-page-logo {
  font-family: var(--script);
  font-size: 2rem;
  color: var(--sage);
  line-height: 1;
}

.dc-nav-spacer {
  min-width: 110px;
}

/* Área de conteúdo */
.dc-main {
  padding: var(--section-v) 2rem;
}

.dc-page-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Grade de fotos — 3 colunas */
.dc-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.8rem, 2vw, 1.5rem);
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.dc-photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 3 / 4;
  background: var(--nude);
}

.dc-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.6s var(--ease);
}
.dc-photo-item:hover img { transform: scale(1.03); }

/* Grade 4 colunas — variante para página de mulheres */
.dc-photo-grid--4col {
  grid-template-columns: repeat(4, 1fr);
}

/* Botão "← Voltar" centralizado */
.dc-back-wrap {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

/* Footer simples das páginas dc */
.dc-footer {
  background: var(--sage);
  padding: clamp(2.5rem, 5vw, 4rem) 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.dc-footer-logo {
  font-family: var(--script);
  font-size: 2.5rem;
  color: rgba(255,246,238,0.9);
  line-height: 1;
}

.dc-footer-date {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--sage-light);
  opacity: 0.85;
}

/* ============================================================
   SEÇÃO 6 — FAQ
   ============================================================ */
#faq {
  background: var(--cream);
  padding: var(--section-v) 2rem;
}

.faq-list {
  border-top: 1px solid rgba(213,190,175,0.4);
}

.faq-item {
  border-bottom: 1px solid rgba(213,190,175,0.4);
  overflow: hidden;
}

/* Pergunta (summary) */
.faq-q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
  transition: color 0.3s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.faq-q::-webkit-details-marker,
.faq-q::marker { display: none; }

/* Ícone + → × */
.faq-q::after {
  content: '+';
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--sage);
  line-height: 1;
  transition: transform 0.35s var(--ease), color 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}
.faq-item[open] .faq-q {
  color: var(--sage);
}

/* Resposta — display:block !important sobrescreve o display:none do UA no <details> fechado,
   permitindo animar max-height de 0 → 300px em vez de pop instantâneo */
.faq-a {
  display: block !important;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.85;
  max-width: 680px;
  overflow: hidden;
  max-height: 0;
  padding: 0;
  transition: max-height 0.45s var(--ease), padding-bottom 0.45s var(--ease);
}
details[open] .faq-a {
  max-height: 300px;
  padding-bottom: 1.4rem;
}

/* ============================================================
   SEÇÃO 7 — A NOTE FROM THE BRIDE & GROOM
   ============================================================ */
#note-bride {
  background: var(--warm-bg);
  padding: var(--section-v) 2rem;
}

/* Desktop: dois cards lado a lado, mesma altura */
.letters-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
}

/* Card carta com borda lateral esquerda */
.letter-card {
  padding: 3rem;
  border-left: 3px solid var(--nude);
  background: var(--warm-bg);
}

.letter-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--nude);
  margin-bottom: 2rem;
  display: block;
}

.letter-body {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-bottom: 2rem;
}

.letter-p {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 2;
}

/* Assinatura em Pinyon Script */
.letter-sig {
  font-family: var(--script);
  font-size: 3.25rem;
  color: var(--sage);
  line-height: 1;
}

/* Dots — ocultos no desktop */
.letters-dots { display: none; }

/* Wrapper de posicionamento para as setas absolutas */
.letters-carousel { position: relative; }

/* Setas — ocultas no desktop */
.letters-arrow { display: none; }

/* ============================================================
   SEÇÃO 8 — CONFIRMAR PRESENÇA
   ============================================================ */
#confirmacao {
  background: var(--cream);
  padding: var(--section-v) 2rem;
}

.form-wrapper {
  max-width: 480px;
  margin: 0 auto;
}

/* Campos com borda inferior apenas — estilo minimalista */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.field-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.field-input {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(197,201,181,0.7);
  border-radius: 0;
  padding: 0.5rem 0;
  width: 100%;
  transition: border-color 0.35s;
  -webkit-appearance: none;
  appearance: none;
}
.field-input:focus {
  outline: none;
  border-bottom-color: var(--sage);
}
.field-input::placeholder { color: var(--ink-faint); }

/* Seta customizada no select */
.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235B6B52' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 1.4rem;
  cursor: pointer;
}

/* Botão de submit ocupa a largura total dos campos — centraliza naturalmente */
.rsvp-form .btn-primary {
  display: block;
  width: 100%;
}

/* Estado de loading do botão */
.btn-spinner { display: none; }
.btn-primary.loading .btn-label  { display: none; }
.btn-primary.loading .btn-spinner { display: inline; }
.btn-primary.loading { opacity: 0.7; pointer-events: none; }

/* Campo com erro */
.field-input.campo-erro {
  border-bottom-color: #c0392b;
}

/* Mensagem de sucesso */
.rsvp-success {
  text-align: center;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: fadeIn 0.7s var(--ease) both;
}
.rsvp-success[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.success-ornament {
  font-size: 1.6rem;
  color: var(--sage-light);
}

.success-title {
  font-family: var(--script);
  font-size: clamp(2.2rem, 6vw, 3rem);
  color: var(--sage);
  line-height: 1;
}

.success-text {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink-mid);
  line-height: 1.85;
  max-width: 400px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--sage);
  padding: clamp(4rem, 8vw, 6rem) 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

/* Monograma invertido: filter invert + mix-blend-mode screen para mostrar branco sobre verde */
.footer-monogram {
  width: 120px;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.9;
}

/* Data em numeral romano */
.footer-roman {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--sage-light);
  opacity: 0.90;
}

.footer-phrase {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(255,246,238,0.80);
}

.footer-gift-wrap {
  margin: 0.8rem 0;
}

.footer-credit {
  font-family: var(--sans);
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(197,201,181,0.35);
  margin-top: 1rem;
}

/* ============================================================
   RESPONSIVO — TABLET (≤ 860px)
   ============================================================ */
@media (max-width: 860px) {

  /* dc-photo-grid: 2 colunas em tablet */
  .dc-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* 4col variante mantém 3 colunas no tablet */
  .dc-photo-grid--4col {
    grid-template-columns: repeat(3, 1fr);
  }
  .dc-nav-spacer { min-width: 60px; }

  /* Menu mobile oculto por padrão */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(255,246,238,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s var(--ease), padding 0.45s;
    border-bottom: 1px solid rgba(197,201,181,0.3);
  }
  .nav-links.open {
    max-height: 500px;
    padding: 1rem 0 1.8rem;
  }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a  {
    display: block;
    padding: 0.8rem 2rem;
    font-size: 0.72rem;
  }
  .nav-presente { display: inline-block !important; margin-top: 0.5rem; }

  /* Timeline mobile: linha vertical à esquerda, conteúdo à direita */
  .timeline::before {
    left: 13px;
    transform: none;
  }

  .timeline-item {
    grid-template-columns: 28px 1fr;
    gap: 0 1.2rem;
  }

  /* Oculta coluna vazia (usada só no desktop para alternância) */
  .tl-empty { display: none; }

  /* Ponto central → coluna 1, linha 1 */
  .tl-middle {
    grid-column: 1;
    grid-row: 1;
  }

  /* Conteúdo (esquerda ou direita no desktop) → coluna 2, sempre alinhado à esquerda */
  .tl-content,
  .tl-content--right {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    padding: 0;
  }

  /* Cards: empilha — gap mínimo aumentado para 2rem (antes caía para 1.2rem em 375px) */
  .event-cards {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* ============================================================
   RESPONSIVO — CARROSSEL CARTAS (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* Carrossel com scroll-snap nativo */
  .letters-wrap {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
  }
  .letters-wrap::-webkit-scrollbar { display: none; }

  .letter-card {
    scroll-snap-align: start;
    flex: 0 0 100%;
  }

  /* Setas de navegação */
  .letters-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    font-family: var(--serif);
    font-size: 3rem;
    color: var(--sage);
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    line-height: 1;
    opacity: 1;
    transition: opacity 0.4s var(--ease);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  .letters-arrow--prev { left: 0; }
  .letters-arrow--next { right: 0; }
  .letters-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
  }

  /* Indicadores de ponto */
  .letters-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
  }

  .letters-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--sage-light);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s;
  }
  .letters-dot--active {
    background: var(--sage);
    border-color: var(--sage);
    transform: scale(1.1);
  }
}

/* ============================================================
   RESPONSIVO — MOBILE PEQUENO (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

  .hero-monogram { width: 130px; }

  .hero-names { font-size: 3rem; }

  /* Fonte menor garante linha única sem flex-wrap em telas de 320-480px */
  .countdown-num { font-size: 2.2rem; }
  .countdown-sep { font-size: 1.8rem; padding-bottom: 0.35rem; }
  .countdown-grid { gap: 0.4rem; }

  .letter-p { font-size: 1.05rem; }

  /* Dress code: botões empilhados em telas muito pequenas */
  .dresscode-btns { flex-direction: column; align-items: center; }
  .btn-dc { width: 200px; text-align: center; }

  /* dc-photo-grid: 2 colunas mesmo em mobile */
  .dc-photo-grid { gap: 0.5rem; }
  .dc-photo-grid--4col { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .dc-page-nav { padding: 0 1rem; }
  .dc-back { font-size: 0.56rem; min-width: 80px; }
}
