:root {
  --bg: #f7f5f1;
  --bg-alt: #efebe4;
  --surface: #ffffff;
  --ink: #1e1e1c;
  --muted: #6d6b65;
  --line: #ddd8cf;
  --accent: #6f7f63;      /* verde-salva */
  --accent-ink: #ffffff;
  --placeholder: #e4dfd6;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1120px;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; object-fit: cover; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.1; }
em { font-style: italic; color: var(--accent); }
a { color: inherit; }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 48px);
  transition: background .3s, box-shadow .3s;
}
.nav.is-scrolled { background: rgba(247,245,241,.92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.nav__logo { font-family: var(--serif); font-size: 24px; text-decoration: none; letter-spacing: .05em; }
.nav__logo span { font-style: italic; color: var(--accent); }
.nav__links { display: flex; gap: 32px; align-items: center; }
.nav__links a { text-decoration: none; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }
.nav__links a:hover { color: var(--accent); }
.nav__cta { border: 1px solid var(--ink); padding: 9px 18px; }
.nav__cta:hover { background: var(--ink); color: var(--bg) !important; }
.nav__toggle { display: none; background: none; border: 0; width: 32px; height: 32px; padding: 0; cursor: pointer; }
.nav__toggle span { display: block; height: 1px; background: var(--ink); margin: 8px 4px; transition: transform .3s; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 80px);
  align-items: center;
  max-width: var(--max); margin: 0 auto;
  padding: 120px clamp(16px, 4vw, 48px) 64px;
}
.hero__names { font-size: clamp(56px, 9vw, 112px); letter-spacing: -.01em; margin-bottom: 28px; }
.hero__names em { display: inline-block; padding: 0 .08em; }
.hero__date { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); margin: 0; }
.hero__place { color: var(--muted); margin: 4px 0 40px; letter-spacing: .04em; }
.hero__photo { width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius); }

.countdown { display: flex; gap: clamp(16px, 3vw, 36px); margin-bottom: 44px; }
.countdown div { display: flex; flex-direction: column; align-items: flex-start; min-width: 56px; }
.countdown span { font-family: var(--serif); font-size: clamp(38px, 4.5vw, 54px); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.countdown div + div { padding-left: clamp(16px, 3vw, 36px); border-left: 1px solid var(--line); }
.countdown__done { font-family: var(--serif); font-size: 32px; font-style: italic; color: var(--accent); margin: 0 0 40px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-block; background: var(--ink); color: var(--bg);
  border: 1px solid var(--ink); border-radius: var(--radius);
  padding: 15px 34px; font: 500 13px var(--sans); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .25s, color .25s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn--full { width: 100%; }
.link { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link:hover { color: var(--accent); }

/* ---------- Placeholders ---------- */
.placeholder {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,.025) 14px 15px),
    var(--placeholder);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: var(--radius);
}
.placeholder span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 6vw, 80px) clamp(16px, 4vw, 48px); }
.section--alt { max-width: none; background: var(--bg-alt); }
.section--alt > * { max-width: calc(var(--max) - 2 * clamp(16px, 4vw, 48px)); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section__head h2 { font-size: clamp(40px, 5.5vw, 64px); }
.lead { color: var(--muted); margin: 20px 0 0; font-size: 17px; }
.lead strong { color: var(--ink); font-weight: 500; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 16px; }
.gallery__item { width: 100%; height: 100%; border-radius: var(--radius); }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }

/* ---------- Venues ---------- */
.venues { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.venue { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.venue__photo { aspect-ratio: 16 / 10; width: 100%; border-radius: 0; }
.venue__body { padding: 36px 36px 40px; }
.venue__time { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--accent); margin: 0 0 12px; }
.venue h3 { font-size: 32px; margin-bottom: 14px; }
.venue__name { font-weight: 500; margin: 0; }
.venue__address { color: var(--muted); margin: 4px 0 24px; }

/* ---------- RSVP ---------- */
.rsvp { max-width: 560px; margin: 0 auto; display: grid; gap: 24px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding: 0; }
.optional { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 300; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; font: 300 16px var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; transition: border-color .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field.is-invalid input, .field.is-invalid .choice span { border-color: #b4553f; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: block; text-align: center; padding: 14px 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: all .2s;
}
.choice input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-only-attending][hidden] { display: none; }
.hp { position: absolute; left: -9999px; }
.rsvp__status { text-align: center; margin: 0; min-height: 1.6em; }
.rsvp__status.is-ok { color: var(--accent); font-family: var(--serif); font-size: 22px; font-style: italic; }
.rsvp__status.is-error { color: #b4553f; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 64px 16px; border-top: 1px solid var(--line); color: var(--muted); letter-spacing: .2em; font-size: 13px; }
.footer__names { font-family: var(--serif); font-size: 32px; letter-spacing: 0; color: var(--ink); margin: 0 0 8px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 104px; }
  .hero__photo { order: -1; aspect-ratio: 4 / 3; }
  .countdown { justify-content: center; }
  .countdown div { align-items: center; }
  .venues { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
}
@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 22px;
    background: var(--bg); padding: 28px 16px 36px; box-shadow: 0 1px 0 var(--line);
    transform: translateY(-140%); transition: transform .35s ease;
  }
  .nav.is-open { background: var(--bg); }
  .nav.is-open .nav__links { transform: none; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .venue__body { padding: 28px 24px 32px; }
}
@media (max-width: 420px) {
  .countdown { gap: 12px; }
  .countdown div { min-width: 0; }
  .countdown div + div { padding-left: 12px; }
  .choices { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery__item--tall, .gallery__item--wide { grid-row: auto; grid-column: auto; }
}

/* ---------- Separador ---------- */
.divider {
  display: flex; align-items: center; gap: 20px;
  max-width: 360px; margin: 0 auto clamp(48px, 7vw, 80px);
  color: var(--accent);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider span { font-family: var(--serif); font-style: italic; font-size: 32px; line-height: 1; }
#nos { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(40px, 5vw, 64px); }

/* ---------- Programa da tarde ---------- */
.optional-tag { font-size: .45em; font-style: italic; color: var(--muted); white-space: nowrap; }
.rally { display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.croqui { width: 100%; height: auto; background: var(--surface); border-radius: var(--radius); }
.croqui .street { fill: none; stroke: #ebe6dd; stroke-width: 12; stroke-linecap: round; }
.croqui .street--thin { stroke-width: 7; }
.croqui .largo { fill: none; stroke: var(--line); stroke-width: 1.5; }
.croqui .hill { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.croqui .route { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 9; }
.croqui .heart { fill: #c4664f; }
.croqui .stop circle { fill: var(--ink); }
.croqui .stop text { fill: var(--bg); font: 600 14px var(--sans); text-anchor: middle; }
.croqui .hand { font-family: "Caveat", cursive; font-size: 25px; fill: var(--ink); }
.croqui .hand--sub { font-size: 18px; fill: var(--muted); }
.stops { list-style: none; margin: 0; padding: 0; counter-reset: stop -1; display: grid; gap: 18px; }
.stops li { counter-increment: stop; display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; }
.stops li::before {
  content: counter(stop); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--bg); font: 600 13px/30px var(--sans); text-align: center;
}
.stops li.stops__start::before { content: "♥"; background: #c4664f; }
.stops strong { font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.2; }
.stops span { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .rally { grid-template-columns: 1fr; } }

/* ---------- Notas ---------- */
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 880px; margin: 0 auto; }
.note { border-top: 1px solid var(--ink); padding-top: 24px; }
.note__label { font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.note h3 { font-size: 32px; margin-bottom: 10px; }
.note p:last-child { color: var(--muted); margin: 0; }
@media (max-width: 720px) { .notes { grid-template-columns: 1fr; } }
