/* ==========================================================================
   Shaniya & Mithun · Wedding invitation
   Palette and line art follow the printed card: maroon ground, copper ink.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: "Citadel Script"; src: url(../assets/fonts/citadel-script.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Yeseva One"; src: url(../assets/fonts/yeseva-one.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "The Seasons"; src: url(../assets/fonts/the-seasons-lt.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "The Seasons"; src: url(../assets/fonts/the-seasons-reg.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "The Seasons"; src: url(../assets/fonts/the-seasons-bd.woff2) format("woff2"); font-weight: 700; font-display: swap; }
/* Legacy-encoded Malayalam: never show the fallback (it would print ASCII). */
@font-face { font-family: "ML-TT Sabari"; src: url(../assets/fonts/ml-tt-sabari.woff2) format("woff2"); font-display: block; }

/* ---------- Tokens ---------- */
:root {
  --maroon-950: #1c020b;
  --maroon-900: #2a0412;
  --maroon-800: #3D061B;
  --maroon-700: #4f0c26;
  --maroon-600: #6a1734;
  --copper-200: #fbdccc;
  --copper-300: #f4c1a8;
  --copper-400: #eba184;
  --copper-500: #DB8572;
  --copper-600: #c06a58;
  --copper-700: #8f4640;
  --line: rgba(219, 133, 114, .55);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-soft: cubic-bezier(.45, .05, .25, 1);

  --f-script: "Citadel Script", "Snell Roundhand", "Apple Chancery", cursive;
  --f-display: "Yeseva One", Didot, Georgia, serif;
  --f-text: "The Seasons", "Cormorant Garamond", Georgia, serif;
  --f-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script-scale: 1;
  --text-scale: 1;
  --track: 1;          /* multiplier for letter-spacing; 0 for Indic scripts */
  --gutter: 16px;
}
:root:lang(ml) {
  --f-script: "ML-TT Sabari", "Noto Serif Malayalam", serif;
  --f-display: "Noto Serif Malayalam", serif;
  --f-text: "Noto Serif Malayalam", serif;
  --script-scale: .66;
  --text-scale: .84;
  --track: 0;
}
:root:lang(ta) {
  --f-script: "Tiro Tamil", "Noto Serif Tamil", serif;
  --f-display: "Noto Serif Tamil", serif;
  --f-text: "Noto Serif Tamil", serif;
  --script-scale: .52;
  --text-scale: .8;
  --track: 0;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--maroon-800); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--copper-500);
  background: var(--maroon-800);
  font-family: var(--f-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .78 0 0 0 0 .68 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 70% at 50% 0%, rgba(112, 22, 54, .55), transparent 62%),
    radial-gradient(140% 80% at 50% 100%, rgba(16, 1, 7, .7), transparent 60%),
    var(--maroon-800);
}
body.is-locked { overflow: hidden; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
p, h1, h2, h3 { margin: 0; font-weight: inherit; }
:focus-visible { outline: 2px solid var(--copper-300); outline-offset: 4px; border-radius: 8px; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Type roles ---------- */
.t-script { font-family: var(--f-script); font-weight: 400; line-height: 1.25; }
.t-display { font-family: var(--f-display); font-weight: 400; }
.t-text { font-family: var(--f-text); font-weight: 300; }
:lang(ml) .t-display, :lang(ta) .t-display { font-weight: 700; }
:lang(ml) .t-text, :lang(ta) .t-text { font-weight: 400; }
:lang(ta) .t-script { font-style: italic; }
.isfoc {
  font-family: "ML-TT Sabari";
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  font-synthesis: none;
  text-transform: none;
}
.isfoc .w { white-space: nowrap; }

/* ---------- Line art (masked SVG, tinted copper) ---------- */
.art {
  background: linear-gradient(172deg, var(--copper-300) 0%, var(--copper-500) 42%, var(--copper-600) 100%);
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
}

/* ==========================================================================
   Intro: light the nilavilakku
   ========================================================================== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  text-align: center;
  touch-action: none;
  background:
    radial-gradient(70% 55% at 50% 60%, rgba(120, 28, 52, .55), transparent 70%),
    radial-gradient(120% 90% at 50% 50%, #44081f 0%, #2a0413 55%, #150108 100%);
}
.js .intro { display: flex; }
.js .intro.is-gone { display: none; }
.intro__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: auto;            /* centred, but never pushed off the top on short screens */
  padding: calc(20px + env(safe-area-inset-top)) var(--gutter) calc(84px + env(safe-area-inset-bottom));
}
.intro__inner > * { animation: rise-in 1.4s var(--ease) both; }
.intro__inner > :nth-child(2) { animation-delay: .15s; }
.intro__inner > :nth-child(3) { animation-delay: .3s; }
.intro__inner > :nth-child(4) { animation-delay: .45s; }
.intro__inner > :nth-child(5) { animation-delay: .9s; }
@keyframes rise-in { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: none; } }

.intro__kicker {
  font-size: clamp(11px, 2.9vw, 14px);
  letter-spacing: calc(.34em * var(--track));
  text-transform: uppercase;
  color: var(--copper-400);
}
.intro__names {
  margin-top: .1em;
  font-size: calc(clamp(44px, 12vw, 80px) * var(--script-scale));
  color: var(--copper-400);
  text-shadow: 0 0 28px rgba(235, 161, 132, .25);
}
:lang(ml) .intro__names, :lang(ta) .intro__names { margin: .35em 0 .2em; }
.divider.intro__orn { width: clamp(150px, 42vw, 220px); margin-top: .7em; }
.intro__hint {
  margin-top: clamp(10px, 2.4vh, 22px);
  font-size: calc(clamp(15px, 4vw, 19px) * var(--text-scale));
  color: var(--copper-300);
  transition: opacity .6s;
}
.intro__spark { display: inline-block; font-size: .7em; color: var(--copper-500); animation: twinkle 2.4s ease-in-out infinite; }
.intro__spark:last-child { animation-delay: 1.2s; }
@keyframes twinkle { 0%, 100% { opacity: .35; scale: .8; } 50% { opacity: 1; scale: 1.15; } }

/* The lamp */
.lamp {
  position: relative;
  display: block;
  height: clamp(210px, 47vh, 440px);
  aspect-ratio: 200 / 440;
  margin: clamp(14px, 3.4vh, 34px) auto 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lamp:focus-visible { outline-offset: 10px; border-radius: 40px; }
.lamp__svg { position: relative; width: 100%; height: 100%; overflow: visible; transition: filter 1.6s var(--ease); }
.lamp.is-lit .lamp__svg { filter: brightness(1.12) saturate(1.08) drop-shadow(0 0 18px rgba(255, 170, 90, .28)); }

/* invitation to tap: a soft ring around the wicks */
.lamp::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 25%;
  width: 92%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(244, 193, 168, .5);
  animation: beckon 2.6s var(--ease) infinite;
  pointer-events: none;
}
.lamp.is-lit::after { display: none; }
@keyframes beckon { 0% { scale: .35; opacity: 0; } 30% { opacity: .85; } 100% { scale: 1.5; opacity: 0; } }

.lamp__halo {
  position: absolute;
  left: 50%;
  top: 24%;
  width: 420%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 140, .5) 0%, rgba(255, 160, 80, .2) 22%, rgba(255, 120, 60, .07) 42%, transparent 64%);
  opacity: 0;
  scale: .5;
  transition: opacity 1.4s var(--ease), scale 1.8s var(--ease);
  pointer-events: none;
}
.lamp.is-lit .lamp__halo { opacity: 1; scale: 1; animation: breathe 3.2s ease-in-out 1.8s infinite alternate; }
@keyframes breathe { from { scale: 1; opacity: 1; } to { scale: 1.06; opacity: .85; } }

.flame { transform-box: fill-box; transform-origin: 50% 85%; transform: scale(0); opacity: 0; }
.lamp.is-lit .flame { animation: ignite .8s var(--ease) calc(var(--i) * .24s) forwards; }
@keyframes ignite {
  0% { transform: scale(.05); opacity: 0; }
  35% { opacity: 1; }
  70% { transform: scale(1.14); }
  100% { transform: scale(1); opacity: 1; }
}
.flame__f { transform-box: fill-box; transform-origin: 50% 85%; animation: flicker var(--t, 1.2s) ease-in-out infinite alternate; animation-play-state: paused; }
.lamp.is-lit .flame__f { animation-play-state: running; }
@keyframes flicker {
  0% { transform: scale(1, 1) skewX(0deg); }
  30% { transform: scale(.95, 1.07) skewX(-2.5deg); }
  55% { transform: scale(1.04, .94) skewX(1.5deg); }
  80% { transform: scale(.97, 1.05) skewX(-1deg); }
  100% { transform: scale(1.02, .98) skewX(1.8deg); }
}

.lamp__embers { position: absolute; left: 50%; top: 21%; width: 0; height: 0; pointer-events: none; }
.lamp__embers i {
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #ffe1a8;
  box-shadow: 0 0 6px 2px rgba(255, 170, 80, .55);
  opacity: 0;
}
.lamp.is-lit .lamp__embers i { animation: ember 2.8s ease-out infinite; }
.lamp__embers i:nth-child(1) { --x: -22px; animation-delay: .9s !important; }
.lamp__embers i:nth-child(2) { --x: 14px; animation-delay: 1.3s !important; }
.lamp__embers i:nth-child(3) { --x: -6px; animation-delay: 1.9s !important; }
.lamp__embers i:nth-child(4) { --x: 26px; animation-delay: 2.4s !important; }
.lamp__embers i:nth-child(5) { --x: -30px; animation-delay: 2.9s !important; }
.lamp__embers i:nth-child(6) { --x: 4px; animation-delay: 3.3s !important; }
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), -110px) scale(.3); }
}

/* Short screens (phones held sideways) */
@media (max-height: 560px) {
  .intro__inner { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .intro__names { font-size: calc(clamp(30px, 9vh, 52px) * var(--script-scale)); }
  .divider.intro__orn { margin-top: .2em; }
  .lamp { height: clamp(120px, 46vh, 240px); margin-top: 8px; }
  .intro__hint { margin-top: 6px; }
}

/* The light spreads and the invitation appears */
.intro__wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 45%), rgba(255, 232, 186, .95) 0%, rgba(255, 178, 110, .6) 14%, rgba(150, 30, 50, .15) 38%, transparent 58%);
  transform-origin: var(--fx, 50%) var(--fy, 45%);
  opacity: 0;
  pointer-events: none;
}
.intro.is-opening .intro__wash { animation: wash 1.8s var(--ease-soft) forwards; }
@keyframes wash {
  0% { opacity: 0; transform: scale(.5); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scale(2.6); }
}
.intro.is-opening { animation: intro-out 1.3s .55s var(--ease-soft) forwards; }
.intro.is-opening .intro__hint { opacity: 0; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

/* ==========================================================================
   Floating controls: music + language
   ========================================================================== */
.controls {
  position: fixed;
  z-index: 110;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(32, 3, 13, .74);
  border: 1px solid rgba(219, 133, 114, .38);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
          backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.lang { display: flex; gap: 2px; }
.lang button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--copper-400);
  font: 500 13.5px/1 var(--f-ui);
  cursor: pointer;
  transition: background-color .3s, color .3s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .lang button:hover { color: var(--copper-200); } }
.lang button[aria-pressed="true"] { background: var(--copper-500); color: var(--maroon-900); }
.music {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(219, 133, 114, .5);
  border-radius: 50%;
  background: transparent;
  color: var(--copper-400);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.music[hidden] { display: none; }
.music__icon { width: 17px; height: 17px; transition: opacity .3s, scale .3s; }
.music::after {   /* "muted" slash */
  content: "";
  position: absolute;
  width: 22px; height: 1.5px;
  background: currentColor;
  rotate: -45deg;
  transition: scale .3s;
}
.music[aria-pressed="true"]::after { scale: 0 1; }
.music__bars { position: absolute; display: flex; gap: 2px; align-items: flex-end; height: 14px; opacity: 0; transition: opacity .3s; }
.music__bars i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; animation: eq 1s ease-in-out infinite alternate; animation-play-state: paused; }
.music__bars i:nth-child(2) { animation-delay: -.35s; animation-duration: .8s; }
.music__bars i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.15s; }
.music__bars i:nth-child(4) { animation-delay: -.15s; animation-duration: .9s; }
@keyframes eq { from { scale: 1 .25; } to { scale: 1 1; } }
.music.is-playing .music__icon { opacity: 0; scale: .6; }
.music.is-playing .music__bars { opacity: 1; }
.music.is-playing .music__bars i { animation-play-state: running; }

@media (min-width: 900px) {
  .controls { left: auto; right: 22px; bottom: 22px; translate: none; }
}
@media (max-height: 560px) {
  .controls { left: auto; right: max(12px, env(safe-area-inset-right)); top: 10px; bottom: auto; translate: none; }
}

/* Falling petals */
.petals { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }

/* ==========================================================================
   Invitation
   ========================================================================== */
.invitation { position: relative; z-index: 1; overflow-x: clip; transition: opacity .24s ease; }
.invitation:focus { outline: none; }
.intro__inner { transition: opacity .24s ease; }
.is-switching .invitation, .is-switching .intro__inner { opacity: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) clamp(36px, 7vw, 80px);
  text-align: center;
}
.hero__frame {
  --ew: clamp(92px, 25vw, 260px);       /* elephant width */
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
}
.elephant {
  --src: url(../assets/art/elephant.svg);
  position: absolute;
  top: 0;
  width: var(--ew);
  aspect-ratio: 1340 / 1896;
  transform-origin: 50% 6%;
}
.elephant--left { left: calc(var(--ew) * -.1); }
.elephant--right { right: calc(var(--ew) * -.1); scale: -1 1; }
/* Once in place, each elephant first eases from upright to where its sway begins
   (starting the sway at its first keyframe made them jump). */
.elephant.in { animation: sway-elephant-in-l 3.2s ease-in-out 1.6s both, sway-elephant 6.5s ease-in-out 4.8s infinite alternate; }
.elephant--right.in { animation-name: sway-elephant-in-r, sway-elephant; animation-direction: normal, alternate-reverse; }
@keyframes sway-elephant-in-l { from { rotate: 0deg; } to { rotate: -1.4deg; } }
@keyframes sway-elephant-in-r { from { rotate: 0deg; } to { rotate: 1.6deg; } }
@keyframes sway-elephant { from { rotate: -1.4deg; } to { rotate: 1.6deg; } }

.om {
  position: relative;
  max-width: calc(100% - var(--ew) * 1.3);
  margin: clamp(8px, 2.4vw, 26px) auto 0;
  font-size: calc(clamp(11.5px, 3.1vw, 19px) * var(--text-scale));
  letter-spacing: calc(.04em * var(--track));
  line-height: 1.5;
  color: var(--copper-400);
}
.ganesha-wrap {
  position: relative;
  width: clamp(46px, 9.5vw, 84px);
  aspect-ratio: 750 / 980;
  margin: clamp(10px, 2.2vw, 22px) auto 0;
}
.ganesha { --src: url(../assets/art/ganesha.svg); position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 10px rgba(235, 161, 132, .25)); }
.mandala {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 290%;
  max-width: none;
  height: auto;
  translate: -50% -50%;
  opacity: .2;
  pointer-events: none;
  animation: spin 140s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

.blessing {
  max-width: min(34em, calc(100% - var(--ew) * 1.56));
  margin: clamp(18px, 3.4vw, 30px) auto 0;
  font-size: calc(clamp(15px, 3.9vw, 23px) * var(--text-scale));
  line-height: 1.65;
  color: var(--copper-400);
  text-wrap: balance;
}
/* Phones: the elephants are too close together, so the blessing sits below their trunks. */
@media (max-width: 599px) {
  .ganesha-wrap { width: clamp(52px, 14vw, 62px); }
  .blessing { max-width: 30em; margin-top: max(26px, calc(var(--ew) * 1.42 - 96px)); }
}
.title {
  width: fit-content;
  margin: clamp(16px, 3.4vw, 30px) auto 0;
  padding: .05em .35em .12em;
  font-size: calc(clamp(42px, 11.4vw, 88px) * var(--script-scale));
  line-height: 1.3;
}
:lang(ml) .title, :lang(ta) .title { margin-top: clamp(22px, 4.4vw, 36px); }
:lang(ml) .title { font-size: calc(clamp(42px, 11.4vw, 88px) * .82); }
.of { margin-top: .1em; font-size: clamp(15px, 3.7vw, 22px); }
.of:empty { display: none; }

/* ---------- Couple ---------- */
.couple {
  display: grid;
  justify-items: center;
  max-width: 1120px;
  margin: clamp(4px, 1.6vw, 16px) auto 0;
}
.person { display: flex; flex-direction: column; align-items: center; }
.person__name {
  width: fit-content;
  padding: .05em .35em .12em;
  font-size: calc(clamp(66px, 19vw, 104px) * var(--script-scale));
  line-height: 1.3;
  color: var(--copper-400);
  text-shadow: 0 0 34px rgba(235, 161, 132, .18);
}
:lang(ml) .person__name, :lang(ta) .person__name { padding: .2em .25em .1em; }
.person__family { display: flex; flex-direction: column; align-items: center; }
.person__rel { margin-top: .1em; font-size: calc(clamp(14px, 3.7vw, 19px) * var(--text-scale)); color: var(--copper-500); }
.person__rel:empty { display: none; }
.person__rel--after { margin-top: .45em; }
.person__parents {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: .25em;
  font-size: calc(clamp(23px, 6.2vw, 34px) * var(--text-scale));
  line-height: 1.22;
}
.amp { font-family: "Yeseva One", serif; font-weight: 400; font-size: .92em; margin: .04em 0; color: var(--copper-400); }

.rings { position: relative; width: clamp(130px, 38vw, 210px); margin: clamp(14px, 4vw, 24px) 0; }
.rings svg { width: 100%; height: auto; overflow: visible; }
.rings__amp {
  position: absolute;
  left: 50%;
  top: 46%;
  translate: -50% -50%;
  font-family: "Yeseva One", serif;
  font-weight: 400;
  font-size: clamp(20px, 5.4vw, 30px);
  color: var(--copper-300);
  text-shadow: 0 0 12px rgba(61, 6, 27, .9);
}
.ring { transition: transform 1.2s var(--ease) .1s, opacity .9s .1s; }
.rings__glint { transform-box: fill-box; transform-origin: center; opacity: 0; }
.rings.in .rings__glint { animation: glint 4.5s ease-in-out 1.8s infinite; }
@keyframes glint {
  0%, 72%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); }
  82% { opacity: 1; transform: scale(1) rotate(45deg); }
}

@media (min-width: 720px) {
  .couple { grid-template-columns: 1fr clamp(150px, 19vw, 230px) 1fr; align-items: start; column-gap: clamp(8px, 2vw, 24px); }
  .person__name { font-size: calc(clamp(58px, 8.6vw, 116px) * var(--script-scale)); }
  .person__parents { font-size: calc(clamp(21px, 2.8vw, 34px) * var(--text-scale)); }
  .rings { align-self: center; width: 100%; margin: clamp(30px, 7vw, 90px) 0 0; }
}

/* ---------- Muhurtham & venue ---------- */
.details {
  position: relative;
  padding: clamp(28px, 6vw, 64px) var(--gutter) clamp(56px, 9vw, 120px);
  text-align: center;
}
.details__inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }

/* The date stage (dividers + scratch card). The banana plants are placed off its
   left and right edges, so whatever the screen size they never cover the date. */
.date-stage {
  --bw: clamp(118px, 30vw, 370px);          /* banana plant width */
  --leaf-gap: clamp(6px, 1.6vw, 18px);      /* clear space between leaf tips and the card */
  position: relative;
  width: min(100% - 2 * clamp(34px, 11vw, 64px), 540px);
  margin: 0 auto;
}
.banana {
  position: absolute;
  z-index: 0;
  top: calc(50% - var(--bw) * .6);
  width: var(--bw);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 96%);
          mask-image: linear-gradient(to bottom, #000 58%, transparent 96%);
}
.banana .art { width: 100%; height: 100%; }
.banana--left { right: calc(100% + var(--leaf-gap)); aspect-ratio: 1560 / 2583; transform-origin: 6% 100%; }
.banana--right { left: calc(100% + var(--leaf-gap)); aspect-ratio: 1542 / 2631; transform-origin: 94% 100%; }
.banana--left .art { --src: url(../assets/art/banana-left.svg); }
.banana--right .art { --src: url(../assets/art/banana-right.svg); }
/* They sway mostly outwards, so the leaf tips never swing onto the card. Like the
   elephants, they ease from upright into the sway, which starts at its inward end. */
.banana--left.in { animation: sway-banana-in-l 1.6s ease-in-out 1.4s both, sway-banana-l 8s ease-in-out 3s infinite alternate-reverse; }
.banana--right.in { animation: sway-banana-in-r 1.6s ease-in-out 1.4s both, sway-banana-r 9.5s ease-in-out 3s infinite alternate-reverse; }
@keyframes sway-banana-in-l { from { rotate: 0deg; } to { rotate: .3deg; } }
@keyframes sway-banana-in-r { from { rotate: 0deg; } to { rotate: -.3deg; } }
@keyframes sway-banana-l { from { rotate: -1.5deg; } to { rotate: .3deg; } }
@keyframes sway-banana-r { from { rotate: 1.5deg; } to { rotate: -.3deg; } }

/* Phones: there's no room beside the card, so the plants form a canopy of
   leaves above it instead (their trunks fade out before the card starts). */
@media (max-width: 719px) {
  .date-stage {
    --bw: clamp(150px, 44vw, 300px);
    width: 100%;
    padding-top: calc(var(--bw) * .9);
  }
  .banana {
    top: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 34%, transparent 50%);
            mask-image: linear-gradient(to bottom, #000 34%, transparent 50%);
  }
  .banana--left { right: auto; left: calc(var(--bw) * -.2); }
  .banana--right { left: auto; right: calc(var(--bw) * -.2); }
}

.divider { width: min(100%, 520px); height: auto; margin: 0 auto; color: var(--copper-500); fill: var(--copper-500); overflow: visible; }

/* ---------- Scratch card ---------- */
.scratch {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(116px, 28vw, 168px);
  margin: clamp(10px, 2.4vw, 18px) 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(118, 26, 56, .55), transparent 70%),
    linear-gradient(180deg, #44081f, #2a0412);
  box-shadow: inset 0 0 0 4px rgba(42, 4, 18, .95), inset 0 0 0 5px rgba(219, 133, 114, .3), 0 16px 36px rgba(0, 0, 0, .28);
}
.scratch__content { padding: clamp(18px, 4.6vw, 30px) 12px clamp(16px, 4vw, 26px); }
.date {
  font-size: calc(clamp(26px, 7.2vw, 52px) * var(--text-scale));
  font-size: calc(10.2cqi * var(--date-fit, 1));     /* fills the card's width */
  line-height: 1.12;
  color: var(--copper-300);
}
.date:focus { outline: none; }     /* focused only after a keyboard reveal */
:lang(ml) .date { --date-fit: .95; }
:lang(ta) .date { --date-fit: 1.06; }
.weekday {
  margin-top: .6em;
  font-size: calc(clamp(13px, 3.4vw, 18px) * var(--text-scale));
  font-weight: 400;
  letter-spacing: calc(.34em * var(--track));
  padding-left: calc(.34em * var(--track));
  text-transform: uppercase;
}

.scratch__foil {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  touch-action: none;                 /* a finger on the foil scratches instead of scrolling */
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.35' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%23fff6d2'/%3E%3Cstop offset='.4' stop-color='%23f3c862'/%3E%3Cstop offset='.8' stop-color='%23c18a2c'/%3E%3Cstop offset='1' stop-color='%238e5c1b'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='16' cy='16' r='13' fill='url(%23g)' stroke='%238e5c1b' stroke-width='1.5'/%3E%3Ccircle cx='16' cy='16' r='9.5' fill='none' stroke='%23fff0b8' stroke-opacity='.6'/%3E%3C/svg%3E") 16 16, pointer;
  transition: opacity .9s var(--ease);
}
.scratch.is-revealed .scratch__foil { opacity: 0; pointer-events: none; }

.scratch__shine { position: absolute; inset: 0; z-index: 3; border-radius: inherit; overflow: hidden; pointer-events: none; }
.scratch__shine::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 244, 236, .55), transparent);
  translate: -120% 0;
}
.ready .scratch:not(.is-scratching):not(.is-revealed) .scratch__shine::before { animation: foil-shine 3.8s ease-in-out 1s infinite; }
.scratch.is-revealed .scratch__shine::before {
  background: linear-gradient(100deg, transparent, rgba(255, 214, 180, .3), transparent);
  animation: foil-shine 1.6s var(--ease) .15s 1;
}
@keyframes foil-shine { 0% { translate: -120% 0; } 55%, 100% { translate: 330% 0; } }

.scratch__hint {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.6vw, 10px);
  padding: 0 16px;
  pointer-events: none;
  transition: opacity .5s var(--ease);
}
.ready .scratch__hint { display: flex; }
.scratch.is-scratching .scratch__hint,
.scratch.is-revealed .scratch__hint { opacity: 0; }
.scratch__hint-text {
  max-width: 17em;
  font-size: calc(clamp(13px, 3.5vw, 17px) * var(--text-scale));
  line-height: 1.3;
  text-wrap: balance;
  color: #571a1f;
  text-shadow: 0 1px 0 rgba(255, 236, 224, .55);
}
/* A gold kasu "scrubbing" the foil */
.scratch__coin {
  position: relative;
  width: clamp(24px, 6vw, 30px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff6d2 0%, #f3c862 34%, #c18a2c 70%, #8e5c1b 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 238, 176, .55), inset 0 0 0 4px rgba(142, 92, 27, .5), 0 3px 8px rgba(70, 14, 14, .35);
  animation: coin-scrub 2.6s ease-in-out infinite;
}
.scratch__coin::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #8e5c1b; }
@keyframes coin-scrub {
  0%, 100% { translate: -38px 2px; rotate: -18deg; }
  25% { translate: 32px -3px; rotate: 14deg; }
  50% { translate: -26px 3px; rotate: -10deg; }
  75% { translate: 38px -2px; rotate: 18deg; }
}

/* Jasmine, rose petals and mango leaves thrown out when the date appears */
.scratch__burst { position: absolute; left: 50%; top: 50%; z-index: 5; width: 0; height: 0; pointer-events: none; }
.burst { position: absolute; left: 0; top: 0; display: block; }
.burst--petal { width: 10px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cdefs%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f4c1a8'/%3E%3Cstop offset='1' stop-color='%23c06a58'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M6 .5C10.5 2.5 12 8.5 6 14C0 8.5 1.5 2.5 6 .5Z' fill='url(%23g)'/%3E%3C/svg%3E") center / contain no-repeat; }
.burst--jasmine { width: 17px; height: 17px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-11 -11 22 22'%3E%3Cdefs%3E%3CradialGradient id='g' cx='0' cy='0' r='10' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23b8604d'/%3E%3Cstop offset='.4' stop-color='%23e39a7e'/%3E%3Cstop offset='1' stop-color='%23f8d2bf'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg fill='url(%23g)' stroke='%238f4640' stroke-opacity='.55' stroke-width='.45'%3E%3Cpath d='M0 0C4.5-2.5 5-9.5 0-10C-5-9.5-4.5-2.5 0 0Z'/%3E%3Cpath d='M0 0C4.5-2.5 5-9.5 0-10C-5-9.5-4.5-2.5 0 0Z' transform='rotate(72)'/%3E%3Cpath d='M0 0C4.5-2.5 5-9.5 0-10C-5-9.5-4.5-2.5 0 0Z' transform='rotate(144)'/%3E%3Cpath d='M0 0C4.5-2.5 5-9.5 0-10C-5-9.5-4.5-2.5 0 0Z' transform='rotate(216)'/%3E%3Cpath d='M0 0C4.5-2.5 5-9.5 0-10C-5-9.5-4.5-2.5 0 0Z' transform='rotate(288)'/%3E%3C/g%3E%3Ccircle r='1.9' fill='%238f4640'/%3E%3Ccircle cx='-.5' cy='-.5' r='.7' fill='%23fbdccc'/%3E%3C/svg%3E") center / contain no-repeat; }
.burst--leaf { width: 9px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 26'%3E%3Cpath d='M6 1C10 6 10.5 15 6 23C1.5 15 2 6 6 1Z' fill='%23c06a58'/%3E%3Cpath d='M6 1C2 6 1.5 15 6 23Z' fill='%23eba184'/%3E%3Cpath d='M6 2.5V25' stroke='%23fbdccc' stroke-width='.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }

.scratch.is-revealed .date { animation: date-glow 2.6s var(--ease) both; }
@keyframes date-glow {
  0% { text-shadow: 0 0 0 rgba(255, 214, 170, 0); }
  30% { text-shadow: 0 0 26px rgba(255, 214, 170, .8); }
  100% { text-shadow: 0 0 12px rgba(235, 161, 132, .22); }
}

/* Keyboard / screen-reader way to reveal: invisible until focused */
.scratch__key {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 10px;
  translate: -50% 0;
  display: none;
  padding: .55em 1.1em;
  border: 1px solid var(--copper-500);
  border-radius: 999px;
  background: var(--maroon-900);
  color: var(--copper-300);
  font: 500 13px/1 var(--f-ui);
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}
.ready .scratch:not(.is-revealed) .scratch__key { display: block; }
.scratch__key:focus { opacity: 1; pointer-events: auto; }

.muhurtham-label {
  margin-top: clamp(24px, 5vw, 40px);
  font-size: calc(clamp(12px, 3vw, 14px) * var(--text-scale));
  letter-spacing: calc(.34em * var(--track));
  padding-left: calc(.34em * var(--track));
  text-transform: uppercase;
  opacity: .85;
}
.time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  margin-top: .2em;
  font-size: calc(clamp(27px, 7vw, 42px) * var(--text-scale));
  font-weight: 700;
  color: var(--copper-400);
}
.time__clock { width: .95em; height: .95em; flex: none; }
.time__hand { transform-box: view-box; transform-origin: 12px 12px; }
@keyframes clock-hand { from { transform: rotate(-300deg); } to { transform: rotate(0deg); } }

/* Countdown: arched like temple windows */
.countdown { margin-top: clamp(28px, 6vw, 50px); }
.countdown__title { margin-bottom: .9em; font-size: calc(clamp(15px, 3.8vw, 19px) * var(--text-scale)); color: var(--copper-300); }
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.4vw, 16px);
  max-width: 470px;
  margin: 0 auto;
}
.countdown__grid[hidden], .countdown__title[hidden], .countdown__msg[hidden] { display: none; }
.cd {
  position: relative;
  padding: clamp(14px, 3.4vw, 20px) 2px clamp(9px, 2.2vw, 13px);
  border: 1px solid var(--line);
  border-radius: 50% 50% 10px 10px / 30% 30% 10px 10px;
  background: linear-gradient(180deg, rgba(96, 18, 44, .62), rgba(36, 3, 15, .62));
  box-shadow: inset 0 0 0 3px rgba(42, 4, 18, .9), inset 0 0 0 4px rgba(219, 133, 114, .22), 0 8px 22px rgba(0, 0, 0, .18);
}
.cd__num {
  display: block;
  font-family: "Yeseva One", serif;
  font-weight: 400;
  font-size: clamp(26px, 7.4vw, 44px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--copper-300);
}
.cd__lab {
  display: block;
  margin-top: .45em;
  font-family: var(--f-text);
  font-weight: 400;
  font-size: calc(clamp(10px, 2.7vw, 13px) * var(--text-scale));
  letter-spacing: calc(.16em * var(--track));
  text-transform: uppercase;
  opacity: .9;
}
.countdown__msg { font-size: calc(clamp(34px, 9vw, 56px) * var(--script-scale)); color: var(--copper-300); }

.cal { margin-top: clamp(28px, 6vw, 46px); }
.cal__label {
  margin-bottom: .9em;
  font-size: calc(clamp(12px, 3vw, 14px) * var(--text-scale));
  font-weight: 400;
  letter-spacing: calc(.32em * var(--track));
  padding-left: calc(.32em * var(--track));
  text-transform: uppercase;
  opacity: .85;
}
.cal__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 46px;
  padding: .65em 1.3em;
  border: 1px solid rgba(219, 133, 114, .6);
  border-radius: 999px;
  background: rgba(42, 4, 18, .55);
  color: var(--copper-300);
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .3s, color .3s, border-color .3s, translate .3s var(--ease);
}
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn--solid { background: var(--copper-500); border-color: var(--copper-500); color: var(--maroon-900); }
/* Hover styles only where there is a real pointer. On iPhones a tap first "hovers"
   (the button turned copper) and only a second tap opened the link. */
@media (hover: hover) {
  .btn:hover { background: var(--copper-500); border-color: var(--copper-500); color: var(--maroon-900); translate: 0 -2px; }
  .btn--solid:hover { background: var(--copper-300); border-color: var(--copper-300); }
}

/* ---------- Revealed with the date ----------
   The muhurtham, countdown and calendar buttons are folded away (height 0)
   until the scratch card is cleared, then unfold one after another. */
.after-date { display: grid; grid-template-rows: 1fr; }
.after-date__inner { min-height: 0; }
.ready .after-date { transition: grid-template-rows 1.1s var(--ease) .3s; }
.ready .after-date:not(.is-open) { grid-template-rows: 0fr; }
.ready .after-date:not(.is-settled) .after-date__inner { overflow: hidden; }

.ready .after-date__inner > * {
  opacity: 0;
  translate: 0 22px;
  transition: opacity .9s var(--ease), translate 1.1s var(--ease);
}
.ready .after-date.is-open .after-date__inner > * { opacity: 1; translate: none; }
.ready .after-date.is-open .muhurtham-label { transition-delay: .45s; }
.ready .after-date.is-open .time { transition-delay: .6s; }
.ready .after-date.is-open .countdown { transition-delay: .8s; }
.ready .after-date.is-open .cal { transition-delay: 1.6s; }

/* countdown boxes pop in one after another */
.ready .after-date .cd {
  opacity: 0;
  scale: .6;
  transition: opacity .6s var(--ease), scale .8s cubic-bezier(.34, 1.56, .64, 1);
}
.ready .after-date.is-open .cd { opacity: 1; scale: 1; }
.ready .after-date.is-open .cd:nth-child(1) { transition-delay: 1s; }
.ready .after-date.is-open .cd:nth-child(2) { transition-delay: 1.12s; }
.ready .after-date.is-open .cd:nth-child(3) { transition-delay: 1.24s; }
.ready .after-date.is-open .cd:nth-child(4) { transition-delay: 1.36s; }
.after-date.is-open .time__hand { animation: clock-hand 2.4s var(--ease) .6s both; }

.venue { margin-top: clamp(54px, 12vw, 96px); }
.at { font-size: calc(clamp(16px, 4vw, 22px) * var(--text-scale)); }
.venue__name {
  --ls: calc(.06em * var(--track));      /* letter-spacing */
  margin: .35em 0 1.1em;
  font-size: calc(clamp(19px, 5.1vw, 34px) * var(--text-scale));
  font-weight: 700;
  line-height: 1.55;
  color: var(--copper-400);
  letter-spacing: var(--ls);
}
.venue__name > span { display: block; padding-left: var(--ls); }
.acute { position: relative; display: inline-block; letter-spacing: 0; margin-right: var(--ls); }
.acute::after {
  content: "";
  position: absolute;
  left: 50%;
  top: .13em;
  width: .075em;
  height: .24em;
  border-radius: .05em;
  background: currentColor;
  translate: -20% 0;
  rotate: 40deg;
}

/* ---------- Closing ---------- */
.closing { position: relative; text-align: center; padding-top: clamp(10px, 4vw, 40px); overflow: hidden; }
.wishes {
  width: fit-content;
  max-width: min(100% - 2 * var(--gutter), 24em);
  margin: 0 auto;
  padding: .05em .35em .15em;
  font-size: calc(clamp(19px, 4.8vw, 28px) * var(--text-scale));
  line-height: 1.5;
  color: var(--copper-400);
  text-wrap: balance;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  margin-top: 1.3em;
  padding: .4em .2em;
  font-weight: 400;
  font-size: calc(clamp(14px, 3.6vw, 17px) * var(--text-scale));
  color: var(--copper-300);
  text-decoration: underline;
  text-decoration-color: rgba(219, 133, 114, .45);
  text-underline-offset: 5px;
}
.card-link svg { width: 1.1em; height: 1.1em; }
@media (hover: hover) { .card-link:hover { color: var(--copper-200); } }

/* The whole skyline (all three temples and both lamp towers) always fits the screen width. */
.temple {
  position: relative;
  width: 100%;
  max-width: 1500px;
  margin: clamp(28px, 6vw, 60px) auto 0;
  aspect-ratio: 4989 / 1146;
}
.temple__sky {
  position: absolute;
  inset: -45% 6% 0;
  background: radial-gradient(60% 70% at 50% 100%, rgba(255, 150, 90, .16), transparent 70%);
  pointer-events: none;
}
.temple__art { --src: url(../assets/art/temple.svg); position: absolute; inset: 0; }
.temple__lights { position: absolute; inset: 0; pointer-events: none; }
.temple__lights i {
  position: absolute;
  width: max(.5%, 3px);
  aspect-ratio: 1 / 2;
  translate: -50% -92%;
  border-radius: 50% 50% 45% 45% / 64% 64% 36% 36%;
  background: radial-gradient(ellipse 50% 50% at 50% 72%, #fffbe8 0 20%, #ffd36b 38%, #ff9a38 62%, rgba(255, 110, 30, 0) 100%);
  box-shadow: 0 0 10px 3px rgba(255, 166, 72, .38);
  opacity: 0;
  transform-origin: 50% 100%;
  transition: opacity .8s var(--ease) var(--d, 0s);
}
.temple__lights i.big { width: max(.8%, 4.5px); }
@media (max-width: 600px) { .temple__lights i { box-shadow: 0 0 5px 1.5px rgba(255, 166, 72, .4); } }
.temple.in .temple__lights i { opacity: 1; animation: lamp-flicker var(--t, 1.4s) ease-in-out infinite alternate; }
.temple:not(.is-visible) .temple__lights i { animation-play-state: paused; }
@keyframes lamp-flicker {
  0% { transform: scale(1, 1); }
  40% { transform: scale(.88, 1.12); }
  100% { transform: scale(1.06, .92); }
}

.footer-band {
  position: relative;
  padding: 30px var(--gutter) calc(92px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #2a0413, var(--maroon-950));
  border-top: 1px solid var(--copper-600);
}
.footer-band::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 6px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14'%3E%3Cpath d='M0 .5h22M0 13.5h22' stroke='%23DB8572' stroke-width='1'/%3E%3Cpath d='M3.5 13L11 4.2 18.5 13' fill='none' stroke='%23DB8572' stroke-width='1'/%3E%3Ccircle cx='11' cy='9.6' r='1.3' fill='%23DB8572'/%3E%3C/svg%3E") repeat-x center / auto 14px;
  opacity: .75;
}
.footer-band p {
  font-family: "Yeseva One", serif;
  font-size: 13px;
  letter-spacing: .28em;
  padding-left: .28em;
  color: var(--copper-600);
}
@media (min-width: 900px) { .footer-band { padding-bottom: 34px; } }

/* ==========================================================================
   Scroll reveals (only with JS; content stays visible without it)
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  translate: 0 26px;
  transition: opacity .8s var(--ease) var(--d, 0s), translate 1s var(--ease) var(--d, 0s), scale 1.2s var(--ease) var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; translate: none; }
.js [data-reveal="from-left"] { translate: -40px -14px; transition-duration: 1.6s; }
.js [data-reveal="from-right"] { translate: 40px -14px; transition-duration: 1.6s; }
.js [data-reveal="rise"] { translate: 0 70px; transition-duration: 1.4s; }
.js [data-reveal="glow"] { translate: none; scale: .8; }
.js [data-reveal="glow"].in { scale: 1; }

/* Handwriting: a soft-edged mask sweeps left to right. (A clip-path would
   hide the element from IntersectionObserver, so a mask is used instead.) */
.js [data-reveal="write"] {
  opacity: 1;
  translate: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 45%, transparent 55%);
          mask-image: linear-gradient(90deg, #000 0%, #000 45%, transparent 55%);
  -webkit-mask-size: 250% 100%;
          mask-size: 250% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0;
          mask-position: 100% 0;
  transition: -webkit-mask-position 2s cubic-bezier(.45, .1, .3, 1) var(--d, 0s), mask-position 2s cubic-bezier(.45, .1, .3, 1) var(--d, 0s);
}
.js [data-reveal="write"].in { -webkit-mask-position: 0 0; mask-position: 0 0; }
.js [data-reveal="write"].done { -webkit-mask-image: none; mask-image: none; }
.br-narrow { display: none; }
@media (max-width: 599px) { .br-narrow { display: inline; } }

.js [data-reveal="draw"] { opacity: 1; translate: none; }
.js [data-reveal="draw"] .divider__l,
.js [data-reveal="draw"] .divider__r {
  transform-box: fill-box;
  transform: scaleX(0);
  transition: transform 1.5s var(--ease) calc(var(--d, 0s) + .2s);
}
.js [data-reveal="draw"] .divider__l { transform-origin: 100% 50%; }
.js [data-reveal="draw"] .divider__r { transform-origin: 0% 50%; }
.js [data-reveal="draw"] .divider__c {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(.2) rotate(-120deg);
  opacity: 0;
  transition: transform 1.1s var(--ease) var(--d, 0s), opacity .8s var(--d, 0s);
}
.js [data-reveal="draw"].in .divider__l,
.js [data-reveal="draw"].in .divider__r,
.js [data-reveal="draw"].in .divider__c { transform: none; opacity: 1; }

.js [data-reveal="rings"] { opacity: 1; translate: none; }
.js [data-reveal="rings"] .ring--a { transform: translateX(-36px); opacity: 0; }
.js [data-reveal="rings"] .ring--b { transform: translateX(36px); opacity: 0; }
.js [data-reveal="rings"].in .ring { transform: none; opacity: 1; }
.js [data-reveal="rings"] .rings__amp { opacity: 0; scale: .4; transition: opacity .7s .9s, scale .8s var(--ease) .9s; }
.js [data-reveal="rings"].in .rings__amp { opacity: 1; scale: 1; }

.js [data-reveal="spread"] { transition: opacity 1.1s var(--ease) var(--d, 0s), translate 1.1s var(--ease) var(--d, 0s), letter-spacing 1.4s var(--ease) var(--d, 0s); }
.js [data-reveal="spread"]:not(.in) { letter-spacing: calc(.2em * var(--track)); }   /* still fits one line from 360px wide */

/* ==========================================================================
   Reduced motion: everything is shown, nothing loops
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1 !important; translate: none !important; scale: none !important; -webkit-mask-image: none !important; mask-image: none !important; }
  .mandala, .elephant, .banana, .scratch__coin, .scratch__shine::before { animation: none !important; }
  .petals { display: none; }
}
