/* Palette and type pulled from the wedding moodboard (Canva PDF):
   plum #2a1925 (cover), wine #600e1a (monogram), brown #371213 (dark slides),
   olive #6b6e45 (headings), rose #c88fa0 (pattern), off-white #f4ecdf (invite).
   Forum for display caps, Ibarra Real Nova for the invite body, Pinyon Script
   stands in for the handwritten names, Open Sans for form controls. */

/* Buffalo is a licensed font: drop Buffalo.woff2 (or .otf) in assets/fonts/ and
   it kicks in; until then Yellowtail (Google Fonts) stands in. */
@font-face {
  font-family: "Buffalo";
  src: url("../assets/fonts/Buffalo.woff2") format("woff2"),
       url("../assets/fonts/Buffalo.otf") format("opentype"),
       url("../assets/fonts/Buffalo.ttf") format("truetype");
  font-display: swap;
}

:root {
  --plum: #2a1925;
  --plum-2: #3a2434;
  --wine: #600e1a;
  --wine-2: #7a1f2e;
  --brown: #371213;
  --olive: #6b6e45;
  --olive-2: #8a8c5f;
  --rose: #c88fa0;
  --rose-2: #e2bfca;
  --paper: #f4ecdf;
  --paper-2: #faf5ec;
  --ink: #2b1c22;
  --ink-2: #5a4a52;
  --gold: #c9b68a;

  --display: "Forum", "Cormorant Garamond", Georgia, serif;
  --serif: "Ibarra Real Nova", Georgia, "Times New Roman", serif;
  --script: "Pinyon Script", cursive;
  --names: "Buffalo", "Yellowtail", cursive;
  --sans: "Open Sans", system-ui, -apple-system, sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper-2);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .06em; margin: 0; }
h2 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; text-transform: uppercase; }
h3 { font-size: clamp(20px, 2.4vw, 26px); text-transform: uppercase; letter-spacing: .18em; }
p { margin: 0 0 1em; }
strong { font-weight: 500; }
.muted { color: var(--ink-2); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--gutter);
  background: linear-gradient(to bottom, rgba(42,25,37,.85), rgba(42,25,37,0));
  color: var(--paper);
  transition: background .3s;
}
.nav.is-solid { background: rgba(42,25,37,.96); backdrop-filter: blur(8px); }
.nav__brand img { width: 34px; height: 34px; filter: brightness(0) invert(1); opacity: .9; }
.nav__menu { display: flex; gap: clamp(14px, 2.4vw, 30px); align-items: center; }
.nav__menu a {
  font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; opacity: .88;
}
.nav__menu a:hover { opacity: 1; }
.nav__cta { border: 1px solid rgba(244,236,223,.6); padding: 8px 14px; border-radius: 999px; }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 1.5px; background: var(--paper); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(42,25,37,.98);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 14px 0; border-bottom: 1px solid rgba(244,236,223,.12); font-size: 13px; }
  .nav__cta { border: 0; padding: 14px 0; border-radius: 0; color: var(--rose-2); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  padding: 15px 30px; text-decoration: none; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--light { background: var(--paper); color: var(--plum); }
.btn--light:hover { background: #fff; }
.btn--wine { background: var(--wine); color: var(--paper); }
.btn--wine:hover { background: var(--wine-2); }
.btn--outline { background: transparent; color: var(--wine); border-color: var(--wine); }
.btn--outline:hover { background: var(--wine); color: var(--paper); }
.btn--outline-light { color: var(--paper); border-color: rgba(244,236,223,.6); }
.btn--outline-light:hover { background: var(--paper); color: var(--brown); }
.btn--small { padding: 11px 22px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  background: var(--plum); color: var(--paper); text-align: center;
  padding: 110px var(--gutter) 80px; overflow: hidden; isolation: isolate;
}
.hero__pattern {
  position: absolute; inset: 0; z-index: -1;
  background: url("../assets/estampa.png") center/420px repeat;
  opacity: .22;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.9), rgba(0,0,0,.35) 55%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.9), rgba(0,0,0,.35) 55%, transparent 85%);
}
.hero__inner { max-width: 820px; }
.hero__logo { width: clamp(96px, 13vw, 140px); height: auto; margin: 0 auto 22px; filter: drop-shadow(0 6px 24px rgba(0,0,0,.35)); }
.hero__kicker { font-family: var(--sans); font-size: 12px; letter-spacing: .34em; text-transform: uppercase; opacity: .8; margin-bottom: 14px; }
.hero__names { display: grid; justify-items: center; font-family: var(--names); text-transform: none; letter-spacing: 0; line-height: 1; }
.hero__name { font-size: clamp(56px, 11vw, 128px); }
.hero__and { font-size: clamp(28px, 5vw, 56px); color: var(--rose-2); margin: .1em 0; }
.hero__date { font-family: var(--display); font-size: clamp(22px, 3.4vw, 34px); letter-spacing: .3em; margin: 22px 0 6px; }
.hero__place { font-style: italic; opacity: .8; margin-bottom: 36px; }

.countdown { display: flex; justify-content: center; gap: clamp(14px, 4vw, 40px); margin: 0 auto 36px; }
.countdown div { display: grid; gap: 2px; min-width: 56px; }
.countdown strong { font-family: var(--display); font-size: clamp(30px, 5vw, 48px); line-height: 1; font-weight: 400; }
.countdown span { font-family: var(--sans); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; opacity: .7; }

.hero__scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); opacity: .6; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ---------- invite card ---------- */
.convite {
  background: var(--plum) url("../assets/estampa.png") center/380px repeat;
  padding: clamp(40px, 7vw, 96px) var(--gutter);
}
.convite__card {
  max-width: 720px; margin: 0 auto; background: var(--paper); color: var(--ink);
  padding: clamp(36px, 6vw, 64px) clamp(22px, 6vw, 72px);
  text-align: center; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  border: 1px solid var(--gold);
  outline: 6px solid var(--paper);
}
.convite__card::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(201,182,138,.7); pointer-events: none;
}
.convite__flor { width: 64px; margin: 0 auto 10px; }
.convite__script { font-family: var(--script); font-size: clamp(44px, 7vw, 64px); line-height: 1.1; color: var(--olive); margin: 0 0 8px; }
.convite__caps { font-family: var(--sans); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2); margin: 18px 0; }
.convite__pais { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-family: var(--sans); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 6px; }
.convite__pais div { display: grid; gap: 4px; }
.convite__texto { font-size: 17px; line-height: 1.7; max-width: 460px; margin: 0 auto 14px; }
.convite__capela { width: 220px; margin: 18px auto 0; opacity: .85; }
@media (max-width: 520px) { .convite__pais { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: min(80vh, 760px); }
.split__media { position: relative; min-height: 360px; }
.split__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__text { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 96px) var(--gutter); max-width: 640px; }
.split--reverse .split__media { order: 2; }
.split--dark { background: var(--brown); color: var(--paper); }
.split--dark .muted { color: rgba(244,236,223,.7); }
.split--dark .eyebrow { color: var(--rose-2); }
.split--dark dt { color: var(--rose-2); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split--reverse .split__media { order: 0; }
  .split__media { min-height: 62vw; }
}

.eyebrow { font-family: var(--sans); font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--olive); margin-bottom: 14px; }
.eyebrow--center { text-align: center; }
.split h2 { margin-bottom: 26px; color: inherit; }

.facts { display: grid; gap: 16px; margin: 0 0 22px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: baseline; }
.facts dt { font-family: var(--sans); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--olive); }
.facts dd { margin: 0; font-size: 18px; }
@media (max-width: 460px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }
.split .btn { align-self: flex-start; margin-top: 10px; }

.gallery { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; background: var(--paper-2); padding: 6px; }
.gallery img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
@media (max-width: 620px) { .gallery { grid-template-columns: 1fr; } .gallery img { aspect-ratio: 4/3; } }

/* ---------- generic section ---------- */
.section { padding: clamp(64px, 9vw, 120px) var(--gutter); max-width: 100%; }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section__title { text-align: center; margin-bottom: 18px; color: var(--wine); }
.section__sub { text-align: center; color: var(--olive); margin: 56px 0 28px; }
.section__lead { text-align: center; max-width: 620px; font-size: 19px; color: var(--ink-2); margin-bottom: 40px; }
.section--paper { background: var(--paper); }
.section--dark { background: var(--plum); color: var(--paper); position: relative; overflow: hidden; }
.section--dark .section__title { color: var(--paper); }
.section--dark .section__lead { color: rgba(244,236,223,.78); }
.section--dark .eyebrow { color: var(--rose-2); }
.pattern-band { position: absolute; inset: 0 0 auto 0; height: 160px; background: url("../assets/estampa.png") center/360px repeat; opacity: .16; mask-image: linear-gradient(to bottom, black, transparent); -webkit-mask-image: linear-gradient(to bottom, black, transparent); pointer-events: none; max-width: none; }

/* ---------- people grids ---------- */
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.4vw, 28px); }
.people figure { margin: 0; text-align: center; }
.people img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; box-shadow: 0 12px 30px rgba(42,25,37,.12); }
.people figcaption { margin-top: 14px; display: grid; gap: 2px; }
.people figcaption strong { font-family: var(--display); font-size: 17px; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); }
.people figcaption span { font-size: 15px; color: var(--ink-2); }
.people--round { grid-template-columns: repeat(3, 1fr); max-width: 760px; }
.people--round img { border-radius: 50%; }
@media (max-width: 860px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .people--round { grid-template-columns: 1fr; max-width: 260px; } }

/* ---------- gifts ---------- */
.gifts { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 20px; }
.gift {
  display: grid; gap: 6px; justify-items: center; text-align: center;
  padding: 30px 22px; border: 1px solid rgba(244,236,223,.25); border-radius: 6px;
  background: rgba(255,255,255,.03); color: var(--paper); text-decoration: none; cursor: pointer;
  font: inherit; transition: background .2s, border-color .2s;
}
.gift:hover { background: rgba(255,255,255,.07); border-color: var(--rose); }
.gift__icon { font-size: 26px; color: var(--rose-2); }
.gift strong { font-family: var(--display); font-size: 20px; letter-spacing: .14em; text-transform: uppercase; }
.gift span:last-child { font-size: 15px; opacity: .75; }
@media (max-width: 560px) { .gifts { grid-template-columns: 1fr; } }
.pix { text-align: center; margin-top: 30px; display: grid; gap: 12px; justify-items: center; }
.pix__label { font-family: var(--sans); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; opacity: .7; margin: 0; }
.pix__key { font-family: var(--sans); font-size: 16px; padding: 12px 18px; background: rgba(255,255,255,.08); border-radius: 4px; word-break: break-all; }
.pix__done { font-size: 15px; color: var(--rose-2); margin: 0; }

/* ---------- rsvp ---------- */
.rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; max-width: 680px; margin: 0 auto; }
.rsvp label { display: grid; gap: 6px; }
.rsvp label > span, .rsvp legend { font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--olive); }
.rsvp input[type="text"], .rsvp select, .rsvp textarea {
  width: 100%; font: 17px var(--serif); padding: 13px 14px; border: 1px solid #d8cdb9; border-radius: 4px; background: #fff; color: var(--ink);
}
.rsvp input:focus, .rsvp select:focus, .rsvp textarea:focus { outline: 2px solid var(--rose); outline-offset: 1px; border-color: var(--rose); }
.rsvp textarea { resize: vertical; }
.rsvp__full { grid-column: 1 / -1; }
.rsvp__choice { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.rsvp__choice label { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.rsvp__choice input { accent-color: var(--wine); width: 18px; height: 18px; }
.rsvp .btn { justify-self: center; width: 100%; max-width: 340px; margin-top: 8px; }
.rsvp__hint { text-align: center; font-size: 14px; color: var(--ink-2); margin: 0; }
.rsvp .is-invalid { border-color: var(--wine); }
@media (max-width: 560px) { .rsvp { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { background: var(--plum); color: var(--paper); text-align: center; padding: 64px var(--gutter) 48px; }
.footer img { width: 56px; margin: 0 auto 16px; filter: brightness(0) invert(1); opacity: .9; }
.footer__names { font-family: var(--script); font-size: 40px; margin: 0; color: var(--rose-2); }
.footer__date { font-family: var(--sans); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; opacity: .7; margin: 8px 0 24px; }
.footer__small { font-size: 14px; opacity: .55; margin: 0; }

/* ---------- reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
