:root {
  --paper: #f8f1e8;
  --paper-2: #fffaf4;
  --paper-3: #f4ebe0;
  --navy: #1f2f5e;
  --navy-soft: #34436b;
  --gold: #b6936a;
  --gold-strong: #a78054;
  --gold-line: rgba(182, 147, 107, 0.34);
  --ink: #213056;
  --muted: #746c66;
  --shadow: 0 20px 65px rgba(31, 47, 94, 0.14);
  --shadow-soft: 0 12px 28px rgba(31, 47, 94, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --script: 'Great Vibes', cursive;
  --serif: 'Cormorant Garamond', serif;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background: linear-gradient(180deg, #e9dfd3, #f6ede2 40%, #ebe2d7);
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; }

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 16% 8%, rgba(124, 140, 190, .18), transparent 28%),
    radial-gradient(circle at 85% 14%, rgba(182, 147, 107, .18), transparent 24%),
    linear-gradient(180deg, #ece2d7, #f7efe5 48%, #ece2d7 100%);
}
.site-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 320 320' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: max(3px, env(safe-area-inset-top));
  z-index: 30;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(182,147,107,.65), rgba(31,47,94,.8));
  box-shadow: 0 4px 16px rgba(31,47,94,.18);
  transition: width .08s linear;
}

.app {
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255,250,244,.94), rgba(246,237,228,.96) 55%, rgba(255,251,245,.96));
  box-shadow: 0 0 90px rgba(31, 47, 94, 0.14);
  overflow: hidden;
}
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(123, 139, 190, .22), transparent 32%),
    linear-gradient(160deg, #faf4eb, #ece1d5);
  transition: opacity .65s ease, visibility .65s ease;
}
.gate.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gate__flower {
  position: absolute;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  opacity: .78;
  filter: drop-shadow(0 18px 28px rgba(31,47,94,.08));
}
.gate__flower--tl { width: min(76vw, 420px); height: min(84vw, 460px); left: -70px; top: -30px; background-image: url('assets/floral_tl.png'); }
.gate__flower--br { width: min(72vw, 380px); height: min(84vw, 450px); right: -70px; bottom: -40px; background-image: url('assets/floral_br.png'); }
.gate__card {
  position: relative;
  width: min(100%, 420px);
  padding: 48px 28px 38px;
  text-align: center;
  border-radius: 32px;
  background: rgba(255, 250, 244, .74);
  border: 1px solid rgba(182,147,107,.34);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 90px rgba(31,47,94,.14);
}
.gate__card::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(182,147,107,.28);
  border-radius: 22px;
  pointer-events: none;
}
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 11px;
  font-weight: 500;
  color: var(--gold-strong);
}
.gate__names,
.hero__names {
  margin: 18px 0 12px;
  font-family: var(--script);
  color: var(--navy);
  font-size: clamp(66px, 17vw, 100px);
  line-height: .82;
  font-weight: 400;
  text-shadow: 0 10px 28px rgba(31,47,94,.05);
}
.gate__names span,
.hero__names span,
.closing__inner h3 span {
  display: block;
  font-family: var(--serif);
  color: var(--gold);
  font-size: .38em;
  line-height: 1.1;
}
.gate__meta {
  margin: 0 0 24px;
  font-family: var(--serif);
  color: var(--navy-soft);
  font-size: 24px;
  line-height: 1.35;
}
.gate__meta strong { color: var(--gold); font-weight: 600; }
.gate__note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .24s ease, box-shadow .24s ease, background .24s ease;
  -webkit-tap-highlight-color: transparent;
}
.button:active { transform: scale(.985); }
.button--primary {
  color: #fffaf5;
  background: linear-gradient(135deg, #20315f, #2d3d6b);
  border: 1px solid rgba(182,147,107,.7);
  box-shadow: 0 16px 36px rgba(31,47,94,.18);
}
.button--outline {
  color: var(--navy);
  background: rgba(255, 251, 246, .78);
  border: 1px solid rgba(31,47,94,.38);
  box-shadow: var(--shadow-soft);
}
.button--ghost {
  color: var(--navy);
  background: rgba(182,147,107,.10);
  border: 1px solid rgba(182,147,107,.38);
  box-shadow: var(--shadow-soft);
}
.button--full { width: 100%; }
.button__icon { color: #eadbc6; font-size: 18px; }
.button--outline .button__icon,
.button--ghost .button__icon { color: var(--gold-strong); }

.section-screen {
  position: relative;
  min-height: 100svh;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
}
.section-pad {
  position: relative;
  padding: 74px 24px;
}

.hero {
  overflow: hidden;
  isolation: isolate;
}
.frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(182,147,107,.4);
  border-radius: 26px;
  pointer-events: none;
  z-index: 2;
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  border-style: solid;
  border-color: rgba(182,147,107,.44);
}
.frame::before { right: -1px; top: -1px; border-width: 0 0 1px 1px; border-bottom-left-radius: 34px; }
.frame::after { left: -1px; bottom: -1px; border-width: 1px 1px 0 0; border-top-right-radius: 34px; }
.frame--small { inset: 14px; }

.floral {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  transform-origin: center;
  animation: floatFloral 8s ease-in-out infinite;
}
.floral--tl { width: 82%; left: -86px; top: -48px; opacity: .72; }
.floral--tr { width: 42%; right: -54px; top: -18px; opacity: .66; animation-delay: 1.5s; }
.floral--rm { width: 50%; right: -86px; top: 36%; opacity: .48; animation-delay: 2.5s; }
.floral--bl { width: 64%; left: -108px; bottom: -34px; opacity: .48; }
.floral--br { width: 68%; right: -98px; bottom: -44px; opacity: .56; animation-delay: 2s; }
.floral--closing { width: 62%; left: -105px; top: -24px; opacity: .45; }

.sparkle,
.stars {
  position: absolute;
  pointer-events: none;
}
.sparkle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  filter: blur(42px);
  opacity: .18;
  z-index: 0;
  animation: pulseGlow 6s ease-in-out infinite;
}
.sparkle--one { background: rgba(182,147,107,.52); left: -30px; bottom: 80px; }
.sparkle--two { background: rgba(132,150,201,.42); right: -18px; top: 100px; animation-delay: 2s; }
.stars {
  width: 220px;
  height: 220px;
  opacity: .24;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 0;
  animation: driftStars 16s linear infinite;
  background-image: url("data:image/svg+xml,%3Csvg width='300' height='300' viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23b6936a' stroke-width='1' opacity='.72'%3E%3Cpath d='M34 95 L86 52 L132 106 L188 78 L244 124'/%3E%3Cpath d='M60 242 L106 210 L156 246 L212 214 L266 250'/%3E%3C/g%3E%3Cg fill='%23b6936a' opacity='.78'%3E%3Ccircle cx='34' cy='95' r='3'/%3E%3Ccircle cx='86' cy='52' r='2.5'/%3E%3Ccircle cx='132' cy='106' r='3'/%3E%3Ccircle cx='188' cy='78' r='2.4'/%3E%3Ccircle cx='244' cy='124' r='2.8'/%3E%3Ccircle cx='60' cy='242' r='2.6'/%3E%3Ccircle cx='106' cy='210' r='2.8'/%3E%3Ccircle cx='156' cy='246' r='2.4'/%3E%3Ccircle cx='212' cy='214' r='3'/%3E%3Ccircle cx='266' cy='250' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
}
.stars--left { left: -70px; bottom: 108px; transform: rotate(-15deg); }
.stars--right { right: -30px; top: 100px; }

.hero__inner,
.closing__inner {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  text-align: center;
}
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 16px;
  color: var(--gold);
}
.divider i {
  width: 58px;
  height: 1px;
  background: rgba(182,147,107,.42);
}
.divider b {
  font-weight: 500;
  font-size: 15px;
}
.hero__date,
.hero__time {
  margin: 0;
  font-family: var(--serif);
  color: var(--navy);
}
.hero__date { font-size: 20px; }
.hero__time { font-size: 28px; margin-top: 4px; }
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  color: var(--gold-strong);
  font-size: 13px;
  letter-spacing: .06em;
}
.scroll-cue b {
  font-size: 28px;
  line-height: 1;
  animation: bounce 1.8s ease-in-out infinite;
}

.section-head,
.section-title {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 410px;
  margin: 0 auto 28px;
}
.section-copy,
.section-title p {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.45;
}
.section-title p {
  font-size: 18px;
  color: var(--muted);
}
.section-title h3 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 600;
  color: var(--navy);
}

.info-card,
.rsvp-form {
  position: relative;
  z-index: 2;
  padding: 26px 20px;
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 246, .76);
  border: 1px solid rgba(182,147,107,.28);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.info-card::before,
.rsvp-form::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(182,147,107,.22);
  border-radius: 22px;
  pointer-events: none;
}
.countdown-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(182,147,107,.10), rgba(255,255,255,.54));
  border: 1px solid rgba(182,147,107,.28);
  margin-bottom: 18px;
}
.countdown-chip small {
  display: block;
  color: var(--gold-strong);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 11px;
}
.countdown-chip strong {
  color: var(--navy);
  font-size: 22px;
  font-family: var(--serif);
  font-weight: 600;
}
.info-grid {
  display: grid;
  gap: 14px;
}
.info-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
}
.icon-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(182,147,107,.12);
  border: 1px solid rgba(182,147,107,.24);
  color: var(--gold-strong);
  font-size: 18px;
}
.info-row small {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-strong);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.info-row strong {
  display: block;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.1;
}
.info-row span,
.info-row p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.info-row p { margin-top: 8px; }
.button-stack {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.timeline {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
  text-align: center;
  padding-top: 24px;
}
.timeline__line {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 42px;
  height: 1px;
  background: rgba(182,147,107,.40);
}
.timeline__item {
  position: relative;
  padding-top: 0;
}
.timeline__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,251,246,.9);
  border: 1px solid rgba(182,147,107,.28);
  box-shadow: var(--shadow-soft);
  color: var(--gold-strong);
  font-size: 23px;
}
.timeline__item strong {
  display: block;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 26px;
}
.timeline__item span {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  line-height: 1.35;
  font-size: 14px;
}

.hidden { display: none; }
.field,
.choice-group {
  position: relative;
  z-index: 2;
  margin: 0 0 14px;
}
.field span,
.choice-group legend {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-weight: 500;
  font-size: 14px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(182,147,107,.35);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  outline: none;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(31,47,94,.38);
  box-shadow: 0 0 0 4px rgba(31,47,94,.07);
}
.choice-group {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(182,147,107,.28);
  background: rgba(255,255,255,.58);
}
.choice-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--ink);
}
.choice-group input { accent-color: var(--navy); }
.form-message {
  min-height: 24px;
  margin: 14px 4px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.closing {
  padding-top: 66px;
  padding-bottom: 84px;
}
.closing__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 360px;
  margin: 0 auto;
}
.closing__inner p {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.35;
}
.closing__inner h3 {
  margin: 18px 0 10px;
  color: var(--navy);
  font-family: var(--script);
  font-size: clamp(48px, 13vw, 72px);
  line-height: .9;
  font-weight: 400;
}
.back-top {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-strong);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@keyframes floatFloral {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1.2deg); }
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: .16; }
  50% { transform: scale(1.08); opacity: .22; }
}
@keyframes driftStars {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

@media (max-width: 420px) {
  .section-pad { padding: 64px 18px; }
  .section-screen { padding-left: 18px; padding-right: 18px; }
  .gate__card { padding: 42px 22px 34px; }
  .section-title h3 { font-size: 36px; }
  .section-copy { font-size: 19px; }
  .hero__date { font-size: 18px; }
  .hero__time { font-size: 24px; }
  .timeline { gap: 8px; }
  .timeline__item strong { font-size: 22px; }
  .timeline__item span { font-size: 13px; }
  .info-row strong { font-size: 22px; }
  .closing__inner p { font-size: 24px; }
}
