/* ============================================================
   Joyal & Divyamol - editorial floral invitation
   ============================================================ */

:root {
  --color-paper: #fffaf0;
  --color-paper-soft: #f8f1e3;
  --color-cream: #f1e5cf;
  --color-ivory: #fffdf8;
  --color-sage: #647856;
  --color-sage-deep: #42543c;
  --color-sage-soft: #d9dfc7;
  --color-gold: #c8a765;
  --color-gold-soft: #ead8ae;
  --color-ink: #3b342b;
  --color-muted: #7d7262;
  --color-border: rgba(100, 120, 86, 0.18);
  --color-shadow: rgba(72, 58, 38, 0.14);

  --font-script: 'Great Vibes', cursive;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Raleway', sans-serif;
  --font-malayalam: 'Noto Sans Malayalam', sans-serif;

  --section-space: clamp(4.5rem, 9vw, 7.5rem);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(248, 241, 227, 0.96)),
    var(--color-paper);
  letter-spacing: 0.2px;
}

body.lang-ml {
  font-family: var(--font-malayalam), var(--font-body);
}

body.lang-ml .script-heading,
body.lang-ml .hero-reception,
body.lang-ml .footer-script {
  font-family: var(--font-malayalam), var(--font-body);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--color-gold-soft);
  color: var(--color-ink);
}

body.no-scroll {
  overflow: hidden;
}

body.invitation-locked {
  overflow: hidden;
}

main,
.site-footer {
  position: relative;
  z-index: 4;
}

.invitation-gate {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.88), transparent 25rem),
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(241, 229, 207, 0.98));
  transition: opacity 0.85s var(--ease-smooth), visibility 0.85s var(--ease-smooth);
  transform-origin: left center;
  transform-style: preserve-3d;
}

.invitation-gate::before,
.invitation-gate::after {
  content: "";
  position: absolute;
  width: min(58vw, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(217, 223, 199, 0.35);
  filter: blur(2px);
}

.invitation-gate::before {
  top: -8rem;
  left: -7rem;
}

.invitation-gate::after {
  right: -8rem;
  bottom: -9rem;
}

.invitation-gate.is-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-loader,
.open-card-scene {
  position: relative;
  grid-area: 1 / 1;
  z-index: 1;
  text-align: center;
}

.gate-loader {
  display: grid;
  justify-items: center;
  gap: 1rem;
  color: var(--color-sage-deep);
  transition: opacity 0.55s var(--ease-smooth), transform 0.55s var(--ease-smooth);
}

.gate-loader p {
  color: var(--color-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2.8px;
  text-transform: uppercase;
}

.loader-rings {
  position: relative;
  width: 88px;
  height: 58px;
  animation: ringFloat 2.3s ease-in-out infinite;
}

.loader-ring {
  position: absolute;
  top: 12px;
  width: 46px;
  height: 46px;
  border: 4px solid var(--color-gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 250, 240, 0.78), 0 8px 22px rgba(200, 167, 101, 0.22);
}

.loader-ring::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 15px;
  height: 15px;
  border: 3px solid var(--color-gold);
  border-radius: 4px;
  background: var(--color-ivory);
  transform: translateX(-50%) rotate(45deg);
}

.loader-ring-left {
  left: 2px;
  transform: rotate(-12deg);
}

.loader-ring-right {
  right: 2px;
  transform: rotate(12deg);
}

@keyframes ringFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.open-card-scene {
  display: grid;
  place-items: center;
  width: min(100%, 430px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.invitation-gate.is-ready .gate-loader {
  opacity: 0;
  transform: translateY(-22px) scale(0.96);
  pointer-events: none;
}

.invitation-gate.is-ready .open-card-scene {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

.gate-couple-name {
  margin: 0.35rem 0 1.2rem;
  color: var(--color-sage-deep);
  font-family: var(--font-script);
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 400;
  line-height: 0.9;
}

.gate-divider {
  width: 40px;
  height: 1px;
  background: rgba(200, 167, 101, 0.4);
  margin-bottom: 1.5rem;
}

.gate-subtitle {
  color: var(--color-gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
}

.paper-open-control {
  width: min(85vw, 360px);
  padding: 3.5rem 2rem 2.5rem;
  border-radius: 180px 180px 12px 12px;
  background: 
    linear-gradient(180deg, rgba(255, 253, 248, 0.85), rgba(241, 229, 207, 0.8)),
    url('images/botanical-bg.png') top center / 300px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(200, 167, 101, 0.5);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.paper-open-control::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(200, 167, 101, 0.4);
  border-radius: 172px 172px 6px 6px;
  pointer-events: none;
}

.open-btn {
  width: 100%;
  box-shadow: none !important;
  border: 1px solid rgba(200, 167, 101, 0.3);
}

.invitation-gate.is-opening .open-card-scene {
  opacity: 0;
  transform: translateY(-24px) scale(0.96);
  pointer-events: none;
}

body.invitation-locked .controls-fixed,
body.invitation-locked .dot-nav,
body.invitation-locked main,
body.invitation-locked .site-footer {
  pointer-events: none;
}

.botanical-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.92), transparent 34rem),
    url('images/botanical-bg.png') repeat center center;
  background-size: auto, 460px;
  opacity: 0.1;
  mix-blend-mode: multiply;
}

#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.leaf-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.falling-leaf {
  position: absolute;
  top: -8vh;
  left: var(--leaf-left);
  width: var(--leaf-size);
  height: var(--leaf-height);
  border-radius: 90% 0 90% 0;
  background: linear-gradient(135deg, rgba(167, 151, 87, 0.82), rgba(93, 122, 71, 0.74));
  opacity: calc(var(--leaf-opacity) * 0.65);
  transform-origin: 35% 50%;
  animation: leafFall var(--leaf-duration) linear infinite;
  animation-delay: var(--leaf-delay);
  filter: drop-shadow(0 3px 3px rgba(79, 76, 50, 0.12));
}

.falling-leaf::after {
  content: "";
  position: absolute;
  top: 47%;
  left: 10%;
  width: 78%;
  height: 1px;
  background: rgba(255, 251, 238, 0.55);
  transform: rotate(-22deg);
}

@keyframes leafFall {
  0% {
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }
  45% {
    transform: translate3d(var(--leaf-drift-mid), 48vh, 0) rotate(var(--leaf-rotate-mid));
  }
  100% {
    transform: translate3d(var(--leaf-drift), 112vh, 0) rotate(var(--leaf-rotate));
  }
}

.controls-fixed {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: var(--color-ivory);
  background: rgba(66, 84, 60, 0.88);
  box-shadow: 0 10px 30px rgba(54, 68, 46, 0.22);
  transition: transform 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth);
}

.control-btn:hover,
.control-btn:focus-visible {
  transform: translateY(-2px);
  background: var(--color-sage-deep);
  outline: none;
}

.control-btn.playing {
  animation: pulseGlow 2.2s infinite;
}

.music-btn .icon-muted {
  display: none;
}

.music-btn.is-muted .icon-sound {
  display: none;
}

.music-btn.is-muted .icon-muted {
  display: block;
}

body.invitation-locked .controls-fixed {
  opacity: 0;
}

.lang-btn {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(100, 120, 86, 0.38); }
  70% { box-shadow: 0 0 0 13px rgba(100, 120, 86, 0); }
  100% { box-shadow: 0 0 0 0 rgba(100, 120, 86, 0); }
}

.dot-nav {
  position: fixed;
  top: 50%;
  right: 22px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transform: translateY(-50%);
}

.dot-nav-item {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  border: 1px solid var(--color-sage);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.65);
  transition: transform 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth);
}

.dot-nav-item.active,
.dot-nav-item:hover {
  background: var(--color-sage);
  transform: scale(1.45);
}

.dot-tooltip {
  position: absolute;
  top: 50%;
  right: 22px;
  padding: 4px 9px;
  border-radius: 4px;
  color: var(--color-ivory);
  background: var(--color-sage-deep);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 1.3px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.25s var(--ease-smooth);
}

.dot-nav-item:hover .dot-tooltip,
.dot-nav-item:focus-visible .dot-tooltip {
  opacity: 1;
}

.section {
  position: relative;
  display: flex;
  justify-content: center;
  padding: var(--section-space) clamp(1.2rem, 5vw, 2rem);
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(54vw, 280px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 120, 86, 0.24), transparent);
  transform: translateX(-50%);
}

.hero-section::before,
.countdown-section::before {
  content: none;
}

.section-inner {
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
}

.section-inner.narrow {
  width: min(100%, 620px);
}

.eyebrow {
  color: var(--color-gold);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.5;
  text-transform: uppercase;
}

.section-title {
  margin: 0.3rem 0 0.8rem;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.3rem);
  font-weight: 500;
  line-height: 1.08;
}

.script-heading {
  margin: 0.35rem 0 1rem;
  color: var(--color-sage-deep);
  font-family: var(--font-script);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 400;
  line-height: 1;
}

.section-lead {
  max-width: 520px;
  margin: 0 auto 2.2rem;
  color: var(--color-muted);
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
}

.hero-section {
  min-height: 100svh;
  align-items: center;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.2), rgba(255, 250, 240, 0.78));
}

.hero-frame {
  position: relative;
  width: min(100%, 56.3svh, 640px);
  height: min(1080px, 100svh);
  min-height: 720px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 18px 60px rgba(86, 68, 42, 0.08);
}

.hero-arch {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.1) 0%, rgba(255, 250, 240, 0) 18%, rgba(255, 250, 240, 0) 62%, rgba(255, 250, 240, 0.22) 100%),
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.34), transparent 24rem);
}

.hero-bottom-blend {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 5;
  height: clamp(9rem, 24svh, 17rem);
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 250, 240, 0) 0%,
    rgba(255, 250, 240, 0.72) 48%,
    var(--color-paper) 84%,
    var(--color-paper) 100%
  );
}

.hero-copy,
.hero-event-details {
  position: absolute;
  z-index: 2;
  left: 50%;
  width: min(70%, 360px);
  text-align: center;
  transform: translateX(-50%);
 
}

.hero-copy {
  top: clamp(4.8rem, 10svh, 7.2rem);
}

.hero-names {
  margin: 0.65rem 0 0.7rem;
  color: var(--color-sage-deep);
  font-family: var(--font-script);
  font-size: clamp(3.6rem, 8.2svh, 6.4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.76;
  text-transform: none;
  text-shadow: 0 2px 14px rgba(255, 250, 240, 0.75);
}

.hero-names > span {
  display: block;
}

.hero-name-line {
  position: relative;
  width: max-content;
  margin-inline: auto;
}

/* Optical alignment to compensate for script font swashes */
.hero-names > span:first-child {
  padding-right: 0.3em;
}

.hero-names > span:last-child {
  padding-left: 0.1em;
}

.falling-hearts-container {
  position: absolute;
  inset: 0;
  height: 55%; /* Covers the arch, fades out before the names */
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.falling-heart {
  position: absolute;
  top: -30px;
  width: clamp(16px, 3vw, 24px);
  height: clamp(16px, 3vw, 24px);
  opacity: 0.8;
  animation: fallDown linear forwards;
}

.falling-heart svg {
  width: 100%;
  height: 100%;
  fill: var(--color-gold);
  filter: drop-shadow(0 2px 4px rgba(200, 167, 101, 0.4));
}

@keyframes fallDown {
  0% {
    transform: translateY(-30px) rotate(0deg);
  }
  100% {
    transform: translateY(60vh) rotate(360deg);
  }
}

.hero-amp {
  margin: 1rem 0 1rem;
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: 0.4em;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.hero-family-line {
  color: var(--color-muted);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-style: italic;
}

.hero-request {
  margin-top: 0.3rem;
  color: var(--color-sage-deep);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.7;
  text-transform: uppercase;
}

.hero-event-details {
  top: clamp(19.5rem, 45svh, 30rem);
  color: var(--color-ink);
}

.hero-date {
  font-family: var(--font-display);
  font-size: clamp(0.86rem, 1.9svh, 1rem);
  font-weight: 600;
  letter-spacing: 1px;
}

.hero-time {
  margin: 0.35rem 0 0.7rem;
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4svh, 2.4rem);
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1;
}

.hero-place {
  color: var(--color-sage-deep);
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4svh, 1.35rem);
  font-weight: 600;
  line-height: 1.15;
}

.hero-location {
  margin-top: 0.2rem;
  color: var(--color-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-reception {
  margin-top: 0.5rem;
  color: var(--color-sage);
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 3.5svh, 2rem);
  line-height: 1.1;
}

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--color-sage-deep);
  opacity: 0.82;
  transform: translateX(-50%);
}

.scroll-cue-text {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.scroll-cue-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, var(--color-sage), transparent);
  animation: scrollPulse 2.1s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.32; transform: scaleY(0.65); }
  50% { opacity: 1; transform: scaleY(1); }
}

.countdown-section {
  padding-top: clamp(3.2rem, 7vw, 5.5rem);
}

.countdown-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(66px, 1fr));
  gap: clamp(0.65rem, 2vw, 1rem);
  margin-top: 1.8rem;
}

.countdown-item {
  min-height: 86px;
  padding: 1rem 0.45rem 0.85rem;
  border: 1px solid rgba(200, 167, 101, 0.18);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 14px 30px rgba(113, 92, 58, 0.06);
}

.countdown-value {
  display: block;
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 600;
  line-height: 1;
}

.countdown-label {
  display: block;
  margin-top: 0.55rem;
  color: var(--color-muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  line-height: 1.2;
  text-transform: uppercase;
}

.story-section {
  padding-top: clamp(4rem, 7vw, 6rem);
}

.story-copy {
  max-width: 520px;
  margin: 0 auto 2.2rem;
  color: var(--color-muted);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.6vw, 1.24rem);
  font-style: italic;
  line-height: 1.9;
}

.verse-block {
  max-width: 520px;
  margin: 0 auto 2rem;
  color: var(--color-ink);
}

.verse-mark {
  color: var(--color-gold-soft);
  font-family: var(--font-display);
  font-size: 4.4rem;
  line-height: 0.5;
}

.verse-block blockquote {
  color: var(--color-sage-deep);
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-style: italic;
  line-height: 1.8;
}

.verse-block cite {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--color-gold);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.family-btn,
.submit-btn,
.event-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.75rem 1.45rem;
  border-radius: 4px;
  color: var(--color-ivory);
  background: var(--color-sage);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  line-height: 1.1;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
}

.family-btn:hover,
.submit-btn:hover,
.event-map-link:hover,
.family-btn:focus-visible,
.submit-btn:focus-visible,
.event-map-link:focus-visible {
  background: var(--color-sage-deep);
  box-shadow: 0 12px 28px rgba(66, 84, 60, 0.18);
  outline: none;
  transform: translateY(-2px);
}

.events-stack {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 620px);
  margin: 2rem auto 1.4rem;
}

.event-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 1rem;
  align-items: stretch;
  padding: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.9), rgba(248, 241, 227, 0.62)),
    rgba(255, 253, 248, 0.82);
  box-shadow: 0 16px 34px rgba(86, 68, 42, 0.075);
  text-align: left;
  transition: border-color 0.28s var(--ease-smooth), box-shadow 0.28s var(--ease-smooth), transform 0.28s var(--ease-smooth);
}

.event-card:hover {
  border-color: rgba(200, 167, 101, 0.34);
  box-shadow: 0 20px 40px rgba(86, 68, 42, 0.1);
  transform: translateY(-2px);
}

.event-date-box {
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(200, 167, 101, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(248, 241, 227, 0.9), rgba(255, 253, 248, 0.85));
  color: var(--color-gold);
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.55);
}

.event-date-box span {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
}

.event-date-box small {
  margin-top: 0.35rem;
  color: var(--color-sage);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.event-card-inner {
  padding: 0.1rem 0.2rem;
  color: var(--color-muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.event-name {
  margin-bottom: 0.25rem;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
}

.event-card strong {
  color: var(--color-sage-deep);
  font-weight: 600;
}

.event-address {
  margin-bottom: 0.8rem;
}

.event-map-link {
  min-height: 34px;
  padding: 0.62rem 1rem;
  border-radius: 4px;
  font-size: 0.58rem;
  box-shadow: 0 8px 18px rgba(66, 84, 60, 0.12);
}

.map-embed {
  width: min(100%, 620px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-ivory);
  box-shadow: 0 14px 32px rgba(86, 68, 42, 0.07);
}

.map-embed iframe {
  display: block;
  filter: saturate(0.8) contrast(0.94);
}

.gallery-grid {
  --polaroid-gap: clamp(1.1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--polaroid-gap);
  width: min(100%, 720px);
  margin: 2.1rem auto 0;
  padding: 0 clamp(0rem, 3vw, 1.5rem);
}

.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.25;
  padding: 0.55rem 0.55rem 1.85rem;
  border: 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 30px rgba(67, 56, 38, 0.17);
  transform: rotate(var(--rotate, -3deg));
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0.55rem 0.55rem 1.85rem;
  z-index: 1;
  border-radius: 2px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.2), rgba(100, 120, 86, 0.12)),
    radial-gradient(circle at 50% 0%, rgba(234, 216, 174, 0.22), transparent 58%);
  mix-blend-mode: soft-light;
}

.gallery-item:nth-child(2n) { --rotate: 4deg; margin-top: 1.2rem; }
.gallery-item:nth-child(3n) { --rotate: -5deg; margin-top: 0.3rem; }
.gallery-item:nth-child(5n) { --rotate: 5deg; }

.gallery-item:hover,
.gallery-item:focus-visible {
  z-index: 2;
  box-shadow: 0 24px 38px rgba(67, 56, 38, 0.22);
  outline: none;
  transform: rotate(0deg) translateY(-6px);
}

.gallery-img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  filter: sepia(0.16) saturate(0.76) hue-rotate(-8deg) brightness(1.05) contrast(0.93);
  object-fit: cover;
}

.rsvp-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
  text-align: left;
}

.rsvp-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--color-sage-deep);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid rgba(100, 120, 86, 0.16);
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--color-ink);
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.rsvp-form input,
.rsvp-form select {
  min-height: 44px;
  padding: 0 0.9rem;
}

.rsvp-form textarea {
  resize: vertical;
  padding: 0.85rem 0.9rem;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: rgba(100, 120, 86, 0.5);
  outline: 3px solid rgba(100, 120, 86, 0.1);
}

.submit-btn {
  width: 100%;
  margin-top: 0.2rem;
}

.rsvp-status {
  min-height: 1.5rem;
  color: var(--color-sage-deep);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  text-align: center;
}

.modal,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-smooth);
}

.modal.active,
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(38, 43, 34, 0.48);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: min(92%, 620px);
  max-height: 86vh;
  overflow-y: auto;
  padding: clamp(1.6rem, 5vw, 2.4rem);
  border: 1px solid rgba(200, 167, 101, 0.2);
  border-radius: 8px;
  background: var(--color-ivory);
  box-shadow: 0 30px 80px rgba(22, 27, 20, 0.24);
  transform: translateY(20px);
  transition: transform 0.35s var(--ease-smooth);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close,
.lightbox-close {
  color: inherit;
  background: transparent;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: var(--color-muted);
  font-size: 1.8rem;
  line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--color-sage-deep);
  outline: none;
}

.modal-title {
  margin-bottom: 1.4rem;
  color: var(--color-sage-deep);
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 8vw, 3.5rem);
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.family-group + .family-group {
  margin-top: 2rem;
}

.family-group-title {
  margin-bottom: 0.85rem;
  color: var(--color-gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.family-member {
  min-height: 118px;
  padding: 1rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: rgba(248, 241, 227, 0.48);
  text-align: center;
}

.family-member-featured {
  grid-column: 1 / -1;
  background: rgba(255, 253, 248, 0.78);
}

.member-name {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.35;
}

.member-relation {
  margin-top: 0.35rem;
  color: var(--color-muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.member-detail {
  margin-top: 0.55rem;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 1.55;
  text-transform: none;
}

.lightbox {
  background: rgba(19, 22, 17, 0.9);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  max-width: 84vw;
  max-height: 84vh;
  touch-action: pan-y;
  cursor: grab;
}

.lightbox-content:active {
  cursor: grabbing;
}

.lightbox-img {
  max-width: 84vw;
  max-height: 84vh;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  filter: sepia(0.12) saturate(0.82) hue-rotate(-7deg) brightness(1.04) contrast(0.94);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform: scale(0.94);
  transition: transform 0.35s var(--ease-smooth);
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 2.2rem;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: #fff;
  outline: none;
}

.site-footer {
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--color-sage-deep), #2b3727fa);
  color: var(--color-ivory);
}

.footer-script {
  color: var(--color-gold-soft);
  font-family: var(--font-script);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
}

.footer-names {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.footer-line {
  margin-top: 0.45rem;
  opacity: 0.76;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
}

.footer-date {
  margin-top: 0.9rem;
  color: var(--color-gold-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 3px;
}

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .dot-nav {
    right: 10px;
    gap: 12px;
  }

  .dot-tooltip {
    display: none;
  }

  .controls-fixed {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .section {
    padding-inline: 1rem;
  }

  .hero-section {
    padding-inline: 0;
  }

  .hero-frame {
    width: 100%;
    height: 100svh;
    min-height: 700px;
  }

  .hero-copy {
    top: clamp(10rem, 10svh, 6.2rem);
    width: min(66%, 320px);
  }

  .hero-event-details {
    top: clamp(19rem, 44svh, 27rem);
    width: min(68%, 330px);
  }

  .countdown-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .countdown-item {
    min-height: 78px;
    padding-inline: 0.2rem;
  }

  .event-card {
    grid-template-columns: 66px 1fr;
    gap: 0.8rem;
  }

  .event-date-box span {
    font-size: 1.6rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 0 0.25rem;
  }
}

@media (max-width: 430px) {
  .hero-copy {
    width: 62%;
  }

  .hero-names {
    font-size: clamp(3.3rem, 7.1svh, 4.6rem);
  }

  .hero-event-details {
    top: clamp(18.5rem, 43svh, 25rem);
  }

  .hero-place {
    font-size: 0.98rem;
  }

  .hero-reception {
    font-size: 1.3rem;
  }

  .countdown-label {
    letter-spacing: 1px;
  }

  .event-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .event-date-box {
    min-height: 72px;
  }

  .event-card-inner {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .falling-leaf,
  #particles-canvas {
    display: none;
  }

  .falling-heart {
    animation: none;
  }
}
