@font-face {
  font-family: "Wedding Serif";
  src: url("../assets/fonts/noto-serif-sc-wedding.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --canvas-width: 390px;
  --canvas-scale: 1;
  --canvas-viewport-height: 100dvh;
  --ivory: #f6f1e8;
  --ivory-deep: #ede4d6;
  --champagne: #d7c2a2;
  --champagne-dark: #ad9572;
  --champagne-ink: #765f43;
  --taupe: #887b69;
  --ink: #35352f;
  --ink-soft: #5b584f;
  --sage: #78806e;
  --sage-dark: #535c4c;
  --forest: #385443;
  --forest-dark: #294034;
  --blush: #d7a9b3;
  --blush-soft: #ead6d9;
  --blush-dark: #84535f;
  --mist: #d8dde0;
  --paper-shadow: rgba(31, 28, 23, 0.22);
  --type-primary: "Wedding Serif", "Noto Serif SC", serif;
  --type-signature: "Xingkai SC", "STXingkai", "Kaiti SC", var(--type-primary);
  --serif-display: var(--type-primary);
  --serif-cn: var(--type-primary);
  --sans: var(--type-primary);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #293129;
  scroll-behavior: smooth;
}

html.is-locked,
html.lightbox-open {
  overflow: hidden;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #293129;
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--champagne-dark);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
figure,
blockquote {
  margin: 0;
}

.desktop-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 24% 20%, rgba(215, 194, 162, 0.12), transparent 35%),
    radial-gradient(circle at 76% 84%, rgba(120, 128, 110, 0.14), transparent 38%),
    #293129;
}

.desktop-backdrop::before {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent 0 5px, rgba(255, 255, 255, 0.012) 5px 6px);
  content: "";
}

.mobile-canvas {
  width: var(--canvas-width);
  margin-inline: auto;
}

.mobile-canvas {
  position: relative;
  overflow: hidden;
  background: var(--ivory);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.3);
  zoom: var(--canvas-scale);
}

.gate-paper {
  width: min(100%, var(--canvas-width));
  margin-inline: auto;
}

.paper-section,
.gate-paper {
  background-color: var(--ivory);
  background-image:
    radial-gradient(circle at 18% 28%, rgba(136, 123, 105, 0.06) 0 1px, transparent 1.4px),
    radial-gradient(circle at 78% 68%, rgba(136, 123, 105, 0.045) 0 1px, transparent 1.4px),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(108, 96, 78, 0.015) 4px 5px);
  background-size: 33px 31px, 41px 43px, auto;
}

.section-pad {
  padding: 92px 30px;
}

.section-eyebrow {
  margin-bottom: 15px;
  color: var(--taupe);
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.27em;
  text-align: center;
}

.section-eyebrow--light {
  color: rgba(246, 241, 232, 0.68);
}

.section-title {
  color: var(--ink);
  font-family: var(--serif-cn);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-align: center;
}

.section-title--light {
  color: var(--ivory);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 800ms ease var(--delay, 0ms),
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Opening gate */
.invitation-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: #24241f;
}

.gate-paper {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: max(34px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.3);
}

.gate-paper::before,
.gate-paper::after {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(173, 149, 114, 0.32);
  border-radius: 50%;
  content: "";
}

.gate-paper::before {
  top: -82px;
  left: -76px;
}

.gate-paper::after {
  right: -82px;
  bottom: -76px;
}

.gate-brand {
  position: absolute;
  top: max(34px, env(safe-area-inset-top));
  color: var(--taupe);
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.3em;
}

.gate-for {
  margin: 0 0 5px;
  color: var(--taupe);
  font-family: var(--serif-display);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.gate-guest {
  min-height: 28px;
  margin-bottom: clamp(35px, 7svh, 60px);
  font-size: 17px;
  letter-spacing: 0.08em;
}

.envelope-button {
  position: relative;
  width: min(82vw, 356px);
  height: 276px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1200px;
  -webkit-tap-highlight-color: transparent;
}

.envelope-button:disabled {
  cursor: default;
}

.envelope {
  position: absolute;
  inset: 28px 0 0;
  display: block;
  filter: drop-shadow(0 18px 20px rgba(62, 52, 39, 0.16));
}

.envelope-back,
.envelope-front,
.envelope-flap {
  position: absolute;
  inset-inline: 0;
  display: block;
}

.envelope-back {
  bottom: 0;
  height: 210px;
  border: 1px solid rgba(136, 123, 105, 0.32);
  background: #e7dac7;
}

.envelope-letter {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  z-index: 1;
  display: flex;
  height: 190px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(173, 149, 114, 0.48);
  background: var(--ivory);
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1) 250ms;
}

.envelope-letter::before,
.envelope-letter::after {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(173, 149, 114, 0.22);
  content: "";
}

.envelope-letter::after {
  inset: 14px;
  border-style: dotted;
}

.letter-small {
  position: relative;
  z-index: 1;
  color: var(--taupe);
  font-family: var(--serif-display);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.letter-names {
  position: relative;
  z-index: 1;
  margin: 9px 0;
  font-family: var(--type-signature);
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
}

.letter-names i {
  margin-inline: 4px;
  color: var(--champagne-dark);
  font-family: var(--serif-display);
  font-weight: 400;
}

.letter-date {
  position: relative;
  z-index: 1;
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.envelope-front {
  bottom: 0;
  z-index: 2;
  height: 211px;
  overflow: hidden;
  border: 1px solid rgba(136, 123, 105, 0.28);
  background:
    linear-gradient(29deg, #e2d2bb 49.5%, transparent 50%) left bottom / 51% 100% no-repeat,
    linear-gradient(-29deg, #e2d2bb 49.5%, transparent 50%) right bottom / 51% 100% no-repeat;
}

.envelope-front::after {
  position: absolute;
  right: -20%;
  bottom: -71%;
  left: -20%;
  height: 160%;
  border: 1px solid rgba(136, 123, 105, 0.2);
  background: #eadfce;
  content: "";
  transform: rotate(45deg);
}

.envelope-flap {
  top: 0;
  z-index: 3;
  height: 136px;
  border-top: 1px solid rgba(136, 123, 105, 0.26);
  background: #efe4d4;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wax-seal {
  position: absolute;
  top: 102px;
  left: 50%;
  z-index: 4;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px solid rgba(84, 80, 67, 0.36);
  border-radius: 49% 54% 48% 52%;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.28), transparent 22%),
    radial-gradient(circle, #8c947e 0 58%, #747c68 59% 72%, #89917a 73%);
  box-shadow:
    0 7px 12px rgba(55, 55, 45, 0.25),
    inset 0 0 0 3px rgba(246, 241, 232, 0.14),
    inset 0 0 0 8px rgba(65, 73, 59, 0.18);
  color: var(--ivory);
  font-family: var(--serif-display);
  font-size: 22px;
  letter-spacing: -0.08em;
  transform: translateX(-50%);
  transition:
    opacity 380ms ease,
    transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wax-seal::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(246, 241, 232, 0.4);
  border-radius: 50%;
  content: "";
}

.gate-hint {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: clamp(24px, 5svh, 42px);
  color: var(--taupe);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  animation: hintPulse 2.4s ease-in-out infinite;
}

.gate-hint span {
  width: 24px;
  height: 1px;
  background: rgba(136, 123, 105, 0.45);
}

.invitation-gate.is-opening {
  animation: gateFade 520ms ease 650ms forwards;
}

.invitation-gate.is-opening .envelope-flap {
  z-index: 0;
  transform: rotateX(180deg);
}

.invitation-gate.is-opening .wax-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0.58) rotate(-10deg);
}

.invitation-gate.is-opening .envelope-letter {
  transform: translateY(-88px);
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes gateFade {
  to { opacity: 0; visibility: hidden; }
}

/* Hero */
.hero-section {
  position: relative;
  display: flex;
  min-height: max(760px, var(--canvas-viewport-height));
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: max(32px, calc(env(safe-area-inset-top) + 18px)) 26px max(30px, calc(env(safe-area-inset-bottom) + 22px));
  color: var(--ink);
}

.hero-section::before,
.hero-section::after {
  position: absolute;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(56, 84, 67, 0.18);
  border-radius: 50%;
  content: "";
}

.hero-section::before {
  top: -77px;
  left: -73px;
}

.hero-section::after {
  right: -78px;
  bottom: -72px;
}

.hero-topline {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding-right: 54px;
  color: var(--ink-soft);
  font-family: var(--serif-display);
  font-size: 10px;
  letter-spacing: 0.24em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  margin: 52px 0 30px;
  text-align: center;
}

.hero-kicker {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-family: var(--serif-display);
  font-size: 13px;
  letter-spacing: 0.21em;
}

.hero-copy h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--type-signature);
  font-size: 39px;
  font-weight: 400;
  letter-spacing: 0.09em;
  line-height: 1.18;
}

.hero-copy h1 i {
  color: var(--champagne-ink);
  font-family: var(--serif-display);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.hero-portrait {
  position: relative;
  z-index: 1;
  width: 310px;
  height: 382px;
  margin: 0;
}

.hero-portrait::before {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(56, 84, 67, 0.36);
  box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5px rgba(173, 149, 114, 0.3);
  content: "";
  pointer-events: none;
}

.hero-portrait::after {
  position: absolute;
  top: -20px;
  left: 50%;
  padding: 0 10px;
  background: var(--ivory);
  color: var(--forest);
  content: "❦";
  font-family: var(--type-primary);
  font-size: 20px;
  line-height: 1;
  transform: translateX(-50%);
}

.hero-portrait-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(173, 149, 114, 0.58);
  padding: 7px;
  background: rgba(255, 252, 246, 0.8);
  box-shadow: 0 18px 34px rgba(83, 71, 53, 0.14);
}

.hero-portrait-frame::before {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(215, 169, 179, 0.34);
  content: "";
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 43%;
  filter: saturate(0.72) sepia(0.06) contrast(0.96);
}

.hero-date-lockup {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  text-align: center;
}

.hero-date {
  font-family: var(--serif-cn);
  font-size: 13px;
  letter-spacing: 0.13em;
}

.hero-place {
  margin-top: 9px;
  color: var(--forest);
  font-size: 14px;
  letter-spacing: 0.16em;
}

/* Invitation */
.invitation-intro {
  position: relative;
  min-height: 820px;
  overflow: hidden;
  text-align: center;
}

.corner-flourish {
  position: absolute;
  width: 138px;
  color: var(--sage);
  opacity: 0.26;
}

.corner-flourish--top {
  top: 18px;
  left: -20px;
  transform: rotate(-8deg);
}

.corner-flourish--bottom {
  right: -24px;
  bottom: 18px;
  transform: rotate(172deg);
}

.olive-branch {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.olive-branch circle {
  fill: currentColor;
  stroke: none;
}

.filigree-divider {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--champagne-dark);
}

.filigree-stem,
.vine-stem,
.frame-corner-stem {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.filigree-stem {
  stroke-width: 1.05;
}

.filigree-leaf,
.filigree-dot,
.vine-leaf,
.frame-corner-leaf {
  fill: currentColor;
  stroke: none;
}

.filigree-divider--hairline {
  opacity: 0.72;
}

.filigree-divider--light {
  color: var(--champagne);
  opacity: 0.82;
}

.filigree-divider--small {
  width: min(190px, 72%);
  margin: 0 auto 12px;
  opacity: 0.62;
}

.frame-corners {
  --corner-size: 44px;
  position: absolute;
  display: block;
  color: var(--champagne-dark);
  pointer-events: none;
}

.frame-corner {
  position: absolute;
  display: block;
  width: var(--corner-size);
  height: var(--corner-size);
  overflow: visible;
}

.frame-corner-stem {
  stroke-width: 0.95;
}

.frame-corner-leaf {
  opacity: 0.72;
}

.frame-corner--top-left { top: 0; left: 0; }
.frame-corner--top-right { top: 0; right: 0; transform: scaleX(-1); }
.frame-corner--bottom-left { bottom: 0; left: 0; transform: scaleY(-1); }
.frame-corner--bottom-right { right: 0; bottom: 0; transform: scale(-1); }

.frame-corners--section {
  --corner-size: 48px;
  inset: 20px 16px;
  z-index: 2;
  color: var(--forest);
  opacity: 0.44;
}

.frame-corners--card {
  --corner-size: 39px;
  inset: 7px;
  z-index: 0;
  color: var(--forest);
  opacity: 0.42;
}

.frame-corners--photo {
  --corner-size: 32px;
  inset: -9px;
  z-index: 2;
  opacity: 0.68;
}

.vine-motif {
  position: absolute;
  display: block;
  overflow: visible;
  color: var(--champagne-dark);
  pointer-events: none;
}

.vine-stem {
  stroke-width: 1.05;
}

.vine-leaf {
  opacity: 0.66;
}

.guest-salutation {
  color: var(--ink-soft);
  font-size: 20px;
  letter-spacing: 0.1em;
}

.guest-salutation strong {
  color: var(--forest-dark);
  font-family: var(--type-signature);
  font-size: 23px;
  font-weight: 400;
}

.hairline {
  position: relative;
  display: grid;
  min-height: 38px;
  place-items: center;
  margin: 38px 0 32px;
  color: var(--champagne-dark);
  font-family: var(--serif-display);
  font-size: 18px;
  letter-spacing: 0.12em;
}

.hairline > span {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 0 13px;
  background: var(--ivory);
  line-height: 1;
  transform: translate(-50%, -50%);
}

.invitation-copy {
  max-width: 330px;
  margin-inline: auto;
  font-size: 16px;
  letter-spacing: 0.12em;
  line-height: 2.05;
}

.date-lockup {
  display: grid;
  width: 230px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 56px auto 42px;
  font-family: var(--serif-display);
}

.date-lockup span {
  padding-block: 9px;
  border-top: 1px solid rgba(136, 123, 105, 0.5);
  border-bottom: 1px solid rgba(136, 123, 105, 0.5);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.date-lockup strong {
  color: var(--sage-dark);
  font-size: 76px;
  font-weight: 400;
  line-height: 0.8;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(136, 123, 105, 0.26);
  border-bottom: 1px solid rgba(136, 123, 105, 0.26);
  padding: 19px 0;
}

.countdown div {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.countdown div:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 12px;
  color: rgba(83, 92, 76, 0.48);
  content: "❧";
  font-family: var(--type-primary);
  font-size: 13px;
  line-height: 1;
  transform: translate(50%, -50%) rotate(-12deg);
}

.countdown strong {
  font-family: var(--serif-display);
  font-size: 29px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.countdown span {
  color: var(--taupe);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.countdown-complete {
  margin-top: 18px;
  color: var(--sage-dark);
  font-size: 15px;
  letter-spacing: 0.15em;
}

/* Quote */
.quote-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--sage-dark);
  color: var(--ivory);
  text-align: center;
}

.quote-section::before {
  position: absolute;
  inset: 14px;
  z-index: 0;
  border: 1px solid rgba(246, 241, 232, 0.18);
  content: "";
  pointer-events: none;
}

.quote-section::after {
  position: absolute;
  top: 24px;
  right: -41px;
  z-index: 0;
  width: 184px;
  height: 184px;
  border: 1px solid rgba(246, 241, 232, 0.17);
  border-radius: 48% 52% 46% 54%;
  background:
    radial-gradient(ellipse 38% 18% at 50% 10%, transparent 67%, rgba(246, 241, 232, 0.19) 69% 70%, transparent 72%),
    radial-gradient(ellipse 18% 38% at 90% 50%, transparent 67%, rgba(246, 241, 232, 0.19) 69% 70%, transparent 72%),
    radial-gradient(ellipse 38% 18% at 50% 90%, transparent 67%, rgba(246, 241, 232, 0.19) 69% 70%, transparent 72%),
    radial-gradient(ellipse 18% 38% at 10% 50%, transparent 67%, rgba(246, 241, 232, 0.19) 69% 70%, transparent 72%),
    radial-gradient(circle at center, transparent 22%, rgba(246, 241, 232, 0.18) 23% 24%, transparent 25% 41%, rgba(246, 241, 232, 0.15) 42% 43%, transparent 44%);
  content: "";
  pointer-events: none;
  transform: rotate(-15deg);
}

.quote-section > * {
  position: relative;
  z-index: 1;
}

.quote-rule {
  width: 210px;
  height: auto;
  margin: -104px auto 44px;
}

.quote-section blockquote {
  position: relative;
  padding: 10px 0 4px;
}

.quote-section blockquote p {
  max-width: 330px;
  margin: 0 auto 22px;
  font-size: 20px;
  letter-spacing: 0.15em;
  line-height: 1.9;
}

.quote-section cite {
  color: rgba(246, 241, 232, 0.66);
  font-family: var(--serif-display);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.1em;
}

/* Story */
.story-section {
  overflow: hidden;
}

.editorial-photo {
  position: relative;
}

.editorial-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.68) sepia(0.06) contrast(0.96);
}

.editorial-photo figcaption {
  margin-top: 11px;
  color: var(--taupe);
  font-family: var(--serif-display);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.12em;
}

.editorial-photo--wide {
  width: 86%;
  height: 305px;
  margin: 48px auto 44px;
}

.editorial-photo--wide::before {
  position: absolute;
  z-index: 1;
  inset: -9px;
  border: 1px solid rgba(173, 149, 114, 0.52);
  box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5px rgba(56, 84, 67, 0.18);
  content: "";
  pointer-events: none;
}

.editorial-photo--detail {
  width: 78%;
  height: 280px;
  margin: 50px 0 0 auto;
}

.editorial-photo--detail::before {
  position: absolute;
  top: 18px;
  bottom: -16px;
  left: -22px;
  width: 22px;
  border: 1px solid rgba(173, 149, 114, 0.68);
  border-right: 0;
  border-radius: 28px 0 0 28px;
  content: "";
  pointer-events: none;
}

.story-copy {
  position: relative;
  padding-left: 34px;
}

.story-vine {
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 25px;
  height: calc(100% - 10px);
  color: rgba(120, 128, 110, 0.72);
}

.story-copy p {
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
  font-size: 15px;
  letter-spacing: 0.08em;
  line-height: 2;
  text-align: justify;
}

.story-copy p:last-child {
  margin-bottom: 0;
}

/* Schedule */
.ornate-section {
  --ornate-bg: var(--ivory);
  position: relative;
}

.ornate-section::before {
  position: absolute;
  z-index: 0;
  inset: 22px 18px;
  background:
    radial-gradient(ellipse at 50% 100%, transparent 68%, rgba(56, 84, 67, 0.26) 70% 73%, transparent 75%) top / 68px 12px repeat-x,
    radial-gradient(ellipse at 50% 0, transparent 68%, rgba(215, 169, 179, 0.3) 70% 73%, transparent 75%) bottom / 68px 12px repeat-x;
  content: "";
  opacity: 0.72;
  pointer-events: none;
}

.ornate-section::after {
  position: absolute;
  z-index: 1;
  top: 11px;
  left: 50%;
  padding: 0 11px;
  background: var(--ornate-bg);
  color: var(--forest);
  content: "❦";
  font-family: var(--type-primary);
  font-size: 20px;
  line-height: 1;
  transform: translateX(-50%);
}

.ornate-section > * {
  position: relative;
  z-index: 1;
}

.ornate-section > .frame-corners {
  position: absolute;
  z-index: 2;
}

.details-section {
  --ornate-bg: #f1eadf;
  overflow: hidden;
  background-color: var(--ornate-bg);
  color: var(--ink);
}

.schedule-list {
  position: relative;
  margin: 54px 0 66px;
}

.schedule-vine {
  top: 10px;
  bottom: 20px;
  left: 73px;
  z-index: 0;
  width: 25px;
  height: calc(100% - 30px);
  color: rgba(56, 84, 67, 0.48);
}

.schedule-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 66px 39px 1fr;
  align-items: start;
  min-height: 87px;
}

.schedule-item time {
  padding-top: 1px;
  color: var(--forest);
  font-family: var(--serif-display);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.schedule-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 14px;
  margin: 2px auto 0;
  border: 1px solid rgba(56, 84, 67, 0.62);
  border-radius: 100% 0 100% 0;
  background: var(--blush-soft);
  box-shadow: 0 0 0 3px var(--ornate-bg);
  transform: rotate(var(--leaf-rotation));
}

.schedule-item:nth-of-type(even) .schedule-dot {
  background: rgba(120, 128, 110, 0.72);
}

.schedule-item h3 {
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.schedule-item p {
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.dress-card {
  position: relative;
  margin-inline: 5px;
  padding: 46px 25px 35px;
  background:
    radial-gradient(ellipse at 50% 0, transparent 64%, rgba(56, 84, 67, 0.23) 65% 66%, transparent 67%) top / 78px 14px repeat-x,
    rgba(255, 252, 247, 0.7);
  text-align: center;
}

.dress-card::before {
  position: absolute;
  inset: 10px 8px;
  border: 1px solid rgba(173, 149, 114, 0.54);
  border-radius: 58% 58% 4px 4px / 34px 34px 4px 4px;
  content: "";
  pointer-events: none;
}

.dress-card::after {
  position: absolute;
  right: 50%;
  bottom: -13px;
  width: 78px;
  height: 25px;
  border: 1px solid rgba(56, 84, 67, 0.34);
  border-top: 0;
  border-radius: 0 0 50% 50%;
  content: "";
  transform: translateX(50%);
  pointer-events: none;
}

.dress-card > :not(.frame-corners) {
  position: relative;
  z-index: 1;
}

.dress-label {
  color: var(--forest-dark);
  font-family: var(--serif-display);
  font-size: 14px;
  letter-spacing: 0.16em;
}

.dress-card h3 {
  margin: 13px 0 17px;
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--forest-dark);
}

.dress-description {
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.07em;
  line-height: 1.8;
}

.dress-palette {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin-top: 20px;
}

.dress-palette span {
  width: 29px;
  height: 29px;
  border: 3px solid rgba(255, 252, 247, 0.88);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(136, 123, 105, 0.38);
}

.dress-etiquette {
  margin-top: 29px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.9;
}

.dress-etiquette strong {
  display: block;
  margin: 4px 0 7px;
  color: var(--forest-dark);
  font-family: var(--serif-cn);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

/* Venue */
.venue-section {
  overflow: hidden;
}

.venue-photo {
  position: relative;
  width: 82%;
  height: 318px;
  margin: 74px auto -7px;
  padding: 7px;
  background: rgba(255, 252, 247, 0.78);
  box-shadow: 0 15px 28px rgba(82, 69, 50, 0.1);
}

.venue-photo::before {
  position: absolute;
  z-index: 1;
  inset: -8px;
  border: 1px solid rgba(56, 84, 67, 0.34);
  box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5px rgba(173, 149, 114, 0.32);
  content: "";
  pointer-events: none;
}

.venue-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.62) sepia(0.1) contrast(0.94);
}

.venue-photo figcaption {
  position: absolute;
  right: 50%;
  bottom: -28px;
  z-index: 1;
  padding: 0 12px;
  background: var(--ivory);
  color: var(--forest);
  font-family: var(--serif-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  transform: translateX(50%);
}

.frame-corners--venue {
  --corner-size: 38px;
  inset: -10px;
  z-index: 2;
  color: var(--forest);
  opacity: 0.48;
}

.venue-copy {
  padding-top: 91px;
}

.venue-room {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  color: var(--sage-dark);
  font-family: var(--serif-display);
  font-size: 17px;
  letter-spacing: 0.06em;
  text-align: center;
}

.venue-room span:last-child {
  color: var(--forest);
  font-family: var(--serif-cn);
  font-size: 16px;
  font-style: normal;
  letter-spacing: 0.15em;
}

.venue-address {
  margin: 18px auto 0;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-align: center;
}

.venue-transport {
  max-width: 340px;
  margin: 30px auto 0;
  color: var(--ink-soft);
  text-align: center;
}

.venue-transport p {
  font-size: 13px;
  letter-spacing: 0.07em;
  line-height: 1.85;
}

.venue-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 34px;
}

.outline-button,
.submit-button {
  min-height: 48px;
  border: 1px solid rgba(83, 92, 76, 0.8);
  border-radius: 999px;
  background: transparent;
  color: var(--forest-dark);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.13em;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease;
}

.outline-button:active {
  background: var(--sage-dark);
  color: var(--ivory);
}

/* Gallery */
.gallery-section {
  overflow: hidden;
  background: var(--sage-dark);
  color: var(--ivory);
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 42px;
}

.gallery-heading .section-eyebrow,
.gallery-heading .section-title {
  text-align: left;
}

.gallery-heading > p {
  color: rgba(246, 241, 232, 0.54);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  text-align: right;
}

.gallery-track {
  display: grid;
  grid-auto-columns: 78%;
  grid-auto-flow: column;
  gap: 14px;
  width: calc(100% + 30px);
  overflow-x: auto;
  padding-right: 30px;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  position: relative;
  height: 430px;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #33372f;
  cursor: zoom-in;
  scroll-snap-align: start;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.66) sepia(0.06) contrast(0.96);
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card:active img {
  transform: scale(1.025);
}

.gallery-card > span {
  position: absolute;
  right: 13px;
  bottom: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(246, 241, 232, 0.58);
  border-radius: 50%;
  background: rgba(35, 35, 30, 0.24);
  color: var(--ivory);
  font-family: var(--serif-display);
  font-size: 11px;
  backdrop-filter: blur(5px);
}

.gallery-progress {
  width: 100%;
  height: 1px;
  margin-top: 19px;
  overflow: hidden;
  background: rgba(246, 241, 232, 0.18);
}

.gallery-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--champagne);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 100ms linear;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(24, 24, 21, 0.96);
  color: var(--ivory);
  padding: max(54px, env(safe-area-inset-top)) 22px max(38px, env(safe-area-inset-bottom));
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox figure {
  width: min(100%, 460px);
  text-align: center;
}

.gallery-lightbox figure img {
  width: 100%;
  max-height: 76svh;
  object-fit: contain;
}

.gallery-lightbox figcaption {
  margin-top: 15px;
  color: rgba(246, 241, 232, 0.65);
  font-family: var(--serif-display);
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
}

.lightbox-close {
  top: max(11px, env(safe-area-inset-top));
  right: max(10px, calc((100vw - 480px) / 2 + 10px));
  font-family: var(--serif-display);
  font-size: 35px;
  font-weight: 300;
}

.lightbox-arrow {
  top: 50%;
  border: 1px solid rgba(246, 241, 232, 0.25);
  border-radius: 50%;
  font-family: var(--serif-display);
  font-size: 32px;
  transform: translateY(-50%);
}

.lightbox-arrow--prev { left: max(7px, calc((100vw - 480px) / 2 + 7px)); }
.lightbox-arrow--next { right: max(7px, calc((100vw - 480px) / 2 + 7px)); }

/* RSVP */
.rsvp-section {
  position: relative;
  overflow: hidden;
  background-color: #f0eadf;
}

.rsvp-section::before,
.rsvp-section::after {
  position: absolute;
  width: 164px;
  height: 164px;
  border: 1px solid rgba(56, 84, 67, 0.24);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.rsvp-section::before {
  top: -94px;
  left: -87px;
}

.rsvp-section::after {
  right: -94px;
  bottom: -86px;
  border-color: rgba(215, 169, 179, 0.3);
}

.rsvp-section > * {
  position: relative;
  z-index: 1;
}

.rsvp-section > .frame-corners {
  position: absolute;
}

.frame-corners--rsvp {
  --corner-size: 43px;
  inset: 24px 18px;
  z-index: 2;
  color: var(--champagne-dark);
  opacity: 0.5;
}

.rsvp-form {
  position: relative;
  display: grid;
  gap: 22px;
  margin-top: 34px;
  padding: 32px 22px 30px;
}

.rsvp-form::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(173, 149, 114, 0.5);
  border-radius: 56% 56% 6px 6px / 28px 28px 6px 6px;
  content: "";
  pointer-events: none;
}

.rsvp-form::after {
  position: absolute;
  top: -9px;
  right: 50%;
  width: 130px;
  height: 18px;
  border-top: 1px solid rgba(56, 84, 67, 0.35);
  border-radius: 50%;
  content: "";
  transform: translateX(50%);
  pointer-events: none;
}

.rsvp-form > * {
  position: relative;
  z-index: 1;
}

.rsvp-form > label,
.rsvp-form fieldset {
  display: grid;
  gap: 11px;
  margin: 0;
  border: 0;
  padding: 0;
}

.rsvp-form fieldset {
  gap: 16px;
  padding-top: 3px;
}

.rsvp-form .attendee-names[hidden] {
  display: none;
}

.rsvp-form .attendee-names {
  gap: 10px;
  padding-top: 2px;
}

.attendee-names > p {
  margin: -3px 0 2px;
  color: var(--taupe);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.55;
}

.attendee-name-list {
  display: grid;
  gap: 14px;
}

.attendee-name-list label {
  display: grid;
  gap: 11px;
}

.rsvp-form > label {
  transition: opacity 180ms ease;
}

.rsvp-form > label.is-disabled {
  opacity: 0.48;
}

.rsvp-form label > span,
.rsvp-form legend {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

.rsvp-form label small {
  color: var(--ink-soft);
  font-size: 11px;
}

.rsvp-form input[type="text"],
.rsvp-form textarea,
.rsvp-form select {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid rgba(136, 123, 105, 0.4);
  border-radius: 0;
  padding: 10px 2px 8px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.rsvp-form textarea {
  height: 74px;
  min-height: 74px;
  padding: 20px 2px 6px;
  resize: vertical;
  line-height: 1.7;
}

.rsvp-form select {
  min-height: 48px;
  border: 1px solid rgba(136, 123, 105, 0.38);
  border-radius: 999px;
  padding: 8px 18px;
  background-color: #e9e2d6;
}

.rsvp-form select option {
  background-color: #e9e2d6;
  color: var(--ink);
}

.rsvp-form select:disabled {
  cursor: not-allowed;
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
  color: rgba(70, 66, 59, 0.42);
}

.attendance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attendance-options label {
  position: relative;
}

.attendance-options input {
  position: absolute;
  opacity: 0;
}

.rsvp-form .attendance-options label > span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(136, 123, 105, 0.38);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.07em;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.rsvp-form .guest-side-options label > span {
  padding: 5px;
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-align: center;
}

.attendance-options input:checked + span {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
  color: var(--ivory);
}

.attendance-options input:focus-visible + span {
  outline: 2px solid var(--champagne-dark);
  outline-offset: 2px;
}

.honeypot {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-button {
  display: flex;
  align-items: center;
  justify-self: center;
  justify-content: center;
  width: min(100%, 224px);
  margin-top: 10px;
  border-color: var(--sage-dark);
  padding: 0 18px;
  background: var(--sage-dark);
  color: var(--ivory);
  font-size: 16px;
  letter-spacing: 0.1em;
  gap: 10px;
}

.submit-button i {
  font-family: var(--serif-display);
  font-size: 20px;
  font-style: normal;
}

.submit-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.form-status {
  min-height: 22px;
  color: var(--taupe);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-align: center;
}

.form-status.is-error { color: #775f50; }
.form-status.is-success { color: var(--sage-dark); }

.rsvp-form.is-submitted > label,
.rsvp-form.is-submitted fieldset,
.rsvp-form.is-submitted .submit-button {
  opacity: 0.46;
  pointer-events: none;
}

/* Closing */
.closing-section {
  position: relative;
  min-height: max(760px, var(--canvas-viewport-height));
  overflow: hidden;
  padding-bottom: max(96px, env(safe-area-inset-bottom));
  background: var(--forest-dark);
  color: var(--ivory);
}

.closing-section > img,
.closing-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.closing-section > img {
  object-fit: cover;
  filter: saturate(0.44) sepia(0.12) brightness(0.72);
}

.closing-wash {
  background: linear-gradient(180deg, rgba(41, 64, 52, 0.22), rgba(30, 54, 43, 0.6));
}

.closing-copy {
  position: absolute;
  top: 46%;
  right: 30px;
  left: 30px;
  text-align: center;
  transform: translateY(-50%);
}

.closing-copy > p {
  color: var(--champagne);
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.35em;
}

.closing-monogram {
  display: grid;
  width: 110px;
  height: 110px;
  place-items: center;
  margin: 28px auto;
  border: 1px solid rgba(246, 241, 232, 0.58);
  border-radius: 50%;
  font-family: var(--serif-display);
  font-size: 29px;
  letter-spacing: 0.08em;
}

.closing-copy h2 {
  margin-bottom: 18px;
  font-family: var(--type-signature);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.closing-copy > span {
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.21em;
}

.closing-section > small {
  position: absolute;
  right: 0;
  bottom: max(30px, env(safe-area-inset-bottom));
  left: 0;
  color: rgba(246, 241, 232, 0.5);
  font-family: var(--serif-display);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-align: center;
}

/* Floating audio */
.audio-control {
  position: fixed;
  top: max(17px, calc(env(safe-area-inset-top) + 9px));
  right: max(14px, calc((100vw - 390px) / 2 + 14px));
  z-index: 80;
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(246, 241, 232, 0.48);
  border-radius: 50%;
  background: rgba(42, 40, 35, 0.44);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.audio-control[hidden] {
  display: none;
}

.audio-disc {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(246, 241, 232, 0.75);
  border-radius: 50%;
}

.audio-disc::before,
.audio-disc::after,
.audio-disc i {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.audio-disc::before {
  inset: 5px;
  border: 1px solid rgba(246, 241, 232, 0.5);
}

.audio-disc::after {
  inset: 10px;
  background: var(--champagne);
}

.audio-disc i {
  top: 2px;
  right: 2px;
  width: 4px;
  height: 4px;
  background: var(--ivory);
}

.audio-control.is-playing .audio-disc {
  animation: discSpin 4s linear infinite;
}

.audio-control.needs-gesture {
  animation: audioNudge 1.6s ease-in-out infinite;
}

@keyframes discSpin { to { transform: rotate(360deg); } }
@keyframes audioNudge { 50% { transform: scale(1.08); } }

.noscript-message {
  max-width: 480px;
  min-height: 100vh;
  margin: auto;
  padding: 80px 30px;
  background: var(--ivory);
  text-align: center;
}

@media (hover: hover) {
  .outline-button:hover {
    background: var(--ink);
    color: var(--ivory);
  }

  .gallery-card:hover img {
    transform: scale(1.025);
  }
}

@supports not (zoom: 1) {
  @media (max-width: 389px) {
    .mobile-canvas { width: 100%; }
  }
}

@media (min-width: 391px) {
  .invitation-gate,
  .gallery-lightbox {
    background: rgba(28, 28, 24, 0.92);
  }

  .gate-paper {
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.42);
  }
}

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