:root {
  --paper: #f5f1e9;
  --paper-soft: #fbf9f5;
  --ink: #1e2b33;
  --muted: #67737a;
  --blue: #617785;
  --blue-dark: #3f5663;
  --gold: #b79a55;
  --gold-dark: #94773d;
  --white: #ffffff;
  --line: rgba(63, 86, 99, .17);
  --shadow: 0 24px 70px rgba(32, 46, 54, .12);
  --radius: 28px;
  --container: min(1160px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper-soft);
  font-family: "Montserrat", system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.container { width: var(--container); margin-inline: auto; }
.section { padding: 110px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 16px; }

.topbar {
  position: fixed;
  inset: 0 0 auto;
  height: 78px;
  z-index: 50;
  background: rgba(250, 248, 243, .82);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px);
  transition: box-shadow .25s, border-color .25s;
}
.topbar.scrolled { box-shadow: 0 8px 28px rgba(30, 43, 51, .08); border-color: var(--line); }
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: "Playfair Display", serif; font-size: 1.22rem; font-weight: 600; letter-spacing: .08em; text-decoration: none; }
.brand span { color: var(--gold-dark); margin-inline: .25rem; font-style: italic; }
nav { display: flex; align-items: center; gap: 30px; }
nav a { text-decoration: none; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
nav a:hover { color: var(--gold-dark); }
.nav-rsvp { border: 0; background: var(--blue-dark); color: white; border-radius: 999px; padding: 12px 20px; cursor: pointer; font-weight: 700; }
.menu-button { display: none; border: 0; background: transparent; width: 44px; height: 44px; place-items: center; cursor: pointer; }
.menu-button span:not(.sr-only) { width: 24px; height: 2px; background: var(--ink); display: block; margin: 4px 0; transition: transform .2s, opacity .2s; }

.hero {
  position: relative;
  min-height: 930px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(110deg, var(--paper-soft) 0 46%, #eee7df 46% 100%);
}
.hero-photo { position: absolute; inset: 0 0 0 48%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.hero-wash { position: absolute; inset: 0; background: linear-gradient(90deg, var(--paper-soft) 0 45%, rgba(251,249,245,.9) 49%, rgba(251,249,245,.08) 68%, rgba(251,249,245,0) 100%), linear-gradient(0deg, rgba(245,241,233,.24), transparent 25%); }
.botanical { position: absolute; pointer-events: none; z-index: 1; background-repeat: no-repeat; background-size: contain; }
.botanical-top { left: -50px; top: 52px; width: 520px; height: 440px; background-image: url("assets/botanical-top.svg"); opacity: .82; }
.botanical-bottom { right: -90px; bottom: -80px; width: 560px; height: 470px; background-image: url("assets/botanical-bottom.svg"); opacity: .78; }
.hero-inner { position: relative; z-index: 2; padding-top: 92px; }
.hero-copy { width: min(580px, 55%); text-align: center; }
.eyebrow, .section-kicker { margin: 0 0 16px; color: var(--gold-dark); font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: "Great Vibes", cursive; font-weight: 400; color: var(--blue-dark); line-height: .73; font-size: clamp(6rem, 9vw, 9.3rem); }
.hero h1 span { display: block; }
.hero h1 small { display: block; margin: .14em 0 .06em; font-family: "Playfair Display", serif; font-size: .26em; font-style: italic; font-weight: 400; }
.hero-subtitle { margin: 38px auto 24px; font-family: "Playfair Display", serif; text-transform: uppercase; letter-spacing: .13em; font-size: .9rem; }
.date-lockup { display: flex; justify-content: center; align-items: center; gap: 14px; font-family: "Playfair Display", serif; font-size: 1.15rem; letter-spacing: .08em; }
.date-lockup i { width: 34px; height: 1px; background: var(--gold); }
.hero-meta { margin: 14px 0 28px; color: var(--muted); font-size: .95rem; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; padding: 14px 25px; text-decoration: none; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--blue-dark); color: white; box-shadow: 0 12px 30px rgba(63,86,99,.18); }
.button-primary:hover { background: #324b58; box-shadow: 0 16px 34px rgba(63,86,99,.24); }
.button-secondary { border-color: var(--gold); background: rgba(255,255,255,.45); color: var(--ink); }
.button-secondary:hover { background: white; }
.button-large { min-height: 58px; padding-inline: 32px; }
.deadline { margin: 18px 0 0; font-size: .82rem; color: var(--muted); }

.countdown-section { position: relative; z-index: 5; margin-top: -54px; }
.countdown-card { min-height: 166px; padding: 35px 46px; display: grid; grid-template-columns: 1fr 1.55fr; align-items: center; gap: 50px; background: rgba(255,255,255,.92); border: 1px solid rgba(183,154,85,.22); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.countdown-intro h2 { margin: 0; font-family: "Playfair Display", serif; font-weight: 500; font-size: clamp(1.5rem, 2.5vw, 2.25rem); line-height: 1.2; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.countdown div { min-height: 92px; display: grid; place-items: center; align-content: center; border-left: 1px solid var(--line); }
.countdown div:first-child { border-left: 0; }
.countdown strong { font-family: "Playfair Display", serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; line-height: 1; color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.countdown span { margin-top: 6px; color: var(--muted); font-size: .65rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }

.welcome { background: var(--paper-soft); }
.welcome-grid { display: grid; grid-template-columns: .9fr 1fr; gap: clamp(58px, 8vw, 110px); align-items: center; }
.welcome-photo { position: relative; width: min(100%, 510px); }
.welcome-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 42%; border-radius: 240px 240px 26px 26px; box-shadow: var(--shadow); }
.photo-frame { position: absolute; inset: 22px -22px -22px 22px; z-index: -1; border: 1px solid var(--gold); border-radius: 240px 240px 26px 26px; }
.welcome-copy h2, .section-heading h2, .rsvp-inner h2, .gifts-copy h2 { margin: 0 0 26px; font-family: "Playfair Display", serif; font-weight: 500; font-size: clamp(2.5rem, 4.5vw, 4.3rem); line-height: 1.08; }
.welcome-copy p { color: #56646c; }
.highlight-copy { font-family: "Playfair Display", serif; font-size: 1.18rem; color: var(--ink) !important; }
.text-link { display: inline-flex; gap: 12px; align-items: center; border: 0; border-bottom: 1px solid var(--gold); padding: 7px 0; background: transparent; color: var(--blue-dark); font-weight: 700; cursor: pointer; }
.text-link span { transition: transform .2s; }
.text-link:hover span { transform: translateX(5px); }

.event-section { background: var(--paper); }
.section-heading { max-width: 680px; margin-bottom: 50px; }
.section-heading.centered { text-align: center; margin-inline: auto; }
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.event-card { position: relative; min-height: 255px; padding: 38px 32px; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(255,255,255,.66); border: 1px solid rgba(63,86,99,.12); border-radius: 20px; overflow: hidden; }
.event-card::before { content: ""; position: absolute; width: 130px; height: 130px; right: -50px; top: -50px; border: 1px solid rgba(183,154,85,.34); border-radius: 50%; }
.event-number { position: absolute; left: 28px; top: 24px; font-family: "Playfair Display", serif; color: var(--gold); font-size: 1.4rem; }
.event-card p { margin: 0 0 8px; color: var(--gold-dark); text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; font-weight: 700; }
.event-card h3 { margin: 0 0 6px; font-family: "Playfair Display", serif; font-size: 1.55rem; font-weight: 500; }
.event-card > span:last-child { color: var(--muted); font-size: .88rem; }
.location-panel { margin-top: 22px; padding: 32px 36px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-radius: 20px; background: var(--blue-dark); color: white; }
.location-panel .section-kicker { color: #dccb9e; margin-bottom: 6px; }
.location-panel h3 { margin: 0; font-family: "Playfair Display", serif; font-size: 1.85rem; font-weight: 500; }
.location-panel p:last-child { margin: 5px 0 0; color: rgba(255,255,255,.73); }
.location-panel .button-primary { background: white; color: var(--blue-dark); box-shadow: none; }

.gallery-section { background: var(--paper-soft); }
.gallery-grid { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: repeat(2, 315px); gap: 18px; }
.gallery-item { margin: 0; overflow: hidden; border-radius: 22px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.gallery-item:hover img { transform: scale(1.025); }
.gallery-tall { grid-row: 1 / 3; }
.gallery-tall img { object-position: 50% 36%; }
.gallery-item:nth-child(2) img { object-position: 50% 36%; }
.gallery-item:nth-child(3) img { object-position: 50% 38%; }

.rsvp-section { position: relative; overflow: hidden; text-align: center; background: linear-gradient(145deg, #e8e0d7, #f8f5ef); }
.rsvp-inner { position: relative; z-index: 2; max-width: 790px; }
.rsvp-inner p:not(.section-kicker) { max-width: 610px; margin: 0 auto 30px; color: var(--muted); }

.guest-messages-section { background: var(--blue-dark); color: white; overflow: hidden; }
.guest-messages-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(45px, 7vw, 90px); align-items: center; }
.guest-messages-heading h2 { margin: 0 0 20px; font-family: "Playfair Display", serif; font-size: clamp(2.4rem, 4.5vw, 4.2rem); font-weight: 500; line-height: 1.08; }
.guest-messages-heading > p:last-child { margin: 0; color: rgba(255,255,255,.7); }
.guest-messages-heading .section-kicker { color: #dccb9e; }
.guest-message-card { position: relative; min-height: 290px; display: grid; align-content: center; padding: 54px 58px 38px; border: 1px solid rgba(255,255,255,.17); border-radius: 28px; background: rgba(255,255,255,.09); box-shadow: 0 24px 70px rgba(16,29,36,.2); transition: opacity .28s ease, transform .28s ease; }
.guest-message-card.changing { opacity: 0; transform: translateY(10px); }
.guest-message-mark { position: absolute; left: 28px; top: 10px; color: #dccb9e; font-family: "Playfair Display", serif; font-size: 6rem; line-height: 1; opacity: .9; }
.guest-message-card blockquote { margin: 0; font-family: "Playfair Display", serif; font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.45; }
.guest-message-counter { margin: 28px 0 0; color: rgba(255,255,255,.58); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.gifts-teaser { background: var(--paper-soft); }
.gifts-panel { padding: 70px 72px; display: grid; grid-template-columns: 1fr .62fr; gap: 60px; align-items: center; border: 1px solid rgba(183,154,85,.25); border-radius: 32px; background: #fff; box-shadow: var(--shadow); }
.gifts-copy h2 { font-size: clamp(2.2rem, 4vw, 3.7rem); }
.gifts-copy p { color: var(--muted); }
.gift-signature { color: var(--ink) !important; font-family: "Playfair Display", serif; font-size: 1.15rem; }
.future-badge { position: relative; min-height: 350px; display: grid; place-items: center; align-content: center; text-align: center; color: white; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #718895, #3f5663 66%); box-shadow: inset 0 0 0 14px rgba(255,255,255,.1), 0 28px 70px rgba(63,86,99,.22); }
.future-badge::before, .future-badge::after { content: ""; position: absolute; inset: -18px; border: 1px solid rgba(183,154,85,.65); border-radius: 50%; transform: rotate(-12deg) scaleY(.72); }
.future-badge::after { inset: -38px 16px; transform: rotate(35deg) scaleY(.68); border-color: rgba(183,154,85,.34); }
.future-badge span { font-size: .67rem; letter-spacing: .25em; font-weight: 700; color: #e7d9b3; }
.future-badge strong { margin-top: 12px; font-family: "Playfair Display", serif; font-size: 2.15rem; font-weight: 500; line-height: 1.1; }
.future-badge i { width: 8px; height: 8px; margin-top: 22px; border-radius: 50%; background: #e1cb8a; box-shadow: 0 0 0 8px rgba(225,203,138,.15); }

footer { padding: 58px 0; background: #263942; color: rgba(255,255,255,.72); text-align: center; }
.footer-inner { display: grid; gap: 7px; }
.footer-inner p { margin: 0; }
.footer-names { font-family: "Great Vibes", cursive; font-size: 2.8rem; color: white; line-height: 1; }
.footer-names span { color: #dccb9e; }
footer a { margin-top: 10px; color: white; font-size: .82rem; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(19,31,38,.72); backdrop-filter: blur(8px); }
.modal-panel { position: relative; width: min(760px, 100%); max-height: min(900px, calc(100vh - 40px)); overflow: auto; padding: 48px; border-radius: 28px; background: var(--paper-soft); box-shadow: 0 32px 100px rgba(0,0,0,.28); animation: modalIn .24s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.modal-close { position: absolute; right: 18px; top: 16px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(63,86,99,.08); font-size: 1.8rem; cursor: pointer; }
.modal-heading h2 { margin: 0 0 8px; font-family: "Playfair Display", serif; font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; line-height: 1.1; }
.modal-heading > p:last-child { color: var(--muted); margin-bottom: 30px; }
form, .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; }
.field-hint { color: var(--muted); font-size: .7rem; font-weight: 500; line-height: 1.45; }
label, legend { font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
input, textarea { width: 100%; border: 1px solid rgba(63,86,99,.2); border-radius: 12px; padding: 14px 15px; color: var(--ink); background: white; outline: none; }
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(183,154,85,.12); }
textarea { resize: vertical; }
.attendance-options { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.attendance-options legend { margin-bottom: 8px; }
.attendance-options label { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid rgba(63,86,99,.15); border-radius: 12px; background: white; cursor: pointer; }
.attendance-options input { width: auto; }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-weight: 500; }
.consent input { width: auto; margin-top: 4px; }
.form-note { margin: -8px 0 0; color: var(--muted); font-size: .72rem; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 13px 18px; border-radius: 999px; background: var(--ink); color: white; box-shadow: var(--shadow); transition: opacity .22s, transform .22s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  :root { --container: min(100% - 28px, 760px); }
  .section { padding: 82px 0; }
  .menu-button { display: block; }
  nav { position: absolute; top: 70px; left: 14px; right: 14px; display: none; padding: 24px; flex-direction: column; align-items: stretch; gap: 18px; border-radius: 18px; background: rgba(251,249,245,.98); box-shadow: var(--shadow); }
  nav.open { display: flex; }
  nav a { text-align: center; }
  .hero { min-height: 960px; align-items: end; background: var(--paper-soft); }
  .hero-photo { inset: 0 0 42% 0; }
  .hero-photo img { object-position: 50% 27%; }
  .hero-wash { background: linear-gradient(0deg, var(--paper-soft) 0 47%, rgba(251,249,245,.25) 62%, rgba(251,249,245,0) 100%); }
  .hero-inner { padding: 0 0 72px; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: clamp(5.2rem, 21vw, 7.2rem); }
  .botanical-top { width: 340px; top: 50px; left: -70px; }
  .countdown-section { margin-top: -30px; }
  .countdown-card { grid-template-columns: 1fr; gap: 28px; padding: 30px 22px; text-align: center; }
  .welcome-grid { grid-template-columns: 1fr; }
  .guest-messages-inner { grid-template-columns: 1fr; }
  .welcome-photo { width: min(86%, 510px); margin-inline: auto; }
  .event-grid { grid-template-columns: 1fr; }
  .event-card { min-height: 210px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 460px 270px; }
  .gallery-tall { grid-column: 1 / -1; grid-row: auto; }
  .gifts-panel { grid-template-columns: 1fr; padding: 48px 28px; }
  .future-badge { width: min(350px, 85vw); min-height: auto; aspect-ratio: 1; margin-inline: auto; }
}

@media (max-width: 560px) {
  .topbar { height: 68px; }
  .hero { min-height: 850px; }
  .hero-photo { inset-bottom: 48%; }
  .hero-inner { padding-bottom: 46px; }
  .hero-subtitle { font-size: .72rem; }
  .date-lockup { font-size: .92rem; gap: 8px; }
  .date-lockup i { width: 18px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .countdown-card { padding-inline: 14px; }
  .countdown { gap: 0; }
  .countdown div { min-height: 78px; }
  .countdown strong { font-size: 2rem; }
  .countdown span { font-size: .54rem; letter-spacing: .06em; }
  .welcome-photo { width: calc(100% - 20px); }
  .photo-frame { inset: 14px -14px -14px 14px; }
  .location-panel { align-items: stretch; flex-direction: column; }
  .gallery-grid { display: grid; grid-template-columns: 1fr; grid-template-rows: repeat(3, 390px); }
  .gallery-tall { grid-column: auto; }
  .modal { padding: 0; align-items: end; }
  .modal-panel { max-height: 94vh; border-radius: 26px 26px 0 0; padding: 38px 20px 28px; }
  form, .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .gifts-panel { padding: 42px 22px; }
  .guest-message-card { min-height: 250px; padding: 48px 26px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Tela de sucesso do RSVP */
.rsvp-success {
  text-align: center;
  padding: 1rem 0 0;
}
.rsvp-success h2 {
  margin: .4rem 0 1rem;
}
.rsvp-success p#rsvp-success-detail {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.rsvp-success-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  align-items: stretch;
}
.rsvp-success-actions .button-secondary {
  background: transparent;
}
