:root {
  --cream: #f1efe9;
  --paper: #efe7e2;
  --ink: #5c4718;
  --ink-soft: #6b5626;
  --gold: #a8926e;
  --gold-h: #cdb891;
  --gold-d: #8a744e;
  --shadow-sm: 0 1px 1px rgba(255,255,255,0.90), 0 -1px 1px rgba(78,52,22,0.16);
  --shadow-md: 0 1px 1px rgba(255,255,255,0.82), 0 -1px 0 rgba(78,52,22,0.10);
  --serif: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --display: "Cinzel", "Cormorant SC", Georgia, serif;
  --script: "Great Vibes", "Pinyon Script", cursive;
}

* { box-sizing: border-box; color-scheme: light only; }
html, body { margin: 0; min-height: 100%; background: var(--cream); color: var(--ink); }
html { scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.is-intro-locked { overflow: hidden; height: 100dvh; }

.frame-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  height: 100dvh;
  background: var(--paper);
}
.frame-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
}

.app {
  position: relative;
  z-index: 1;
  width: min(100vw, 430px);
  margin: 0 auto;
  min-height: 100dvh;
}

.page {
  position: relative;
  min-height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(2.5svh, 26px) 10% min(21vw, 124px);
  text-align: center;
}
.pages {
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  height: 100dvh;
  scrollbar-width: none;
}
.pages::-webkit-scrollbar { display: none; }

.eyebrow {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: var(--shadow-sm);
  margin: 0 0 14px;
}
.script-name {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(52px, 16vw, 78px);
  line-height: 0.92;
  margin: 0;
  background-image: linear-gradient(172deg, var(--gold-h) 0%, var(--gold) 48%, var(--gold-d) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.85)) drop-shadow(0 10px 16px rgba(124,104,70,0.2));
}
.amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 6vw, 30px);
  color: var(--gold);
  margin: 2px 0 4px;
  text-shadow: var(--shadow-sm);
}
.family {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 4.1vw, 18px);
  line-height: 1.45;
  color: var(--ink-soft);
  text-shadow: var(--shadow-sm);
}
.invite-line {
  margin-top: 18px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: var(--shadow-md);
}
.opening-copy {
  max-width: 300px;
  margin: 18px auto 0;
  font-style: italic;
  font-size: clamp(15px, 4.2vw, 17px);
  line-height: 1.85;
  color: var(--ink-soft);
  text-shadow: var(--shadow-sm);
}
.ornament {
  width: 72px;
  height: 10px;
  margin: 18px auto;
  opacity: 0.75;
}

.date-card {
  position: relative;
  width: min(196px, 20.4svh);
  margin: 0 auto;
}
.date-card img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.92;
}
.date-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 41%;
}
.date-day {
  font-family: var(--serif);
  font-size: calc(min(196px, 20.4svh) * 0.212);
  line-height: 1;
  letter-spacing: -0.01em;
  background-image: linear-gradient(172deg, var(--gold-h) 0%, var(--gold) 48%, var(--gold-d) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.85)) drop-shadow(0 10px 16px rgba(124,104,70,0.2));
}
.date-month {
  margin-top: 4px;
  font-family: var(--display);
  font-size: calc(min(196px, 20.4svh) * 0.056);
  letter-spacing: 0.3em;
  text-indent: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: var(--shadow-sm);
}
.date-year, .date-week {
  margin-top: 5px;
  font-family: var(--display);
  font-size: calc(min(196px, 20.4svh) * 0.046);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: var(--shadow-sm);
}
.date-time {
  margin-top: 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: calc(min(196px, 20.4svh) * 0.086);
  letter-spacing: 0.08em;
  color: var(--ink);
  text-shadow: var(--shadow-md);
  font-variant-numeric: lining-nums tabular-nums;
}

.venue-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 400;
  line-height: 1.2;
  margin: 8px 0 8px;
  color: var(--ink);
  text-shadow: var(--shadow-md);
}
.venue-addr {
  font-style: italic;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 280px;
  margin: 0 auto 20px;
}
.gold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid rgba(168,130,66,.72);
  background: linear-gradient(112deg, rgba(255,252,243,.72) 0%, rgba(252,240,214,.88) 48%, rgba(255,252,243,.7) 100%);
  color: #6a4d1f;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 10px 28px rgba(55,34,17,.16);
}
.gold-btn:hover { transform: translateY(-1px); }

.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: min(340px, 100%);
  margin: 18px auto 0;
}
.cd-cell {
  border: 1px solid rgba(168,146,110,0.28);
  background: rgba(255,253,248,0.42);
  padding: 14px 4px 10px;
}
.cd-num {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  background-image: linear-gradient(172deg, var(--gold-h), var(--gold-d));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.cd-lbl {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.tl {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  text-align: left;
  width: 100%;
  max-width: 320px;
  position: relative;
}
.tl:before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(168,146,110,.45), transparent);
}
.tl li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 10px 0; }
.tl .dot {
  width: 11px; height: 11px; margin-top: 6px;
  border: 1px solid var(--gold);
  background: #fffdf8;
  transform: rotate(45deg);
}
.tl time {
  display: block;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--gold);
}
.tl strong {
  display: block;
  font-weight: 500;
  font-size: 20px;
  font-family: var(--serif);
}
.tl p { margin: 3px 0 0; font-style: italic; font-size: 13px; color: var(--ink-soft); }

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 340px;
}
.gallery-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border: 1px solid rgba(168,146,110,0.22);
  background: #fff;
}

.form-field, .mem-form {
  width: min(320px, 100%);
  margin: 0 auto;
}
input, textarea, select {
  width: 100%;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  background: rgba(255,253,248,0.5);
  border: 1px solid rgba(168,146,110,0.32);
  border-radius: 999px;
  padding: 13px 18px;
  outline: none;
}
textarea { border-radius: 18px; min-height: 88px; resize: vertical; }
.choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}
.choice button {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 13px;
  border-radius: 999px;
  border: 1px solid rgba(168,146,110,0.38);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.choice button.is-on, .submit-btn {
  background: linear-gradient(112deg, rgba(255,252,243,.8), rgba(252,240,214,.92));
  border-color: rgba(168,130,66,.72);
  color: #6a4d1f;
}
.submit-btn {
  width: 100%;
  font-family: var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 14px;
  border-radius: 999px;
  cursor: pointer;
}
.note { margin-top: 12px; font-style: italic; color: var(--gold-d); }

.closing {
  font-style: italic;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.45;
  white-space: pre-line;
  color: var(--ink);
  text-shadow: var(--shadow-md);
}

/* Intro — pearl-bold, no Invitely watermark */
.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--cream);
  transition: opacity 600ms ease-in-out;
}
.intro.is-out { opacity: 0; pointer-events: none; }
.intro video, .intro .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
}
.intro .poster { z-index: 1; }
.intro video { z-index: 2; opacity: 0; transition: opacity 400ms ease; }
.intro video.is-on { opacity: 1; }
.intro-veil {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 250px;
  z-index: 3;
  background: linear-gradient(to top, rgba(64,43,22,.30) 0%, rgba(104,73,39,.13) 48%, transparent 100%);
}
.intro-cta {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  cursor: pointer;
  animation: pearlBoldFloat 3.6s cubic-bezier(0.22,1,0.36,1) infinite;
}
.intro-cta .rule {
  display: flex;
  align-items: center;
  gap: 10px;
}
.intro-cta .rule span:first-child,
.intro-cta .rule span:last-child {
  width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(150,113,54,.85));
}
.intro-cta .rule span:last-child { background: linear-gradient(90deg, rgba(150,113,54,.85), transparent); }
.intro-cta .diamond {
  width: 5px; height: 5px;
  transform: rotate(45deg);
  background: rgba(150,113,54,.9);
}
.intro-pill {
  position: relative;
  overflow: hidden;
  min-width: 244px;
  padding: 15px 32px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(168,130,66,.92);
  background: linear-gradient(112deg, rgba(255,252,243,.60) 0%, rgba(252,240,214,.80) 48%, rgba(255,252,243,.58) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(122,86,38,.18), 0 10px 28px rgba(55,34,17,.20);
  backdrop-filter: blur(9px);
}
.intro-pill .sheen {
  position: absolute;
  inset: -2px auto -2px -45%;
  width: 34%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255,229,166,.60), rgba(255,255,255,.42), transparent);
  animation: pearlGoldSheen 4.6s ease-in-out infinite;
}
.intro-pill b {
  position: relative;
  z-index: 1;
  display: block;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: #6a4d1f;
  text-shadow: 0 1px 0 rgba(255,255,255,.85);
  white-space: nowrap;
}

.music-btn {
  position: fixed;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(168,146,110,.4);
  background: rgba(241,239,233,.84);
  color: var(--gold-d);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.reveal { opacity: 0; transform: translateY(22px); filter: blur(6px); animation: rise .95s cubic-bezier(.19,1,.22,1) forwards; }
.d2 { animation-delay: .12s; }
.d3 { animation-delay: .24s; }
.d4 { animation-delay: .38s; }

@keyframes rise {
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes pearlBoldFloat {
  0%, 100% { opacity: 0.94; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-5px); }
}
@keyframes pearlGoldSheen {
  0%, 32% { left: -45%; opacity: 0; }
  42% { opacity: .72; }
  64%, 100% { left: 118%; opacity: 0; }
}

@media (min-width: 760px) {
  .app { box-shadow: 0 0 0 1px rgba(168,146,110,.12), 0 30px 80px rgba(92,71,24,.12); }
}
