:root {
  --sage-900: #455442;
  --sage-800: #556651;
  --sage-700: #667861;
  --sage-600: #798b73;
  --sage-500: #8fa087;
  --sage-300: #bcc8b6;
  --sage-200: #d7ded2;
  --sage-100: #e9ede5;
  --deep-green: #314638;
  --deep-green-2: #395242;
  --deep-green-3: #496553;
  --gold: #cbb07a;
  --gold-soft: #e1cfaa;
  --ivory: #f8f5ee;
  --paper: #f4f2eb;
  --white: #fffdf8;
  --ink: #293028;
  --muted: #73796f;
  --line: rgba(69, 84, 66, 0.18);
  --shadow: 0 28px 70px rgba(43, 53, 41, 0.14);
  --script: "Allura", "Segoe Script", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
button, input { font: inherit; }
a { color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow, .section-kicker { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .24em; font-size: .72rem; font-weight: 600; color: var(--sage-700); }

/* Lock screen */
.lock-page {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.72), transparent 26%),
    radial-gradient(circle at 85% 82%, rgba(139,158,132,.14), transparent 28%),
    linear-gradient(145deg, #f3f5f0 0%, #e8ede4 46%, #d8e0d2 100%);
  overflow-x: hidden;
}

.lock-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 36px 20px; position: relative; isolation: isolate; }
.lock-shell::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(69,84,66,.22); pointer-events: none; z-index: -1; }
.lock-card { width: min(560px, 100%); text-align: center; padding: 44px 54px 34px; background: rgba(255,253,248,.86); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); backdrop-filter: blur(18px); position: relative; transition: opacity .7s ease, transform .7s ease; }
.lock-card::after { content: ""; position: absolute; inset: 9px; border: 1px solid var(--line); pointer-events: none; }
.lock-names { margin: 0; white-space: nowrap; font-family: var(--script); font-size: clamp(3.7rem, 12vw, 5.7rem); line-height: .9; font-weight: 400; color: var(--sage-800); }
.lock-names span { color: var(--sage-500); }
.lock-date { margin: 16px 0 0; letter-spacing: .32em; padding-left: .32em; font-family: var(--serif); font-size: .9rem; text-transform: uppercase; }
.lock-copy h2 { font-family: var(--serif); font-size: 2rem; font-weight: 500; margin: 12px 0 5px; }
.lock-copy p { max-width: 390px; margin: 0 auto 22px; line-height: 1.7; color: var(--muted); font-size: .9rem; }
.lock-note { margin: 24px 0 0; font-family: var(--serif); font-style: italic; color: var(--sage-700); }

.envelope-stage { height: 208px; display: grid; place-items: center; perspective: 1000px; margin: 12px 0 6px; }
.envelope {
  --env-w: 255px;
  width: var(--env-w);
  height: calc(var(--env-w) * 0.608);
  position: relative;
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 18px rgba(49,60,47,.13));
}
.envelope-back { position: absolute; inset: 0; background: #e9e4d8; border: 1px solid #d8d1c2; }
.envelope-front { position: absolute; inset: 0; z-index: 4; overflow: hidden; }
.envelope-monogram {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 6;
  font-family: var(--serif);
  font-size: 1.08rem;
  letter-spacing: .28em;
  padding-left: .28em;
  text-transform: uppercase;
  color: var(--sage-800);
  font-weight: 600;
  pointer-events: none;
}
.envelope-monogram span { color: var(--sage-500); letter-spacing: 0; padding: 0 .12em; }
.envelope-front::before, .envelope-front::after { content: ""; position: absolute; bottom: 0; width: 0; height: 0; border-style: solid; }
.envelope-front::before {
  left: 0;
  border-width: calc(var(--env-w) * 0.306) calc(var(--env-w) * 0.498) 0 0;
  border-color: #f4efe5 transparent transparent transparent;
}
.envelope-front::after {
  right: 0;
  border-width: 0 calc(var(--env-w) * 0.498) calc(var(--env-w) * 0.306) 0;
  border-color: transparent #ede7da transparent transparent;
}
.envelope-flap {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 0;
  height: 0;
  border-left: calc(var(--env-w) * 0.5) solid transparent;
  border-right: calc(var(--env-w) * 0.5) solid transparent;
  border-top: calc(var(--env-w) * 0.357) solid #ded7c8;
  transform-origin: top center;
  transition: transform .75s cubic-bezier(.4,0,.2,1), z-index .15s .5s;
}
.letter {
  position: absolute;
  z-index: 2;
  width: calc(var(--env-w) * 0.79);
  height: calc(var(--env-w) * 0.46);
  left: calc(var(--env-w) * 0.105);
  top: calc(var(--env-w) * 0.17);
  background: var(--white);
  border: 1px solid #e4ddcf;
  display: grid;
  place-content: center;
  gap: 0;
  transition: transform .8s .45s cubic-bezier(.2,.7,.2,1);
}
.letter small { letter-spacing: .18em; text-transform: uppercase; font-size: .52rem; margin-top: -6px; color: var(--sage-700); }
.monogram { font-family: var(--script); font-size: 3.2rem; line-height: 1; color: var(--sage-800); }
.monogram span { font-size: .65em; color: var(--sage-500); }
.wax-seal {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: calc(var(--env-w) * 0.235);
  transform: translateX(-50%);
  width: calc(var(--env-w) * 0.192);
  height: calc(var(--env-w) * 0.192);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .08em;
  background: var(--sage-700);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: .95rem;
  letter-spacing: .03em;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.12), 0 5px 12px rgba(61,76,58,.22);
  transition: opacity .3s ease .18s, transform .4s ease;
}
.wax-seal strong { font-weight: 600; }
.wax-seal span { font-size: .9em; color: rgba(255,255,255,.9); }
.envelope.open .envelope-flap { transform: rotateX(180deg); z-index: 1; }
.envelope.open .wax-seal { opacity: 0; transform: translateX(-50%) scale(.6); }
.envelope.open .letter { transform: translateY(calc(var(--env-w) * -0.45)); z-index: 6; }

.password-form { max-width: 390px; margin: 0 auto; }
.password-wrap { position: relative; }
.password-wrap input { width: 100%; height: 54px; border: 1px solid rgba(69,84,66,.22); background: rgba(255,255,255,.72); border-radius: 0; padding: 0 72px 0 17px; outline: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.password-wrap input:focus { border-color: var(--sage-600); box-shadow: 0 0 0 3px rgba(121,139,115,.13); }
.reveal-button { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--sage-700); font-size: .73rem; font-weight: 600; cursor: pointer; padding: 12px; }
.primary-button, .secondary-button { border: 0; min-height: 54px; padding: 0 20px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .69rem; }
.primary-button { margin-top: 10px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 15px; background: var(--sage-700); color: white; cursor: pointer; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--sage-800); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: .72; }
.form-message { min-height: 20px; margin: 10px 0 0; font-size: .76rem; color: var(--sage-700); }
.form-message.error { color: #9d4f4a; }
.shake { animation: shake .42s ease; }
.unlocking { opacity: .98; }

.botanical { position: absolute; width: 310px; height: 500px; opacity: .32; z-index: -1; background: radial-gradient(ellipse at center, var(--sage-700) 0 4%, transparent 4.8%) 0 0/46px 66px; mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 80%, transparent); transform: rotate(-20deg); }
.botanical-one { left: -120px; top: 6%; }
.botanical-two { right: -110px; bottom: 2%; transform: rotate(160deg); }

/* Wedding site */
.site-page { background: var(--white); }
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; transition: background .3s, box-shadow .3s, transform .35s; }
.site-header.scrolled { background: rgba(248,245,238,.92); box-shadow: 0 1px 0 rgba(69,84,66,.12); backdrop-filter: blur(14px); }
.site-header.header-hidden { transform: translateY(-100%); }
.mini-monogram { text-decoration: none; font-family: var(--script); font-size: 2.25rem; color: var(--sage-800); line-height: 1; }
.mini-monogram span { color: var(--sage-500); font-size: .72em; }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); }
.site-nav a, .nav-lock { text-transform: uppercase; letter-spacing: .16em; font-size: .66rem; font-weight: 600; text-decoration: none; background: none; border: 0; padding: 8px 0; cursor: pointer; color: var(--ink); position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: var(--sage-700); transition: right .2s; }
.site-nav a:hover::after { right: 0; }
.nav-lock { color: var(--sage-700); }
.menu-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; position: relative; }
.menu-toggle span:not(.sr-only) { position: absolute; width: 20px; height: 1px; background: var(--ink); left: 11px; top: 17px; transition: transform .25s, top .25s; }
.menu-toggle span:nth-child(2) { top: 24px; }

.hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; position: relative; padding: 120px 20px 70px; background: var(--white); }
.hero::after { content: ""; position: absolute; inset: 26px; border: 1px solid rgba(69,84,66,.17); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; max-width: 1040px; }
.hero-names { margin: 8px 0 18px; white-space: nowrap; font-family: var(--script); font-weight: 400; line-height: .9; font-size: clamp(5.2rem, 13vw, 10.5rem); color: var(--sage-800); letter-spacing: -.02em; }
.hero-names span { color: var(--sage-500); }
.hero-divider { width: min(570px, 78vw); margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; color: var(--sage-700); }
.hero-divider span { height: 1px; background: var(--sage-300); }
.hero-divider b { font-family: var(--serif); font-size: 1rem; letter-spacing: .26em; padding-left: .26em; font-weight: 500; }
.hero-subtitle { font-family: var(--serif); font-size: 1.15rem; margin: 16px 0 34px; color: var(--muted); }
.text-link { display: inline-flex; gap: 9px; text-decoration: none; text-transform: uppercase; letter-spacing: .18em; font-size: .63rem; font-weight: 600; color: var(--sage-700); }
.hero-botanical { display: none; }
.hero-botanical::before, .hero-botanical::after { content: ""; position: absolute; width: 45%; height: 72%; border: 1px solid var(--sage-700); border-radius: 50%; top: 14%; }
.hero-botanical::before { left: -12%; transform: rotate(28deg); }
.hero-botanical::after { right: -12%; transform: rotate(-28deg); }
.hero-botanical-left { left: -230px; bottom: -190px; transform: rotate(-22deg); }
.hero-botanical-right { right: -250px; top: -170px; transform: rotate(20deg); }

.section-padding { padding: clamp(85px, 11vw, 145px) 6vw; }
.narrow { max-width: 760px; margin: 0 auto; text-align: center; }
.narrow h2, .section-heading h2, .split-copy h2 { font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 500; line-height: 1.02; margin: 0 0 24px; color: var(--sage-900); }
.lead, .section-heading p, .split-copy > p { color: var(--muted); line-height: 1.9; font-family: var(--serif); font-size: 1.25rem; }
.intro-section { background: var(--white); }
.day-section { background: var(--sage-100); }
.section-heading { max-width: 760px; margin: 0 auto 58px; text-align: center; }
.detail-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.detail-card { background: rgba(255,253,248,.78); padding: 38px 34px 42px; min-height: 290px; border-top: 3px solid var(--sage-500); position: relative; }
.detail-number { display: block; font-family: var(--serif); font-size: .85rem; color: var(--sage-600); letter-spacing: .14em; margin-bottom: 36px; }
.detail-card h3 { font-family: var(--serif); font-size: 2rem; font-weight: 500; margin: 0 0 12px; }
.detail-card p { color: var(--muted); line-height: 1.7; font-size: .9rem; }
.detail-card .detail-status { text-transform: uppercase; letter-spacing: .14em; font-size: .65rem; font-weight: 600; color: var(--sage-700); margin-bottom: 17px; }
.quote-band { padding: 90px 6vw; background: var(--sage-800); color: var(--ivory); text-align: center; }
.quote-inner { max-width: 760px; margin: 0 auto; }
.monogram-large { font-family: var(--script); font-size: 5rem; line-height: 1; color: white; opacity: .95; }
.monogram-large span { color: var(--sage-300); font-size: .7em; }
.quote-inner p { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.35; margin: 15px 0 0; }
.rsvp-section { background: var(--white); }
.split-layout { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.25fr .75fr; gap: 80px; align-items: center; }
.secondary-button { background: var(--sage-700); color: white; margin-top: 16px; opacity: .64; }
.date-tile { width: min(360px, 100%); aspect-ratio: 1; justify-self: end; display: grid; place-content: center; text-align: center; border: 1px solid var(--sage-300); background: var(--sage-100); box-shadow: 22px 22px 0 var(--sage-200); }
.date-tile span { text-transform: uppercase; letter-spacing: .25em; font-size: .72rem; font-weight: 600; color: var(--sage-700); }
.date-tile strong { font-family: var(--serif); font-size: 8rem; line-height: .88; font-weight: 400; color: var(--sage-800); }
.date-tile small { font-family: var(--serif); font-size: 1.4rem; margin-top: 10px; }
.stay-section { background: var(--paper); }
.stay-card { max-width: 960px; margin: 0 auto; padding: 26px 28px; border: 1px solid var(--line); background: rgba(255,253,248,.75); display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.stay-card > div { display: flex; align-items: center; gap: 20px; }
.stay-icon { width: 54px; height: 54px; border-radius: 50%; background: var(--sage-100); display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; color: var(--sage-700); }
.stay-card h3 { font-family: var(--serif); font-size: 1.65rem; font-weight: 500; margin: 0 0 3px; }
.stay-card p { margin: 0; color: var(--muted); font-size: .85rem; }
.coming-pill { flex: 0 0 auto; border: 1px solid var(--sage-300); color: var(--sage-700); padding: 10px 14px; text-transform: uppercase; letter-spacing: .13em; font-size: .59rem; font-weight: 600; }
.site-footer { background: var(--sage-900); color: var(--ivory); text-align: center; padding: 72px 20px; }
.footer-monogram { font-family: var(--script); font-size: 4rem; line-height: 1; }
.footer-monogram span { color: var(--sage-300); }
.site-footer p { font-family: var(--serif); letter-spacing: .12em; }
.site-footer a { display: inline-block; margin-top: 16px; text-transform: uppercase; letter-spacing: .16em; font-size: .62rem; text-decoration: none; color: var(--sage-200); }

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

@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-4px); } }

@media (max-width: 820px) {
  .site-header { height: 68px; padding: 0 22px; }
  .menu-toggle { display: block; z-index: 3; }
  .site-nav { position: fixed; inset: 0; background: rgba(248,245,238,.98); flex-direction: column; justify-content: center; gap: 30px; transform: translateY(-100%); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
  .site-nav a, .nav-lock { font-family: var(--serif); text-transform: none; letter-spacing: .02em; font-size: 1.6rem; font-weight: 500; }
  .menu-open .site-nav { transform: translateY(0); }
  .menu-open .menu-toggle span:first-child { top: 21px; transform: rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }
  .hero { min-height: 92svh; }
  .hero-names { font-size: clamp(4rem, 20vw, 7rem); }
  .detail-grid { grid-template-columns: 1fr; max-width: 590px; }
  .detail-card { min-height: 0; }
  .split-layout { grid-template-columns: 1fr; gap: 55px; }
  .date-tile { justify-self: center; width: min(310px, 84vw); }
}

@media (max-width: 560px) {
  .lock-shell { padding: 20px 12px; }
  .lock-shell::before { inset: 8px; }
  .lock-card { padding: 34px 20px 25px; }
  .lock-card::after { inset: 6px; }
  .lock-names { font-size: clamp(3.45rem, 18vw, 4.6rem); }
  .envelope-stage { height: 198px; margin: 4px 0 4px; }
  .envelope { --env-w: 236px; }
  .envelope-monogram { bottom: 14px; font-size: .88rem; letter-spacing: .22em; padding-left: .22em; }
  .lock-copy h2 { font-size: 1.75rem; }
  .hero::after { inset: 10px; }
  .hero { padding: 108px 12px 58px; min-height: 88svh; }
  .hero-names { font-size: clamp(3.7rem, 20vw, 5.8rem); }
  .hero-divider { width: 88vw; gap: 10px; }
  .hero-divider b { font-size: .8rem; letter-spacing: .19em; padding-left: .19em; }
  .section-padding { padding-inline: 24px; }
  .narrow h2, .section-heading h2, .split-copy h2 { font-size: 2.65rem; }
  .lead, .section-heading p, .split-copy > p { font-size: 1.1rem; }
  .detail-card { padding: 30px 26px; }
  .stay-card { align-items: flex-start; flex-direction: column; }
  .stay-card > div { align-items: flex-start; }
  .date-tile strong { font-size: 6.5rem; }
}

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