:root {
  --paper: #f8efe2;
  --card: #fdf8f0;
  --ink: #4a3324;
  --ink-soft: #7a6352;
  --gold: #b48a4f;
  --gold-soft: #d9c39b;
  --rose: #d99a9e;
  --sage: #6f8c74;
  --foil: linear-gradient(135deg, #ead6a8, #b48a4f 30%, #f5e8c8 50%, #b48a4f 70%, #ead6a8);
  --script: "Great Vibes", cursive;
  --serif: "EB Garamond", Garamond, Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(ellipse at top, #fcf6ec 0%, transparent 60%),
                    radial-gradient(ellipse at bottom, #f3e6d3 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--serif);
  text-align: center;
  overflow-x: hidden;
  position: relative;
}
body.locked { overflow: hidden; }
img { max-width: 100%; }
main { display: block; overflow: hidden; position: relative; z-index: 1; }

/* Glam: gold sparkles behind the content and a fine double gold frame with filigree corners. */
#sparkles, #confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body.locked #sparkles { z-index: 10; } /* over the envelope too */
#confetti { z-index: 12; }
/* The page frame scrolls with the page (top at the start, bottom at the very end):
   a fixed bottom edge jumps on Android when the address bar slides in and out. */
.frame { position: absolute; inset: 8px; border: 1px solid rgba(180, 138, 79, .55); pointer-events: none; z-index: 11; }
.intro .frame { position: fixed; }
body.locked > .frame { display: none; }
.frame::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(180, 138, 79, .28); }
.frame i { position: absolute; width: 58px; height: 58px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23e9d29c'/%3E%3Cstop offset='.45' stop-color='%23b48a4f'/%3E%3Cstop offset='.7' stop-color='%23f3e3bb'/%3E%3Cstop offset='1' stop-color='%23b48a4f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none' stroke='url(%23g)' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M12 9.5C20 9 26 10.5 29 14.5C31 17.5 29 20.5 26.5 19.5C24.5 18.7 25 16 27 16.3'/%3E%3Cpath d='M9.5 12C9 20 10.5 26 14.5 29C17.5 31 20.5 29 19.5 26.5C18.7 24.5 16 25 16.3 27'/%3E%3Cpath d='M29 14.5C33 11.5 38 10 45 10'/%3E%3Cpath d='M14.5 29C11.5 33 10 38 10 45'/%3E%3C/g%3E%3Cpath fill='url(%23g)' d='M6 0.5L11.5 6L6 11.5L0.5 6Z'/%3E%3Cpath fill='url(%23g)' opacity='.85' d='M12 12Q20 13.5 22 22Q13.5 20 12 12Z'/%3E%3Ccircle cx='45' cy='10' r='1.3' fill='%23b48a4f'/%3E%3Ccircle cx='10' cy='45' r='1.3' fill='%23b48a4f'/%3E%3C/svg%3E") 0 0 / 100% no-repeat; }
.frame i:nth-child(1) { top: -7px; left: -7px; }
.frame i:nth-child(2) { top: -7px; right: -7px; transform: scaleX(-1); }
.frame i:nth-child(3) { bottom: -7px; left: -7px; transform: scaleY(-1); }
.frame i:nth-child(4) { bottom: -7px; right: -7px; transform: scale(-1); }
/* Gold-foil borders on cards, with a slow glint running along them. */
.card, .event, .countdown div {
  border: 1px solid transparent !important;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(110deg, transparent 42%, rgba(255, 248, 228, .95) 50%, transparent 58%) border-box,
    var(--foil) border-box !important;
  background-size: 100% 100%, 300% 100%, 100% 100% !important;
  background-repeat: no-repeat !important;
  animation: glint 7s ease-in-out infinite;
}
.countdown div:nth-child(2) { animation-delay: .25s; }
.countdown div:nth-child(3) { animation-delay: .5s; }
.countdown div:nth-child(4) { animation-delay: .75s; }
@keyframes glint {
  0% { background-position: 0 0, 100% 0, 0 0; }
  45%, 100% { background-position: 0 0, 0 0, 0 0; }
}

.section { max-width: 760px; margin: 0 auto; padding: 56px 16px; }
.title { font: 400 clamp(2.4rem, 7vw, 3.2rem)/1.1 var(--script); color: var(--ink); margin: 0 0 24px; }
.center { margin-top: 0; }
.small { font-style: italic; margin: 0; color: var(--ink-soft); }
.note { font-style: italic; color: var(--ink-soft); font-size: 1rem; margin-top: 28px; }

/* HERO */
.hero { padding-top: 20px; }
.ornament-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.embroidery { width: min(30vw, 210px); }
.hands { width: min(26vw, 170px); }
.greeting { font: 400 2rem var(--script); color: var(--gold); margin: 16px 0 0; }
.quote { font-style: italic; color: var(--ink-soft); margin: 24px auto; font-size: 1rem; }
.quote cite { display: block; margin-top: 4px; font-style: normal; font-variant: small-caps; letter-spacing: .15em; font-size: .85rem; color: var(--gold); }
.lead { font-style: italic; margin: 0; }
.names {
  font: 400 clamp(3.2rem, 13vw, 6rem)/1.05 var(--script);
  margin: 8px 0 20px; position: relative; display: inline-block; padding: 0 clamp(56px, 14vw, 120px);
}
/* A classic upright "&" in gold foil, with room on both sides. */
.amp {
  font: 400 .6em/1 var(--serif); margin: 0 .2em; vertical-align: .1em;
  background: linear-gradient(160deg, #a77c41 10%, #e6c983 45%, #b48a4f 60%, #d8b56f 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Names stacked: Florin / & / Natalia. The script font sits high in its line box,
   so the "&" gets more room above than below to look centred between the names. */
.names > span { display: block; }
.names .amp { font-size: .7em; line-height: .9; margin: -.2em 0 .32em; vertical-align: 0; }
.rings, .doodle { position: absolute; top: 50%; transform: translateY(-50%); width: clamp(52px, 13vw, 110px); }
.rings { left: 0; }
.doodle { right: 0; }
.parents { font: italic 500 1.35rem/1.4 var(--serif); margin: 4px 0 24px; }
.late { color: var(--ink-soft); font-style: normal; font-weight: 400; }
/* Upright roman "&", as on the printed invitation (the italic one is a swash "Et"). */
.and { font-style: normal; font-weight: 400; }
.si { font-size: .85rem; margin: 0 10px; color: var(--ink-soft); }
.body-text { font-style: italic; margin: 0 0 24px; }
.body-text strong { font-weight: 500; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--rose); margin: 32px auto 8px; max-width: 520px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); }
.date { font: 400 clamp(2rem, 8.2vw, 3.6rem)/1.2 var(--script); margin: 0 0 24px; }

.countdown { display: flex; justify-content: center; gap: clamp(8px, 3vw, 20px); margin: 0 0 32px; }
.countdown div {
  width: clamp(68px, 19vw, 96px); padding: 12px 0 8px;
  border: 1px solid var(--gold-soft); border-radius: 12px; background: var(--card);
  box-shadow: 0 6px 18px -12px rgba(74, 51, 36, .35);
}
.countdown b { display: block; font: 500 clamp(1.6rem, 6vw, 2.2rem)/1 var(--serif); color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.countdown-done { font: 400 2rem var(--script); color: var(--gold); }

.cal-menu { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.cal-menu a { color: var(--gold); cursor: pointer; }

/* BUTTONS */
.btn {
  display: inline-block; font: 500 1.05rem var(--serif); letter-spacing: .04em;
  padding: 12px 28px; border-radius: 999px; border: 1px solid var(--gold);
  background: var(--gold); color: #fff; text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(180, 138, 79, .9); }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-block { width: 100%; margin-top: 8px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* EVENTS */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.event { background: var(--card); border: 1px solid var(--gold-soft); border-radius: 16px; overflow: hidden; padding-bottom: 20px; position: relative; }
.event-photo { height: 180px; background-size: cover; background-position: center; }
.event-icon { width: 84px; margin: -48px auto 0; display: block; position: relative; background: #fff; border: 1px solid var(--gold-soft); border-radius: 50%; padding: 6px; mix-blend-mode: normal; }
.event h3 { font: italic 500 1.35rem var(--serif); margin: 8px 16px 0; }
.event .time { font-style: italic; margin: 4px 0 8px; color: var(--gold); font-size: 1.2rem; }
.event p { margin: 0 16px 8px; }
.nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.nav-links a { font-size: .95rem; padding: 6px 16px; border: 1px solid var(--gold-soft); border-radius: 999px; color: var(--ink); text-decoration: none; }
.nav-links a:hover { border-color: var(--gold); color: var(--gold); }

/* FORM */
.card { background: var(--card); border: 1px solid var(--gold-soft); border-radius: 16px; padding: 28px clamp(16px, 5vw, 36px); text-align: left; box-shadow: 0 16px 40px -28px rgba(74, 51, 36, .5); }
.field { display: block; border: 0; padding: 0; margin: 0 0 20px; }
.field > span, .field legend { display: block; font-weight: 500; margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--ink-soft); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #e3d3bb; border-radius: 10px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label {
  flex: 1 1 180px; display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid #e3d3bb; border-radius: 10px; padding: 10px 12px; background: #fff;
}
.choice label:has(input:checked) { border-color: var(--gold); background: #fbf3e6; }
.choice input { width: auto; accent-color: var(--gold); }
.guest-names .guest { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.guest-names .guest label { white-space: nowrap; font-size: .95rem; display: flex; gap: 4px; }
.guest-names .guest label input { width: auto; accent-color: var(--gold); }
.invalid { border-color: #c0504d !important; }
.form-error { color: #a33d3a; margin: 0 0 12px; }
.hp { position: absolute; left: -9999px; }
.thanks { text-align: center; }
.thanks-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.thanks-title { font: 400 2.2rem var(--script); color: var(--gold); margin: 0 0 8px; }

/* CONTACT */
.contacts { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.contacts a { display: block; color: var(--ink); text-decoration: none; }
.contacts .wa { color: var(--sage); font-size: .95rem; }
.who { font: 400 2rem var(--script); margin: 0; color: var(--gold); }

/* FOOTER */
.footer { position: relative; min-height: 340px; max-width: 1000px; margin: 0 auto; }
.farewell { font: 400 clamp(2.6rem, 10vw, 3.8rem) var(--script); margin: 0; padding-top: 16px; position: relative; z-index: 1; }
.bear {
  position: absolute; left: 0; bottom: 0; width: min(78vw, 560px);
  -webkit-mask-image: linear-gradient(to top, #000 70%, transparent), linear-gradient(to left, transparent, #000 30%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to top, #000 70%, transparent), linear-gradient(to left, transparent, #000 30%);
  mask-composite: intersect;
}
.leaves { position: absolute; right: 0; bottom: 0; width: min(30vw, 200px); }

/* INTRO */
.intro {
  position: fixed; inset: 0; z-index: 9; display: grid; place-items: center;
  background: var(--paper); transition: opacity .9s ease, transform .9s ease;
}
.intro.open { opacity: 0; transform: scale(1.06); pointer-events: none; }
.intro-inner { padding: 0 16px; }
.intro-names { font: 400 clamp(2.4rem, 10vw, 4rem)/1.2 var(--script); margin: 0 0 24px; }
.seal {
  width: 120px; height: 120px; border-radius: 50%; border: 0; cursor: pointer;
  font: 400 2.2rem/1 var(--script); color: #fbefd9; padding: 0;
  background: radial-gradient(circle at 35% 30%, #d2a86b, #9c733b 70%, #7d5a2c);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .15), 0 10px 24px -8px rgba(74, 51, 36, .6);
  animation: pulse 2.4s ease-in-out infinite;
}
.seal { position: relative; overflow: hidden; }
.seal .amp { background: none; color: #fbefd9; -webkit-text-fill-color: #fbefd9; font-size: .6em; margin: 0 .25em; }
/* Light sweeping across the wax seal. */
.seal::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 3.5s ease-in-out infinite;
}
@keyframes shine { 55%, 100% { transform: translateX(120%); } }
.intro-hint { font-style: italic; color: var(--ink-soft); margin-top: 20px; padding: 0 16px; }
@keyframes pulse { 50% { transform: scale(1.05); } }

.music {
  position: fixed; right: 16px; bottom: 16px; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gold); background: var(--card); color: var(--gold); font-size: 1.2rem; cursor: pointer;
}
.music.off { opacity: .55; text-decoration: line-through; }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .seal, .seal::after, .card, .event, .countdown div { animation: none; }
}

@media (max-width: 520px) {
  body { font-size: 1.05rem; }
  .section { padding-left: 24px; padding-right: 24px; }
  .frame { inset: 5px; }
  .frame i { width: 48px; height: 48px; }
  .body-text br, .quote br { display: none; }
  .si { display: block; margin: 2px 0; }
  .contacts { gap: 28px; }
}
