:root {
  --ink: #2b2724;
  --muted: #8b8378;
  --line: #cfc7bb;
  --cream: #f3efe6;
  --cream-deep: #e4ddcd;
  --gold: #a88f5a;
  --serif: "Cormorant Infant", Georgia, serif;
  --caps: "Cormorant SC", "Cormorant Infant", serif;
  --sans: "Montserrat", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 30%, #ffffff 0%, #faf9f6 55%, #f1eee8 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100vh; }
a { color: inherit; text-decoration: none; }

/* ---------- ENVELOPE ---------- */
.envelope {
  position: fixed; inset: 0; z-index: 100; cursor: pointer;
  background: linear-gradient(180deg, #f6f3ea, #e9e3d3);
  transition: opacity 1.1s ease, transform 1.1s ease, visibility 1.1s;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 6vh 20px 4vh;
}
.envelope.open { opacity: 0; transform: scale(1.08); visibility: hidden; pointer-events: none; }
.flap { position: absolute; left: 0; right: 0; pointer-events: none; }
.flap-top {
  top: 0; height: 58%;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(0,0,0,.03));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.flap-bottom {
  bottom: 0; height: 42%;
  background: linear-gradient(0deg, rgba(0,0,0,.06), rgba(255,255,255,0));
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
}
.env-content { position: relative; z-index: 2; }
.env-eyebrow { font-family: var(--caps); letter-spacing: .38em; font-size: .85rem; color: var(--muted); margin-bottom: 4vh; }
.env-name { font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); }
.env-parents { font-size: .8rem; color: var(--muted); line-height: 1.5; margin: .4rem 0 1.2rem; white-space: pre-line; }
.env-with { font-style: italic; color: var(--muted); margin-bottom: 1rem; }
.seal {
  position: relative; z-index: 3; margin-top: 3vh;
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fffdf6, #e9dfc2);
  border: 5px solid #fff;
  box-shadow: 0 8px 22px rgba(80,60,20,.25), inset 0 0 0 6px #efe6cd;
  font-size: 2.4rem; color: var(--gold);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.env-foot { position: absolute; bottom: 7vh; z-index: 2; }
.env-teaser { font-style: italic; font-size: 1.5rem; color: var(--muted); }
.env-hint { font-family: var(--sans); font-size: .65rem; letter-spacing: .25em; color: var(--muted); margin-top: .8rem; }

/* ---------- FIXED DECOR ---------- */
.frame { position: fixed; inset: 6px; border: 1px solid var(--line); z-index: 1; pointer-events: none; }
.corner { position: fixed; width: 250px; height: 250px; z-index: 1; pointer-events: none; opacity: .9; }
.corner.tl { top: 14px; left: 14px; }
.corner.tr { top: 14px; right: 14px; transform: scaleX(-1); }
.corner.bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.corner.br { bottom: 14px; right: 14px; transform: scale(-1, -1); }

.petals { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -40px; width: 26px; height: 34px;
  background: radial-gradient(circle at 30% 30%, #fff, #ece7df);
  border-radius: 60% 40% 60% 40% / 60% 60% 40% 40%;
  box-shadow: inset -2px -3px 6px rgba(120,105,85,.18), 0 1px 3px rgba(0,0,0,.06);
  opacity: .85; animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translate3d(0,-40px,0) rotate(0deg); }
  50%  { transform: translate3d(40px,55vh,0) rotate(180deg); }
  100% { transform: translate3d(-30px,110vh,0) rotate(360deg); }
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: center; align-items: flex-start; gap: 5.5rem;
  padding: 26px 20px 0; pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-link { font-family: var(--caps); letter-spacing: .12em; font-size: 1rem; margin-top: 18px; }
.monogram { display: flex; flex-direction: column; align-items: center; color: #8d847a; }
.orn { font-size: 1.1rem; line-height: 1; }
.mono { font-size: 2.6rem; line-height: 1; letter-spacing: .05em; display: flex; align-items: center; gap: .15em; }
.mono i { font-size: .9rem; font-style: normal; }

/* ---------- LAYOUT ---------- */
main { position: relative; z-index: 2; }
.eyebrow, .small-caps, .ceremony-tag {
  font-family: var(--caps); letter-spacing: .28em; color: var(--muted); font-size: .95rem;
}
.dim { opacity: .75; }
.display { font-weight: 300; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.12; max-width: 820px; margin: 1rem auto; }
.body { font-family: var(--sans); font-weight: 300; font-size: .95rem; line-height: 1.85; max-width: 560px; margin: 1.5rem auto; }
.block { padding: 16vh 24px 10vh; max-width: 1000px; margin: 0 auto; }
.center { text-align: center; }
.divider {
  width: 200px; height: 22px; margin: 1.6rem auto;
  background:
    linear-gradient(var(--line), var(--line)) left 50% / 80px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) right 50% / 80px 1px no-repeat;
  position: relative;
}
.divider::after { content: "✿"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: var(--muted); font-size: 1rem; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh; display: grid; align-items: center;
  grid-template-columns: 1fr minmax(240px, 300px) 1fr; gap: 2rem;
  padding: 120px 9vw 60px; max-width: 1400px; margin: 0 auto;
}
.hero-left { text-align: center; }
.hero-left .eyebrow { max-width: 200px; margin: 0 auto 2rem; line-height: 1.3; }
.names { font-weight: 300; font-size: clamp(3.2rem, 6vw, 5.2rem); line-height: .9; display: flex; flex-direction: column; align-items: center; position: relative; }
.names em { position: absolute; top: 48%; left: 50%; transform: translate(-50%,-50%); font-size: 4rem; font-weight: 300; color: #cfc8bf; z-index: -1; }
.names.small { font-size: 3rem; flex-direction: row; gap: .6rem; margin: 1.2rem 0; }
.names.small em { position: static; transform: none; font-size: 1.6rem; z-index: 0; }
.hero-photo { aspect-ratio: 3 / 4; }
.hero-photo img, .hero-photo .ph { width: 100%; height: 100%; object-fit: cover; }
.hero-right { text-align: center; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.datebox { display: flex; align-items: center; gap: .6rem; }
.datebox .day { font-size: 2.6rem; }
.brace { font-size: 3.4rem; font-weight: 200; color: var(--line); }

/* ---------- PLACEHOLDERS ---------- */
.ph {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, #f4f1ea, #f4f1ea 12px, #efebe2 12px, #efebe2 24px);
  border: 1.5px dashed #bdb4a5; color: var(--muted);
  font-family: var(--sans); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; padding: 1rem;
}

/* ---------- STORY ---------- */
.story-text { font-size: clamp(1.3rem, 2.4vw, 1.8rem); max-width: 520px; margin: 1.5rem auto; line-height: 1.35; font-weight: 300; }
.polaroids { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 20px; justify-content: center; margin-top: 4rem; }
.polaroid { aspect-ratio: 4 / 5; background: #f1eee8; box-shadow: 0 10px 30px rgba(60,50,30,.1); overflow: hidden; }
.polaroid:nth-child(1) { transform: rotate(-3deg); }
.polaroid:nth-child(2) { transform: rotate(2deg) translateY(20px); }
.polaroid:nth-child(3) { transform: rotate(2deg); }
.polaroid:nth-child(4) { transform: rotate(-2deg) translateY(20px); }
.polaroid img, .polaroid .ph { width: 100%; height: 100%; object-fit: cover; }

/* ---------- VENUE ---------- */
.ceremony-tag { margin-top: 3rem; }
.venue-title { font-weight: 400; font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: .6rem 0; }
.venue-card { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-top: 4rem; text-align: center; }
.venue-card > div:first-child { aspect-ratio: 4 / 3; }
.venue-card img, .venue-card .ph { width: 100%; height: 100%; object-fit: cover; }
.address { font-family: var(--sans); font-weight: 300; font-size: .8rem; line-height: 1.8; letter-spacing: .05em; margin: 1rem 0 1.6rem; text-transform: uppercase; }
.btn {
  display: inline-block; font-family: var(--caps); letter-spacing: .15em; font-size: .95rem;
  border: 1px solid var(--muted); padding: .7rem 1.6rem; border-radius: 40px;
  transition: background .3s, color .3s;
}
.btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn + .btn { margin-left: .6rem; }

/* ---------- SCHEDULE ---------- */
.day-label { font-family: var(--caps); letter-spacing: .25em; color: var(--muted); font-size: 1.05rem; margin: 6rem 0 3rem; }
.event { margin-bottom: 5rem; }
.event .time { font-family: var(--caps); letter-spacing: .2em; color: var(--muted); }
.event h3 { font-weight: 300; font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.15; max-width: 640px; margin: .6rem auto; }
.event p { font-family: var(--sans); font-weight: 300; font-size: .9rem; line-height: 1.8; max-width: 440px; margin: 1.2rem auto 0; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 8vh 24px 14vh; display: flex; flex-direction: column; gap: .8rem; align-items: center; }

/* ---------- MUSIC ---------- */
.music {
  position: fixed; right: 26px; bottom: 26px; z-index: 30; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: #f6efdc; color: var(--gold); font-size: 1.3rem; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.1);
}
.music.off { opacity: .55; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 140px; gap: 2.4rem; }
  .hero-photo { max-width: 280px; margin: 0 auto; order: 2; }
  .hero-right { order: 3; }
  .nav { gap: 1.2rem; }
  .nav-link { font-size: .8rem; }
  .corner { width: 130px; height: 130px; }
  .venue-card { grid-template-columns: 1fr; gap: 1.5rem; }
  .names em { font-size: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .petal, .seal { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
