/* =====================================================================
   Sashin & Ornessa — Save the Date
   ===================================================================== */

:root {
  --paper: #f6f2ea;
  --paper-2: #ebe4d6;
  --cream: #f6f1e3;
  --ink: #2a2b1c;
  --ink-soft: #5c5a4c;
  --gold: #b8963e;
  --gold-2: #cfae62;
  --gold-dark: #8a6a2a;
  --wax: #8e2a1b;
  --wax-dark: #5a150c;
  --wax-light: #b9452d;
  --font: 'Cormorant Garamond', 'Cormorant', Garamond, 'EB Garamond', 'Times New Roman', serif;

  /* Sizes — set by script.js */
  --env-w: 900px;
  --env-h: 620px;
  --card-w: 600px;
  --card-h: 900px;
  --card-left: 0px;
  --card-top: 0px;

  /* Animation state — set by script.js every frame (0..1) */
  --f-top: 0;
  --f-bottom: 0;
  --f-left: 0;
  --f-right: 0;
  --env-o: 1;
  --env-s: 1;
  --card-s: .6;
  --card-r: 4px;
  --card-shadow: 1;
  --ext: 0;
  --hint-o: 1;
  --hint-more-o: 0;
}

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

html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}

/* Off-white paper with a soft vignette and a whisper of grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 85% 75% at 50% 45%, #faf7f1 0%, #f6f2ea 45%, #ece5d7 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .40 0 0 0 0 .30 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------
   Opener: scroll track + pinned stage
   --------------------------------------------------------------------- */
.opener {
  position: relative;
  height: 380vh;
  height: 380svh;
  z-index: 1;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene {
  position: relative;
  z-index: 2;
  animation: scene-in 1.8s cubic-bezier(.2,.7,.2,1) both;
}
.scene.idle .envelope { animation: float 7s ease-in-out infinite; }
@keyframes scene-in {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* ---------------------------------------------------------------------
   Envelope — landscape, seen from the back, four flaps
   --------------------------------------------------------------------- */
.envelope {
  position: relative;
  width: var(--env-w);
  height: var(--env-h);
}

.env-part {
  position: absolute;
  inset: 0;
  opacity: var(--env-o);
  transform: scale(var(--env-s));
  perspective: 1800px;
  perspective-origin: 50% 50%;
  pointer-events: none;
}

.env-inside {
  z-index: 1;
  border-radius: 4px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='6' cy='6' r='.9' fill='%239c7d3f' fill-opacity='.5'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #d8c6a4, #cbb68f);
  box-shadow:
    inset 0 0 40px rgba(90, 70, 30, .18),
    0 50px 80px -30px rgba(60, 45, 15, .35),
    0 18px 30px -18px rgba(60, 45, 15, .3);
  pointer-events: auto;
  cursor: pointer;
}

.part-left, .part-right { z-index: 3; }
.part-bottom            { z-index: 4; }
.part-top               { z-index: 5; }

.flap {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.flap-top    { transform-origin: 50% 0;    transform: rotateX(calc(var(--f-top) * 180deg)); }
.flap-bottom { transform-origin: 50% 100%; transform: rotateX(calc(var(--f-bottom) * -180deg)); }
.flap-left   { transform-origin: 0 50%;    transform: rotateY(calc(var(--f-left) * -180deg)); }
.flap-right  { transform-origin: 100% 50%; transform: rotateY(calc(var(--f-right) * 180deg)); }

.flap-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.face-in { display: none; }
.flap.open .face-out { display: none; }
.flap.open .face-in  { display: block; }
.flap.open .env-note, .flap.open .seal { display: none; }

.env-note {
  position: absolute;
  left: 0; right: 0;
  top: 80%;
  margin: 0;
  text-align: center;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(11px, calc(var(--env-w) * .021), 20px);
  letter-spacing: .06em;
  color: rgba(120, 95, 45, .8);
}

/* Wax seal — stuck to the tip of the top flap, lifts with it */
.seal {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 17%;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.seal:focus-visible .seal-glow { opacity: 1; }
.seal.lifted { pointer-events: none; }

.seal-glow {
  position: absolute;
  inset: -24%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,150,62,.5) 0%, rgba(184,150,62,0) 65%);
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
}
.scene.idle .seal-glow { animation: glow 3.2s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { opacity: 0; transform: scale(.85); }
  50%      { opacity: .85; transform: scale(1.05); }
}

.wax {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  /* the flap tips towards us as it opens, so the shadow has to be live */
  filter: drop-shadow(0 calc(var(--env-w) * .006) calc(var(--env-w) * .009) rgba(60, 25, 10, .45));
}

/* ---------------------------------------------------------------------
   The card
   --------------------------------------------------------------------- */
.card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card-w);
  height: var(--card-h);
  margin-left: calc(var(--card-w) / -2);
  margin-top: calc(var(--card-h) / -2);
  z-index: 2;
  transform: scale(var(--card-s));
  will-change: transform;
  container-type: inline-size;
  perspective: 1600px;
}
.card.free { z-index: 10; }

.card-inner {
  position: absolute;
  inset: 0;
  border-radius: var(--card-r);
  overflow: hidden;
  background: var(--cream);
  box-shadow:
    0 60px 80px -40px rgba(60, 45, 15, calc(.5 * var(--card-shadow))),
    0 20px 30px -20px rgba(60, 45, 15, calc(.4 * var(--card-shadow)));
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

/* Artwork layers (positions come from assets/art/layers.css) */
.art { position: absolute; inset: 0; overflow: hidden; }
.art-base { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.art-layer { position: absolute; display: block; pointer-events: none; will-change: transform; }

.art-leaves { transform-origin: 0% 100%; }
.art-garland-left, .art-garland-right { transform-origin: 50% 0%; }

.sway-leaves      { animation: sway-leaves 9s ease-in-out infinite; }
.sway-leaves-b    { animation: sway-leaves 11s ease-in-out -4s infinite; }
.sway-garland-a   { animation: pendulum 5.2s ease-in-out infinite alternate; }
.sway-garland-b   { animation: pendulum 4.3s ease-in-out -1.6s infinite alternate; }
.sway-garland-c   { animation: pendulum 4.8s ease-in-out -3.1s infinite alternate; }
@keyframes sway-leaves {
  0%, 100% { transform: scale(1.03) rotate(0deg) skewX(0deg); }
  50%      { transform: scale(1.035) rotate(-.6deg) skewX(.5deg); }
}
@keyframes pendulum {
  from { transform: rotate(-1.4deg); }
  to   { transform: rotate(1.4deg); }
}

/* Typography — measured from the original design */
.card-text {
  position: absolute;
  inset: 0;
  color: var(--ink);
  text-transform: uppercase;
  text-align: center;
  font-weight: 500;
  line-height: 1;
}
.card-text > * {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  padding-left: 2.2%;
}
.lotus { color: var(--gold-dark); stroke-dasharray: 220; stroke-dashoffset: 220; }
.lotus-top { top: 10.9%; left: 50.7%; right: auto; width: 7cqw;   height: 5.6cqw; margin-left: -3.5cqw; padding: 0; }
.lotus-mid { top: 50.0%; left: 50.7%; right: auto; width: 6.2cqw; height: 5cqw;   margin-left: -3.1cqw; padding: 0; }
.title  { top: 17.44%; font-size: 4.2cqw;  font-weight: 600; letter-spacing: .24em; text-indent: .24em; }
.sub    { top: 21.26%; font-size: 2.05cqw; letter-spacing: .34em; }
.name   { font-size: 4.6cqw; font-weight: 600; letter-spacing: .09em; text-indent: .09em; }
.name-1 { top: 25.87%; }
.name-2 { top: 33.23%; }
.amp    { top: 28.9%;  font-size: 6.4cqw; font-style: italic; font-weight: 500; text-transform: none; color: var(--gold-dark); letter-spacing: 0; }
.date   { top: 41.25%; font-size: 3.25cqw; letter-spacing: .22em; text-indent: .22em; }
.venue  { top: 44.3%;  font-size: 2.25cqw; letter-spacing: .19em; line-height: 1.34; }
.follow { top: 54.25%; font-size: 1.65cqw; letter-spacing: .335em; }
.tagline {
  top: 61.9%; left: 80.3%; right: auto; width: 30cqw; margin-left: -15cqw; padding: 0;
  font-size: 1.75cqw; letter-spacing: .35em; line-height: 1.95;
}
.rule { display: block; height: 1.5px; background: var(--gold-dark); padding: 0; right: auto; left: 50.7%; }
.rule-1 { top: 38.75%; width: 5.6cqw; margin-left: -2.8cqw; }
.rule-2 { top: 74.05%; left: 80.3%; width: 3.8cqw; margin-left: -1.9cqw; }

.reveal {
  opacity: 0;
  transform: translateY(1.6cqw);
  filter: blur(6px);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(.2,.7,.2,1), filter 1s ease, stroke-dashoffset 1.8s ease;
  transition-delay: var(--d, 0s);
}
.rule.reveal { transform: scaleX(0); }
.card.revealed .reveal { opacity: 1; transform: none; filter: none; }
.card.revealed .lotus { stroke-dashoffset: 0; }
.lotus-top { --d: .05s; } .title { --d: .2s; } .sub { --d: .36s; } .name-1 { --d: .52s; }
.amp { --d: .66s; } .name-2 { --d: .78s; } .rule-1 { --d: .94s; } .date { --d: 1.06s; }
.venue { --d: 1.2s; } .lotus-mid { --d: 1.34s; } .follow { --d: 1.48s; } .tagline { --d: 1.64s; } .rule-2 { --d: 1.84s; }

/* ---------------------------------------------------------------------
   Full-bleed extensions (fade in as the card fills the screen)
   --------------------------------------------------------------------- */
.scene-ext {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--ext);
  pointer-events: none;
}
.ext-wall {
  position: absolute;
  inset: 0;
  background-color: var(--wall-top);
  background-image:
    url('assets/art/wall-strip.png'),
    linear-gradient(to bottom, var(--art-top) 0, var(--art-top) var(--card-top),
                    var(--art-bottom) var(--card-top), var(--art-bottom) calc(var(--card-top) + var(--card-h)),
                    var(--wall-bottom) 100%);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% var(--card-h), 100% 100%;
  background-position: 0 var(--card-top), 0 0;
}
/* portrait phones: garland strands continue above the art box */
.ext-tile {
  position: absolute;
  top: 0;
  height: var(--card-top);
  background-repeat: repeat-y;
  background-size: 100% auto;
  display: none;
}
.ext-tile-left  { left: calc(var(--card-left) + var(--card-w) * var(--garland-left-tile-x));  width: calc(var(--card-w) * var(--garland-left-tile-w));  background-image: url('assets/art/garland-left-tile.webp'); }
.ext-tile-right { left: calc(var(--card-left) + var(--card-w) * var(--garland-right-tile-x)); width: calc(var(--card-w) * var(--garland-right-tile-w)); background-image: url('assets/art/garland-right-tile.webp'); }
.stage.fit-w .ext-tile { display: block; }
/* portrait phones: the marble floor continues below the art as a soft reflection */
.ext-floor {
  position: absolute;
  display: none;
  top: calc(var(--card-top) + var(--card-h));
  left: var(--card-left);
  width: var(--card-w);
  height: calc(var(--card-h) * .14);
  background: url('assets/art/base.webp') left bottom / var(--card-w) var(--card-h) no-repeat;
  transform: scaleY(-1);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
  mask-image: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
}
.stage.fit-w .ext-floor { display: block; }

/* landscape screens: pillar continues, extra garland and leaves fill the sides */
.ext-pillar, .ext-garland, .ext-leaves { display: none; }
.stage.fit-h .ext-pillar, .stage.fit-h .ext-garland, .stage.fit-h .ext-leaves { display: block; }
.ext-pillar {
  position: absolute;
  top: var(--card-top);
  left: calc(var(--card-left) + var(--card-w));
  width: calc(var(--card-w) * .084);
  height: var(--card-h);
  background-image: url('assets/art/base.webp');
  background-size: var(--card-w) var(--card-h);
  background-position: right top;
  transform: scaleX(-1);
}
.ext-garland {
  position: absolute;
  top: var(--card-top);
  left: calc(var(--card-left) + var(--card-w) * 1.30);
  width: calc(var(--card-w) * var(--garland-right-w));
  height: calc(var(--card-h) * var(--garland-right-h));
  background: url('assets/art/garland-right.webp') center/100% 100% no-repeat;
  transform-origin: 50% 0;
}
.ext-leaves {
  position: absolute;
  left: 0;
  bottom: calc(100% - var(--card-top) - var(--card-h) * var(--leaves-h));
  width: calc(var(--card-w) * var(--leaves-w) * 1.28);
  height: calc(var(--card-h) * var(--leaves-h) * 1.28);
  background: url('assets/art/leaves.webp') left bottom/100% 100% no-repeat;
  transform-origin: 0 100%;
  filter: brightness(.94) saturate(.95);
}

/* ---------------------------------------------------------------------
   Hints
   --------------------------------------------------------------------- */
.hint {
  position: absolute;
  left: 0; right: 0;
  bottom: max(10px, 1.6svh);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: var(--hint-o);
  transition: opacity .4s;
  z-index: 20;
}
.hint-more { opacity: var(--hint-more-o); }
.hint-text {
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-dark);
  opacity: .9;
}
.chevron {
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--gold-dark);
  border-bottom: 1.5px solid var(--gold-dark);
  transform: rotate(45deg);
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(45deg); opacity: .5; }
  50%      { transform: translateY(6px) rotate(45deg); opacity: 1; }
}

/* ---------------------------------------------------------------------
   Details section
   --------------------------------------------------------------------- */
.details {
  position: relative;
  z-index: 1;
  padding: 14vh 24px 8vh;
  text-align: center;
  color: var(--ink);
}
.details-inner { max-width: 680px; margin: 0 auto; }
.lotus-gold { width: 54px; height: 38px; color: var(--gold); margin-bottom: 18px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-dark); }
.couple {
  margin: 0;
  font-size: clamp(40px, 8vw, 68px);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.05;
}
.couple em { font-style: italic; font-weight: 500; text-transform: none; color: var(--gold-dark); font-size: .95em; margin: 0 .05em; }
.lede { margin: 14px auto 0; max-width: 420px; font-size: clamp(18px, 2.4vw, 22px); font-style: italic; color: var(--ink-soft); }

.fact-row { display: flex; align-items: stretch; justify-content: center; gap: clamp(20px, 5vw, 56px); margin: 44px auto 0; }
.fact { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.fact-label { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-dark); }
.fact-value { font-size: clamp(20px, 2.6vw, 26px); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.25; }
.fact-value small { display: block; font-size: .7em; font-weight: 500; letter-spacing: .14em; color: var(--ink-soft); }
.fact-divider { width: 1px; background: linear-gradient(transparent, var(--gold), transparent); opacity: .7; }

.countdown { margin: 52px 0 0; }
.countdown-label {
  margin: 0 0 18px;
  font-size: 13px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold-dark);
}
.clock {
  display: flex; align-items: flex-start; justify-content: center;
  gap: clamp(6px, 1.6vw, 18px);
}
.unit { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: clamp(58px, 15vw, 104px); }
.num {
  font-size: clamp(42px, 11vw, 78px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
  /* keeps the seconds from nudging the layout as digits change width */
  font-feature-settings: 'tnum' 1;
}
.cap { font-size: clamp(9px, 1.5vw, 12px); letter-spacing: .26em; text-transform: uppercase; color: var(--gold-dark); }
.sep {
  display: flex;
  align-items: center;
  height: clamp(42px, 11vw, 78px);   /* the numerals' own line box */
  font-size: clamp(24px, 6vw, 42px);
  line-height: 1;
  color: var(--gold);
  opacity: .45;
}
.countdown-note { margin: 16px 0 0; font-style: italic; font-size: clamp(16px, 2.2vw, 19px); color: var(--gold-dark); min-height: 1.4em; }
.countdown.done .clock { display: none; }
.countdown.done .countdown-label { display: none; }
.countdown.done .countdown-note { font-size: clamp(20px, 3vw, 26px); }

.cal {
  margin: 44px auto 0;
  padding: 34px 22px 26px;
  border: 1px solid rgba(138,106,42,.4);
  border-radius: 6px;
  position: relative;
  background: rgba(255,255,255,.35);
}
.cal::before, .cal::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(138,106,42,.2); border-radius: 3px; pointer-events: none; }
.cal::after { inset: 10px; border-color: rgba(138,106,42,.1); }
.cal-title { margin: 0 0 22px; font-size: 13px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-dark); }
.cal-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  background: transparent;
  transition: background .3s, color .3s, transform .3s, box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn:hover, .btn:focus-visible {
  background: var(--gold-dark);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(138,106,42,.6);
  outline: none;
}
.ics-link {
  display: inline-block; margin-top: 18px;
  font-size: 14px; font-style: italic; color: var(--ink-soft);
  text-decoration: none; border-bottom: 1px solid rgba(42,43,28,.25);
  transition: color .3s, border-color .3s;
}
.ics-link:hover { color: var(--gold-dark); border-color: var(--gold-dark); }
.follow-note { margin: 40px 0 0; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); }
.replay { margin-top: 26px; padding: 8px 14px; border: 0; background: none; color: var(--gold-dark); font-family: var(--font); font-size: 15px; font-style: italic; cursor: pointer; opacity: .8; transition: opacity .3s; }
.replay:hover { opacity: 1; }
.foot { margin-top: 10vh; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: rgba(42,43,28,.45); }

/* ---------------------------------------------------------------------
   Music toggle
   --------------------------------------------------------------------- */
.audio-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 50;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 12px;
  border: 1px solid rgba(138,106,42,.5);
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gold-dark);
  font-family: var(--font);
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-8px);
  animation: toggle-in .8s 1.2s ease both;
  transition: border-color .3s, background .3s;
}
.audio-toggle:hover { border-color: var(--gold-dark); background: rgba(255,255,255,.85); }
.audio-toggle.nudge { animation: toggle-in .8s 1.2s ease both, nudge 2.4s 2.2s ease-in-out infinite; }
@keyframes toggle-in { to { opacity: 1; transform: none; } }
@keyframes nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(138,106,42,0); }
  50%      { box-shadow: 0 0 0 6px rgba(138,106,42,.2); }
}
.bars { display: inline-flex; align-items: flex-end; gap: 2px; width: 16px; height: 14px; }
.bars i { flex: 1; height: 30%; background: currentColor; border-radius: 1px; transform-origin: bottom; transition: height .3s; }
.audio-toggle.playing .bars i { animation: eq 1s ease-in-out infinite; }
.audio-toggle.playing .bars i:nth-child(2) { animation-delay: -.3s; }
.audio-toggle.playing .bars i:nth-child(3) { animation-delay: -.6s; }
.audio-toggle.playing .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* Debug (?p=) — freeze motion so screenshots are stable */
html.debug .scene, html.debug .audio-toggle, html.debug .scene.idle .envelope,
html.debug .art-layer, html.debug .ext-garland, html.debug .ext-leaves, html.debug .chevron {
  animation: none !important;
}
html.debug .scene, html.debug .audio-toggle { opacity: 1; transform: none; }
html.debug .seal-glow { animation: none !important; }
html.debug .art-leaves { transform: scale(1.03); }
html.debug .reveal, html.debug .hint { transition: none !important; }
html.notext .card-text { visibility: hidden; }

/* ---------------------------------------------------------------------
   Responsive & motion preferences
   --------------------------------------------------------------------- */
@media (max-width: 520px) {
  .hint-text { font-size: 11px; letter-spacing: .22em; }
  .fact-row { flex-direction: column; gap: 22px; align-items: center; }
  .fact-divider { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
  .btn { width: 100%; justify-content: center; }
  .audio-label { display: none; }
  .audio-toggle { padding: 10px 12px; gap: 0; }
  .follow-note { font-size: 12px; letter-spacing: .2em; }
  .details { padding-top: 12vh; }
}

@media (prefers-reduced-motion: reduce) {
  .scene, .scene.idle .envelope, .scene.idle .seal-glow, .chevron, .audio-toggle,
  .audio-toggle.playing .bars i, .art-layer, .ext-garland, .ext-leaves { animation: none !important; opacity: 1; }
  .art-leaves { transform: scale(1.03); }
  .reveal { transition-duration: .3s; filter: none; transform: none; }
}
