:root {
  --paper: #f8f5ef;
  --paper-deep: #eee8df;
  --ink: #22201f;
  --muted: #786f69;
  --wine: #8b3e48;
  --wine-dark: #71323b;
  --line: rgba(139, 62, 72, .42);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }

.invitation-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(22px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom));
  background: rgba(248,245,239,.94);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  transition: opacity .45s ease, visibility .45s ease;
}
.invitation-gate.is-opening { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-card {
  position: relative;
  width: min(100%, 430px);
  padding: clamp(36px, 10vw, 58px) 27px 31px;
  border: 1px solid var(--line);
  background: rgba(255,253,249,.88);
  box-shadow: 0 22px 60px rgba(72,44,41,.12);
  text-align: center;
}
.gate-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(139,62,72,.24); pointer-events: none; }
.gate-card > * { position: relative; }
.gate-card .eyebrow { letter-spacing: .22em; }
.gate-card h2 { margin: 21px 0 7px; color: var(--ink); font: 400 clamp(50px, 13vw, 66px)/1 "Great Vibes", "Cormorant Garamond", cursive; }
.gate-card h2 span { color: var(--wine); font-family: "Cormorant Garamond", Georgia, serif; font-size: .62em; font-style: italic; }
.gate-date { margin: 0; color: var(--muted); font: 500 14px "DM Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.gate-date span { color: var(--wine); padding: 0 4px; }
.gate-divider { display: flex; align-items: center; gap: 12px; width: min(220px, 82%); margin: 24px auto; color: var(--wine); }
.gate-divider::before, .gate-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.gate-divider span { font-size: 21px; }
.gate-button {
  display: flex;
  width: 100%;
  min-height: 60px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: var(--wine-dark);
  color: #fffaf6;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  transition: background .2s ease, transform .2s ease;
}
.gate-button:active { transform: scale(.985); }
.gate-button-title { font-size: 13px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.gate-button-subtitle { color: rgba(255,250,246,.76); font-size: 10px; letter-spacing: .09em; }
body.gate-open { overflow: hidden; }

.opening {
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top)) 18px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 7% 18%, rgba(255,255,255,.95), transparent 29%),
    radial-gradient(ellipse at 92% 84%, rgba(229,215,202,.42), transparent 32%),
    var(--paper);
}
.opening-video {
  display: block;
  width: min(100%, 470px, 45.57svh);
  height: auto;
  aspect-ratio: 512 / 910;
  flex: 0 0 auto;
  object-fit: contain;
  background: #f4f0e8;
}
.video-bottom {
  z-index: 2;
  width: min(100%, 470px);
  margin: 12px auto 0;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--wine-dark);
  pointer-events: none;
}
.scroll-cue {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--wine-dark);
  background: rgba(248,245,239,.9);
  text-decoration: none;
  font-size: 20px;
  animation: float 1.8s ease-in-out infinite;
}
.opening-note { margin: 15px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-align: center; }

.invitation { width: min(100%, 820px); margin: auto; padding: 88px 24px 35px; text-align: center; position: relative; }
.eyebrow { margin: 0; color: var(--wine); font-size: 10px; letter-spacing: .24em; font-weight: 600; }
h1, h2, p { margin-top: 0; }
h1 { font-family: "Great Vibes", "Cormorant Garamond", cursive; font-weight: 400; font-size: clamp(54px, 11vw, 88px); line-height: 1; margin: 19px 0 20px; }
h1 span { color: var(--wine); font-family: "Cormorant Garamond", serif; font-size: .72em; font-style: italic; }
.intro { color: #57504b; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(19px, 4vw, 25px); line-height: 1.45; margin-bottom: 45px; }
.date-block { width: min(100%, 630px); margin: 0 auto 34px; padding: 0 8px; color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(10px, 3vw, 28px); }
.date-side { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 11px; color: var(--ink); font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(16px, 3.7vw, 25px); line-height: 1.05; white-space: nowrap; }
.date-rule { display: block; width: 100%; height: 1px; background: rgba(34,32,31,.65); }
.date-center { display: flex; flex-direction: column; align-items: center; color: #171615; font-family: "Cormorant Garamond", Georgia, serif; line-height: 1; }
.date-month { font-size: clamp(20px, 4.2vw, 30px); letter-spacing: .05em; margin-bottom: 0; }
.date-day { font-size: clamp(68px, 15vw, 96px); line-height: .88; font-weight: 500; font-variant-numeric: lining-nums; }
.date-year { font-size: clamp(23px, 5vw, 34px); line-height: 1.05; margin-top: 6px; }
.hairline { display: flex; align-items: center; gap: 12px; max-width: 280px; margin: 0 auto 34px; color: var(--wine); }
.hairline::before, .hairline::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.hairline span { font-size: 22px; }
.venue { margin-bottom: 42px; }
.venue h2, .photo-story h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: clamp(28px, 6vw, 38px); margin: 10px 0 7px; }
.venue-address { position: relative; z-index: 3; display: block; color: #615952; font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; line-height: 1.4; margin: 0 auto 18px; text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: rgba(139,62,72,.15); }
.map-link { position: relative; z-index: 3; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; color: var(--wine-dark); border: 1px solid var(--line); padding: 10px 16px; font-size: 13px; font-weight: 600; letter-spacing: .08em; cursor: pointer; touch-action: manipulation; pointer-events: auto; -webkit-tap-highlight-color: rgba(139,62,72,.18); }
.map-link span { font-size: 14px; margin-left: 5px; }
.families { display: flex; justify-content: center; align-items: center; gap: clamp(28px, 9vw, 82px); padding: 28px 0 44px; color: #4f4944; }
.families p { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 16px; line-height: 1.45; letter-spacing: .08em; }
.families p span { font-size: 18px; }
.flower { font-size: 34px; color: var(--wine); }
.countdown { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 12px; margin: 0 auto 64px; max-width: 590px; }
.count-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.count-grid div { display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.count-grid div:last-child { border-right: 0; }
.count-grid strong { color: var(--wine-dark); font: 500 clamp(27px, 7vw, 42px) "Cormorant Garamond", Georgia, serif; }
.count-grid span { color: var(--muted); font-size: 8px; letter-spacing: .16em; }
.photo-story { padding: 0 0 58px; }
.photo-story h2 { margin: 8px 0 25px; font-style: italic; }
.photo-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: center; max-width: 690px; margin: auto; }
.photo { margin: 0; padding: 7px; background: #fffdf9; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(65,43,39,.1); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-main { aspect-ratio: 4 / 5; }
.photo-second { aspect-ratio: 3 / 4; transform: translateY(24px); }
footer { border-top: 1px solid var(--line); padding: 29px 0 8px; color: var(--wine-dark); }
.footer-mark { font: 500 24px "Cormorant Garamond", Georgia, serif; letter-spacing: .05em; margin-bottom: 12px; }
.footer-mark span { color: var(--wine); font-style: italic; }
footer p { font-size: 9px; letter-spacing: .18em; margin-bottom: 6px; }
footer .made { color: var(--muted); font: italic 18px "Cormorant Garamond", Georgia, serif; letter-spacing: 0; }
.desktop-only { display: initial; }
@keyframes float { 50% { transform: translateY(4px); } }
@media (min-width: 760px) {
  .opening { padding-top: 50px; padding-bottom: 40px; }
}
@media (max-width: 430px) {
  .opening { padding-left: 12px; padding-right: 12px; }
  .opening-video { width: min(100%, 470px, 43.89svh); }
  .invitation { padding: 68px 19px 30px; }
  .intro { margin-bottom: 35px; }
  .desktop-only { display: none; }
  .photo-grid { gap: 10px; }
  .photo { padding: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
