*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-bg: #f2f7f2;
  --color-surface: #ffffff;
  --color-tint: #e3eee5;
  --color-text: #14261e;
  --color-muted: #566a60;
  --color-accent: #0f4a37;
  --color-accent-hover: #0a3527;
  --color-gold: #b8893b;
  --color-gold-light: #e6c27a;
  --color-blush: #f7dde0;
  --color-sage: #e2e8d2;
  --color-green: #24402f;
  --color-night: #07241b;
  --color-whatsapp: #1b8f50;
  --color-night-2: #0f4a37;
  --color-on-dark: #f8eee0;
  --color-line: rgba(15, 74, 55, 0.16);
  --swatch-yellow: #f5c542;
  --swatch-orange: #f08a2c;
  --swatch-pink: #ec7a9c;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-display: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --font-script: "Pinyon Script", cursive;
  --font-devanagari: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif;
  --font-sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-width: 1080px;
  --radius: 18px;
  --shadow: 0 6px 30px rgba(7, 36, 27, 0.08);
  --shadow-deep: 0 30px 60px -20px rgba(7, 36, 27, 0.35);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  overflow-x: clip;
  /* only vertical panning: no sideways sliding and no pinch-zoom (swipes in the photo viewer still reach the script) */
  touch-action: pan-y;
}

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

a {
  color: var(--color-accent);
}

/* Opening invitation: a pair of palace doors with a gold seam and a seal; tap the seal and they swing open */

.invite {
  display: none;
}

.js .invite {
  --seal: 118px;
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  perspective: 1800px;
  perspective-origin: 50% 50%;
}

.js .invite[hidden] {
  display: none;
}

.js.invite-open .invite {
  pointer-events: none;
}

html.js:not(.invite-open) {
  overflow: hidden;
}

.invite-flap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 100% 50%, rgba(184, 137, 59, 0.28), transparent 65%),
    linear-gradient(180deg, var(--color-night-2), var(--color-night));
  transition:
    transform 1.8s cubic-bezier(0.65, 0, 0.25, 1),
    opacity 0.5s 1.3s;
}

/* the vertical divider where the two doors meet: a double gold line */
.invite-flap-left {
  left: 0;
  transform-origin: 0 50%;
  border-right: 8px double var(--color-gold);
}

.invite-flap-right {
  right: 0;
  transform-origin: 100% 50%;
  border-left: 8px double var(--color-gold);
  background:
    radial-gradient(ellipse at 0% 50%, rgba(184, 137, 59, 0.28), transparent 65%),
    linear-gradient(180deg, var(--color-night-2), var(--color-night));
}

/* gold frame that runs across both doors */
.invite-flap::before {
  content: "";
  position: absolute;
  inset: 14px 0 14px 14px;
  border: 1px solid rgba(230, 194, 122, 0.5);
  border-right: 0;
  border-radius: 10px 0 0 10px;
}

.invite-flap-right::before {
  inset: 14px 14px 14px 0;
  border: 1px solid rgba(230, 194, 122, 0.5);
  border-left: 0;
  border-radius: 0 10px 10px 0;
}

/* shading that deepens as each door swings away */
.invite-flap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.55));
  opacity: 0;
  transition: opacity 1.8s;
}

.invite-flap-right::after {
  background: linear-gradient(270deg, transparent, rgba(0, 0, 0, 0.55));
}

/* carved arch panel: the two panels join into one arch when the doors are shut */
.door-panel {
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: clamp(28px, 8vw, 56px);
  right: 22px;
  border: 2px solid var(--color-gold);
  border-radius: 100vw 0 0 0;
  background:
    linear-gradient(180deg, rgba(15, 74, 55, 0.5), rgba(7, 36, 27, 0.15));
  box-shadow:
    inset 0 0 0 6px var(--color-night),
    inset 0 0 0 7px rgba(230, 194, 122, 0.55),
    inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.invite-flap-right .door-panel {
  left: 22px;
  right: clamp(28px, 8vw, 56px);
  border-radius: 0 100vw 0 0;
  background:
    linear-gradient(180deg, rgba(15, 74, 55, 0.5), rgba(7, 36, 27, 0.15));
}

/* a column of brass studs beside the seam */
.door-studs {
  position: absolute;
  top: 12px;
  bottom: 12px;
  right: 6px;
  width: 12px;
  background: radial-gradient(circle, var(--color-gold-light) 0 1.5px, var(--color-gold) 2.5px, transparent 3.5px) 50% 0 / 12px 26px repeat-y;
}

.invite-flap-right .door-studs {
  right: auto;
  left: 6px;
}

/* three gold hinge plates on the outer edge */
.door-hinges {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14px;
  background:
    linear-gradient(90deg, var(--color-gold-light), var(--color-gold)) 0 16% / 100% 34px no-repeat,
    linear-gradient(90deg, var(--color-gold-light), var(--color-gold)) 0 50% / 100% 34px no-repeat,
    linear-gradient(90deg, var(--color-gold-light), var(--color-gold)) 0 84% / 100% 34px no-repeat;
  border-radius: 0 4px 4px 0;
  opacity: 0.85;
}

.invite-flap-right .door-hinges {
  left: auto;
  right: 0;
  border-radius: 4px 0 0 4px;
}

/* brass door ring beside the seam, below the seal */
.door-ring {
  position: absolute;
  top: 70%;
  right: 22px;
  width: 36px;
  height: 36px;
  border: 4px solid var(--color-gold);
  border-radius: 50%;
  background: radial-gradient(circle, transparent 55%, rgba(0, 0, 0, 0.35));
  box-shadow:
    0 6px 10px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px var(--color-gold-light);
}

.invite-flap-right .door-ring {
  right: auto;
  left: 22px;
}

.invite-front {
  position: absolute;
  inset: 0;
  color: var(--color-on-dark);
  text-align: center;
  pointer-events: none;
  transition: opacity 0.5s, transform 0.6s var(--ease-out);
}

.invite-seal {
  position: absolute;
  top: calc(50% - var(--seal) / 2);
  left: calc(50% - var(--seal) / 2);
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  width: var(--seal);
  height: var(--seal);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f8e3a8, var(--color-gold) 55%, #7d5a1f);
  box-shadow:
    0 0 0 6px rgba(230, 194, 122, 0.18),
    0 0 0 7px rgba(230, 194, 122, 0.55),
    inset 0 -6px 12px rgba(0, 0, 0, 0.3),
    0 18px 40px rgba(0, 0, 0, 0.55);
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--color-night);
  cursor: pointer;
  pointer-events: auto;
  animation: seal-pulse 2.4s ease-in-out infinite;
  transition: transform 0.5s var(--ease-out), opacity 0.4s;
}

.invite-seal::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(7, 36, 27, 0.5);
  border-radius: 50%;
}

.is-loading .invite-seal {
  animation: none;
  opacity: 0.75;
  cursor: progress;
}

.is-loading .invite-seal::before {
  animation: seal-spin 2.4s linear infinite;
}

.invite-seal span {
  margin: 0 0.05em;
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--color-accent-hover);
}

.invite-seal:focus-visible {
  outline: 2px solid var(--color-gold-light);
  outline-offset: 10px;
}

.invite-hint {
  position: absolute;
  top: calc(50% + var(--seal) / 2 + 1.75rem);
  left: 0;
  right: 0;
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(248, 238, 224, 0.75);
  animation: hint-fade 2.4s ease-in-out infinite;
}

.invite-open .invite-seal {
  animation: none;
  transform: scale(1.35);
  opacity: 0;
}

.invite-open .invite-front {
  opacity: 0;
  transform: scale(1.08);
}

/* doors open inwards, hinged at the outer edges */
.invite-open .invite-flap-left {
  transform: rotateY(78deg);
  opacity: 0;
}

.invite-open .invite-flap-right {
  transform: rotateY(-78deg);
  opacity: 0;
}

.invite-open .invite-flap::after {
  opacity: 1;
}

@keyframes seal-pulse {
  50% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 10px rgba(230, 194, 122, 0.12),
      0 0 0 11px rgba(230, 194, 122, 0.45),
      inset 0 -6px 12px rgba(0, 0, 0, 0.3),
      0 18px 50px rgba(230, 194, 122, 0.35);
  }
}

@keyframes seal-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hint-fade {
  50% {
    opacity: 0.35;
  }
}

@keyframes reveal-glow {
  50% {
    text-shadow: 0 0 18px rgba(230, 194, 122, 0.7);
  }
}

@keyframes petal-burst {
  from {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
  }
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 3rem 1.25rem 5rem;
  overflow: hidden;
  text-align: center;
  color: var(--color-on-dark);
  background:
    radial-gradient(ellipse at 50% 35%, rgba(184, 137, 59, 0.22), transparent 60%),
    radial-gradient(ellipse at 50% 120%, var(--color-night-2), transparent 70%),
    var(--color-night);
}

/* fixed to the screen, so the petals keep falling all the way down the page to the footer */
.hero-canvas {
  position: fixed;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s;
}

.is-petalling .hero-canvas {
  opacity: 1;
}

.hero-stage {
  position: relative;
  perspective: 1200px;
}

.hero-card {
  position: relative;
  padding: 3.25rem clamp(1.5rem, 6vw, 4.5rem) 3.5rem;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
  animation: hero-enter 1.6s var(--ease-out) backwards;
}

.js:not(.invite-open) .hero-card {
  opacity: 0;
  animation: none;
}

.js.invite-open .hero-card {
  animation: hero-enter 1.6s var(--ease-out) 0.6s backwards;
}

.hero-card > * {
  transform: translateZ(50px);
}

.hero-card h1 {
  transform: translateZ(110px);
}

.hero-arch {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(230, 194, 122, 0.45);
  border-radius: 260px 260px var(--radius) var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 0 0 8px rgba(230, 194, 122, 0.06),
    0 40px 80px -30px rgba(0, 0, 0, 0.6);
  transform: translateZ(-40px) !important;
}

.hero-arch::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(230, 194, 122, 0.25);
  border-radius: inherit;
}

.hero-card > .ganesh {
  margin: 0 auto 0.75rem;
  transform: translateZ(120px);
}

.hero-card > .ganesh {
  position: relative;
  isolation: isolate;
}

/* slow gold light rays behind the medallion, never over it */
.hero-card > .ganesh::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -71px;
  left: 50%;
  width: 250px;
  height: 250px;
  margin-left: -125px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(230, 194, 122, 0.28) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, transparent 0 40%, #000 42%, transparent 70%);
  mask: radial-gradient(circle, transparent 0 40%, #000 42%, transparent 70%);
  animation: rays-spin 60s linear infinite;
}

.ganesh-medallion {
  width: 108px;
  height: 108px;
  margin: 0 auto 0.6rem;
  padding: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 2px var(--color-gold-light),
    0 0 0 6px rgba(230, 194, 122, 0.18),
    0 0 0 7px rgba(230, 194, 122, 0.5),
    0 0 28px rgba(230, 194, 122, 0.45);
  animation: ganesh-glow 4s ease-in-out infinite;
}

.ganesh-medallion img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ganesh-mantra {
  margin: 0;
  font-family: var(--font-devanagari);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--color-gold-light);
}

@keyframes ganesh-glow {
  50% {
    box-shadow:
      0 0 0 2px var(--color-gold-light),
      0 0 0 6px rgba(230, 194, 122, 0.18),
      0 0 0 7px rgba(230, 194, 122, 0.5),
      0 0 44px rgba(230, 194, 122, 0.75);
  }
}

.hero-eyebrow,
.section-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--color-gold);
}

.hero-eyebrow {
  color: var(--color-gold-light);
}

.hero h1 {
  /* the gold gradient only paints inside the element's box, so the script font's tails
     (the y in Ashay, the flourishes at the sides) need padding to stay visible; the negative margins keep the layout as it was */
  margin: calc(0.5rem - 0.08em) -0.15em calc(0.5rem - 0.35em);
  padding: 0.08em 0.15em 0.35em;
  font-family: var(--font-script);
  font-size: clamp(3.6rem, 13vw, 7rem);
  font-weight: 400;
  line-height: 1.15;
  background: linear-gradient(
    100deg,
    var(--color-on-dark) 20%,
    var(--color-gold-light) 42%,
    var(--color-surface) 50%,
    var(--color-gold-light) 58%,
    var(--color-on-dark) 80%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.5));
  animation: name-shimmer 7s linear infinite;
}

.hero-amp {
  -webkit-text-fill-color: var(--color-gold-light);
  display: block;
  font-family: var(--font-script);
  font-size: 0.7em;
  line-height: 1.1;
  color: var(--color-gold-light);
}

.hero-sub-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 1.5rem);
  margin-top: 0.75rem;
}

.hero-sub-row .hero-sub {
  margin: 0;
}

/* a small Varmala couple on each side of the line, the right one mirrored */
.hero-art {
  flex: none;
  width: clamp(46px, 15vw, 88px);
  height: auto;
  filter: drop-shadow(0 0 10px rgba(230, 194, 122, 0.4)) drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
  animation: art-float 5s ease-in-out infinite;
}

.hero-art-flip {
  transform: scaleX(-1);
  animation-delay: -2.5s;
}

.hero-sub {
  margin: 0.75rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  color: rgba(248, 238, 224, 0.8);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 220px;
  margin: 1.5rem auto;
  color: var(--color-gold);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.6;
}

.hero-date {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600;
}

.hero-place {
  margin: 0.25rem 0 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: rgba(248, 238, 224, 0.7);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2.5vw, 1.25rem);
  margin-bottom: 1.75rem;
}

.cd-unit {
  min-width: 4.6rem;
  padding: 0.75rem 0.5rem 0.5rem;
  border: 1px solid rgba(230, 194, 122, 0.3);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.6);
  perspective: 300px;
}

.cd-unit span {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--color-gold-light);
  transform-origin: 50% 60%;
}

.cd-unit span.is-flipping {
  animation: digit-flip 0.55s var(--ease-out);
}

.cd-unit small {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 238, 224, 0.65);
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1.5px solid rgba(230, 194, 122, 0.6);
  border-radius: 14px;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--color-gold-light);
  animation: scroll-cue 1.8s ease-in-out infinite;
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: rotateX(25deg) translateY(60px) scale(0.92);
  }
}

@keyframes art-float {
  0%,
  100% {
    translate: 0 0;
    rotate: -2.5deg;
  }
  50% {
    translate: 0 -7px;
    rotate: 2.5deg;
  }
}

@keyframes name-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes rays-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes digit-flip {
  from {
    opacity: 0;
    transform: rotateX(-90deg);
  }
}

@keyframes scroll-cue {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* scratch-off card: gold foil over "You are invited" */
.scratch {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  height: 4.75rem;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(230, 194, 122, 0.45);
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 50%, var(--color-night-2), var(--color-night));
  cursor: pointer;
}

.scratch:focus-visible {
  outline: 2px solid var(--color-gold-light);
  outline-offset: 3px;
}

.scratch-text {
  margin: 0;
  font-family: var(--font-script);
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--color-gold-light);
}

.scratch-text small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(248, 238, 224, 0.75);
}

.is-scratched .scratch-text {
  animation: reveal-glow 2.4s ease-in-out infinite;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  transition: opacity 0.8s;
}

.is-scratched .scratch-canvas {
  opacity: 0;
  pointer-events: none;
}

/* petals that fly out from the scratch card when it is revealed */
.burst-petal {
  position: fixed;
  z-index: 120;
  left: var(--x);
  top: var(--y);
  width: 10px;
  pointer-events: none;
  height: 14px;
  border-radius: 0 100% 0 100%;
  background: var(--swatch-pink);
  animation: petal-burst var(--t) cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}

.burst-petal:nth-child(3n) {
  background: var(--swatch-orange);
}

.burst-petal:nth-child(3n + 1) {
  background: var(--swatch-yellow);
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--color-accent);
  box-shadow: 0 10px 20px -10px rgba(15, 74, 55, 0.7);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-whatsapp {
  color: var(--color-surface);
  background: var(--color-whatsapp);
  box-shadow: 0 10px 20px -10px rgba(27, 143, 80, 0.7);
}

.btn-whatsapp:hover {
  box-shadow: 0 14px 26px -10px rgba(27, 143, 80, 0.85);
}

.btn-outline {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: transparent;
}

.btn-outline:hover {
  color: #fff;
  background: var(--color-accent);
}

/* Sections */

.section {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5.5rem 1.25rem;
  text-align: center;
}

.section-tinted {
  max-width: none;
  background:
    radial-gradient(rgba(184, 137, 59, 0.16) 1px, transparent 1.5px) 0 0 / 24px 24px,
    var(--color-tint);
}

.section::before {
  content: "✦";
  position: absolute;
  top: -14px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  background: var(--color-bg);
  font-size: 0.8rem;
  line-height: 1;
  color: var(--color-gold);
}

.section-tinted::before {
  background: var(--color-tint);
}

.section-tinted > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  margin-top: 0;
  margin-bottom: 2.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

.section h2::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin: 0.9rem auto 0;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  transition: width 1.2s var(--ease-out) 0.4s;
}

.reveal.is-visible h2::after {
  width: 130px;
}

.section-lead {
  margin: -1.5rem auto 2rem;
  color: var(--color-muted);
}

.reveal {
  opacity: 0;
  transform: perspective(1200px) translateY(60px) rotateX(4deg);
  transform-origin: 50% 0;
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

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

/* 3D tilt, driven by --rx / --ry from main.js */

[data-tilt] {
  position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out), box-shadow 0.4s, translate 0.4s var(--ease-out);
}

[data-tilt].is-tilting {
  transition: transform 0.1s linear, box-shadow 0.4s, translate 0.4s var(--ease-out);
  box-shadow: var(--shadow-deep);
}

[data-tilt]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 255, 255, 0.45),
    transparent 55%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

[data-tilt].is-tilting::after {
  opacity: 1;
}

/* Story: a timeline whose line draws itself as you scroll */

.photo-placeholder {
  margin: 0;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e2ede4, #cfe0d4);
  border-radius: var(--radius);
  color: var(--color-muted);
  font-size: 0.875rem;
}

.timeline {
  --progress: 0;
  position: relative;
  max-width: 920px;
  margin: 3.5rem auto 0;
  padding: 0;
  list-style: none;
}

.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--color-line);
}

.timeline::after {
  background: linear-gradient(180deg, var(--color-gold-light), var(--color-gold));
  transform: scaleY(var(--progress));
  transform-origin: 50% 0;
}

.moment {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 2.25rem 0;
  perspective: 1000px;
}

.moment::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  background: var(--color-bg);
  transition: background 0.5s, box-shadow 0.5s;
}

.moment.is-visible::before {
  background: var(--color-gold);
  box-shadow: 0 0 0 6px rgba(184, 137, 59, 0.18);
}

.moment > * {
  opacity: 0;
  translate: -50px 0;
  rotate: y 25deg;
  transition: opacity 0.9s var(--ease-out), translate 0.9s var(--ease-out), rotate 0.9s var(--ease-out);
}

.moment:nth-child(even) > * {
  translate: 50px 0;
  rotate: y -25deg;
}

.moment.is-visible > * {
  opacity: 1;
  translate: 0 0;
  rotate: none;
}

.moment .photo-placeholder {
  justify-self: end;
  width: 100%;
  max-width: 300px;
  border-radius: 150px 150px var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

.moment .photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* photos fade in once loaded (main.js adds is-loaded) */
.js .moment .photo-placeholder img,
.js .couple-portrait img,
.js .memory img {
  opacity: 0;
  transition: opacity 0.9s var(--ease-out);
}

.js .moment .photo-placeholder img.is-loaded,
.js .couple-portrait img.is-loaded,
.js .memory img.is-loaded {
  opacity: 1;
}

.moment-text {
  text-align: left;
}

.moment:nth-child(even) .photo-placeholder {
  order: 2;
  justify-self: start;
}

.moment:nth-child(even) .moment-text {
  text-align: right;
}

.moment-date {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-gold);
}

.moment-icon {
  margin-right: 0.35rem;
  font-size: 1.2rem;
}

.moment-text h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--color-accent);
}

.moment-text p:last-child {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.6;
}

.moment-final {
  grid-template-columns: 1fr;
  gap: 1rem;
  justify-items: center;
  padding-bottom: 0;
}

.moment-final::before {
  display: none;
}

.moment-art {
  width: min(100%, 260px);
  height: auto;
  background: var(--color-bg);
}

.moment-final .moment-text {
  max-width: 520px;
  padding: 0.5rem 1rem 0;
  text-align: center !important;
  background: var(--color-bg);
}

/* Events */

/* Cards: a continuous gold border with a fine inner frame, like a printed invitation */

.event-card,
.info-card,
.venue-card,
.outfit-face {
  --face-tint: var(--color-surface);
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg, var(--face-tint) 0, var(--color-surface) 55%) padding-box,
    linear-gradient(145deg, var(--color-gold-light), var(--color-gold) 40%, var(--color-gold-light) 70%, var(--color-gold)) border-box;
}

.event-card::before,
.info-card::before,
.venue-card::before,
.outfit-face::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(184, 137, 59, 0.35);
  border-radius: calc(var(--radius) - 7px);
  pointer-events: none;
}

.event-card:hover,
.info-card:hover,
.outfit:hover .outfit-face {
  box-shadow: 0 20px 40px -18px rgba(184, 137, 59, 0.6);
}

.event-card:hover,
.info-card:hover {
  translate: 0 -4px;
}

.couple-portrait {
  width: min(100%, 280px);
  margin: 0 auto 3rem;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 6px double var(--color-gold);
  border-radius: 150px 150px var(--radius) var(--radius);
  box-shadow: var(--shadow-deep);
}

.couple-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-note {
  min-height: 1.6em;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.event-day + .event-day {
  margin-top: 3rem;
}

.day-heading {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
}

.event-card {
  padding: 2.25rem 1.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.event-card,
.info-card,
.outfit {
  --i: 0;
}

.event-card:nth-child(2),
.info-card:nth-child(2) {
  --i: 1;
}

.info-card:nth-child(3) {
  --i: 2;
}

.info-card:nth-child(4) {
  --i: 3;
}

.reveal.is-visible .event-card,
.reveal.is-visible .info-card,
.reveal.is-visible .outfit {
  animation: card-in 0.9s var(--ease-out) backwards;
  animation-delay: calc(var(--i) * 0.14s + 0.2s);
}

/* every illustration gets the same-size frame; the picture is scaled to fit inside it, whatever its shape */
.event-art {
  display: block;
  width: 100%;
  height: 190px;
  margin: 0 auto 0.75rem;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(7, 36, 27, 0.22));
}

.event-link {
  margin-top: 1rem;
  padding: 0.6rem 1.4rem;
}

.event-card > * {
  transform: translateZ(30px);
}

.event-card h4 {
  margin: 0.9rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-accent);
}

.event-card p {
  margin: 0;
  color: var(--color-muted);
}

.event-time {
  display: inline-block;
  padding: 0.3rem 1rem;
  border: 1px solid rgba(184, 137, 59, 0.45);
  border-radius: 999px;
  background: rgba(184, 137, 59, 0.12);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent) !important;
}

.event-theme {
  margin-bottom: 0.5rem !important;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-text) !important;
}

.event-theme::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 0.7rem auto 0.6rem;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.event-dress {
  margin-top: 1rem !important;
  padding: 0.6rem 0.9rem;
  border: 1px dashed rgba(184, 137, 59, 0.5);
  border-radius: 10px;
  background: var(--color-tint);
  font-style: italic;
  font-size: 0.95rem;
}

.events-more {
  margin-top: 2.5rem;
}

.event-grid-single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* Dress code */

.wardrobe-toggle {
  position: relative;
  display: inline-flex;
  gap: 0.35rem;
  margin: 0 auto 3rem;
  padding: 0.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.wardrobe-toggle button {
  padding: 0.55rem 1.4rem 0.65rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-script);
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--color-muted);
  cursor: pointer;
  transition: background 0.35s var(--ease-out), color 0.35s;
}

.wardrobe-toggle small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.wardrobe-toggle button[data-side="ladies"].is-active {
  color: var(--color-accent);
  background: var(--color-tint);
  border: 1px solid var(--color-gold);
}

.wardrobe-toggle button[data-side="gents"].is-active {
  color: var(--color-green);
  background: var(--color-sage);
}

.wardrobe-toggle button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.wardrobe {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 1.75rem;
}

.wardrobe-single {
  grid-template-columns: minmax(0, 340px);
  justify-content: center;
}

.outfit {
  border-radius: var(--radius);
}

.outfit::after {
  display: none;
}

.outfit-inner {
  display: grid;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 70ms);
}

.wardrobe.is-gents .outfit-inner {
  transform: rotateY(180deg);
}

.outfit-face {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.5rem 1.75rem;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow);
}

.outfit-ladies {
  --face-tint: var(--color-blush);
}

.outfit-gents {
  --face-tint: var(--color-sage);
  transform: rotateY(180deg);
}

.outfit-face img {
  width: 160px;
  height: auto;
  margin-bottom: 1.1rem;
  border-radius: 90px 90px 12px 12px;
  box-shadow: 0 14px 26px -14px rgba(7, 36, 27, 0.55);
}

.outfit-face h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.outfit-gents h3 {
  color: var(--color-green);
}

.outfit-theme {
  margin: 0.15rem 0 0.6rem;
  padding: 0 0.9rem;
  font-family: var(--font-script);
  font-size: 1.45rem;
  color: var(--color-accent);
  background: linear-gradient(90deg, transparent, var(--color-blush) 15%, var(--color-blush) 85%, transparent);
}

.outfit-gents .outfit-theme {
  color: var(--color-green);
  background: linear-gradient(90deg, transparent, var(--color-sage) 15%, var(--color-sage) 85%, transparent);
}

.outfit-face p:not(.outfit-theme) {
  margin: 0;
  max-width: 26ch;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--color-text);
}

.swatches {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.swatches i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  background: var(--swatch-yellow);
}

.swatches i:nth-child(2) {
  background: var(--swatch-orange);
}

.swatches i:nth-child(3) {
  background: var(--swatch-pink);
}

.wardrobe-sign {
  margin: 3rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Venue */

.venue-card {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.venue-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
}

.venue-card p {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
}

.map-embed {
  margin: 0 0 1.75rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--color-line);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Travel */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1.5rem;
  text-align: left;
}

.info-card {
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-card > * {
  transform: translateZ(25px);
}

.info-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--color-accent);
  background: var(--color-blush);
}

.info-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-accent);
}

.info-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.975rem;
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 340px));
  justify-content: center;
}

.contact-role {
  margin: 0;
  color: var(--color-muted);
}

.contact-number {
  margin: 0.75rem 0 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-actions .btn {
  padding: 0.65rem 1.4rem;
}

/* Gallery: a rotating 3D ring of photos */

.carousel {
  --card-w: 220px;
  --ring-r: 300px;
  height: calc(var(--card-w) * 1.25 + 4rem);
  perspective: 1400px;
  display: grid;
  place-items: center;
}

.carousel-ring {
  position: relative;
  width: var(--card-w);
  aspect-ratio: 4 / 5;
  transform-style: preserve-3d;
  animation: carousel-spin 36s linear infinite;
}

.carousel:hover .carousel-ring,
.carousel:focus-within .carousel-ring {
  animation-play-state: paused;
}

.memory {
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  cursor: zoom-in;
}

.memory img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.memory:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

.carousel-ring .photo-placeholder {
  position: absolute;
  inset: 0;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(var(--ring-r));
}

@keyframes carousel-spin {
  from {
    transform: rotateX(-6deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-6deg) rotateY(-360deg);
  }
}

/* Lightbox: full-screen photo viewer for Memories */

html:has(.lightbox[open]) {
  overflow: hidden;
}

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: var(--color-on-dark);
}

.lightbox[open] {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.lightbox::backdrop {
  background: rgba(7, 36, 27, 0.94);
  backdrop-filter: blur(6px);
}

.lightbox-stage {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin: 0;
  perspective: 1200px;
}

.lightbox-media {
  width: min(80vw, 560px, calc(75dvh * 0.8));
  aspect-ratio: 4 / 5;
}

.lightbox-media.is-entering {
  animation: lightbox-in 0.55s var(--ease-out);
}

.lightbox-media img,
.lightbox-media .photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}

.lightbox-media img {
  object-fit: cover;
}

.lightbox figcaption {
  display: grid;
  gap: 0.25rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.lightbox figcaption small {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: rgba(248, 238, 224, 0.6);
}

.lightbox-nav,
.lightbox-close {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0 0 4px;
  border: 1px solid rgba(230, 194, 122, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 2rem;
  line-height: 1;
  color: var(--color-gold-light);
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-nav:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid var(--color-gold-light);
  outline-offset: 3px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: rotateY(var(--from, 0deg)) scale(0.88);
  }
}

/* FAQ */

.faq {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}

.faq details {
  border-bottom: 1px solid var(--color-line);
}

.faq summary {
  position: relative;
  padding: 1.1rem 2rem 1.1rem 0;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  color: var(--color-gold);
  font-size: 1.5rem;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
}

/* Footer */

.site-footer {
  padding: 3.5rem 1.25rem;
  text-align: center;
  color: rgba(248, 238, 224, 0.7);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  background: var(--color-night);
}

.site-footer p {
  margin: 0;
}

.footer-names {
  margin-bottom: 0.25rem !important;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  letter-spacing: 0;
  color: var(--color-on-dark);
}

.footer-names span {
  font-family: var(--font-script);
  color: var(--color-gold-light);
}

.footer-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--color-gold-light);
  text-underline-offset: 4px;
}

/* Music: a small mute button in the corner */

/* Sky shots: the firework canvas that main.js adds for a few seconds */

.skyshot-canvas {
  position: fixed;
  inset: 0;
  z-index: 7;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.music-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 110;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(230, 194, 122, 0.6);
  border-radius: 50%;
  background: rgba(7, 36, 27, 0.85);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.6);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-gold-light);
  cursor: pointer;
}

.js:not(.invite-open) .music-toggle {
  display: none;
}

/* a slash through the note while the music is off */
.music-toggle:not(.is-playing)::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 2px;
  background: var(--color-gold-light);
  transform: rotate(-45deg);
}

.music-toggle.is-playing {
  animation: seal-pulse 2.4s ease-in-out infinite;
}

.music-toggle:focus-visible {
  outline: 2px solid var(--color-gold-light);
  outline-offset: 3px;
}

/* Sparkles: gold stars that follow the mouse and burst where you tap */

.sparkle {
  position: fixed;
  z-index: 130;
  left: var(--x);
  top: var(--y);
  width: var(--size, 10px);
  height: var(--size, 10px);
  margin: calc(var(--size, 10px) / -2) 0 0 calc(var(--size, 10px) / -2);
  background: var(--color-gold-light);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  pointer-events: none;
  animation: sparkle-out 0.9s ease-out forwards;
}

@keyframes card-in {
  from {
    opacity: 0;
    translate: 0 40px;
  }
}

@keyframes sparkle-out {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(180deg) scale(0);
  }
}

/* Responsive */

@media (min-width: 761px) {
  .hero-amp {
    display: inline;
    margin: 0 0.15em;
  }
}

@media (max-width: 760px) {
  /* a fixed-width column keeps the arch the same distance from both edges, whatever the content does */
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: 0.75rem 0.25rem 2.5rem;
  }

  .hero-stage {
    width: 100%;
  }

  .hero-card {
    padding: 3.25rem 2.25rem 1.75rem;
    transform: none;
    transform-style: flat;
  }

  /* a compact hero so the scratch card is on the first screen without scrolling */
  .ganesh-medallion {
    width: 84px;
    height: 84px;
    margin-bottom: 0.4rem;
  }

  .hero-card > .ganesh::before {
    top: -58px;
    width: 200px;
    height: 200px;
    margin-left: -100px;
  }

  .ganesh-mantra {
    font-size: 0.95rem;
  }

  .hero-eyebrow {
    margin-bottom: 0.15rem;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 11.5vw, 3.4rem);
  }

  .hero-amp {
    display: inline;
    margin: 0 0.1em;
  }

  .hero-sub-row {
    margin-top: 0;
  }

  .hero-art {
    width: clamp(38px, 11vw, 50px);
  }

  .hero-sub {
    font-size: 1.1rem;
  }

  .divider {
    margin: 0.7rem auto;
  }

  .hero-date {
    font-size: 1.2rem;
  }

  .hero-place {
    margin-bottom: 0.9rem;
    font-size: 0.75rem;
  }

  .scratch {
    height: 4rem;
    margin-bottom: 1rem;
  }

  /* no 3D depth on phones: it pushes Ganesh ji and the text off the arch */
  .hero-stage {
    perspective: none;
  }

  .hero-card > *,
  .hero-card > .ganesh,
  .hero-card h1 {
    transform: none;
  }

  .hero-arch {
    transform: none !important;
  }

  /* the top radius is exactly half the card's width (100vw minus the hero's side padding), so the top is a true semicircle */
  .hero-arch {
    border-radius: calc(50vw - 0.25rem) calc(50vw - 0.25rem) var(--radius) var(--radius);
  }

  .music-toggle {
    right: 0.6rem;
    bottom: 0.6rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  /* a tall section tilted in 3D measures far bigger than it is; on phones just slide it up */
  .reveal {
    transform: translateY(40px);
  }

  .cd-unit {
    flex: 1 1 0;
    min-width: 0;
    max-width: 5.5rem;
  }

  .timeline::before,
  .timeline::after {
    left: 9px;
  }

  .moment {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem 0 1.5rem 2.5rem;
  }

  .moment::before {
    top: 2.25rem;
    left: 9px;
  }

  .moment:not(.is-visible) > * {
    translate: 40px 0;
    rotate: y -20deg;
  }

  .moment .photo-placeholder,
  .moment:nth-child(even) .photo-placeholder {
    order: 0;
    justify-self: start;
    max-width: 260px;
  }

  .moment:nth-child(even) .moment-text {
    text-align: left;
  }

  .moment-final {
    justify-items: start;
  }

  .moment-final .moment-text {
    padding: 0;
    text-align: left !important;
  }

  .lightbox[open] {
    grid-template-columns: 1fr 1fr;
    align-content: center;
  }

  .lightbox-stage {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .lightbox-prev {
    justify-self: end;
  }

  .wardrobe-toggle button {
    padding: 0.5rem 0.9rem 0.6rem;
    font-size: 1.25rem;
  }

  .wardrobe {
    grid-template-columns: 1fr;
  }

  .carousel {
    --card-w: 150px;
    --ring-r: 200px;
  }

  .venue-card {
    padding: 1.75rem 1.25rem;
  }

  .hero-eyebrow,
  .section-eyebrow {
    letter-spacing: 0.18em;
  }

  .hero-place {
    letter-spacing: 0.12em;
  }

  .lightbox {
    padding: 0.75rem;
  }

  .lightbox-media {
    width: min(86vw, 560px, calc(70dvh * 0.8));
  }
}

@media (max-width: 400px) {
  .hero {
    padding-inline: 0.125rem;
  }

  .hero-card {
    padding-inline: 1.375rem;
  }

  .hero-arch {
    border-radius: calc(50vw - 0.125rem) calc(50vw - 0.125rem) var(--radius) var(--radius);
  }

  .countdown {
    gap: 0.4rem;
  }

  .cd-unit {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 0.25rem;
  }

  .cd-unit small {
    letter-spacing: 0.1em;
  }

  .carousel {
    --card-w: 130px;
    --ring-r: 170px;
  }

  .event-card {
    padding-inline: 1.1rem;
  }
}

@media (max-height: 520px) {
  .js .invite {
    --seal: 76px;
  }

  .invite-seal {
    font-size: 1.6rem;
  }

  .invite-hint {
    display: none;
  }

  .door-ring {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .music-toggle.is-playing,
  .hero-card > .ganesh::before,
  .hero-art,
  .hero h1,
  .reveal.is-visible .event-card,
  .reveal.is-visible .info-card,
  .reveal.is-visible .outfit,
  .hero-card,
  .js.invite-open .hero-card,
  .invite-seal,
  .is-loading .invite-seal::before,
  .invite-hint,
  .ganesh-medallion,
  .scroll-cue span,
  .cd-unit span.is-flipping {
    animation: none;
  }

  .outfit-inner {
    transition: none;
  }

  .section h2::after {
    width: 130px;
    transition: none;
  }

  .sparkle,
  .hero-canvas {
    display: none;
  }

  .invite-flap {
    transition: opacity 0.5s;
  }

  .is-scratched .scratch-text,
  .invite-hint {
    animation: none;
  }

  .scratch-canvas {
    transition: none;
  }

  .invite-open .invite-flap-left,
  .invite-open .invite-flap-right {
    transform: none;
  }

  .timeline {
    --progress: 1;
  }

  .moment > *,
  .moment:nth-child(even) > * {
    opacity: 1;
    translate: none;
    rotate: none;
    transition: none;
  }

  .lightbox-media.is-entering {
    animation: none;
  }

  .carousel {
    height: auto;
    perspective: none;
  }

  .carousel-ring {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    width: 100%;
    aspect-ratio: auto;
    animation: none;
  }

  .carousel-ring .photo-placeholder {
    position: static;
    aspect-ratio: 1;
    transform: none;
  }
}
