/* ---------- section frame ---------- */
.section { position: relative; padding: clamp(64px, 10vw, 120px) max(18px, env(safe-area-inset-left)); text-align: center; overflow: clip; }
.section:nth-of-type(odd) { background: radial-gradient(ellipse 90% 60% at 50% 40%, #fff0f4 0%, #fadbe3 55%, #f6ccd8 100%); }
.section:nth-of-type(even) { background: radial-gradient(ellipse 90% 60% at 50% 45%, #fde7ed 0%, #f7d0db 60%, #f2c2cf 100%); }
.section + .section::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,134,46,0.65), transparent);
}
.panel {
  position: relative; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.78), rgba(253,228,236,0.82));
  border: 1px solid rgba(184,134,46,0.55);
  box-shadow: 0 24px 50px rgba(160,70,100,0.16), inset 0 1px 0 rgba(255,255,255,0.9);
}
.panel::after { content: ''; position: absolute; inset: 7px; border-radius: calc(var(--radius) - 6px); border: 1px solid rgba(184,134,46,0.25); pointer-events: none; }

.scene { position: relative; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene.is-3d .fallback { visibility: hidden; }

/* ---------- invitation card ---------- */
.section--card { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: 48px; perspective: 1400px; }
.card-wrap { width: min(600px, 100%); transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.35s ease-out; }
.invite {
  position: relative; border-radius: 10px; padding: clamp(34px, 7vw, 58px) clamp(18px, 6vw, 54px);
  background:
    radial-gradient(ellipse at 50% 28%, rgba(255,226,170,0.35), transparent 55%),
    repeating-linear-gradient(47deg, rgba(255,255,255,0.35) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-47deg, rgba(190,90,120,0.05) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 45%, #fff3f6, #f6c9d5 80%);
  /* stacked edges give the card its paper thickness */
  box-shadow:
    1px 1px 0 #d9b562, 2px 2px 0 #b48a36, 3px 3px 0 #e2c274, 4px 4px 0 #9a7228, 5px 5px 0 #c9a24b, 6px 6px 0 #6f4f17,
    24px 38px 55px rgba(150,60,90,0.28), 0 0 90px rgba(224,168,70,0.25);
  animation: float 7s ease-in-out infinite alternate;
}
@keyframes float { from { translate: 0 -5px; } to { translate: 0 7px; } }
.invite:focus { outline: none; }
.invite::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.45) 48%, transparent 58%) var(--shine, 50%) 0 / 260% 100%; }
.invite__art { position: absolute; inset: 0; pointer-events: none; }
.invite__art svg { position: absolute; }
.invite__body { position: relative; }
.invite .sanskrit { margin-bottom: 8px; }
.invite__small, .invite__label { font: 600 clamp(0.66rem, 2.4vw, 0.82rem)/1.9 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream); }
.invite__lead { margin-top: 18px; font-size: clamp(0.86rem, 3.4vw, 1.12rem); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.6; }
.invite__couple { margin: 22px 0 8px; }
.invite__name { font: 700 clamp(2.3rem, 11vw, 4rem)/1.15 var(--display); letter-spacing: 0.09em; text-transform: uppercase; filter: drop-shadow(0 1px 0 rgba(255,255,255,0.9)); }
.invite__intro { font-style: italic; font-size: clamp(1rem, 4vw, 1.25rem); color: var(--champagne); }
.invite__amp { display: block; font: italic 500 clamp(2.2rem, 9vw, 3.2rem)/1.2 var(--serif); }
.invite__label { margin-top: 16px; color: var(--rose); letter-spacing: 0.32em; }
.invite__date { font: 600 clamp(1.05rem, 4.6vw, 1.6rem)/1.5 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.invite__value { font: 500 clamp(0.95rem, 4vw, 1.2rem)/1.5 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.invite__venue { font: 700 clamp(1.35rem, 5.8vw, 2rem)/1.4 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.invite__closing { max-width: 30ch; margin: 0 auto; font-style: italic; font-weight: 600; font-size: clamp(1rem, 3.8vw, 1.2rem); text-transform: uppercase; letter-spacing: 0.04em; }
.scroll-cue { margin-top: 42px; font: 600 0.68rem var(--display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--champagne); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { opacity: 0.45; transform: translateY(0); } 50% { opacity: 1; transform: translateY(7px); } }

/* ---------- rings ---------- */
.section.section--rings { padding-top: 24px; padding-inline: 0; }
.scene--rings { height: clamp(380px, 76svh, 760px); width: 100%; }
.promise { padding: 0 18px; font: 600 clamp(1.25rem, 4vw, 2.4rem)/1.55 var(--display); letter-spacing: 0.1em; text-transform: uppercase; transition: opacity 1.6s, transform 1.6s; }
.section--rings.is-waiting .promise { opacity: 0; transform: translateY(20px); }
#replayRings { margin-top: 22px; }

/* CSS stand-ins, only visible if WebGL cannot run */
.fallback--rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fallback--rings i { width: min(38vw, 220px); aspect-ratio: 1; border-radius: 50%; border: 14px solid transparent; margin: 0 -22px;
  background: var(--foil) border-box; mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0); filter: drop-shadow(0 12px 14px rgba(150,60,90,0.3)); }
.glyph { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; background: var(--foil); }
.glyph--calendar { border-radius: 12px; box-shadow: inset 0 18px 0 #d77892; border: 3px solid var(--gold); }
.glyph--clock { border-radius: 50%; background: linear-gradient(#5c0a1c 0 0) 50% 28% / 4px 28px no-repeat, linear-gradient(#5c0a1c 0 0) 66% 50% / 22px 4px no-repeat, var(--foil); border: 4px solid var(--gold); }
.glyph--pin { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }

/* ---------- Ganesha ---------- */
.section.section--blessings { padding-top: 40px; }
.scene--ganesha { height: clamp(360px, 68svh, 660px); max-width: 760px; margin: 0 auto 10px; display: grid; place-items: center; }
.scene--ganesha img { width: min(60%, 280px); height: auto; filter: drop-shadow(0 0 30px rgba(240,190,90,0.45)); }
.sanskrit--large { font-size: clamp(1.7rem, 5.4vw, 3rem); }
.blessing { font: 600 clamp(1rem, 3vw, 1.5rem) var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--cream); }

/* ---------- couple ---------- */
.couple { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 6vw, 80px); max-width: 920px; margin: 40px auto 0; }
.person { perspective: 1000px; }
.frame { position: relative; width: min(100%, 360px); aspect-ratio: 4 / 5.2; margin: 0 auto 26px; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.3s ease-out; }
.frame__arch { position: absolute; inset: 6.5% 8.5%; padding: 6px; border-radius: 50% 50% 8px 8px / 34% 34% 8px 8px; background: var(--foil); box-shadow: 0 26px 44px rgba(150,60,90,0.25), 0 0 55px rgba(224,170,72,0.25); }
.frame__photo { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; background: radial-gradient(ellipse at 50% 35%, #fff2f6, #f2bfcd 75%); }
/* the inner gold border sits in front of the photo, so the photo looks tucked behind the frame */
.frame__photo::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 3px #f9dde5, inset 0 0 0 5px var(--gold), inset 0 -14px 18px -10px rgba(120,50,70,0.35); }
.frame__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame__empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 12px; }
.frame__initial { font: 600 clamp(3.4rem, 12vw, 6.4rem)/1 var(--display); width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 50%; position: relative; }
.frame__initial::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--gold); box-shadow: 0 0 0 6px transparent, 0 0 0 7px rgba(201,162,75,0.45); }
.frame__note { font: 600 clamp(0.6rem, 1.9vw, 0.74rem)/1.9 var(--display); letter-spacing: 0.17em; text-transform: uppercase; color: var(--champagne); }
.frame__art { position: absolute; inset: 0; pointer-events: none; transform: translateZ(34px); }
.frame__art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.person__role { font: 600 0.7rem var(--display); letter-spacing: 0.34em; text-transform: uppercase; color: var(--rose); }
.person__name { font: 700 clamp(1.5rem, 5vw, 2.7rem)/1.4 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.person__intro { font-style: italic; font-size: clamp(1.05rem, 3vw, 1.4rem); color: var(--champagne); }

/* ---------- details ---------- */
dt { font: 600 0.68rem var(--display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--rose); }
dd { font: 600 clamp(1.05rem, 2.2vw, 1.3rem)/1.5 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ivory); text-wrap: balance; }
.who { max-width: 920px; margin: 36px auto 24px; padding: clamp(36px, 5vw, 50px) clamp(22px, 4vw, 48px) clamp(36px, 5vw, 48px); }
/* soft golden glow behind the "&" */
.who::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at 50% 40%, rgba(236,196,120,0.24), transparent 52%); }
/* small gold corner brackets */
.who__corner { position: absolute; width: 26px; height: 26px; border: 2px solid var(--gold); pointer-events: none; }
.who__corner:nth-of-type(1) { top: 16px; left: 16px; border-width: 2px 0 0 2px; border-top-left-radius: 8px; }
.who__corner:nth-of-type(2) { top: 16px; right: 16px; border-width: 2px 2px 0 0; border-top-right-radius: 8px; }
.who__corner:nth-of-type(3) { bottom: 16px; left: 16px; border-width: 0 0 2px 2px; border-bottom-left-radius: 8px; }
.who__corner:nth-of-type(4) { bottom: 16px; right: 16px; border-width: 0 2px 2px 0; border-bottom-right-radius: 8px; }
.who__couple { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(12px, 3vw, 40px); }
.who__couple::before {
  content: '&'; grid-column: 2; grid-row: 1; display: grid; place-items: center; width: 1.5em; height: 1.5em; padding-bottom: 0.08em;
  font: italic 500 clamp(2.3rem, 5.4vw, 3.3rem)/1 var(--serif); color: var(--gold);
  border-radius: 50%; border: 1px solid rgba(184,134,46,0.6); background: rgba(255,255,255,0.55);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.45), 0 0 0 7px rgba(184,134,46,0.3), 0 10px 24px rgba(184,134,46,0.22);
}
.who__person:first-child { grid-column: 1; grid-row: 1; }
.who__person:last-child { grid-column: 3; grid-row: 1; }
.who__person dt { color: var(--rose); }
.who__name { margin-top: 8px; font: 700 clamp(1.6rem, 4.2vw, 2.6rem)/1.2 var(--display); letter-spacing: 0.08em; filter: drop-shadow(0 1px 0 rgba(255,255,255,0.9)); }
.who__intro { margin-top: 4px; font: italic 500 clamp(1rem, 2.3vw, 1.2rem)/1.4 var(--serif); letter-spacing: 0; text-transform: none; color: var(--champagne); }
.who__event { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: clamp(22px, 3.6vw, 32px); }
.who__event::before, .who__event::after { content: ''; flex: 1; max-width: 200px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.who__event::after { background: linear-gradient(90deg, var(--gold), transparent); }
.who__event span {
  padding: 11px 22px; border-radius: 999px; white-space: nowrap;
  font: 600 clamp(0.7rem, 1.8vw, 0.86rem)/1 var(--display); letter-spacing: 0.28em; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, #cd6688, #a9476b); box-shadow: 0 8px 18px rgba(160,70,100,0.3), inset 0 0 0 1px rgba(255,226,170,0.75), inset 0 0 0 3px rgba(169,71,107,1), inset 0 0 0 4px rgba(255,226,170,0.5);
}
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 920px; margin: 0 auto; padding-top: 12px; }
.detail { display: flex; flex-direction: column; align-items: center; padding: 38px 20px 30px; transition: translate 0.35s, box-shadow 0.35s; }
.detail:hover { translate: 0 -6px; box-shadow: 0 30px 55px rgba(150,60,90,0.22), 0 0 40px rgba(224,170,72,0.3); }
/* rose ribbon sitting on the top border */
.detail__tag {
  position: absolute; top: 0; left: 50%; translate: -50% -50%; z-index: 1; padding: 8px 18px; border-radius: 999px; white-space: nowrap;
  font: 600 0.66rem/1 var(--display); letter-spacing: 0.26em; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, #cd6688, #a9476b); box-shadow: 0 6px 14px rgba(160,70,100,0.28), inset 0 0 0 1px rgba(255,226,170,0.75);
}
/* icon resting on a soft golden halo */
.detail__icon { position: relative; width: 100%; }
.detail__icon::before { content: ''; position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(250,222,230,0.7) 45%, transparent 70%); box-shadow: inset 0 0 0 1px rgba(184,134,46,0.18); }
.scene--icon { height: 160px; margin-bottom: 6px; }
.detail__body { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; }
.detail__value { font: 700 clamp(1.2rem, 2.3vw, 1.5rem)/1.3 var(--display); letter-spacing: 0.05em; text-transform: uppercase; filter: drop-shadow(0 1px 0 rgba(255,255,255,0.9)); }
.detail__to { display: block; margin: 2px 0; font: italic 500 1rem/1.2 var(--serif); letter-spacing: 0; text-transform: none; }
.detail__rule { position: relative; width: 120px; height: 10px; background:
  linear-gradient(90deg, transparent, var(--gold)) 0 50% / 50px 1px no-repeat,
  linear-gradient(90deg, var(--gold), transparent) 100% 50% / 50px 1px no-repeat; }
.detail__rule::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; translate: -50% -50%; rotate: 45deg; background: var(--foil); }
.detail__sub { font: italic 500 clamp(1.05rem, 2vw, 1.2rem)/1.45 var(--serif); letter-spacing: 0; text-transform: none; color: var(--cream); }
.detail__link { margin-top: 14px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(184,134,46,0.6); font: 600 0.68rem var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--champagne); text-decoration: none; transition: background 0.3s, color 0.3s; }
.detail__link:hover, .detail__link:focus-visible { background: var(--gold); color: #fff; }

/* ---------- countdown ---------- */
.countdown { --h: clamp(78px, 17vw, 150px); --gap: clamp(14px, 3.4vw, 36px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); max-width: 820px; margin: 44px auto 0; padding: clamp(22px, 3.5vw, 34px) clamp(16px, 3.5vw, 34px) clamp(18px, 3vw, 28px); }
.unit { position: relative; }
/* gold ":" between the units */
.unit + .unit::before { content: ''; position: absolute; left: calc(var(--gap) / -2); top: calc(var(--h) / 2); width: 6px; height: 26px; translate: -50% -50%; pointer-events: none;
  background: radial-gradient(circle, var(--gold) 2.5px, transparent 3.2px) 50% 0 / 6px 6px no-repeat, radial-gradient(circle, var(--gold) 2.5px, transparent 3.2px) 50% 100% / 6px 6px no-repeat; }
.unit > span { display: inline-block; margin-top: 14px; padding: 6px 12px; border-radius: 999px; font: 600 clamp(0.54rem, 1.6vw, 0.72rem)/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #cd6688, #a9476b); box-shadow: 0 4px 10px rgba(160,70,100,0.25); }
.flip { position: relative; height: var(--h); perspective: 500px; font: 700 clamp(1.9rem, 7.4vw, 4.4rem)/var(--h) var(--display); color: #7a2c48; font-variant-numeric: tabular-nums; filter: drop-shadow(0 12px 14px rgba(150,60,90,0.22)); }
.flip > span { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; backface-visibility: hidden; }
.flip > span b { position: absolute; left: 0; right: 0; height: var(--h); font-weight: inherit; }
.flip__top, .flip__front { top: 0; border-radius: 14px 14px 0 0; background: linear-gradient(180deg, #ffffff, #fbeef2); border: 1.5px solid rgba(184,134,46,0.75); border-bottom: 1px solid rgba(184,134,46,0.55); transform-origin: bottom; }
.flip__top b, .flip__front b { top: 0; }
.flip__bottom, .flip__back { bottom: 0; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, #f6e1e8, #fff7f9); border: 1.5px solid rgba(184,134,46,0.75); border-top: 0; transform-origin: top; }
/* small gold pins on the hinge */
.flip::after { content: ''; position: absolute; left: -3px; right: -3px; top: 50%; height: 8px; translate: 0 -50%; z-index: 2; pointer-events: none;
  background: radial-gradient(circle, var(--gold) 3px, transparent 3.6px) 0 50% / 8px 8px no-repeat, radial-gradient(circle, var(--gold) 3px, transparent 3.6px) 100% 50% / 8px 8px no-repeat; }
.flip__bottom b, .flip__back b { bottom: 0; }
.flip__front, .flip__back { visibility: hidden; }
.flip.is-flipping .flip__front { visibility: visible; animation: flipFront 0.32s ease-in forwards; }
.flip.is-flipping .flip__back { visibility: visible; animation: flipBack 0.32s 0.32s ease-out both; }
@keyframes flipFront { to { transform: rotateX(-90deg); } }
@keyframes flipBack { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
.countdown__target { margin-top: 30px; font: italic 500 clamp(1.05rem, 2.4vw, 1.3rem)/1.4 var(--serif); color: var(--cream); }
.countdown__target::before, .countdown__target::after { content: ''; display: inline-block; vertical-align: middle; margin: 0 12px; width: clamp(24px, 6vw, 60px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.countdown__target::after { background: linear-gradient(90deg, var(--gold), transparent); }
.begun { margin-top: 36px; font: 700 clamp(1.6rem, 5.5vw, 3.4rem)/1.4 var(--display); letter-spacing: 0.08em; text-transform: uppercase; animation: cue 3s ease-in-out infinite; }

/* ---------- venue ---------- */
.venue { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr); align-items: center; max-width: 920px; margin: 12px auto 0; padding: clamp(40px, 5vw, 52px) clamp(20px, 4vw, 40px) clamp(32px, 4vw, 44px); }
.venue > .who__corner { position: absolute; }
/* pin on a soft golden halo */
.venue__stage { position: relative; grid-column: 1; grid-row: 1; }
.venue__stage::before { content: ''; position: absolute; left: 50%; top: 46%; width: min(86%, 300px); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(250,222,230,0.65) 50%, transparent 71%); box-shadow: inset 0 0 0 1px rgba(184,134,46,0.18); }
.scene--venue { height: 360px; }
/* thin gold line between the pin and the text */
.venue::before { content: ''; grid-column: 2; grid-row: 1; align-self: stretch; width: 1px; margin: 30px clamp(8px, 2vw, 20px); background: linear-gradient(180deg, transparent, var(--gold), transparent); }
.venue__text { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 12px; }
.venue__kicker { font: italic 500 clamp(1.05rem, 2.2vw, 1.25rem)/1 var(--serif); color: var(--rose); }
.venue__name { font: 700 clamp(1.6rem, 3.6vw, 2.5rem)/1.2 var(--display); letter-spacing: 0.08em; text-transform: uppercase; filter: drop-shadow(0 1px 0 rgba(255,255,255,0.9)); }
address { display: flex; flex-direction: column; gap: 2px; font-style: normal; }
.venue__street { font: 600 clamp(1rem, 2.2vw, 1.2rem)/1.5 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ivory); }
.venue__region { font: italic 500 clamp(1.05rem, 2.2vw, 1.2rem)/1.5 var(--serif); color: var(--cream); }
.venue__hint { margin-top: -4px; font: italic 500 0.95rem var(--serif); color: var(--champagne); }
#directions[hidden] + .venue__hint { display: none; }
.venue .btn-royal { position: relative; z-index: 1; margin-top: 10px; }

/* ---------- RSVP ---------- */
.rsvp { max-width: 620px; margin: 36px auto 0; padding: clamp(24px, 5vw, 44px); text-align: left; }
.rsvp form, .rsvp .success, .rsvp .notice { position: relative; z-index: 1; }
fieldset { border: 0; min-width: 0; display: grid; gap: 18px; }
fieldset:disabled { opacity: 0.55; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.field label:not(.choice), .field .label { display: block; margin-bottom: 8px; font: 600 0.72rem var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--champagne); }
.field small { text-transform: none; letter-spacing: 0.04em; font: italic 500 0.9rem var(--serif); }
.field input:not([type=radio]), .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(184,134,46,0.5); background: #fff; color: #4a1a2c;
  font: 600 1.08rem var(--serif);
}
.field textarea { resize: vertical; }
.field [aria-invalid=true] { border-color: #c62839; box-shadow: 0 0 0 2px rgba(198,40,57,0.3); }
.error, .form-status.is-error { color: #b3261e; font-size: 0.98rem; font-weight: 600; }
.error:empty { display: none; }
.error { margin-top: 6px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; place-items: center; height: 100%; min-height: 56px; padding: 10px 12px; text-align: center; border-radius: 12px; border: 1px solid rgba(184,134,46,0.55); background: rgba(255,255,255,0.6); font-weight: 600; transition: background 0.25s, color 0.25s; }
.choice input:checked + span { background: var(--foil); color: #3d0612; border-color: transparent; }
.choice input:focus-visible + span { outline: 2px solid var(--champagne); outline-offset: 3px; }
.trap { position: absolute; left: -9999px; }
#rsvpSubmit { width: 100%; margin-top: 4px; }
#rsvpSubmit span { width: 100%; }
.form-status { margin-top: 18px; text-align: center; }
.form-status:empty { display: none; }
.notice { margin-bottom: 24px; padding: 14px 18px; border-radius: 12px; border: 1px dashed var(--gold); background: rgba(255,255,255,0.6); text-align: center; }
.notice strong { display: block; color: var(--champagne); font-family: var(--display); letter-spacing: 0.08em; }
.success { text-align: center; }
.success:focus { outline: none; }
.success__mark { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--foil); color: #3d0612; font-size: 2.2rem; animation: rise 0.8s both; }
.success h3 { font: 700 2rem var(--display); }
.success p { margin: 8px 0 22px; }

/* ---------- finale ---------- */
.section.section--finale { min-height: max(100svh, 640px); display: flex; flex-direction: column; justify-content: flex-end; padding: 40px 26px calc(56px + env(safe-area-inset-bottom)); }
.scene--finale { position: absolute; inset: 0; }
.scene--finale .fallback--rings { bottom: 45%; }
.finale__border { position: absolute; inset: 14px; pointer-events: none; border-radius: 22px; border: 1.5px solid rgba(184,134,46,0.75); box-shadow: inset 0 0 60px rgba(255,255,255,0.35); }
.finale__border::before { content: ''; position: absolute; inset: 8px; border-radius: 16px; border: 1px solid rgba(184,134,46,0.35); }
/* small gold diamond at the middle of the top and bottom edges */
.finale__border::after { content: ''; position: absolute; left: 50%; top: -6px; width: 11px; height: 11px; translate: -50% 0; rotate: 45deg; background: var(--foil); box-shadow: 0 0 0 3px #f8dbe3; }
.finale__border svg { position: absolute; width: clamp(60px, 12vw, 130px); height: auto; }
.finale__text { position: relative; z-index: 1; text-shadow: 0 1px 12px #fff3f6, 0 0 4px #fff3f6; }
.finale__text::before { content: ''; position: absolute; inset: -60px -26px -20px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(255,242,246,0.85), transparent); }
.finale__lead { max-width: 30ch; margin: 0 auto 10px; font: 600 clamp(1rem, 2.9vw, 1.6rem)/1.6 var(--display); letter-spacing: 0.1em; text-transform: uppercase; text-wrap: balance; }
.finale__lead--soft { font-size: clamp(0.85rem, 2.2vw, 1.15rem); color: var(--champagne); }
.finale__names { margin: 14px 0 4px; font: 700 clamp(1.9rem, 7vw, 4.4rem)/1.3 var(--display); letter-spacing: 0.07em; text-transform: uppercase; text-shadow: none; filter: drop-shadow(0 1px 2px rgba(255,255,255,0.9)) drop-shadow(0 3px 8px rgba(150,60,90,0.25)); }
.finale__love { font: italic 600 clamp(1.1rem, 3vw, 1.5rem) var(--serif); text-transform: uppercase; letter-spacing: 0.2em; color: var(--champagne); }
.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; text-shadow: none; }
.share__status { min-height: 1.6em; margin-top: 10px; font-size: 0.95rem; color: var(--champagne); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); max-width: 420px; row-gap: 40px; }
  .venue { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .venue::before { display: none; }
  .venue__stage, .venue__text { grid-column: 1; grid-row: auto; }
  .scene--venue { height: 270px; }
}
@media (max-width: 620px) {
  /* countdown as a 2 × 2 grid, so the numbers stay large */
  .countdown { --h: 96px; --gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; max-width: 360px; padding: 22px 18px 20px; }
  .countdown .flip { font-size: 2.9rem; }
  .unit + .unit::before { display: none; }
  .countdown__target::before, .countdown__target::after { display: none; }
  .couple { grid-template-columns: minmax(0, 1fr); gap: 52px; }
  .frame { width: min(86%, 320px); }
  .who { max-width: 440px; }
  /* on phones: groom, then "&", then bride */
  .who__couple { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .who__couple::before { grid-column: 1; grid-row: 2; margin: 0 auto; font-size: 2.2rem; }
  .who__person:last-child { grid-column: 1; grid-row: 3; }
  .who__event { gap: 10px; }
  .who__event span { padding: 10px 16px; letter-spacing: 0.2em; }
  .field-row, .choices { grid-template-columns: minmax(0, 1fr); }
  .scene--rings { height: clamp(360px, 64svh, 560px); }
  .scene--ganesha { height: clamp(330px, 56svh, 480px); }
  .share { flex-direction: column; align-items: center; }
  .share .btn-ghost { width: min(100%, 290px); }
}

/* ---------- 3D world behind the page ---------- */
.world { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s; }
/* softly out of focus, like a background behind a portrait, so it never fights with the text */
.world.is-3d canvas { opacity: 1; filter: blur(3px) saturate(0.9); transform: scale(1.02); }
main { position: relative; z-index: 1; }
/* sections become see-through veils, so the corridor shows behind the content */
.has-world .section:nth-of-type(odd),
.has-world .section:nth-of-type(even) {
  /* a calm, almost solid band where the text sits; the corridor shows at the sides */
  background: linear-gradient(90deg, rgba(252,232,239,0.4) 0%, rgba(255,244,247,0.86) 16%, rgba(255,244,247,0.9) 50%, rgba(255,244,247,0.86) 84%, rgba(252,232,239,0.4) 100%);
}
@media (max-width: 620px) {
  .has-world .section:nth-of-type(odd), .has-world .section:nth-of-type(even) { background: rgba(255,244,247,0.84); }
}
/* soft backing behind captions that sit straight on the corridor */
.has-world .person figcaption {
  position: relative; isolation: isolate;
}
.has-world .person figcaption::before {
  content: ''; position: absolute; inset: -10px -18px; z-index: -1; border-radius: 40px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(250,222,231,0.95), rgba(250,222,231,0.6) 58%, transparent 75%);
}
.has-world .section + .section::before { opacity: 0.5; }
.has-world .heading, .has-world .promise, .has-world .sanskrit, .has-world .blessing, .has-world .countdown__target, .has-world .finale__lead {
  filter: drop-shadow(0 0 2px rgba(255,248,250,0.95)) drop-shadow(0 0 10px rgba(255,240,245,0.9));
}
/* panels read as thick gilded slabs */
.panel {
  box-shadow: 0 1px 0 #f1dca8, 0 2px 0 #dfc07a, 0 3px 0 #caa159, 0 4px 0 #b08640, 0 5px 0 #96702f,
    0 26px 50px rgba(150,60,90,0.22), inset 0 1px 0 rgba(255,255,255,0.9);
}
.has-world .panel { background: linear-gradient(160deg, rgba(255,255,255,0.88), rgba(253,232,239,0.9)); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
/* deeper gold for headings over the 3D corridor, so they stay crisp */
.has-world .heading.foil, .has-world .promise.foil, .has-world .sanskrit.foil, .has-world .finale__names.foil {
  background-image: linear-gradient(105deg, #6e4309 0%, #a8761c 24%, #6a420a 44%, #b5842a 60%, #63400a 80%, #946519 100%);
}
/* small lines of text that sit on the corridor get a soft pill behind them */
.has-world .countdown__target, .has-world .blessing, .has-world .finale__love {
  display: inline-block; padding: 6px 18px; border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(252,228,236,0.95), rgba(252,228,236,0.75));
  box-shadow: 0 0 24px 10px rgba(252,228,236,0.7);
}

/* wedding hashtag above the closing words */
.finale__hashtag {
  margin: 0 auto 16px; font: italic 600 clamp(2.1rem, 7.4vw, 3.5rem)/1.2 var(--serif); letter-spacing: 0.03em;
  color: #8a5512; -webkit-text-stroke: 0.5px #8a5512;
  text-shadow: 0 1px 0 #fff, 0 0 14px rgba(255,246,249,0.95), 0 4px 14px rgba(150,60,90,0.25);
}
