/* ====== БАЗА ====== */

:root {
  --c-deep: #1f3b40;
  --c-teal: #65b6bf;
  --c-aqua: #9cf0ea;
  --c-peach: #fac4a0;
  --c-coral: #fa946b;
  --c-lime: #a2c93f;
  --c-soft: #fdf8f3;
  --text-muted: rgba(31, 59, 64, 0.72);
  --shadow-soft: rgba(31, 59, 64, 0.12);
  --shadow-strong: rgba(31, 59, 64, 0.18);
  --glass: rgba(255, 255, 255, 0.82);
}

html {
  overflow-x: hidden;
}

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

body {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  color: var(--c-deep);
  -webkit-font-smoothing: antialiased;
  background-color: var(--c-soft);
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

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

.section {
  padding: clamp(26px, 5vw, 36px) 0;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 32px);
  }
}

@media (max-width: 400px) {
  .container {
    width: calc(100% - 24px);
  }
}

.section-title {
  font-family: "Libre Bodoni", serif;
  font-size: clamp(32px, 4vw, 52px);
  text-transform: uppercase;
  letter-spacing: clamp(0.08em, calc(0.12em + 0.1vw), 0.18em);
  margin: 0 0 32px;
  color: var(--c-teal);
  text-align: center;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

.eyebrow {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: color-mix(in srgb, var(--c-deep) 60%, white);
  margin: 0 0 12px;
  text-align: center;
}

/* ====== HERO ====== */

.hero {
  padding-top: clamp(52px, 12vh, 150px);
  padding-bottom: clamp(68px, 15vh, 190px);
  background: transparent;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-bokeh-host {
  position: relative;
  isolation: isolate;
}

.hero-bokeh-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 35%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-bokeh-blob {
  position: absolute;
  border-radius: 50%;
  background: var(--blob-color, rgba(101, 182, 191, 0.6));
  filter: blur(var(--blur, 32px));
  opacity: var(--opacity, 0.2);
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0) scale(var(--scale, 1));
  animation: hero-bokeh-drift var(--duration, 48s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

@keyframes hero-bokeh-drift {
  0%, 100% {
    transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0) scale(var(--scale, 1));
    opacity: var(--opacity, 0.35);
  }
  50% {
    transform: translate3d(
      calc(var(--parallax-x, 0px) + var(--drift-x, 0px)),
      calc(var(--parallax-y, 0px) + var(--drift-y, 0px)),
      0
    ) scale(calc(var(--scale, 1) + var(--drift-scale, 0.04)));
    opacity: var(--opacity-peak, 0.55);
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: none;
}

.hero-centered {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(20px, 3vw, 34px);
  text-align: center;
  padding-inline: 0;
}

.hero-heart {
  font-size: clamp(26px, 3vw, 34px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: color-mix(in srgb, var(--c-peach) 70%, var(--c-coral));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(46px, 5vw, 64px);
  height: clamp(46px, 5vw, 64px);
  border-radius: 50%;
  background: rgba(250, 196, 160, 0.14);
  box-shadow: 0 10px 30px rgba(250, 148, 107, 0.16);
  margin-bottom: clamp(-4px, -0.5vw, -8px);
}

.hero-portrait {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 900px);
  max-width: 100%;
  overflow: visible;
  margin-inline: auto;
  justify-self: center;
  --hero-radius: clamp(46px, 10vw, 120px);
  --hero-outline: color-mix(in srgb, #fdf8f3 82%, var(--c-peach) 18%);
}

.hero-media {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--hero-photo-width);
  max-width: 100%;
  aspect-ratio: 780 / 560;
  padding: clamp(16px, 3vw, 28px);
  isolation: isolate;
  overflow: visible;
  --hero-photo-width: clamp(260px, 72vw, 680px);
  --hero-photo-border: clamp(6px, 1.6vw, 8px);
  --hero-ornament-gap: clamp(14px, 3vw, 28px);
  --hero-ornament-size: clamp(110px, 18vw, 190px);
  --hero-ornament-width: calc(
    var(--hero-photo-width) +
    (var(--hero-photo-border) * 2) +
    (var(--hero-ornament-gap) + (var(--hero-ornament-size) / 2)) * 2
  );
  --hole-cx: 50%;
  --hole-cy: 50%;
  --hole-w: 76%;
  --hole-h: 74%;
  --hole-r: 12%;
}

.hero-ornament {
  position: absolute;
  opacity: 0.5;
  filter: drop-shadow(0 10px 22px rgba(31, 59, 64, 0.14));
  z-index: 4;
  --flip: 1;
  pointer-events: none;
}

.hero-ornament--left {
  width: clamp(120px, 20vmin, 210px);
  top: clamp(-18px, -2vw, 6px);
  left: clamp(10px, 4vw, 46px);
}

.hero-ornament--right {
  width: clamp(120px, 20vmin, 210px);
  top: clamp(-18px, -2vw, 6px);
  right: clamp(10px, 4vw, 46px);
  --flip: -1;
}

.hero-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: var(--hero-radius);
  box-shadow: 0 20px 50px rgba(31, 59, 64, 0.16);
  border: var(--hero-photo-border) solid var(--hero-outline);
  background: #fff;
  z-index: 2;
}

.hero-ornament-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--hero-ornament-width);
  aspect-ratio: 16 / 11;
  transform: translate(-50%, -50%);
  max-width: calc(100vw - 32px);
  z-index: 3;
  pointer-events: none;
}

.hero-ornament-ring .ring-ornament {
  position: absolute;
  width: var(--hero-ornament-size);
  opacity: 0.55;
  filter: drop-shadow(0 12px 26px rgba(31, 59, 64, 0.16));
}

.ring-ornament--top {
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring-ornament--right {
  top: 50%;
  right: 0;
  transform: translate(50%, -50%) scaleX(-1);
}

.ring-ornament--bottom {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%) scaleY(-1);
}

.ring-ornament--left {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  aspect-ratio: 16 / 11;
  border-radius: inherit;
}

.hero-title {
  display: grid;
  gap: clamp(10px, 1.8vw, 16px);
  justify-items: center;
  margin-inline: auto;
  text-align: center;
  width: min(100%, 900px);
  justify-self: center;
}

.hero-names {
  margin: 0;
  font-family: "Libre Bodoni", serif;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-deep);
  display: inline-flex;
  gap: clamp(12px, 2vw, 22px);
  align-items: center;
  justify-content: center;
}

.hero-name {
  display: inline-block;
}

.hero-amp {
  color: color-mix(in srgb, var(--c-coral) 70%, var(--c-peach));
  font-weight: 400;
  font-size: 1.08em;
}

.hero-date {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(16px, 2.6vw, 20px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c-deep) 60%, white 20%);
  position: relative;
  padding-inline: clamp(8px, 1.6vw, 16px);
}

.hero-date::before,
.hero-date::after {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(40px, 14vw, 120px);
  height: 1px;
  background: color-mix(in srgb, var(--c-deep) 16%, var(--c-peach) 32%, white 52%);
  opacity: 0.7;
}

.hero-date::before {
  left: calc(-1 * clamp(52px, 16vw, 140px));
}

.hero-date::after {
  right: calc(-1 * clamp(52px, 16vw, 140px));
}

@keyframes hero-photo-zoom {
  0% {
    transform: scale(1.14);
  }
  55% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float-sway {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(12px, -10px, 0) scale(1.05);
  }
}

@keyframes drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0.45;
  }
  40% {
    transform: translate3d(-10px, 6px, 0) rotate(5deg);
    opacity: 0.65;
  }
  70% {
    transform: translate3d(14px, -12px, 0) rotate(-4deg);
    opacity: 0.55;
  }
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes corner-drift-left {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(14px, 10px, 0) rotate(4deg);
  }
}

@keyframes corner-drift-right {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(-12px, 12px, 0) rotate(-3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo img {
    animation: none;
    transform: none;
  }

  .twig,
  .bud,
  .rsvp-card::before,
  .rsvp-card::after,
  .story-grid::before,
  .story-grid::after,
  .countdown-card::before,
  .countdown-card::after,
  .finale-card::before,
  .finale-card::after {
    animation: none !important;
  }

  .corner-ornament {
    animation: none;
  }

  .hero-bokeh-blob {
    animation: none;
    transform: translate3d(0, 0, 0) scale(var(--scale, 1));
  }

}


@media (max-width: 920px) {
  .hero {
    padding-top: 48px;
    padding-bottom: 110px;
  }

  .hero-bokeh-layer {
    bottom: 52%;
  }

  .hero-portrait {
    width: min(100%, 820px);
    max-width: 100%;
  }

  .hero-media {
    --hole-w: 84%;
    --hole-h: 78%;
    --hero-photo-width: clamp(240px, 78vw, 600px);
  }

  .hero-photo {
    border-radius: clamp(42px, 14vw, 110px);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 42px;
    padding-bottom: 78px;
  }

  .hero-bokeh-layer {
    bottom: 58%;
  }

  .hero-heart {
    width: 56px;
    height: 56px;
    margin-bottom: -4px;
  }

  .hero-media {
    --hole-w: 92%;
    --hole-h: 86%;
    --hero-photo-width: clamp(240px, 86vw, 560px);
    --hero-ornament-gap: clamp(12px, 4vw, 22px);
    --hero-ornament-size: clamp(96px, 22vw, 150px);
  }

  .hero-photo {
    border-radius: clamp(36px, 18vw, 90px);
    border-width: 7px;
  }

  .hero-date::before,
  .hero-date::after {
    width: clamp(32px, 18vw, 80px);
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 32px;
    padding-bottom: 64px;
  }

  .hero-media {
    --hero-ornament-gap: clamp(10px, 4vw, 18px);
    --hero-ornament-size: clamp(86px, 24vw, 132px);
  }

  .hero-photo {
    border-radius: clamp(32px, 20vw, 80px);
    border-width: 6px;
  }
}

@media (max-width: 480px) {
  .hero-media {
    --hero-photo-width: clamp(240px, 90vw, 520px);
    --hero-ornament-gap: 10px;
    --hero-ornament-size: 90px;
  }
}


/* ====== INVITATION ====== */

.invitation {
  text-align: center;
}

.invitation-card {
  position: relative;
  padding: clamp(32px, 8vw, 72px);
  background: var(--glass);
  border-radius: 32px;
  box-shadow: 0 16px 40px var(--shadow-soft);
  overflow: hidden;
}

.invite-text h2 {
  font-family: "Libre Bodoni", serif;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 16px;
}

.invite-text p {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.5;
}

.invite-illustration {
  position: absolute;
  inset: -20% auto auto -10%;
  width: clamp(180px, 35vw, 320px);
  opacity: 0.3;
}

.invite-illustration svg {
  width: 100%;
  height: auto;
}

.twig {
  fill: none;
  stroke: color-mix(in srgb, var(--c-teal) 70%, var(--c-aqua));
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 6 12;
  animation: dash 12s linear infinite;
}

.bud {
  fill: color-mix(in srgb, var(--c-lime) 65%, var(--c-peach));
  animation: bloom 6s ease-in-out infinite alternate;
}

.twig-ornament {
  position: absolute;
  inset: auto;
  opacity: 0.4;
  pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(31, 59, 64, 0.14));
  z-index: 0;
}

.twig-ornament svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .twig-ornament {
    opacity: 0.3;
  }
}

.location-card .twig-ornament--a {
  width: clamp(140px, 26vw, 220px);
  top: clamp(-40px, -8vw, -12px);
  left: clamp(-28px, -6vw, 8px);
  transform: rotate(8deg);
}

.location-card .twig-ornament--b {
  width: clamp(150px, 30vw, 240px);
  bottom: clamp(-60px, -14vw, -24px);
  right: clamp(-36px, -8vw, 12px);
  transform: rotate(-14deg) scaleX(-1);
}

.day-plan-card .twig-ornament--a {
  width: clamp(160px, 30vw, 240px);
  top: clamp(-36px, -7vw, -12px);
  right: clamp(-46px, -10vw, 6px);
  transform: rotate(10deg);
}

.day-plan-card .twig-ornament--b {
  width: clamp(140px, 26vw, 220px);
  bottom: clamp(-44px, -8vw, -18px);
  left: clamp(-26px, -5vw, 10px);
  transform: rotate(-12deg);
}

.rsvp-card .twig-ornament--a {
  width: clamp(170px, 32vw, 250px);
  top: clamp(-42px, -9vw, -14px);
  left: clamp(-42px, -9vw, 6px);
  transform: rotate(6deg);
}

.rsvp-card .twig-ornament--b {
  width: clamp(160px, 30vw, 240px);
  bottom: clamp(-50px, -10vw, -18px);
  right: clamp(-38px, -8vw, 10px);
  transform: rotate(-16deg) scaleX(-1);
}

.chat-card .twig-ornament--a {
  width: clamp(150px, 28vw, 230px);
  top: clamp(-32px, -6vw, -12px);
  right: clamp(-32px, -7vw, 10px);
  transform: rotate(12deg);
}

.chat-card .twig-ornament--b {
  width: clamp(150px, 28vw, 230px);
  bottom: clamp(-48px, -9vw, -16px);
  left: clamp(-28px, -6vw, 12px);
  transform: rotate(-8deg);
}

.gifts-card .twig-ornament--a {
  width: clamp(160px, 28vw, 240px);
  top: clamp(-34px, -6vw, -12px);
  left: clamp(-24px, -5vw, 10px);
  transform: rotate(8deg);
}

.gifts-card .twig-ornament--b {
  width: clamp(150px, 26vw, 220px);
  bottom: clamp(-42px, -8vw, -16px);
  right: clamp(-32px, -7vw, 10px);
  transform: rotate(-10deg) scaleX(-1);
}

@keyframes dash {
  to {
    stroke-dashoffset: -60;
  }
}

@keyframes bloom {
  from {
    transform: scale(0.9);
    opacity: 0.6;
  }
  to {
    transform: scale(1.15);
    opacity: 1;
  }
}

/* ====== STORY ====== */

.story-grid {
  display: grid;
  gap: clamp(28px, 6vw, 48px);
  justify-items: center;
  position: relative;
}

.story-points {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 5vw, 40px);
  width: min(760px, 100%);
}

.story-points article {
  display: grid;
  gap: 12px;
  text-align: center;
}

.story-points h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-coral);
}

.story-points p {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 20px);
  line-height: 1.6;
  color: var(--text-muted);
}

/* ====== GALLERY ====== */

.gallery-wrap {
  text-align: center;
}

.gallery {
  padding-bottom: clamp(76px, 10vw, 140px);
}

.gallery-trio {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(420px, 1.6fr) minmax(160px, 1fr);
  align-items: center;
  justify-items: center;
  gap: clamp(20px, 4vw, 46px);
  width: min(1240px, 100%);
  margin: 0 auto;
}

.gallery-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(880px, 100%);
}

.gallery-side {
  margin: 0;
  width: min(286px, 100%);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 14px 38px var(--shadow-soft);
  transform-origin: center;
}

.gallery-side img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3/4;
  opacity: 0;
  transform: none;
  transition: none !important;
  animation: none !important;
}

.gallery-side img.is-visible {
  opacity: 1;
  transition: none;
  animation: none;
}

.gallery-side img.is-updating {
  opacity: 1;
  animation: none;
  transition: none;
}

.gallery-side-left {
  transform: rotate(-6deg) translateY(12px);
}

.gallery-side-right {
  transform: rotate(5deg) translateY(-18px);
}

.gallery-frame {
  position: relative;
  margin: 0 auto;
  width: min(880px, 92%);
  aspect-ratio: 1/1;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 16px 44px var(--shadow-soft);
  background: color-mix(in srgb, var(--c-aqua) 18%, white 82%);
  isolation: isolate;
}

.gallery-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: clamp(12px, 2vw, 20px);
  pointer-events: none;
  z-index: 4;
}

.gallery-nav-btn {
  pointer-events: auto;
  display: grid;
  place-items: center;
  padding: 0;
  align-items: center;
  justify-content: center;
  width: clamp(38px, 7vw, 58px);
  height: clamp(38px, 7vw, 58px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.22));
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: var(--c-deep);
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1;
  box-shadow:
    0 14px 28px rgba(11, 16, 24, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.gallery-nav-btn:hover,
.gallery-nav-btn:focus-visible {
  transform: scale(1.05);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.3));
  box-shadow:
    0 16px 32px rgba(11, 16, 24, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  outline: none;
}

.gallery-nav-btn .gallery-nav-icon {
  display: block;
  width: 64%;
  height: 64%;
  margin: auto;
  justify-self: center;
  align-self: center;
}

.gallery-nav-prev .gallery-nav-icon {
  transform: translateX(-4%);
}

.gallery-nav-next .gallery-nav-icon {
  transform: translateX(4%);
}

.gallery-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 12px);
  width: min(680px, 100%);
  margin-top: 2px;
}

.gallery-indicator-segment {
  --progress: 0;
  position: relative;
  flex: 1;
  max-width: 56px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-deep) 18%, white 82%);
  overflow: hidden;
}

.gallery-indicator-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--c-coral);
  transform: scaleX(var(--progress));
  transform-origin: left;
  transition: transform 120ms linear;
}

.gallery-indicator-segment.is-active {
  background: color-mix(in srgb, var(--c-deep) 32%, white 68%);
}

.gallery-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: none;
  transition: opacity 620ms ease;
  animation: none;
  background-color: color-mix(in srgb, white 85%, var(--c-soft) 15%);
}

.gallery-frame img.is-visible {
  opacity: 1;
  z-index: 2;
}

.gallery-trio.is-animating img {
  opacity: 0;
}

.gallery-flyer {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 16px 44px var(--shadow-soft);
  pointer-events: none;
  z-index: 9;
  transition:
    transform 620ms cubic-bezier(0.22, 0.78, 0.28, 0.96),
    opacity 620ms ease;
  will-change: transform, opacity;
}

.gallery-frame img[aria-hidden="true"] {
  z-index: 1;
}

#gallery-buffer.is-visible {
  z-index: 3;
}

.gallery-frame img.gallery-animated {
  animation: none !important;
}

@keyframes gallery-sway {
  0% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }
  32% {
    transform: translate3d(10px, -8px, 0) scale(1.06);
  }
  68% {
    transform: translate3d(-8px, 10px, 0) scale(1.04);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1.02);
  }
}

@media (max-width: 900px) {
  .gallery-trio {
    grid-template-columns: minmax(320px, 1fr);
  }

  .gallery-side {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-indicator-fill {
    transition: none;
  }
}

/* ====== CALENDAR ====== */

.calendar-grid {
  display: grid;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.calendar-grid > * {
  min-width: 0;
}

.calendar-text p {
  font-size: 20px;
  line-height: 1.6;
  margin: 0;
}

.calendar-widget {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.calendar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: "Libre Bodoni", serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-deep);
}

.calendar-year {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: 0.22em;
}

.calendar-month {
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.16em;
  color: color-mix(in srgb, var(--c-deep) 65%, white);
}

.mini-calendar {
  --cal-gap: clamp(6px, 1.5vw, 8px);
  --cal-cell: clamp(32px, 10vw, 48px);
  --cal-mark: var(--cal-cell);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--cal-gap);
  padding: clamp(18px, 4vw, 26px);
  border-radius: 20px;
  background: var(--glass);
  box-shadow: 0 12px 30px var(--shadow-soft);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--text-muted);
  width: min(440px, 100%);
}

.mini-calendar .hdr {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.mini-calendar > div {
  min-height: var(--cal-cell);
  display: grid;
  place-items: center;
}

.mini-calendar .mark {
  background: var(--c-coral);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(101, 182, 191, 0.35);
  display: grid;
  place-items: center;
  place-self: center;
  line-height: 1;
  inline-size: var(--cal-mark);
  block-size: var(--cal-mark);
  min-inline-size: var(--cal-mark);
  min-block-size: var(--cal-mark);
  max-inline-size: var(--cal-mark);
  max-block-size: var(--cal-mark);
}

/* ====== CONTACTS ====== */

.contacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--text-muted);
}

.contacts-list li {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  background: var(--glass);
  border-radius: 20px;
  box-shadow: 0 10px 24px var(--shadow-soft);
  text-align: left;
}

.contacts-list strong {
  font-family: "Libre Bodoni", serif;
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-teal);
}

.contact-line {
  display: block;
  letter-spacing: 0.02em;
}

.contacts-list a {
  color: var(--c-coral);
  text-decoration: none;
}

.contacts-list a:hover,
.contacts-list a:focus-visible {
  text-decoration: underline;
}

/* ====== LOCATION ====== */

.location-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
  padding: 48px clamp(24px, 8vw, 72px);
  background: var(--glass);
  border-radius: 36px;
  box-shadow: 0 16px 40px var(--shadow-soft);
  border: 1px solid color-mix(in srgb, var(--c-teal) 22%, transparent);
  position: relative;
  overflow: hidden;
}

.location-info p {
  font-size: 20px;
  margin: 12px 0 0;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--c-coral);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px var(--shadow-strong);
  filter: brightness(1.05);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ====== VENUE ====== */

.venue-photo {
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 50px var(--shadow-soft);
  max-width: min(720px, 100%);
}

.venue-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.color-card {
  --tone: var(--c-teal);
  position: relative;
  width: 100%;
  max-width: 260px;
  perspective: 1200px;
  outline: none;
  cursor: pointer;
}

.color-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--tone) 35%, white 65%);
  outline-offset: 6px;
}

.color-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: 0 22px 42px color-mix(in srgb, var(--tone) 18%, rgba(15, 37, 45, 0.32));
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
}

.color-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  backface-visibility: hidden;
  overflow: hidden;
}

.color-card-front {
  background: var(--tone);
  display: block;
}

.color-card-back {
  transform: rotateY(180deg);
}

.color-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .color-card-inner {
    transition: none;
  }

  .color-card:hover .color-card-inner,
  .color-card:focus-visible .color-card-inner {
    transform: none;
  }
}

/* ====== DRESS CODE ====== */

.dresscode-grid {
  display: grid;
  gap: 24px;
}

.dresscode-text p {
  font-size: 20px;
  margin: 0;
  line-height: 1.6;
  text-align: center;
}

.dresscode-hint {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dresscode-palette {
  display: flex;
  justify-content: center;
  gap: 14px 18px;
  flex-wrap: wrap;
}

.ripple {
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
  display: block;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-expand 520ms ease-out;
  opacity: 0.5;
  will-change: transform, opacity;
  z-index: 5;
}

@keyframes ripple-expand {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

.swatch .ripple {
  background: color-mix(in srgb, var(--c, var(--c-teal)) 28%, white 72%);
}

.dresscode-card .ripple {
  background: color-mix(in srgb, var(--tone-base, var(--c-teal)) 30%, white 70%);
  opacity: 0.4;
}

.swatch {
  --swatch-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8), 0 6px 18px var(--shadow-soft);
  --swatch-check-bg: color-mix(in srgb, white 82%, var(--c, var(--c-teal)) 18%);
  --swatch-check-ink: color-mix(in srgb, var(--c, var(--c-teal)) 12%, #0c1e22 88%);
  width: clamp(60px, 14vw, 68px);
  height: clamp(60px, 14vw, 68px);
  border-radius: 50%;
  background: var(--c);
  box-shadow: var(--swatch-shadow);
  border: none;
  cursor: pointer;
  padding: 0;
  appearance: none;
  transition: transform 180ms ease, box-shadow 220ms ease;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.swatch::after {
  content: "✓";
  position: absolute;
  inset: 50%;
  width: clamp(30px, 6.4vw, 34px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.6);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--swatch-check-bg);
  color: var(--swatch-check-ink);
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 3.8vw, 18px);
  line-height: 1;
  box-shadow:
    0 10px 20px color-mix(in srgb, var(--c, var(--c-teal)) 35%, rgba(0, 0, 0, 0.18)),
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 0 0 3px color-mix(in srgb, white 55%, var(--c, var(--c-teal)) 45%);
  opacity: 0;
  transition: opacity 160ms ease, transform 180ms ease;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.6),
    0 2px 12px rgba(12, 20, 25, 0.28);
}

.swatch:focus {
  outline: none;
}

.swatch:focus-visible {
  outline: none;
  --swatch-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 0 4px color-mix(in srgb, var(--c, var(--c-teal)) 45%, white),
    0 10px 22px var(--shadow-soft);
}

.swatch.is-active {
  transform: translateY(-6px) scale(1.05);
  --swatch-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.85), 0 14px 28px color-mix(in srgb, var(--c) 40%, rgba(0, 0, 0, 0.12));
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.85),
    0 0 0 2px color-mix(in srgb, var(--c, var(--c-teal)) 25%, white 75%),
    0 14px 28px color-mix(in srgb, var(--c) 40%, rgba(0, 0, 0, 0.12));
}

.swatch.is-active::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.swatch.is-active:focus-visible {
  --swatch-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.85),
    0 0 0 4px color-mix(in srgb, var(--c, var(--c-teal)) 45%, white),
    0 14px 28px color-mix(in srgb, var(--c) 40%, rgba(0, 0, 0, 0.12));
}

.dresscode-examples {
  display: grid;
  gap: clamp(18px, 4vw, 32px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  width: min(1080px, 100%);
  margin: 0 auto;
}

@media (min-width: 980px) {
  .dresscode-examples {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dresscode-example {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px var(--shadow-soft);
  display: block;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 3 / 4;
}

.dresscode-example img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dresscode-card {
  display: block;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  width: 100%;
  border-radius: 28px;
  --tone-base: var(--tone, var(--c-teal));
  --tone-ink: color-mix(in srgb, var(--tone-base, var(--c-teal)) 22%, #041f24);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.dresscode-card .color-card-inner {
  border-radius: 28px;
  box-shadow: 0 22px 42px color-mix(in srgb, var(--tone-base, var(--c-teal)) 22%, rgba(12, 37, 45, 0.32));
  transition:
    transform 420ms cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 280ms ease,
    opacity 320ms ease var(--card-delay, 0ms);
  will-change: transform;
  transform-style: preserve-3d;
  opacity: 0;
}

.dresscode-card.is-ready .color-card-inner {
  opacity: 1;
}

.dresscode-card .color-card-face {
  border: none;
}

.dresscode-card .color-card-front {
  position: relative;
  background: color-mix(in srgb, var(--tone-base, var(--c-teal)) 75%, white);
  overflow: hidden;
}

.dresscode-card .color-card-front::after {
  content: none;
}

.dresscode-card .color-card-back {
  overflow: hidden;
}

.dresscode-card .color-card-back img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
}

.dresscode-card.is-flipped .color-card-inner {
  transform: rotateY(180deg);
}

.flip-hint {
  position: absolute;
  right: clamp(14px, 2.6vw, 20px);
  bottom: clamp(14px, 2.6vw, 20px);
  width: clamp(38px, 6.2vw, 46px);
  height: clamp(38px, 6.2vw, 46px);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tone-ink);
  background: color-mix(in srgb, white 70%, var(--tone-base, var(--c-teal)) 30%);
  box-shadow:
    0 12px 20px rgba(6, 24, 32, 0.22),
    0 0 0 1px color-mix(in srgb, white 70%, var(--tone-base, var(--c-teal)) 30%);
  pointer-events: none;
  transition: transform 180ms ease, opacity 220ms ease;
  opacity: 0;
  transform: translate3d(12%, 12%, 0) scale(0.9);
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.flip-hint svg {
  width: 20px;
  height: 20px;
}

.flip-hint:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone-base, var(--c-teal)) 65%, white);
}

.dresscode-card:focus-visible {
  outline: none;
}

.dresscode-card:focus-visible .color-card-inner {
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--tone-base, var(--c-teal)) 45%, white),
    0 22px 42px color-mix(in srgb, var(--tone-base, var(--c-teal)) 22%, rgba(12, 37, 45, 0.32));
}

.dresscode-card .color-card-back .flip-hint {
  background: rgba(255, 255, 255, 0.88);
  color: #1c2f36;
  backdrop-filter: blur(6px);
}

.dresscode-card.is-ready:not(.is-flipped) .color-card-front .flip-hint {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition-delay: var(--card-delay, 0ms);
  pointer-events: auto;
}

.dresscode-card.is-flipped .color-card-back .flip-hint {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition-delay: 0ms;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .dresscode-card .color-card-inner {
    transition: none;
    opacity: 1;
    animation: none;
  }

  .dresscode-card.is-flipped .color-card-inner {
    transform: rotateY(180deg);
  }
}

/* ====== COUNTDOWN ====== */

.countdown-card {
  padding: clamp(32px, 6vw, 60px);
  border-radius: 36px;
  background: var(--glass);
  box-shadow: 0 18px 46px var(--shadow-strong);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 18px;
}

.count-box {
  padding: 18px 12px 12px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--c-aqua) 15%, white 85%);
  box-shadow: inset 0 1px 6px rgba(255, 255, 255, 0.55);
  display: grid;
  gap: 8px;
}

.count-box span {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c-teal);
}

.count-box small {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.rsvp-form textarea,
.wishes-form textarea {
  resize: none;
  overflow: auto;
}

@media (max-width: 640px) {
  .countdown-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .count-box {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-frame img,
  .gallery-side img {
    transition: none;
    transform: none;
    animation: none;
  }
}

/* ====== WISHLIST ====== */

.wishlist-layout {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  align-items: stretch;
}

.wishlist-text {
  display: grid;
  gap: 18px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.wishlist-text p {
  font-size: 20px;
  line-height: 1.6;
  margin: 0;
  color: var(--text-muted);
}

.wishlist-form-card {
  background: var(--glass);
  border-radius: 28px;
  box-shadow: 0 16px 36px var(--shadow-soft);
  padding: clamp(24px, 5vw, 36px);
  display: grid;
  gap: 18px;
  justify-items: stretch;
  text-align: left;
}

.wishlist-form-card h3 {
  margin: 0;
  font-family: "Libre Bodoni", serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--c-teal);
}

.wishlist-form-card .form-actions {
  justify-content: flex-start;
}

.wishlist-form-card .form-feedback {
  text-align: left;
}

.wishes-form {
  display: grid;
  gap: 16px;
}

.wishes-form label {
  display: grid;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ====== CONTACTS ====== */

.contacts-grid {
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
}

.contacts-grid > div {
  max-width: 520px;
}

.contacts-grid .contacts-list {
  width: min(560px, 100%);
}

/* ====== RSVP ====== */

.rsvp,
.chat {
  margin-block: clamp(20px, 6vw, 48px);
  padding-inline: clamp(24px, 4vw, 32px);
}

@media (max-width: 600px) {
  .rsvp,
  .chat {
    margin-block: clamp(9px, 4vw, 16px);
  }
}

.rsvp-card {
  padding: clamp(32px, 8vw, 64px);
  border-radius: 36px;
  background: var(--glass);
  box-shadow: 0 20px 48px var(--shadow-strong);
  text-align: center;
  display: grid;
  gap: 24px;
  position: relative;
  overflow: hidden;
  width: calc(100% - 32px);
  max-width: 860px;
  margin-inline: auto;
}

.chat-card {
  position: relative;
}

.rsvp-card > * {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

.rsvp-form {
  display: grid;
  gap: 18px;
  text-align: left;
}

.rsvp-form label {
  display: grid;
  gap: 8px;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea,
.wishes-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-teal) 28%, transparent);
  background: rgba(255, 255, 255, 0.9);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--c-deep);
  background-clip: padding-box;
}

.rsvp-form select {
  appearance: none;
  background-color: rgba(255, 255, 255, 0.95);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='%2365B6BF' d='M1.2 0h11.6c.9 0 1.4 1.1.8 1.8L7.8 9.3a1 1 0 0 1-1.6 0L.4 1.8C-.2 1.1.3 0 1.2 0Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px auto;
  padding-right: 48px;
  line-height: 1.4;
  cursor: pointer;
}

.rsvp-form select::-ms-expand {
  display: none;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus,
.wishes-form textarea:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--c-coral) 60%, transparent),
    0 0 0 2px color-mix(in srgb, var(--c-coral) 32%, transparent);
}

.form-question {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
}

.form-question .question-title {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.rsvp-form fieldset {
  border: 1px solid color-mix(in srgb, var(--c-teal) 22%, transparent);
  border-radius: 18px;
  padding: 24px 22px 18px;
  display: grid;
  gap: 12px;
  background: color-mix(in srgb, white 88%, var(--c-aqua) 12%);
}

.rsvp-form legend {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 8px 0 0;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-muted);
  line-height: 1.45;
}

.rsvp-form legend.visually-hidden {
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
}

.drink-fieldset {
  gap: 18px;
}

.fieldset-hint {
  margin: 0;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  color: color-mix(in srgb, var(--c-deep) 50%, white);
}

.drink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.choice-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 14px 18px;
  min-height: 56px;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--c-deep);
  background: color-mix(in srgb, white 85%, var(--c-aqua) 15%);
  border: 1px solid color-mix(in srgb, var(--c-teal) 20%, transparent);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.choice-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid color-mix(in srgb, var(--c-coral) 50%, transparent);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.choice-pill input {
  appearance: none;
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.pill-text {
  display: block;
  width: 100%;
  color: inherit;
  white-space: normal;
}

.choice-pill input:checked + .pill-text {
  color: var(--c-teal);
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .choice-pill:hover {
    background: color-mix(in srgb, var(--c-peach) 28%, white);
    box-shadow: 0 10px 20px var(--shadow-soft);
    transform: translateY(-1px);
  }
}

.choice-pill:has(input:focus-visible) {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-teal) 35%, white 65%), 0 10px 20px var(--shadow-soft);
  transform: translateY(-1px);
}

.choice-pill:has(input:focus-visible):not(.is-selected) {
  background: color-mix(in srgb, white 85%, var(--c-aqua) 15%);
}

.choice-pill.is-selected {
  background: color-mix(in srgb, var(--c-peach) 35%, white);
  color: var(--c-teal);
  font-weight: 600;
  box-shadow: 0 14px 26px var(--shadow-soft);
}

.choice-pill.is-selected::after {
  opacity: 1;
  transform: scale(1);
}

.choice-pill.is-selected .pill-text {
  color: inherit;
  font-weight: 600;
}

.choice-extra {
  display: grid;
  gap: 6px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--text-muted);
}

/* ====== FINALE ====== */

.chat-card {
  background: white;
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(31, 59, 64, 0.12);
  padding: clamp(28px, 6vw, 64px);
  padding-inline: 24px;
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  justify-items: center;
  text-align: center;
  width: calc(100% - 32px);
  max-width: 860px;
  margin-inline: auto;
  position: relative;
  overflow: hidden;
}

.chat-text {
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.chat-text p {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
}

.chat-actions {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: 100%;
}

.chat-link {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--c-teal);
  text-decoration: underline;
  word-break: break-all;
}

.chat-link:hover,
.chat-link:focus-visible {
  color: var(--c-coral);
}

.chat .btn {
  min-width: 200px;
}

@media (max-width: 640px) {
  .chat-actions {
    justify-items: stretch;
  }

  .chat .btn {
    width: 100%;
  }

  .chat-link {
    width: 100%;
    text-align: center;
  }

  .rsvp-card,
  .chat-card {
    padding-inline: clamp(18px, 6vw, 22px);
  }
}

.finale-card {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.6;
  background: var(--glass);
  padding: 36px 32px;
  border-radius: 28px;
  box-shadow: 0 16px 40px var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.anon-wish {
  margin-top: 32px;
  display: grid;
  gap: 18px;
}

.anon-wish h3 {
  margin: 0;
  font-family: "Libre Bodoni", serif;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-teal);
}

.anon-form {
  display: grid;
  gap: 14px;
}

.anon-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--c-teal) 25%, transparent);
  background: rgba(255, 255, 255, 0.92);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--c-deep);
  resize: vertical;
  min-height: 140px;
}

.anon-form textarea:focus {
  outline: none;
  border-color: var(--c-coral);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-coral) 35%, transparent);
}

.btn-secondary {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--c-teal) 45%, transparent);
  color: var(--c-teal);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: color-mix(in srgb, var(--c-aqua) 20%, white);
}

.btn-tertiary {
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed color-mix(in srgb, var(--c-teal) 35%, transparent);
  color: var(--text-muted);
}

.btn-tertiary:hover,
.btn-tertiary:focus-visible {
  background: color-mix(in srgb, var(--c-peach) 24%, white);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.form-storage {
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--glass);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  display: grid;
  gap: 4px;
  text-align: center;
  color: var(--text-muted);
}

.form-storage strong {
  font-size: 15px;
  color: var(--c-deep);
}

.storage-note {
  font-size: 13px;
  letter-spacing: 0.03em;
}

.form-feedback {
  margin: 0;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--c-lime);
  min-height: 18px;
}

.form-feedback.is-error {
  color: var(--c-coral);
}

.form-storage.is-disabled {
  border: 1px dashed color-mix(in srgb, var(--c-teal) 25%, transparent);
  background: rgba(255, 255, 255, 0.65);
  color: color-mix(in srgb, var(--c-deep) 55%, white);
}

.form-storage.is-disabled strong {
  color: color-mix(in srgb, var(--c-deep) 65%, white);
}

.site-credit {
  margin-top: 36px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c-deep) 55%, white);
}

/* ====== DAY PLAN ====== */

.day-plan-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: 28px;
  padding: clamp(32px, 6vw, 64px);
  box-shadow: 0 25px 70px var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.day-plan-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(32px, 4vw, 48px);
}

.day-plan-header p {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  color: var(--text-muted);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
  position: relative;
  --timeline-line-left: clamp(56px, 9vw, 124px);
  --timeline-time-offset: calc(var(--timeline-line-left) + 24px);
}

.timeline::before {
  content: "";
  position: absolute;
  left: var(--timeline-line-left);
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: color-mix(in srgb, var(--c-teal) 40%, transparent);
}

.timeline li {
  display: grid;
  grid-template-columns: minmax(
      calc(120px + var(--timeline-time-offset)),
      calc(150px + var(--timeline-time-offset))
    )
    1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  padding: clamp(12px, 2vw, 20px) clamp(18px, 3vw, 26px);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 40px rgba(31, 59, 64, 0.08);
}

.timeline li > div {
  align-self: flex-start;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: var(--timeline-line-left);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c-teal);
  box-shadow: 0 0 0 6px rgba(101, 182, 191, 0.25);
}

.timeline time {
  font-family: "Inter", sans-serif;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--c-deep);
  align-self: center;
  display: flex;
  align-items: center;
  padding-left: var(--timeline-time-offset);
  position: relative;
  z-index: 1;
}

.timeline h3 {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.3vw, 26px);
  font-weight: 600;
}

.timeline p {
  margin: 0;
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .timeline::before {
    left: 24px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    padding-left: 48px;
    align-items: flex-start;
  }

  .timeline li::before {
    left: 24px;
  }

  .timeline time {
    font-size: 20px;
    align-self: flex-start;
    padding-left: 0;
  }

  .timeline li > div {
    align-self: flex-start;
  }
}

/* ====== GIFTS ====== */

.gifts-card {
  background: white;
  border-radius: 32px;
  padding: clamp(32px, 5vw, 64px);
  box-shadow: 0 30px 80px rgba(31, 59, 64, 0.12);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  overflow: hidden;
  position: relative;
}

.gifts-text,
.gift-options {
  position: relative;
  z-index: 1;
}

.gifts-text {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.gifts-description {
  margin-top: auto;
  margin-bottom: auto;
}

.gifts-animation {
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: clamp(160px, 22vw, 240px);
  height: clamp(160px, 22vw, 240px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

.gift-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
  animation: gifts-orb-float 6s ease-in-out infinite;
}

.gift-orb--one {
  width: 140px;
  height: 140px;
  right: 0;
  bottom: 0;
  animation-delay: 0s;
}

.gift-orb--two {
  width: 90px;
  height: 90px;
  right: 90px;
  bottom: 40px;
  animation-delay: 1.2s;
}

.gift-orb--three {
  width: 60px;
  height: 60px;
  right: 20px;
  bottom: 110px;
  animation-delay: 2.1s;
}

@keyframes gifts-orb-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.65;
  }
  50% {
    transform: translate3d(-8px, -12px, 0) scale(1.08);
    opacity: 0.9;
  }
}

.gifts-text p {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.gift-options {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: clamp(8px, 3vw, 24px);
  align-items: stretch;
}

.gift-option {
  border: 1px solid rgba(31, 59, 64, 0.08);
  border-radius: 24px;
  padding: 24px;
  background: color-mix(in srgb, var(--c-soft) 85%, white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "desc desc";
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
}

.gift-option h3 {
  margin: 0;
  font-size: 20px;
  grid-area: title;
  align-self: center;
  line-height: 1.2;
}

.gift-option p {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text-muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
  grid-area: desc;
}

.gift-icon {
  font-size: 36px;
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(101, 182, 191, 0.15);
  grid-area: icon;
  color: var(--c-deep);
}

.gift-icon svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gift-icon img {
  width: 34px;
  height: 34px;
  display: block;
}

.gift-icon--bouquet img {
  width: 40px;
  height: 40px;
}

@media (max-width: 900px) {
  .gifts-card {
    grid-template-columns: 1fr;
  }

  .gift-options {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .gifts-card {
    padding: 28px 20px;
    gap: 18px;
    text-align: center;
  }

  .gifts-text {
    display: grid;
    gap: 14px;
  }

  .gifts-description {
    margin: 0;
  }

  .gifts-text .section-title {
    margin-bottom: 12px;
  }

  .gift-options {
    gap: 16px;
  }

  .gift-option {
    text-align: left;
    padding: 20px 18px;
  }

  .gifts-animation {
    right: -12px;
    bottom: -36px;
    opacity: 0.6;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====== REVEAL ====== */

[data-reveal] {
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: opacity;
}

[data-reveal].in {
  opacity: 1;
}

/* ====== MEDIA ====== */

@media (min-width: 1024px) {
  .calendar-widget {
    gap: 24px;
  }

  .mini-calendar {
    --cal-cell: clamp(42px, 4vw, 58px);
    --cal-gap: 12px;
    padding: 34px;
    font-size: 18px;
  }

  .mini-calendar .hdr {
    font-size: 14px;
  }

  .choice-pill {
    min-height: 60px;
    font-size: 16px;
  }

  .wishlist-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    align-items: start;
  }

  .wishlist-text {
    text-align: left;
    margin: 0;
  }
}

@media (max-width: 768px) {
  .mini-calendar {
    --cal-cell: clamp(30px, 9vw, 36px);
    --cal-gap: 6px;
    padding: 20px;
    font-size: 14px;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 32px 0;
  }

  .invitation-card {
    padding: 32px 20px;
  }

  .invite-illustration {
    inset: auto -4% -12% auto;
    width: clamp(120px, 40vw, 180px);
    transform: rotate(180deg);
  }

  .rsvp-card .section-title {
    letter-spacing: 0.1em;
  }

  .mini-calendar {
    --cal-cell: clamp(28px, 11vw, 32px);
    --cal-gap: 4px;
    padding: 18px;
    --cal-mark: clamp(28px, 11vw, 32px);
  }

  .calendar-text {
    text-align: center;
  }

  .calendar-text p {
    text-align: center;
  }

  .rsvp-card {
    padding: 28px 16px;
  }

  .choice-pill {
    min-height: 52px;
    padding: 12px 16px;
  }

  .pill-text {
    font-size: 14px;
  }

  .wishlist-form-card {
    padding: 24px 20px;
  }

  .wishlist-form-card .form-actions {
    justify-content: center;
  }
}
