:root {
  --stage-w: min(100vw, 480px);
  --art-scale: calc(var(--stage-w) / 1366);
  --maroon: #600a0a;
  --wine-deep: #24070c;
  --wine-card: rgba(34, 6, 11, 0.76);
  --olive-gold: #717900;
  --olive-gold-hover: #838c00;
  --cream: #faf3ed;
  --ivory: #fdf9f6;
  --champagne: #e6ddcb;
  --border-gold: rgba(230, 221, 203, 0.28);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: #0c160f;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 0%, rgba(72, 14, 24, 0.35), transparent 58%),
    linear-gradient(180deg, #0b160e 0%, #1a070b 50%, #0b160e 100%);
  color: var(--cream);
  font-family: 'Quattrocento', 'Cormorant Garamond', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-closed {
  overflow: hidden;
  height: 100dvh;
}

/* =========================================================
   COVER OVERLAY
   ========================================================= */
.cover-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a140d;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.cover-overlay.is-open {
  opacity: 0;
  transform: translateY(-28px) scale(1.02);
  pointer-events: none;
}

.cover-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  padding-bottom: max(6.5vh, 42px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

.cover-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  user-select: none;
  pointer-events: none;
}

.cover-artboard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1080px;
  height: 1920px;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(var(--cover-scale, 0.36));
  z-index: 2;
  pointer-events: none;
}

.cover-envelope-btn,
.cover-seal-btn {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.cover-seal-btn {
  transition: filter 0.25s ease;
}

.cover-seal-btn:hover {
  filter: drop-shadow(0 0 18px rgba(250, 243, 237, 0.45));
}

.cover-seal-spin {
  animation: coverSealSpin 20.3s linear infinite;
  transform-origin: center center;
  will-change: transform;
}

@keyframes coverSealSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.cover-rise-el {
  opacity: 0;
  animation: coverArtRise 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--cover-delay, 0ms) both;
}

@keyframes coverArtRise {
  from {
    opacity: 0;
    translate: 0 80px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.cover-content {
  position: relative;
  z-index: 3;
  text-align: center;
  font-family: 'Arimo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.cover-to {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
  opacity: 0.94;
}

.cover-guest {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.cover-open-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--maroon);
  color: #ffffff;
  padding: 11px 28px;
  border-radius: 999px;
  font-family: 'Arimo', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.cover-open-btn:hover,
.cover-open-btn:focus-visible {
  background: #771010;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  outline: none;
}

.cover-open-btn:active {
  transform: translateY(0) scale(0.98);
}

/* =========================================================
   MAIN INVITATION SHELL & ARTBOARD ENGINE
   ========================================================= */
.invitation-shell {
  width: var(--stage-w);
  margin: 0 auto;
  background: #2b090e;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.65);
  position: relative;
  overflow: hidden;
}

.artboard-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: block;
  contain: layout paint style;
}

.artboard-canvas {
  position: relative;
  transform-origin: top left;
  transform: scale(var(--art-scale));
}

.cnv-el {
  position: absolute;
}

.cnv-line {
  display: block;
}

.cnv-text {
  user-select: text;
}

/* Interactive elements inside artboards */
.cnv-maps-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--maroon);
  color: #ffffff;
  font-family: 'Quattrocento', serif;
  font-size: 48px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cnv-maps-btn:hover,
.cnv-maps-btn:focus-visible {
  background: #7a1010;
  transform: translateY(-3px);
  outline: none;
}

.cnv-copy-btn {
  appearance: none;
  border: 0;
  border-radius: 18px;
  padding: 24px 66px;
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.cnv-copy-btn:hover,
.cnv-copy-btn:focus-visible {
  filter: brightness(1.1);
  transform: translateY(-2px);
  outline: none;
}

.cnv-copy-btn:active {
  transform: scale(0.97);
}

.cnv-wa-link {
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cnv-wa-link:hover,
.cnv-wa-link:focus-visible {
  opacity: 0.85;
  transform: scale(1.03);
  outline: none;
}

/* Gallery interactive hover */
.cnv-gallery-cell {
  transition: filter 0.25s ease;
}

.cnv-gallery-cell:hover,
.cnv-gallery-cell:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.cnv-gallery-cell img {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cnv-gallery-cell:hover img {
  transform: scale(1.035);
}

/* Twinkling Sparkles (compositor-only opacity, paused when section is offscreen) */
.cnv-sparkles {
  pointer-events: none;
}

.cnv-sparkles svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cnv-sparkles .sp-group {
  animation: sparkleTwinkle 3.2s ease-in-out infinite;
  animation-play-state: paused;
}

.cnv-sparkles .sp-b {
  animation-delay: -1.6s;
}

.cover-overlay:not([hidden]) .cnv-sparkles .sp-group,
.artboard-section.is-sec-visible .cnv-sparkles .sp-group {
  animation-play-state: running;
}

@keyframes sparkleTwinkle {
  0%, 100% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.96;
  }
}

/* =========================================================
   SECTION 5: REFINED RSVP & WISHES (WITH PAX)
   Seamlessly matches the burgundy velvet + champagne theme
   ========================================================= */
.rsvp-section {
  position: relative;
  width: 100%;
  padding: 52px 22px 58px;
  overflow: hidden;
  color: var(--cream);
  border-top: 1px solid rgba(230, 221, 203, 0.12);
  border-bottom: 1px solid rgba(230, 221, 203, 0.12);
}

.rsvp-velvet-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(43, 9, 14, 0.45) 0%, rgba(28, 5, 9, 0.6) 50%, rgba(43, 9, 14, 0.45) 100%),
    url('assets/media/f36c62f2bb57c539b5c23e2684f29e0e.webp') center / cover no-repeat;
  pointer-events: none;
}

.rsvp-inner {
  position: relative;
  z-index: 2;
  max-width: 400px;
  margin: 0 auto;
}

.rsvp-header {
  text-align: center;
  margin-bottom: 24px;
}

.rsvp-title {
  font-family: 'Sloop Script Pro', serif;
  font-size: 62px;
  font-weight: 400;
  line-height: 1.05;
  color: var(--ivory);
  margin-bottom: 10px;
}

.rsvp-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--champagne);
  opacity: 0.95;
}

.rsvp-card {
  background: var(--wine-card);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 24px 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.field-group {
  margin-bottom: 16px;
  border: 0;
}

.field-group[hidden] {
  display: none;
}

.field-group label,
.attendance-fieldset legend {
  display: block;
  font-family: 'Quattrocento', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--champagne);
  margin-bottom: 7px;
}

.field-group input[type='text'],
.field-group select,
.field-group textarea {
  width: 100%;
  background: rgba(250, 243, 237, 0.08);
  border: 1px solid rgba(230, 221, 203, 0.3);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--ivory);
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field-group select {
  background-color: rgba(250, 243, 237, 0.08);
  padding-right: 28px;
  cursor: pointer;
}

.field-group select option {
  background: #2b090e;
  color: var(--ivory);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: rgba(250, 243, 237, 0.48);
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--champagne);
  background: rgba(250, 243, 237, 0.13);
}

.field-group textarea {
  resize: vertical;
  min-height: 82px;
}

/* Two-card Attendance Selector */
.attendance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attendance-option {
  position: relative;
  margin: 0 !important;
  cursor: pointer;
}

.attendance-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attendance-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 10px;
  border-radius: 12px;
  border: 1px solid rgba(230, 221, 203, 0.26);
  background: rgba(250, 243, 237, 0.06);
  color: rgba(250, 243, 237, 0.78);
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.attendance-option input:checked + .attendance-box {
  background: rgba(113, 121, 0, 0.28);
  border-color: #b4be3b;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(180, 190, 59, 0.45);
}

.attendance-option input[value='no']:checked + .attendance-box {
  background: rgba(96, 10, 10, 0.65);
  border-color: var(--champagne);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(230, 221, 203, 0.35);
}

.form-error {
  color: #ffb8b8;
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 13px;
  margin-bottom: 12px;
}

.rsvp-submit-btn {
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 11px;
  background: var(--olive-gold);
  color: #fcf2ea;
  padding: 13px 20px;
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  transition: background-color 0.2s ease, transform 0.18s ease, opacity 0.2s ease;
}

.rsvp-submit-btn:hover,
.rsvp-submit-btn:focus-visible {
  background: var(--olive-gold-hover);
  transform: translateY(-1px);
  outline: none;
}

.rsvp-submit-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

/* RSVP Success State */
.rsvp-success {
  text-align: center;
  padding: 10px 6px;
}

.rsvp-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(113, 121, 0, 0.28);
  border: 1px solid rgba(180, 190, 59, 0.6);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rsvp-success h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 25px;
  font-weight: 700;
  color: var(--ivory);
  margin-bottom: 6px;
}

.rsvp-success-meta {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(230, 221, 203, 0.14);
  border: 1px solid rgba(230, 221, 203, 0.24);
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 12.5px;
  color: var(--champagne);
  margin-bottom: 12px;
}

.rsvp-success-copy {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--cream);
  margin-bottom: 18px;
}

.rsvp-edit-btn {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(230, 221, 203, 0.45);
  color: var(--cream);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.rsvp-edit-btn:hover {
  background: rgba(250, 243, 237, 0.1);
}

/* Wishes Feed */
.wishes-block {
  margin-top: 28px;
}

.wishes-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(230, 221, 203, 0.2);
}

.wishes-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ivory);
}

.wishes-count {
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 12px;
  color: var(--champagne);
  opacity: 0.85;
}

.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wishes-empty {
  text-align: center;
  padding: 20px 14px;
  border-radius: 12px;
  background: rgba(34, 6, 11, 0.48);
  border: 1px dashed rgba(230, 221, 203, 0.22);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15.5px;
  font-style: italic;
  color: rgba(250, 243, 237, 0.76);
}

.wish-item {
  background: rgba(34, 6, 11, 0.62);
  border: 1px solid rgba(230, 221, 203, 0.18);
  border-radius: 12px;
  padding: 13px 15px;
}

.wish-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.wish-name {
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ivory);
}

.wish-badge {
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.wish-badge.is-yes {
  background: rgba(113, 121, 0, 0.34);
  border: 1px solid rgba(180, 190, 59, 0.45);
  color: #f4f7c8;
}

.wish-badge.is-no {
  background: rgba(250, 243, 237, 0.1);
  border: 1px solid rgba(230, 221, 203, 0.24);
  color: var(--champagne);
}

.wish-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  line-height: 1.48;
  color: var(--cream);
  white-space: pre-wrap;
  word-break: break-word;
}

.wish-time {
  display: block;
  margin-top: 6px;
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 11px;
  color: rgba(230, 221, 203, 0.58);
}

.wishes-more-btn {
  display: block;
  margin: 14px auto 0;
  appearance: none;
  background: transparent;
  border: 1px solid rgba(230, 221, 203, 0.35);
  color: var(--champagne);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.wishes-more-btn:hover {
  background: rgba(250, 243, 237, 0.1);
}

/* =========================================================
   FLOATING MUSIC BUTTON
   ========================================================= */
.music-btn {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(96, 10, 10, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

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

.music-btn:hover {
  transform: scale(1.06);
  background: #ffffff;
}

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

.music-btn:not(.is-playing) .icon-music {
  display: none;
}

.music-btn:not(.is-playing) .icon-muted {
  display: block;
}

.music-btn.is-playing .icon-music {
  animation: musicPulse 2.4s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* =========================================================
   GALLERY LIGHTBOX DIALOG
   ========================================================= */
.photo-dialog {
  margin: auto;
  max-width: min(94vw, 640px);
  max-height: 90dvh;
  background: transparent;
  border: 0;
  padding: 0;
  overflow: visible;
  color: #ffffff;
}

.photo-dialog::backdrop {
  background: rgba(10, 4, 6, 0.9);
  backdrop-filter: blur(6px);
}

.photo-dialog img {
  display: block;
  max-width: 100%;
  max-height: 76dvh;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.dialog-close {
  position: fixed;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(24, 6, 10, 0.8);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.photo-controls {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 13px;
}

.photo-controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(24, 6, 10, 0.8);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* =========================================================
   TOAST NOTIFICATION
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  background: rgba(24, 7, 10, 0.94);
  border: 1px solid rgba(230, 221, 203, 0.35);
  color: var(--ivory);
  padding: 11px 20px;
  border-radius: 999px;
  font-family: 'Arimo', system-ui, sans-serif;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(92vw, 400px);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================
   ENTRANCE ANIMATIONS (Rise, Pop, Clarify)
   ========================================================= */
.cover-bg-img {
  animation: coverSettle 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.cover-rise {
  opacity: 0;
  animation: coverRiseIn 0.72s cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--cover-delay, 0ms) both;
}

@keyframes coverSettle {
  from {
    opacity: 0.72;
    transform: scale(1.035);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes coverRiseIn {
  from {
    opacity: 0;
    translate: 0 28px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* Preset A: 8 — Rise (EaseOutQuad: cubic-bezier(0.25, 0.46, 0.45, 0.94)) */
.anim-ready [data-anim='rise'] {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity var(--anim-dur, 700ms) cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--anim-delay, 0ms),
    translate var(--anim-dur, 700ms) cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--anim-delay, 0ms);
}

.anim-ready [data-anim='rise'].is-animating {
  will-change: opacity, translate;
}

.anim-ready .artboard-section [data-anim='rise'] {
  translate: 0 110px;
}

.anim-ready [data-anim='rise'].is-inview {
  opacity: 1;
  translate: 0 0;
}

/* Preset A: 19 — Pop (Elastic-Out overshoot; char-level on titles, word-level on paragraphs) */
.anim-word {
  display: inline-block;
  white-space: nowrap;
}

.anim-unit {
  display: inline-block;
}

.anim-ready [data-anim='pop'] .anim-unit {
  opacity: 0;
  transform: scale(0);
}

.anim-ready [data-anim='pop'].is-inview .anim-unit {
  animation: textPop var(--unit-dur, 720ms) linear var(--unit-delay, 0ms) both;
}

.anim-ready [data-anim='pop'].is-anim-done .anim-unit {
  animation: none;
  opacity: 1;
  transform: none;
}

@keyframes textPop {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  2% {
    opacity: 1;
    transform: scale(0.08);
  }
  34% {
    opacity: 1;
    transform: scale(1.16);
  }
  58% {
    opacity: 1;
    transform: scale(0.95);
  }
  78% {
    opacity: 1;
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Preset A: 32 — Clarify (Eastward slide + randomized blur-fade on titles / GPU soft-reveal on long copy) */
.anim-ready [data-anim='clarify'] {
  translate: -22px 0;
  transition: translate var(--slide-dur, 1050ms) cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--anim-delay, 0ms);
}

.anim-ready [data-anim='clarify'].is-animating {
  will-change: translate;
}

.anim-ready .artboard-section [data-anim='clarify'] {
  translate: -85px 0;
}

.anim-ready [data-anim='clarify'].is-inview {
  translate: 0 0;
}

.anim-ready [data-anim='clarify'][data-anim-gran='char'] .anim-unit {
  opacity: 0;
  filter: blur(4px);
}

.anim-ready [data-anim='clarify'][data-anim-gran='char'].is-inview .anim-unit {
  animation: textClarifyBlur var(--unit-dur, 820ms) linear var(--unit-delay, 0ms) both;
}

.anim-ready [data-anim='clarify'][data-anim-gran='word'] .anim-unit {
  opacity: 0;
  transform: translate3d(-10px, 0, 0) scale(0.96);
}

.anim-ready [data-anim='clarify'][data-anim-gran='word'].is-inview .anim-unit {
  animation: textClarifySoft var(--unit-dur, 760ms) cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--unit-delay, 0ms) both;
}

.anim-ready [data-anim='clarify'].is-anim-done .anim-unit {
  animation: none;
  opacity: 1;
  filter: none;
  transform: none;
}

@keyframes textClarifyBlur {
  0% {
    opacity: 0;
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes textClarifySoft {
  0% {
    opacity: 0;
    transform: translate3d(-10px, 0, 0) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cnv-sparkles .sp-group,
  .music-btn.is-playing .icon-music,
  .cover-bg-img,
  .cover-rise,
  .cover-rise-el,
  .cover-seal-spin,
  .anim-ready [data-anim='pop'].is-inview .anim-unit,
  .anim-ready [data-anim='clarify'].is-inview .anim-unit {
    animation: none !important;
  }
  .cover-rise,
  .cover-rise-el,
  .anim-ready [data-anim='rise'],
  .anim-ready [data-anim='clarify'],
  .anim-ready [data-anim='pop'] .anim-unit,
  .anim-ready [data-anim='clarify'] .anim-unit {
    opacity: 1 !important;
    translate: 0 0 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .cover-overlay {
    transition: opacity 0.2s ease;
  }
}
