/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

:root {
  --bg: #fafaf7;
  --bg-dark: #14140f;
  --ink: #14140f;
  --ink-soft: #6b6b64;
  --line: #e8e6df;
  --accent: #14140f;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gap: clamp(2px, 0.4vw, 8px);
  --pad: clamp(20px, 4vw, 64px);
}

html { -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(250, 250, 247, 0.97);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand__names {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.brand__amp { font-style: italic; color: var(--ink-soft); font-weight: 300; }
.brand__date {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 6px;
}
.nav { display: flex; gap: clamp(14px, 2vw, 28px); align-items: center; }
.nav__link {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav__link:hover { border-bottom-color: var(--ink); }
.nav__link--cta {
  border: 1px solid var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav__link--cta:hover { background: var(--ink); color: var(--bg); border-bottom-color: var(--ink); }

.nav__toggle { display: none; width: 28px; height: 28px; flex-direction: column; justify-content: space-between; padding: 6px 2px; }
.nav__toggle span { display: block; height: 1px; background: var(--ink); }

/* ---------- Hero (arte do convite) ---------- */
.hero {
  background: #4a1113; /* vinho da arte, cobre qualquer fresta */
  line-height: 0;
}
.hero__img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Slider de fotos ---------- */
.slider { position: relative; }
.slider__track {
  display: flex;
  gap: clamp(8px, 1.2vw, 16px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 clamp(16px, 8vw, 120px);
  -webkit-overflow-scrolling: touch;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__item {
  flex: 0 0 auto;
  height: clamp(320px, 62vh, 640px);
  scroll-snap-align: center;
  cursor: zoom-in;
  background: #eeece5;
}
.slider__item img {
  height: 100%;
  width: auto;
  display: block;
  max-width: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.slider__item img.is-loaded { opacity: 1; }
.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(20, 20, 15, 0.75);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.slider__arrow:hover { background: rgba(20, 20, 15, 0.95); }
.slider__arrow--prev { left: clamp(8px, 2vw, 28px); }
.slider__arrow--next { right: clamp(8px, 2vw, 28px); }
.slider__counter {
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
@media (max-width: 720px) {
  .slider__track { padding: 0 12px; }
  .slider__item { height: clamp(260px, 48vh, 420px); }
  .slider__arrow { width: 38px; height: 38px; font-size: 20px; }
}
.slider--dresscode .slider__track { padding: 0 clamp(16px, 4vw, 40px); }
.slider--dresscode .slider__item {
  height: clamp(280px, 46vh, 480px);
  cursor: default;
  margin: 0;
  background: transparent;
}
.slider--dresscode .slider__item img { height: calc(100% - 26px); opacity: 1; }
.slider--dresscode figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  text-align: center;
  padding-top: 6px;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 48px);
  margin-bottom: 20px;
}
.countdown__unit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.countdown__num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(250, 250, 247, 0.65);
}

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--dark { background: var(--bg-dark); color: var(--bg); }
.section--cta { background: var(--bg-dark); color: var(--bg); text-align: center; }
.section__inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.section__head { max-width: 1200px; margin: 0 auto 32px; padding: 0 var(--pad); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.section__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 6vw, 72px);
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.05;
}
.section--dark .section__title { color: var(--bg); }
.section__sub {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.section__lede {
  max-width: 640px;
  color: var(--ink-soft);
  margin: 0 0 32px;
  font-size: 15px;
}

/* ---------- Grid controls ---------- */
.grid-controls { display: flex; gap: 6px; margin-top: 8px; }
.grid-controls__btn {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.grid-controls__btn:hover { color: var(--ink); border-color: var(--ink); }
.grid-controls__btn.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Masonry (colunas balanceadas via JS) ---------- */
.section--fotos { padding: var(--gap) 0 clamp(32px, 5vw, 64px); }
.masonry {
  display: flex;
  gap: var(--gap);
  padding: 0 var(--gap);
  align-items: stretch;
}
.masonry__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--gap);
}
.masonry__item {
  overflow: hidden;
  cursor: zoom-in;
  background: #eeece5;
}
.masonry__item img {
  width: 100%;
  height: auto;
  transition: transform 0.6s ease, opacity 0.4s ease;
  opacity: 0;
}
.masonry__item img.is-loaded { opacity: 1; }
.masonry__item:hover img { transform: scale(1.03); }

/* ---------- Local ---------- */
.local {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 800px) { .local { grid-template-columns: 1fr; } }
.local__place {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1;
  margin: 8px 0 24px;
  letter-spacing: 0.02em;
}
.local__addr { color: rgba(250, 250, 247, 0.7); font-size: 15px; margin-bottom: 32px; }
.local__schedule { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; border-top: 1px solid rgba(250,250,247,0.15); padding-top: 24px; }
.local__schedule li { display: flex; gap: 20px; font-size: 15px; border-bottom: 1px solid rgba(250,250,247,0.08); padding-bottom: 12px; }
.local__schedule li span {
  min-width: 90px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--bg);
}
.local__map {
  aspect-ratio: 4 / 3;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
}
.local__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.4) contrast(1.05); }

/* ---------- Dress code ---------- */
.dresscode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  margin-top: 24px;
}
@media (max-width: 800px) { .dresscode { grid-template-columns: 1fr; } }
.dresscode__label {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 24px;
  margin: 0 0 16px;
  color: var(--ink-soft);
}
.dresscode__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dresscode__grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #eeece5;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--primary { background: var(--bg); color: var(--ink); }
.btn--primary:hover { background: transparent; color: var(--bg); border-color: var(--bg); }
.btn--ghost { border-color: currentColor; }
.btn--ghost:hover { background: currentColor; color: var(--bg-dark); }
.section:not(.section--dark) .btn--ghost:hover { color: var(--bg); }
.local .btn--ghost { margin-right: 8px; margin-bottom: 8px; }

/* ---------- CTA ---------- */
.cta__title { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4vw, 48px); margin: 0 0 8px; }
.cta__sub { color: rgba(250,250,247,0.7); margin: 0 0 32px; }
.cta__buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px var(--pad);
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
}

/* ---------- Modal de embed ---------- */
.embed-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(20, 20, 15, 0.6);
  display: none;
  flex-direction: column;
  padding: clamp(0px, 3vw, 40px);
}
.embed-modal.is-open { display: flex; }
.embed-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-dark);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px 8px 0 0;
}
.embed-modal__ext {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 250, 247, 0.8);
}
.embed-modal__ext:hover { color: var(--bg); }
.embed-modal__close { color: var(--bg); font-size: 30px; line-height: 1; padding: 0 6px; }
.embed-modal__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 0 0 8px 8px;
}
@media (max-width: 720px) {
  .embed-modal { padding: 0; }
  .embed-modal__bar, .embed-modal__frame { border-radius: 0; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 20, 15, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  color: #fff;
  font-size: 32px;
  padding: 8px 16px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { opacity: 1; }
.lightbox__close { top: 12px; right: 12px; font-size: 40px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); font-size: 56px; }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); font-size: 56px; }
.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  letter-spacing: 0.2em;
}

/* ---------- Mobile menu ---------- */
@media (max-width: 800px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 40;
    width: 80vw;
    max-width: 320px;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 96px var(--pad) var(--pad);
    gap: 20px;
    overflow-y: auto;
    visibility: hidden;
    transform: translateX(105%);
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    box-shadow: -20px 0 40px rgba(0,0,0,0.06);
  }
  .nav.is-open {
    visibility: visible;
    transform: none;
    transition: transform 0.3s ease, visibility 0s;
  }
  .nav__toggle { display: flex; position: relative; z-index: 45; }
  .nav__link { font-size: 15px; }
  .nav__link--cta { width: 100%; text-align: center; }
}
