:root {
  --ivory: #f8f3e8;
  --ivory-2: #fffaf1;
  --forest: #173323;
  --forest-soft: #526257;
  --gold: #b68a3b;
  --line: #d9ccb2;
}

/* Exact requested font names are used first when they are installed/licensed on the device.
   Google-hosted fallbacks keep the site usable without redistributing font files. */
.font-title,
body {
  font-family: "The Youngest Serif", "Cormorant Garamond", Georgia, serif;
}

.font-fancy {
  font-family: "Brittany Signature", "Brittany", "Allura", cursive;
}

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.has-scroll-smooth {
  overflow: hidden;
}

html.has-scroll-dragging {
  user-select: none;
}

[data-scroll-container] {
  min-height: 100vh;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ivory);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  -webkit-hyphens: manual;
  text-wrap: pretty;
}

main,
.section-heading,
.detail-card,
.couple-card,
.reveal,
.has-text-reveal {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

::selection {
  background: #d9c69c;
  color: #173323;
}

.btn-primary,
.btn-secondary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.45rem;
  font-family: "The Youngest Serif", "Cormorant Garamond", Georgia, serif;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn-primary {
  color: #fff;
  background: #345225;
  box-shadow: 0 10px 24px rgba(52, 82, 37, 0.18);
}

.btn-secondary {
  color: #345225;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(52,82,37,0.35);
}

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

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.gallery-item:focus-visible,
#lightboxClose:focus-visible,
.lightbox-nav:focus-visible {
  outline: 3px solid rgba(182,138,59,0.45);
  outline-offset: 3px;
}

.lightbox-nav {
  display: grid;
  height: 2.75rem;
  width: 2.75rem;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: "The Youngest Serif", "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  padding: 0 0 0.12rem;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

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

@media (min-width: 640px) {
  .lightbox-nav {
    height: 3rem;
    width: 3rem;
    font-size: 2.25rem;
  }
}

.section-heading {
  text-align: center;
}

.section-heading p {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: #718076;
}

.section-heading h2 {
  margin-top: 0.65rem;
  font-family: "The Youngest Serif", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  color: #173323;
}

.section-heading img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  margin: 0.7rem auto 0;
}

.couple-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 330px;
  border: 1px solid rgba(182,138,59,0.14);
  background: rgba(255, 252, 245, 0.97);
  border-radius: 2rem;
  padding: 2rem;
  box-shadow: 0 18px 50px rgba(62, 77, 64, 0.06);
}

.couple-photo-shell {
  flex: 0 0 auto;
  width: 180px;
  height: 255px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.detail-card {
  position: relative;
  z-index: 2;
  min-height: 270px;
  border: 1px solid rgba(182,138,59,0.18);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1.8rem;
  padding: 2rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 15px 45px rgba(62, 77, 64, 0.045);
}

.detail-card > span {
  margin-top: 1rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: #617162;
}

.detail-card h3 {
  margin-top: 0.7rem;
  font-family: "The Youngest Serif", "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.12;
  color: #203a29;
  text-wrap: balance;
}

.detail-card p {
  margin-top: 0.5rem;
  font-family: "The Youngest Serif", "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  color: #667268;
}

.journey-masonry {
  column-count: 2;
  column-gap: 1px;
}

.journey-masonry .gallery-item {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.journey-masonry .gallery-item img {
  width: 100%;
  height: auto;
  vertical-align: middle;
  border-radius: 0;
}

@media (min-width: 1024px) {
  .journey-masonry {
    column-count: 3;
  }
}

@media (min-width: 1280px) {
  .journey-masonry {
    column-count: 4;
  }
}

.gallery-item {
  position: relative;
  z-index: 2;
  display: block;
  overflow: hidden;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  border-radius: 1.55rem;
  background: #ede9e0;
  box-shadow: 0 12px 35px rgba(41, 58, 45, 0.08);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.2,.7,.2,1), filter 300ms ease;
}

.gallery-item::after {
  content: "View";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(248, 243, 232, 0.86);
  color: #173323;
  font-family: "The Youngest Serif", "Cormorant Garamond", serif;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
  filter: saturate(1.03) contrast(1.01);
}

.gallery-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  --reveal-delay: 0ms;
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay);
  backface-visibility: hidden;
}

.reveal.reveal-gsap {
  transition: none;
  will-change: transform, opacity;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: none;
  will-change: auto;
}

.reveal-fade-up {
  transform: translateY(32px);
}

.reveal-left {
  transform: translateX(-42px);
}

.reveal-right {
  transform: translateX(42px);
}

.reveal-scale {
  transform: scale(0.94);
}

.reveal-blur {
  transform: translate3d(0, 16px, 0);
}

.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible {
  transform: translate(0) scale(1);
}

.has-text-reveal .text-reveal-word-group {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  vertical-align: top;
}

.has-text-reveal .text-reveal-word,
.has-text-reveal .text-reveal-line,
.has-text-reveal .text-reveal-char {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.has-text-reveal .text-reveal-word-inner,
.has-text-reveal .text-reveal-line-inner,
.has-text-reveal .text-reveal-char {
  display: inline-block;
  transform: translate3d(0, 108%, 0);
  opacity: 0;
  transition:
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 620ms cubic-bezier(0.22, 1, 0.36, 1);
  backface-visibility: hidden;
}

.has-text-reveal .text-reveal-char {
  transform: translate3d(0, 105%, 0);
}

.reveal.is-visible.has-text-reveal .text-reveal-word-inner,
.reveal.is-visible.has-text-reveal .text-reveal-line-inner,
.reveal.is-visible.has-text-reveal .text-reveal-char,
.reveal.is-visible .has-text-reveal .text-reveal-word-inner,
.reveal.is-visible .has-text-reveal .text-reveal-line-inner,
.reveal.is-visible .has-text-reveal .text-reveal-char {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.reveal.is-visible.has-text-reveal .text-reveal-word-inner,
.reveal.is-visible .has-text-reveal .text-reveal-word-inner {
  transition-delay: calc(min(var(--word-i, 0), 18) * 40ms + var(--reveal-delay, 0ms));
}

.reveal.is-visible.has-text-reveal .text-reveal-line-inner,
.reveal.is-visible .has-text-reveal .text-reveal-line-inner {
  transition-delay: calc(var(--line-i, 0) * 120ms + var(--reveal-delay, 0ms));
}

.reveal.is-visible.has-text-reveal .text-reveal-char,
.reveal.is-visible .has-text-reveal .text-reveal-char {
  transition-delay: calc(min(var(--char-i, 0), 24) * 22ms + var(--reveal-delay, 0ms));
}

.reveal[data-text-reveal] {
  opacity: 1;
  transform: none;
  filter: none;
}

.has-text-reveal .text-reveal-word::after {
  content: '\00a0';
}

.loader-leaf {
  animation: floatLeaf 1.6s ease-in-out infinite;
}

.loader-line {
  width: 40%;
  animation: loadingLine 1.2s ease-in-out infinite;
}

.loader-open-btn {
  margin-top: 1.75rem;
  min-height: 3rem;
  padding: 0.75rem 1.65rem;
  border: none;
  border-radius: 999px;
  background: #345225;
  color: #fff;
  font-family: "The Youngest Serif", "Cormorant Garamond", Georgia, serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(23, 51, 35, 0.22);
  transition: transform 180ms ease, background-color 180ms ease, opacity 420ms ease;
}

.loader-open-btn[hidden] {
  display: none;
}

.loader-open-btn.is-ready {
  animation: loaderOpenBtnIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.loader-open-btn:hover {
  background: #2d4720;
  transform: translateY(-2px);
}

.loader-open-btn:focus-visible {
  outline: 3px solid rgba(182, 138, 59, 0.45);
  outline-offset: 3px;
}

@keyframes loaderOpenBtnIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-scroll-hint {
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #4a6354;
  text-decoration: none;
  text-align: center;
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.page-section--hero .hero-scroll-hint--inline {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 1.35rem auto 0;
  padding: 0.35rem 0.75rem;
}

.page-section--hero .hero-scroll-hint--inline.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.page-section--hero .hero-scroll-hint--dock {
  display: none;
}

.page-section--hero .hero-scroll-hint--dock.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-scroll-hint__label {
  font-family: "Italiana", "Cormorant Garamond", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3d5648;
}

.hero-scroll-hint__icon {
  display: block;
  font-family: "Material Symbols Outlined";
  font-size: 2.75rem;
  line-height: 1;
  color: #b68a3b;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
  animation: heroScrollBounce 1.85s ease-in-out infinite;
}

@media (min-width: 640px) {
  .page-section--hero .hero-scroll-hint--inline {
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .hero-scroll-hint__label {
    font-size: 1.35rem;
    letter-spacing: 0.2em;
  }

  .hero-scroll-hint__icon {
    font-size: 3.25rem;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
  }
}

@media (min-width: 768px) {
  .page-section--hero {
    padding-bottom: 6.25rem;
  }

  .page-section--hero .hero-scroll-hint--inline {
    display: none !important;
  }

  .page-section--hero .hero-scroll-hint--dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
    display: flex;
    width: fit-content;
    max-width: calc(100% - 2rem);
    margin-inline: auto;
    padding: 0.35rem 0.75rem;
    transform: none;
  }

  .page-section--hero .hero-scroll-hint--dock.is-hidden {
    transform: translateY(14px);
  }

  .page-section--hero .hero-scroll-hint__label {
    font-size: 1.4rem;
    letter-spacing: 0.22em;
  }

  .page-section--hero .hero-scroll-hint__icon {
    font-size: 3.5rem;
  }
}

@keyframes heroScrollBounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.75;
  }
  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}

@keyframes floatLeaf {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-7px) rotate(3deg); }
}

@keyframes loadingLine {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(360%); }
}

@media (max-width: 767px) {
  .couple-card {
    flex-direction: column;
    gap: 1.35rem;
    padding: 1.55rem;
  }

  .couple-photo-shell {
    width: 160px;
    height: 228px;
  }

  .gallery-item::after {
    display: none;
  }
}

.sticky-invite-fab {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 980;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border-radius: 999px;
  color: #fff;
  background: #345225;
  box-shadow: 0 12px 28px rgba(23, 51, 35, 0.28);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.sticky-invite-fab:hover {
  transform: translateY(-2px);
  background: #2d4720;
}

.sticky-invite-fab:focus-visible {
  outline: 3px solid rgba(182, 138, 59, 0.45);
  outline-offset: 3px;
}

.sticky-invite-fab__plus {
  display: block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  transform: translateY(-0.06em);
}

.sticky-fab-group {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 980;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sticky-music-fab {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  color: #fff;
  background: #345225;
  box-shadow: 0 12px 28px rgba(23, 51, 35, 0.28);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.sticky-music-fab:hover {
  transform: translateY(-2px);
  background: #2d4720;
}

.sticky-music-fab:focus-visible {
  outline: 3px solid rgba(182, 138, 59, 0.45);
  outline-offset: 3px;
}

.sticky-music-fab__icon {
  display: block;
  font-size: 1.375rem;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.sticky-music-fab__icon--off {
  display: none;
}

.sticky-music-fab.is-muted .sticky-music-fab__icon--on {
  display: none;
}

.sticky-music-fab.is-muted .sticky-music-fab__icon--off {
  display: block;
}

.sticky-location-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.65rem 1rem 0.65rem 0.85rem;
  border-radius: 999px;
  color: #fff;
  background: #345225;
  box-shadow: 0 12px 28px rgba(23, 51, 35, 0.28);
  font-family: "The Youngest Serif", "Cormorant Garamond", Georgia, serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.sticky-location-fab:hover {
  transform: translateY(-2px);
  background: #2d4720;
}

.sticky-location-fab:focus-visible {
  outline: 3px solid rgba(182, 138, 59, 0.45);
  outline-offset: 3px;
}

.sticky-location-fab__icon {
  flex-shrink: 0;
}

.sticky-location-fab__label {
  line-height: 1;
}

@media (min-width: 640px) {
  .sticky-invite-fab {
    top: 1.25rem;
    right: 1.25rem;
  }

  .sticky-fab-group {
    right: 1.25rem;
    bottom: 1.5rem;
  }

  .sticky-location-fab {
    padding-inline: 1.1rem 1.15rem;
  }
}

/* =========================================
   FALLING LEAVES (behind page content)
========================================== */
.leaf-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.site-main {
  position: relative;
  z-index: 2;
}

.page-section {
  position: relative;
  z-index: 1;
  background-color: transparent;
}

.page-section--hero {
  background-color: rgba(251, 247, 237, 0.76);
}

.page-section--ivory {
  background-color: rgba(248, 243, 232, 0.76);
}

.page-section--cream {
  background-color: rgba(255, 250, 241, 0.76);
}

.page-section--closing {
  background-color: rgba(255, 253, 250, 0.76);
}

.leaf {
  position: absolute;
  top: -100px;
  width: var(--leaf-width);
  height: var(--leaf-height);
  opacity: var(--leaf-opacity);
  will-change: transform;
  perspective: 500px;
  animation: leafFall var(--fall-duration) linear forwards;
}

.leaf-sway {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: leafSway var(--sway-duration) ease-in-out infinite alternate;
}

.leaf-fold {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: center;
  animation: leafFold var(--fold-duration) ease-in-out infinite;
}

.leaf svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 2px rgba(10, 55, 25, 0.1));
  overflow: visible;
}

@keyframes leafFall {
  0% {
    transform: translate3d(0, -8vh, 0) rotateZ(var(--start-rotate));
  }

  25% {
    transform: translate3d(var(--drift-one), 28vh, 0) rotateZ(calc(var(--start-rotate) + 50deg));
  }

  50% {
    transform: translate3d(var(--drift-two), 58vh, 0) rotateZ(calc(var(--start-rotate) + 130deg));
  }

  75% {
    transform: translate3d(var(--drift-three), 88vh, 0) rotateZ(calc(var(--start-rotate) + 210deg));
  }

  100% {
    transform: translate3d(var(--drift-four), 125vh, 0) rotateZ(calc(var(--start-rotate) + 300deg));
  }
}

@keyframes leafSway {
  0% {
    transform: translateX(-6px) rotateZ(-8deg);
  }

  50% {
    transform: translateX(8px) rotateZ(5deg);
  }

  100% {
    transform: translateX(-3px) rotateZ(11deg);
  }
}

@keyframes leafFold {
  0% {
    transform: rotateX(12deg) rotateY(-10deg) scaleX(1);
  }

  20% {
    transform: rotateX(52deg) rotateY(35deg) scaleX(0.88);
  }

  45% {
    transform: rotateX(-30deg) rotateY(85deg) scaleX(0.65);
  }

  65% {
    transform: rotateX(-55deg) rotateY(135deg) scaleX(0.82);
  }

  82% {
    transform: rotateX(20deg) rotateY(190deg) scaleX(0.95);
  }

  100% {
    transform: rotateX(12deg) rotateY(350deg) scaleX(1);
  }
}

/* =========================================
   BUTTERFLIES (slow flight, perch on content)
========================================== */
#butterfly-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}

.letter-perch {
  position: relative;
  display: inline-block;
}

.letter-perch.creature-letter-landed {
  animation: letterBounce 0.42s ease;
}

@keyframes letterBounce {
  30% { transform: translateY(-4px) rotate(-3deg); }
  65% { transform: translateY(2px) rotate(2deg); }
}

.butterfly-perch {
  position: relative;
}

.butterfly-perch.butterfly-landed::after {
  content: "✦";
  position: absolute;
  top: -9px;
  right: 8px;
  color: #b68a3b;
  font-size: 14px;
  pointer-events: none;
  animation: butterflySparkle 0.7s ease forwards;
}

@keyframes butterflySparkle {
  from {
    opacity: 0;
    transform: scale(0.2) rotate(0);
  }
  40% { opacity: 1; }
  to {
    opacity: 0;
    transform: translateY(-13px) scale(1.4) rotate(60deg);
  }
}

.butterfly {
  position: fixed;
  left: 0;
  top: 0;
  width: 34px;
  height: 30px;
  pointer-events: none;
  transform: translate(-50%, -100%);
  will-change: left, top;
  transition:
    left var(--travel-time, 1.8s) cubic-bezier(0.33, 0.1, 0.25, 1),
    top var(--travel-time, 1.8s) cubic-bezier(0.33, 0.1, 0.25, 1);
}

.butterfly-visual {
  position: relative;
  width: 100%;
  height: 100%;
  transform:
    scale(var(--size, 1))
    scaleX(var(--direction, 1));
  transform-origin: center bottom;
  transform-style: preserve-3d;
}

.butterfly-body {
  position: absolute;
  left: 50%;
  top: 6px;
  z-index: 3;
  width: 3px;
  height: 17px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(#36452a, #181f16);
}

.butterfly-body::before,
.butterfly-body::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 1px;
  height: 7px;
  background: #38442f;
}

.butterfly-body::before {
  left: 0;
  transform: rotate(-28deg);
}

.butterfly-body::after {
  right: 0;
  transform: rotate(28deg);
}

.butterfly-wing {
  position: absolute;
  top: 2px;
  width: var(--wing-top-w, 16px);
  height: var(--wing-top-h, 19px);
  transform-style: preserve-3d;
  filter: drop-shadow(0 2px 2px rgba(20, 50, 25, 0.14));
}

.butterfly-wing::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--top-radius, 85% 40% 78% 42%);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 21%),
    linear-gradient(145deg, var(--wing-light), var(--wing-color));
}

.butterfly-wing::after {
  content: "";
  position: absolute;
  top: var(--lower-top, 11px);
  width: var(--wing-bottom-w, 10px);
  height: var(--wing-bottom-h, 9px);
  border-radius: var(--bottom-radius, 65% 40% 80% 55%);
  background: var(--wing-color);
}

.butterfly-wing.left {
  right: 50%;
  transform-origin: right center;
}

.butterfly-wing.right {
  left: 50%;
  transform-origin: left center;
}

.butterfly-wing.left::after { right: 1px; }
.butterfly-wing.right::after { left: 1px; }

.butterfly.flying .butterfly-wing.left {
  animation: butterflyLeft var(--flutter-speed, 0.42s) ease-in-out infinite;
}

.butterfly.flying .butterfly-wing.right {
  animation: butterflyRight var(--flutter-speed, 0.42s) ease-in-out infinite;
}

.butterfly.flying .butterfly-visual {
  animation: butterflyBodyFloat 2.4s ease-in-out infinite alternate;
}

@keyframes butterflyLeft {
  0%, 100% { transform: rotateY(10deg) rotateZ(-7deg); }
  50% { transform: rotateY(73deg) rotateZ(-2deg); }
}

@keyframes butterflyRight {
  0%, 100% { transform: rotateY(-10deg) rotateZ(7deg); }
  50% { transform: rotateY(-73deg) rotateZ(2deg); }
}

@keyframes butterflyBodyFloat {
  from { margin-top: -2px; }
  to { margin-top: 3px; }
}

.butterfly.resting .butterfly-wing.left {
  animation: butterflyRestLeft 1.8s ease-in-out infinite;
}

.butterfly.resting .butterfly-wing.right {
  animation: butterflyRestRight 1.8s ease-in-out infinite;
}

.butterfly.resting .butterfly-visual {
  animation: restBreath 1.3s ease-in-out infinite alternate;
}

@keyframes butterflyRestLeft {
  0%, 100% { transform: rotateY(34deg); }
  50% { transform: rotateY(54deg); }
}

@keyframes butterflyRestRight {
  0%, 100% { transform: rotateY(-34deg); }
  50% { transform: rotateY(-54deg); }
}

@keyframes restBreath {
  to {
    transform:
      scale(var(--size, 1))
      scaleX(var(--direction, 1))
      translateY(1px);
  }
}

.butterfly.takeoff .butterfly-visual {
  animation: butterflyTakeoff 0.22s ease;
}

@keyframes butterflyTakeoff {
  50% {
    transform:
      scale(var(--size, 1))
      scaleX(var(--direction, 1))
      translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-hint__icon {
    animation: none;
  }

  .leaf-background {
    display: none;
  }

  #butterfly-layer {
    display: none;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  .has-text-reveal .text-reveal-word-inner,
  .has-text-reveal .text-reveal-line-inner,
  .has-text-reveal .text-reveal-char {
    transform: none;
    opacity: 1;
  }
}
