:root {
  --bg: #f3efe7;
  --paper: #f8f5ef;
  --card: rgba(252, 250, 246, 0.92);
  --ink: #38342f;
  --muted: #786f67;
  --line: rgba(56, 52, 47, 0.14);
  --accent: #4a4b4a;
  --accent-soft: #d8d1c6;
  --shadow: 0 24px 60px rgba(49, 42, 34, 0.08);
  --shadow-strong: 0 28px 70px rgba(24, 20, 16, 0.22);
  --radius: 24px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(180deg, #f4efe7 0%, #f2ece3 100%);
  color: var(--ink);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 32px;
  backdrop-filter: blur(14px);
  background: rgba(244, 239, 231, 0.78);
  border-bottom: 1px solid rgba(56, 52, 47, 0.08);
}
.brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  letter-spacing: 0.08em;
}
.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.nav a {
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav a:hover { color: var(--ink); }

main {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}
.section { padding: 72px 0; }
.section-photo { padding-top: 32px; }
.card {
  background: var(--card);
  border: 1px solid rgba(56, 52, 47, 0.08);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
.copy-card { padding: clamp(28px, 4vw, 54px); }
.copy-card h2,
.section-heading h2,
.banner-overlay h2,
.modal-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
  margin: 0 0 16px;
}
.copy-card p,
.section-lead,
.hero-copy,
.timeline-card p,
.gift-description,
.summary-copy,
.payment-intro {
  line-height: 1.75;
  color: var(--muted);
}
.eyebrow, .modal-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 14px;
}
.eyebrow.light,
.light-text .eyebrow { color: rgba(255,255,255,0.84); }
.section-heading {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 34px;
}
.section-heading.narrow { max-width: 700px; }
.light-text h2,
.light-copy,
.light-link,
.light-text .section-lead { color: #fff; }

.hero {
  position: relative;
  display: grid;
  min-height: 84vh;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-image-wrap { position: absolute; inset: 0; }
.hero-image,
.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.toned { filter: sepia(0.24) saturate(0.9) contrast(0.94) brightness(1.02); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(38, 34, 31, 0.56) 0%, rgba(38, 34, 31, 0.24) 52%, rgba(38, 34, 31, 0.12) 100%),
    linear-gradient(180deg, rgba(244, 239, 231, 0.10) 0%, rgba(244, 239, 231, 0.12) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(92%, 720px);
  padding: clamp(34px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 84vh;
  color: #fff;
}
.hero-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 0.85;
  margin: 0;
  font-weight: 500;
}
.hero-date {
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 18px 0 8px;
  color: rgba(255,255,255,0.86);
}
.hero-copy {
  max-width: 540px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #fff; }
.button.secondary,
.button.ghost {
  border-color: rgba(56,52,47,0.18);
  background: rgba(255,255,255,0.78);
  color: var(--ink);
}
.button.small {
  min-height: 40px;
  min-width: 40px;
  padding: 0 14px;
  font-size: 1rem;
}
.button.full-width { width: 100%; }
.text-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--ink);
  border-bottom: 1px solid rgba(56,52,47,0.28);
}
.light-link { border-bottom-color: rgba(255,255,255,0.42); }

.banner-section {
  position: relative;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.banner-image { min-height: 420px; }
.banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 5vw, 52px);
  color: #fff;
  background: linear-gradient(180deg, rgba(22, 20, 18, 0.04) 18%, rgba(22, 20, 18, 0.48) 100%);
}

.timeline-background {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(24, 20, 17, 0.34), rgba(24, 20, 17, 0.58)),
    url('assets/cronograma.jpg') center/cover no-repeat;
  box-shadow: var(--shadow);
}
.timeline-shell {
  position: relative;
  padding: clamp(34px, 4vw, 56px);
}
.weekend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.timeline-grid {
  display: grid;
  gap: 24px;
}
.timeline-card {
  background: rgba(252, 250, 246, 0.9);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  padding: 34px;
}
.glass-card {
  background: rgba(44, 39, 34, 0.48);
  backdrop-filter: blur(8px);
  color: #fff;
}
.glass-card p,
.glass-card .place,
.glass-card .time { color: rgba(255,255,255,0.88); }
.timeline-card .time {
  display: inline-block;
  margin-bottom: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.day-pill {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.timeline-card h3,
.gift-card h3,
.summary-panel h3,
.payment-card h3 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 500;
}
.timeline-card .place { margin: 0 0 12px; }
.full-width { grid-column: 1 / -1; }

.rsvp-background {
  position: relative;
  min-height: 620px;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: url('assets/rsvp.jpg') center/cover no-repeat;
  box-shadow: var(--shadow);
}
.overlay-soft {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248,245,239,0.24), rgba(41, 35, 29, 0.30));
}
.floating-card {
  position: relative;
  z-index: 1;
  max-width: 560px;
  text-align: center;
  background: rgba(248, 245, 239, 0.88);
  backdrop-filter: blur(8px);
}

.gift-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.gift-card {
  background: rgba(252, 250, 246, 0.9);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(56, 52, 47, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gift-card.selected {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(49, 42, 34, 0.12);
  border-color: rgba(74, 75, 74, 0.28);
}
.gift-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: sepia(0.12) saturate(0.95);
}
.gift-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.gift-body h3 { margin: 0; }
.gift-description { margin: 0; font-size: 0.95rem; }
.gift-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.gift-footer.stacked {
  align-items: stretch;
  flex-direction: column;
}
.gift-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
}
.gift-actions {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 10px;
  align-items: center;
}
.gift-qty {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 999px;
  background: rgba(216, 209, 198, 0.32);
  border: 1px solid rgba(56,52,47,0.10);
  font-weight: 600;
}

.summary-panel {
  position: sticky;
  top: 96px;
}
.summary-panel-inner {
  background: rgba(252, 250, 246, 0.96);
  border-radius: var(--radius);
  border: 1px solid rgba(56,52,47,0.08);
  box-shadow: var(--shadow);
  padding: 26px;
}
.selected-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.selected-item,
.payment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(216, 209, 198, 0.18);
  border: 1px solid rgba(56,52,47,0.08);
}
.selected-item strong,
.payment-item strong {
  display: block;
  font-size: 0.96rem;
}
.selected-item span,
.payment-item span,
.empty-selection {
  color: var(--muted);
  font-size: 0.92rem;
}
.summary-total,
.payment-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(56,52,47,0.10);
}
.summary-total strong,
.payment-total-row strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
}

.modal.hidden { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.55);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  width: min(760px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  background: #f7f4ef;
  border-radius: 28px;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.22);
}
.simple-panel { width: min(680px, calc(100% - 24px)); }
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(56,52,47,0.24);
  background: rgba(255,255,255,0.9);
  font-size: 1.8rem;
  line-height: 1;
}
.modal-header { padding: 34px 34px 14px; }
.modal-header.compact { padding-bottom: 4px; }
.modal-body { padding: 10px 34px 34px; }
.modal-body.compact { padding-top: 14px; }
.payment-summary-card,
.payment-card.clean-card {
  background: rgba(255,255,255,0.58);
  border-radius: 20px;
  border: 1px solid rgba(56,52,47,0.08);
  padding: 22px;
}
.payment-card.clean-card { margin-top: 16px; }
.payment-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px 16px;
  margin: 0;
}
.payment-grid dt { color: var(--muted); }
.payment-grid dd {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.copy-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  border-bottom: 1px solid rgba(56,52,47,0.28);
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.modal-actions.align-right { justify-content: flex-end; }

@media (max-width: 1080px) {
  .gift-layout { grid-template-columns: 1fr; }
  .summary-panel {
    position: static;
    order: -1;
  }
}

@media (max-width: 860px) {
  .weekend-grid,
  .gift-grid {
    grid-template-columns: 1fr;
  }
  .full-width { grid-column: auto; }
}

@media (max-width: 760px) {
  .site-header {
    padding: 14px 18px;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav { gap: 14px; }
  main { width: min(calc(100% - 20px), var(--container)); }
  .section { padding: 54px 0; }
  .hero,
  .hero-content { min-height: 78vh; }
  .hero-actions,
  .gift-actions,
  .modal-actions,
  .payment-grid dd {
    flex-direction: column;
    align-items: stretch;
  }
  .rsvp-background { min-height: 520px; }
  .summary-total strong,
  .payment-total-row strong { font-size: 1.7rem; }
  .payment-grid { grid-template-columns: 1fr; }
  .modal-header,
  .modal-body { padding-left: 20px; padding-right: 20px; }
}
