/* =========================================================================
   BASE.CSS — estrutura e componentes compartilhados por todos os estilos.
   As cores/fontes vêm das variáveis definidas em themes.css.
   ========================================================================= */

/* ---------- Tokens padrão (sobrescritos por cada tema) ---------- */
:root {
  --bg: #fff;
  --bg-alt: #f6f3ee;
  --bg-dark: #2b2b2b;
  --text: #2b2b2b;
  --text-soft: #6b6b6b;
  --text-inv: #fff;
  --accent: #b89b5e;
  --accent-soft: #e7dcc4;
  --line: rgba(0, 0, 0, 0.12);
  --hero-overlay: rgba(0, 0, 0, 0.25);
  --card: #fff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', system-ui, sans-serif;
  --font-script: 'Cormorant Garamond', cursive;

  --maxw: 1120px;
  --radius: 2px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(4rem, 10vw, 7rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: clamp(16px, 1.05vw + 0.8rem, 18px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }
section { scroll-margin-top: 64px; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; }
.display { font-size: clamp(2.8rem, 9vw, 6rem); letter-spacing: 0.02em; }
.script { font-family: var(--font-script); font-weight: 400; }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
}
.section-title { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0.4rem 0 0.6rem; }
.section-head { text-align: center; max-width: 38rem; margin: 0 auto clamp(2rem, 5vw, 3.5rem); }
.section-head p { color: var(--text-soft); }
.lead { font-size: 1.08rem; color: var(--text-soft); }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--pad), var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }

/* Divisor ornamental */
.rule {
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  color: var(--accent); margin: 1.2rem auto; max-width: 14rem;
}
.rule::before, .rule::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.rule__dot { width: 7px; height: 7px; transform: rotate(45deg); background: currentColor; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.2em;
  border: 1px solid var(--accent);
  background: var(--accent); color: var(--text-inv);
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(0,0,0,.5); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--text-inv); }
.btn--light { background: transparent; color: var(--text-inv); border-color: rgba(255,255,255,.7); }
.btn--light:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Navegação ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem var(--pad);
  transition: background .3s ease, box-shadow .3s ease;
}
.nav__brand { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.08em; color: var(--text-inv); }
.nav__links { display: flex; gap: clamp(0.8rem, 2vw, 1.8rem); }
.nav__links a {
  color: var(--text-inv); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.18em;
  opacity: .92; position: relative; padding-bottom: 2px;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav.is-scrolled {
  background: var(--bg); box-shadow: 0 1px 0 var(--line);
  padding-block: 0.6rem;
}
.nav.is-scrolled .nav__brand,
.nav.is-scrolled .nav__links a { color: var(--text); }
.nav__toggle { display: none; color: var(--text-inv); font-size: 1.4rem; }
.nav.is-scrolled .nav__toggle { color: var(--text); }

@media (max-width: 760px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; justify-content: center; gap: 1.6rem; padding: 2rem;
    background: var(--bg); transform: translateX(100%); transition: transform .35s ease;
    box-shadow: -20px 0 40px -20px rgba(0,0,0,.3);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { color: var(--text); font-size: 0.95rem; }
  .nav__toggle { display: inline-flex; z-index: 70; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  text-align: center; color: #fff; padding: 6rem var(--pad) 3rem;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background: var(--hero-gradient, radial-gradient(120% 90% at 50% 10%, var(--accent) 0%, var(--bg-dark) 70%));
}
.hero__bg::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--hero-overlay);
}
.hero__monogram {
  position: absolute; inset: 0; z-index: -1; display: grid; place-items: center;
  pointer-events: none; opacity: .14;
}
.hero__monogram svg { width: min(70vmin, 520px); }
.hero__inner { max-width: 46rem; }
.hero__names { font-size: clamp(3rem, 12vw, 7rem); line-height: 0.98; }
.hero__amp { color: var(--accent-soft); font-style: italic; }
.hero__sub { margin-top: 1.4rem; }
.hero__date { margin-top: 1.6rem; font-size: 1rem; letter-spacing: 0.4em; text-transform: uppercase; opacity: .92; }
.hero__cta { margin-top: 2.4rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; opacity: .8;
  display: grid; gap: 0.5rem; justify-items: center;
}
.hero__scroll::after {
  content: ''; width: 1px; height: 34px; background: currentColor;
  animation: scrolldot 1.8s ease-in-out infinite; transform-origin: top;
}
@keyframes scrolldot { 0%,100% { transform: scaleY(.3); opacity:.4 } 50% { transform: scaleY(1); opacity:1 } }

/* ---------- Countdown ---------- */
.countdown { display: flex; justify-content: center; gap: clamp(0.8rem, 4vw, 2.4rem); flex-wrap: wrap; }
.countdown__unit { text-align: center; min-width: 4.5rem; }
.countdown__num {
  font-family: var(--font-display); font-size: clamp(2.2rem, 7vw, 3.6rem); line-height: 1;
}
.countdown__label {
  display: block; margin-top: 0.4rem; font-size: 0.66rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--text-soft);
}
.countdown--hero .countdown__label { color: rgba(255,255,255,.8); }

/* ---------- Timeline (Nossa História) ---------- */
.timeline { max-width: 46rem; margin-inline: auto; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: var(--line); transform: translateX(-50%);
}
.tl-item { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 2.4rem; align-items: center; }
.tl-item:nth-child(even) { direction: rtl; }
.tl-item:nth-child(even) > * { direction: ltr; }
.tl-card { padding: 0 1.6rem; }
.tl-year { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); }
.tl-dot {
  position: absolute; left: 50%; transform: translate(-50%, 0);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line);
}
.tl-item { position: relative; }
.tl-item .tl-dot { top: 0.7rem; }
@media (max-width: 680px) {
  .timeline::before { left: 8px; }
  .tl-item, .tl-item:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
  .tl-card { padding: 0 0 0 2.2rem; text-align: left !important; }
  .tl-item .tl-dot { left: 8px; }
}

/* ---------- Local / Mapa ---------- */
.venues { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(1.2rem, 3vw, 2.2rem); }
.venue {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.venue__map { aspect-ratio: 16/10; border: 0; filter: grayscale(0.2) contrast(1.02); width: 100%; }
.venue__body { padding: 1.6rem 1.6rem 1.8rem; }
.venue__eyebrow { color: var(--accent); font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; }
.venue__name { font-size: 1.5rem; margin: 0.3rem 0 0.5rem; }
.venue__addr { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 1rem; }
.venue__time { font-family: var(--font-display); font-size: 1.25rem; }

/* ---------- RSVP ---------- */
.rsvp-wrap { max-width: 40rem; margin-inline: auto; }
.rsvp-form {
  display: grid; gap: 1.1rem; text-align: left;
  background: var(--card); padding: clamp(1.6rem, 4vw, 2.6rem);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); }
.field input, .field select, .field textarea {
  font: inherit; padding: 0.75rem 0.9rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg); color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.choice { display: flex; gap: 0.8rem; }
.choice label {
  flex: 1; text-align: center; padding: 0.8rem; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; text-transform: none; letter-spacing: 0;
  font-size: 0.95rem; color: var(--text); transition: all .2s ease;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice input:checked + label { background: var(--accent); color: var(--text-inv); border-color: var(--accent); }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.rsvp-note { text-align: center; color: var(--text-soft); font-size: 0.9rem; margin-top: 1rem; }

/* ---------- Presentes ---------- */
.gifts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.gift {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; text-align: center; display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.gift:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -22px rgba(0,0,0,.45); }
.gift__icon { font-size: 1.6rem; color: var(--accent); }
.gift__title { font-family: var(--font-display); font-size: 1.25rem; }
.gift p { color: var(--text-soft); font-size: 0.92rem; }
.pix-box {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem;
  font-family: monospace; font-size: 0.82rem; padding: 0.4rem 0.7rem;
  background: var(--bg-alt); border-radius: var(--radius);
}
.pix-copy { color: var(--accent); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Galeria ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: clamp(0.6rem, 1.5vw, 1rem); }
.gallery__item {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; position: relative;
  cursor: pointer; background: var(--bg-alt);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem 0.8rem 0.7rem; color: #fff; font-size: 0.82rem;
  background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transition: opacity .3s ease;
}
.gallery__item:hover figcaption { opacity: 1; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); }
.ph svg { width: 38%; opacity: .8; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(15,15,15,.92);
  display: none; place-items: center; padding: 2rem;
}
.lightbox.is-open { display: grid; }
.lightbox img { max-width: min(92vw, 1000px); max-height: 86vh; border-radius: 4px; }
.lightbox__close { position: absolute; top: 1.2rem; right: 1.4rem; color: #fff; font-size: 2rem; }

/* ---------- Informações úteis ---------- */
.infos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.info-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; text-align: left;
}
.info-card__icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.info-card h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.info-card p { color: var(--text-soft); font-size: 0.93rem; }
.info-card__contact { margin-top: 0.7rem; font-size: 0.85rem; color: var(--accent); }

/* ---------- Rodapé ---------- */
.footer { background: var(--bg-dark); color: #d8d8d8; text-align: center; padding: clamp(3rem,7vw,5rem) var(--pad); }
.footer .script { color: var(--accent-soft); font-size: 1.8rem; }
.footer p { margin-top: 0.8rem; max-width: 34rem; margin-inline: auto; color: #b8b8b8; }
.footer__hash { margin-top: 1.4rem; font-family: var(--font-display); font-size: 1.2rem; color: #fff; letter-spacing: 0.05em; }
.footer__credit { margin-top: 2.4rem; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: #7d7d7d; }

/* ---------- Animações de entrada ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
