/* The openings of each design (scenes.js). The common parts of an opening (.intro, its name,
   number, prints and flash) are in story.css; here is what each design does differently. */

/* ---------- football: a stadium scoreboard ---------- */
.intro.is-score { background: radial-gradient(120% 70% at 50% 110%, #1f7a3e 0%, #0b3d24 45%, #04130b 100%); }
.sc-lights { position: absolute; inset: 0; pointer-events: none; }
.sc-lights i {
  position: absolute; top: -8%; width: 70%; height: 120%; transform-origin: 50% 0;
  background: conic-gradient(from 168deg at 50% 0%, transparent 0deg, rgba(255, 255, 235, .2) 10deg, rgba(255, 255, 235, .32) 12deg, rgba(255, 255, 235, .2) 14deg, transparent 24deg);
  animation: sc-sweep 3.2s ease-in-out infinite alternate;
}
.sc-lights i:first-child { left: -20%; }
.sc-lights i:last-child { right: -20%; animation-duration: 3.8s; animation-direction: alternate-reverse; }
@keyframes sc-sweep { from { rotate: -16deg; } to { rotate: 16deg; } }
.sc-flashes i {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 5px; height: 5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 12px 5px rgba(255, 255, 255, .8); opacity: 0; animation: sc-flash 2.4s calc(var(--d) * 1s) infinite;
}
@keyframes sc-flash { 0%, 90%, 100% { opacity: 0; } 93% { opacity: 1; } }
.sc-in { gap: 14px; margin-top: -4svh; }
.sc-screen { width: min(64vw, 300px); aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; border: 4px solid #111; box-shadow: 0 0 0 2px #333, 0 20px 40px -14px #000; }
.sc-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-board {
  width: min(86vw, 420px); padding: 12px 14px 10px; border-radius: 10px; background: #0d0d0f; color: #fff;
  box-shadow: 0 0 0 3px #2a2a2e, 0 26px 50px -18px #000, inset 0 0 30px rgba(0, 0, 0, .8); font-family: 'Rubik', var(--ui-font);
}
.sc-head { margin-bottom: 6px; text-align: center; font: 800 .8rem 'Rubik', var(--ui-font); letter-spacing: .12em; color: #ffd400; }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 2px; border-top: 1px solid #222; }
.sc-team { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 800 clamp(1.3rem, 6.4vw, 1.9rem) 'Rubik', var(--ui-font); }
.sc-row:not(.is-home) .sc-team { font-size: 1rem; color: #9a9a9a; }
.sc-digits {
  min-width: 2.1em; padding: 0 .18em; border-radius: 6px; text-align: center; font: 900 clamp(2.4rem, 12vw, 3.6rem)/1.1 'Rubik', var(--ui-font);
  color: #ffb000; background: #1a0f00 radial-gradient(rgba(0, 0, 0, .5) 1px, transparent 1.5px) 0 0 / 4px 4px;
  text-shadow: 0 0 10px rgba(255, 170, 0, .85), 0 0 26px rgba(255, 120, 0, .5); font-variant-numeric: tabular-nums;
}
.sc-row:not(.is-home) .sc-digits { font-size: 1.6rem; color: #8a6a2a; text-shadow: none; }
.sc-time { margin-top: 6px; text-align: center; font: 700 .9rem 'Rubik', var(--ui-font); letter-spacing: .12em; color: #ff4b3e; }
.sc-goal {
  position: absolute; inset: auto 0 20%; text-align: center; pointer-events: none; opacity: 0;
  font: 900 clamp(4.2rem, 28vw, 9rem)/1 'Rubik', var(--ui-font); color: #ffd400; text-shadow: 0 6px 0 #a87a00, 0 0 40px rgba(255, 212, 0, .7);
}
.sc-ticker { position: absolute; bottom: max(16px, 3svh); inset-inline: 0; overflow: hidden; white-space: nowrap; padding: 8px 0; background: rgba(0, 0, 0, .6); border-block: 2px solid #ffd400; font: 800 1rem 'Rubik', var(--ui-font); color: #ffd400; }
.sc-ticker span { display: inline-block; animation: sc-tick 16s linear infinite; }
@keyframes sc-tick { to { transform: translateX(50%); } }
.intro.is-score.go .sc-screen { animation: intro-pop .6s .2s cubic-bezier(.2, 1.4, .4, 1) both; }
.intro.is-score.go .sc-board { animation: sc-drop .7s .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.intro.is-score.go .sc-goal { animation: sc-goal 1.7s var(--flash) both; }
@keyframes sc-drop { from { opacity: 0; transform: translateY(-40px) scale(.9); } }
@keyframes sc-goal { 0% { opacity: 0; transform: scale(.3) rotate(-8deg); } 22% { opacity: 1; transform: scale(1.12) rotate(-5deg); } 72% { opacity: 1; transform: scale(1) rotate(-5deg); } 100% { opacity: 0; transform: scale(1.5) rotate(-5deg); } }

/* ---------- space: a countdown, a warp and a constellation ---------- */
.intro.is-launch { background: radial-gradient(120% 90% at 50% 40%, #16124a 0%, #070921 60%, #020210 100%); }
.ln-stars {
  position: absolute; inset: -20%; pointer-events: none; opacity: .9; background-size: 220px 220px;
  background-image: radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 35%, #cfe9ff, transparent),
    radial-gradient(1px 1px at 80% 15%, #fff, transparent), radial-gradient(2px 2px at 70% 80%, #fff, transparent), radial-gradient(1px 1px at 20% 90%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90% 55%, #ffe9a8, transparent), radial-gradient(1px 1px at 45% 60%, #fff, transparent);
}
.ln-stars.is-far { background-size: 140px 140px; opacity: .5; }
.intro.is-launch.go .ln-stars { animation: ln-warp 1.1s 1.5s cubic-bezier(.5, 0, .7, .4) both; }
@keyframes ln-warp { 0% { transform: scale(1); } 60% { transform: scale(2.8); filter: blur(1.5px); } 100% { transform: scale(1.1); } }
.ln-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ln-count b { grid-area: 1 / 1; opacity: 0; font: 900 min(54vw, 40svh)/1 'Rubik', var(--ui-font); color: #7ee0ff; text-shadow: 0 0 30px rgba(126, 224, 255, .8); }
.intro.is-launch.go .ln-count b { animation: ln-num .5s calc(.1s + var(--i) * .5s) both; }
@keyframes ln-num { 0% { opacity: 0; transform: scale(1.8); } 30% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.6); } }
.ln-planet { position: relative; width: min(46vw, 28svh); aspect-ratio: 1; margin-bottom: 18px; }
.ln-planet img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px rgba(126, 224, 255, .5), 0 0 60px rgba(126, 224, 255, .45); }
.ln-ring { position: absolute; inset: 38% -24%; border-radius: 50%; border: 3px solid rgba(255, 215, 106, .9); transform: rotate(-14deg); box-shadow: 0 0 14px rgba(255, 215, 106, .5); }
.intro.is-launch .intro-name span { text-shadow: 0 0 18px rgba(126, 224, 255, .9), 0 0 2px #fff; }
.intro.is-launch .intro-sub { color: #ffd76a; }
.intro.is-launch.go .ln-planet { animation: ln-rise 1s 1.8s cubic-bezier(.2, 1.2, .4, 1) both; }
.intro.is-launch.go .intro-top { animation-delay: 2s; }
.intro.is-launch.go .intro-name span { animation: ln-glow .9s both; animation-delay: calc(2.1s + var(--i) * .09s); }
.intro.is-launch.go .intro-sub { animation-delay: calc(var(--flash) + .5s); }
@keyframes ln-rise { from { opacity: 0; transform: translateY(40vh) scale(.4); } }
@keyframes ln-glow { from { opacity: 0; filter: blur(12px); transform: scale(1.6); } }

/* ---------- night: a neon sign on a brick wall ---------- */
.intro.is-neon { background: #0c0a12; }
.ne-wall {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 79, 163, .2), transparent 62%), linear-gradient(rgba(8, 6, 14, .5), rgba(8, 6, 14, .88)),
    linear-gradient(#24181c 2px, transparent 2px) 0 0 / 100% 34px, linear-gradient(90deg, #24181c 2px, transparent 2px) 0 0 / 70px 34px, #4a3335;
}
.ne-bulbs { position: absolute; top: 3%; inset-inline: 0; display: flex; justify-content: space-around; padding-inline: 2%; }
.ne-bulbs i {
  width: 12px; height: 16px; margin-top: var(--y); border-radius: 50% 50% 45% 45%; background: #ffd36b; box-shadow: 0 0 14px 4px rgba(255, 211, 107, .7);
  animation: ne-bulb 1.6s calc(var(--i) * -.23s) ease-in-out infinite alternate;
}
.ne-bulbs i:nth-child(3n + 1) { background: #ff4fa3; box-shadow: 0 0 14px 4px rgba(255, 79, 163, .7); }
.ne-bulbs i:nth-child(3n + 2) { background: #7ee0ff; box-shadow: 0 0 14px 4px rgba(126, 224, 255, .7); }
@keyframes ne-bulb { from { opacity: .5; } to { opacity: 1; } }
.ne-top { font: 600 clamp(1rem, 4.4vw, 1.3rem) var(--ui-font); letter-spacing: .08em; color: #c9f3ff; text-shadow: 0 0 6px #4cc9ff, 0 0 18px #4cc9ff; }
.ne-name {
  margin-top: .05em; line-height: 1.1; color: #ffe6f3; font-family: 'Gveret Levin', 'Amatic SC', cursive; font-weight: 400;
  font-size: calc(min(28vw, 18svh, 170px) * min(1, 4.6 / var(--len)));
  text-shadow: 0 0 4px #fff, 0 0 12px #ff4fa3, 0 0 28px #ff4fa3, 0 0 56px #ff2e8a;
}
.ne-age { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.ne-age b { font: 900 min(40vw, 22svh)/1 'Rubik', var(--ui-font); color: transparent; -webkit-text-stroke: 3px #ffd36b; text-shadow: 0 0 14px rgba(255, 211, 107, .9), 0 0 36px rgba(255, 170, 40, .6); font-variant-numeric: tabular-nums; }
.ne-age span { font: 400 2.2rem 'Gveret Levin', cursive; color: #ffd36b; text-shadow: 0 0 10px #ffb02e; }
.intro.is-neon.go .ne-top { animation: ne-on 1s .3s both; }
.intro.is-neon.go .ne-name { animation: ne-on 1.4s .7s both, ne-buzz 3s 2.4s infinite; }
.intro.is-neon.go .ne-age { animation: ne-on 1.2s 1.4s both; }
@keyframes ne-on { 0% { opacity: 0; } 10% { opacity: .9; } 14% { opacity: .1; } 22% { opacity: 1; } 26% { opacity: .2; } 40%, 100% { opacity: 1; } }
@keyframes ne-buzz { 0%, 95%, 100% { opacity: 1; } 97% { opacity: .55; } }

/* ---------- dinosaurs: a jungle, and an egg that hatches the name ---------- */
.intro.is-egg { background: radial-gradient(120% 70% at 60% 18%, #ffe9a8 0%, #8fd18a 22%, #3aa66b 46%, #1d5c3a 72%, #0b2a19 100%); }
.eg-land { position: absolute; inset: auto 0 17%; height: 26%; pointer-events: none; }
.eg-land svg { display: block; width: 100%; height: 100%; }
.eg-far { fill: #2c7a4b; }
.eg-volcano { fill: #3a5739; }
.eg-lava { fill: #ff8a3d; }
.eg-flow { fill: none; stroke: #ff8a3d; stroke-width: 4; stroke-linecap: round; opacity: .85; }
.eg-smoke circle { fill: rgba(240, 240, 230, .55); transform-box: fill-box; transform-origin: center; animation: eg-smoke 3s ease-out infinite; }
.eg-smoke circle:nth-child(2) { animation-delay: -1s; }
.eg-smoke circle:nth-child(3) { animation-delay: -2s; }
@keyframes eg-smoke { from { transform: translateY(14px) scale(.4); opacity: 0; } 30% { opacity: .9; } to { transform: translate(10px, -26px) scale(1.4); opacity: 0; } }
.eg-trunk { fill: none; stroke: #6b4320; stroke-width: 7; stroke-linecap: round; }
.eg-frond { fill: none; stroke: #1f7a42; stroke-width: 9; stroke-linecap: round; }
.eg-palm { transform-box: fill-box; transform-origin: 10% 100%; animation: eg-sway 4s ease-in-out infinite alternate; }
@keyframes eg-sway { from { rotate: -1.5deg; } to { rotate: 2deg; } }
.eg-ground {
  position: absolute; inset: auto 0 0; height: 24%; border-radius: 50% 50% 0 0 / 40px 40px 0 0;
  background: radial-gradient(4px 6px at 20% 30%, #7fb34f 60%, transparent 62%) 0 0 / 34px 26px, radial-gradient(3px 5px at 70% 60%, #6fa043 60%, transparent 62%) 0 0 / 46px 30px, linear-gradient(#5b8a3a, #34591f);
}
.eg-steps { position: absolute; bottom: 5%; inset-inline: 0; height: 70px; }
.eg-step { position: absolute; bottom: 0; right: calc(5% + var(--i) * 15%); width: 34px; opacity: 0; rotate: -90deg; }
.eg-step:nth-child(even) { bottom: 26px; }
.eg-step svg { display: block; width: 100%; fill: #22401a; color: #22401a; }
.intro.is-egg.go .eg-step { animation: eg-stomp .25s calc(2.9s + var(--i) * .22s) both; }
@keyframes eg-stomp { from { opacity: 0; transform: scale(1.8); } to { opacity: .85; } }
.eg-stage { position: relative; width: min(58vw, 31svh); aspect-ratio: 200 / 250; margin-block: 8px 4px; }
.eg-egg { position: absolute; inset: 0; transform-origin: 50% 95%; }
.eg-egg svg { display: block; width: 100%; height: 100%; overflow: visible; }
.eg-shadow { fill: rgba(10, 40, 20, .35); }
.eg-speck { fill: rgba(255, 255, 255, .45); }
.eg-shine { fill: rgba(255, 255, 255, .55); }
.eg-rim { fill: none; stroke: #e2cc98; stroke-width: 6; stroke-linejoin: round; opacity: 0; }
.eg-crack { fill: none; stroke: #5b4a2a; stroke-width: 4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.eg-top { transform-box: fill-box; transform-origin: 50% 100%; }
.intro.is-egg.go .eg-egg { animation: eg-wobble .3s .3s 4 ease-in-out alternate; }
.intro.is-egg.go .eg-crack { animation: eg-crack .5s 1.2s ease-out forwards, eg-gone .1s 1.8s forwards; }
.intro.is-egg.go .eg-top { animation: eg-fly .9s 1.8s cubic-bezier(.3, .6, .4, 1) forwards; }
.intro.is-egg.go .eg-rim { animation: eg-show .2s 1.8s forwards; }
@keyframes eg-wobble { from { rotate: -6deg; } to { rotate: 6deg; } }
@keyframes eg-crack { to { stroke-dashoffset: 0; } }
@keyframes eg-gone { to { opacity: 0; } }
@keyframes eg-show { to { opacity: 1; } }
@keyframes eg-fly { to { transform: translate(60px, -260px) rotate(70deg); opacity: 0; } }
.eg-stage .intro-name { position: absolute; inset: 16% -40% auto; text-shadow: 0 .06em 0 #1d5c3a, 0 0 24px rgba(255, 233, 168, .6); }
.intro.is-egg.go .intro-name span { animation: eg-hatch .7s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(2s + var(--i) * .08s); }
@keyframes eg-hatch { from { opacity: 0; transform: translateY(90px) scale(.2); } }
.eg-age { display: flex; align-items: baseline; gap: 8px; font: 800 1.25rem var(--ui-font); color: #fff3c4; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.eg-age b { font: 900 min(26vw, 13svh)/1 'Rubik', var(--ui-font); color: #ffd166; text-shadow: 0 .06em 0 #b5651d; }
.intro.is-egg.go .eg-age { animation: intro-pop .6s 2.3s cubic-bezier(.2, 1.6, .4, 1) both; }
.intro.is-egg.go .intro-top { animation-delay: .1s; }

/* ---------- garden: vines and a ring of flowers ---------- */
.intro.is-bloom { background: radial-gradient(120% 80% at 50% 25%, #fdfaf0 0%, #e9efdf 55%, #c9d8b6 100%); color: #2f3b33; }
.bl-vine { position: absolute; top: 0; bottom: 0; height: 100%; pointer-events: none; }
.bl-vine.is-l { left: -2%; }
.bl-vine.is-r { right: -2%; transform: scaleX(-1); }
.bl-vine svg { display: block; width: auto; height: 100%; }
.bl-vine path { fill: none; stroke: #6f9a5f; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.bl-leaf { fill: #8fae8b; }
.intro.is-bloom.go .bl-vine path { animation: draw-in 2s .2s ease-out forwards; }
.intro.is-bloom.go .bl-leaf { animation: bl-leaf .5s ease-out both; animation-delay: calc(.45s + var(--i) * .22s); }
@keyframes bl-leaf { from { opacity: 0; } }
@keyframes draw-in { to { stroke-dashoffset: 0; } }
.bl-wreath { position: relative; display: grid; place-items: center; width: min(48vw, 28svh); aspect-ratio: 1; margin-bottom: 14px; }
.bl-wreath > img, .bl-wreath > b {
  display: grid; place-items: center; width: 76%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--accent-2);
  box-shadow: 0 0 0 5px #fff, 0 18px 40px -16px rgba(47, 59, 51, .5); font: 900 3rem 'Rubik', var(--ui-font); color: #fff;
}
.bl-flower { position: absolute; top: 50%; left: 50%; width: 24%; aspect-ratio: 1; margin: -12%; transform: rotate(calc(var(--i) * 36deg)) translateY(-160%) rotate(calc(var(--i) * -36deg)); }
.bl-flower svg { display: block; width: 100%; height: 100%; }
.intro.is-bloom.go .bl-wreath { animation: intro-pop .7s .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.intro.is-bloom.go .bl-flower svg { animation: bl-open .6s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(.9s + var(--i) * .12s); }
@keyframes bl-open { from { transform: scale(0) rotate(-90deg); } }
.intro.is-bloom .intro-top, .intro.is-bloom .intro-sub { color: #5f6f64; }
.intro.is-bloom .intro-name { color: var(--accent); }
.intro.is-bloom .intro-name span { text-shadow: none; }
.intro.is-bloom.go .intro-name span { animation: bl-grow .8s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(1.3s + var(--i) * .08s); }
@keyframes bl-grow { from { opacity: 0; transform: translateY(30px) scaleY(.2); } }
.intro.is-bloom .intro-flash { background: #fffbe6; }

/* ---------- sunset: the sun rises out of the sea ---------- */
.intro.is-sunrise { background: #2b1055; }
.sr-sky { position: absolute; inset: 0; background: linear-gradient(#2b1055 0%, #7a2e6e 38%, #e8567c 62%, #ffb38a 78%, #ffd8a8 100%); }
.intro.is-sunrise.go .sr-sky { animation: sr-sky 4s ease-out both; }
@keyframes sr-sky { from { filter: brightness(.45) saturate(.7); } }
.sr-sun {
  --size: min(62vw, 36svh);
  position: absolute; left: 50%; top: 66%; width: var(--size); aspect-ratio: 1; margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  overflow: hidden; border-radius: 50%; background: radial-gradient(circle, #fff2b3, #ffb347); box-shadow: 0 0 90px 34px rgba(255, 190, 90, .55);
}
.sr-sun img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sr-sun::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, transparent 42%, rgba(255, 160, 60, .55)); }
.intro.is-sunrise.go .sr-sun { animation: sr-rise 2.2s .2s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes sr-rise { from { transform: translateY(42vh); } }
/* clouds lit from below, drifting */
.sr-cloud { position: absolute; height: 5%; border-radius: 999px; background: linear-gradient(#5a2a6e, #ff9fb0 80%, #ffd0a8); opacity: .75; filter: blur(.5px); animation: sr-drift 14s ease-in-out infinite alternate; }
.sr-cloud.is-a { top: 22%; left: -8%; width: 52%; }
.sr-cloud.is-b { top: 30%; right: -6%; width: 40%; height: 4%; animation-duration: 18s; opacity: .6; }
.sr-cloud.is-c { top: 47%; left: 12%; width: 30%; height: 3%; animation-duration: 11s; opacity: .55; }
@keyframes sr-drift { to { translate: 6% 0; } }
.sr-cloud::before, .sr-cloud::after { content: ""; position: absolute; bottom: 25%; border-radius: 50%; background: inherit; }
.sr-cloud::before { left: 16%; width: 34%; aspect-ratio: 1.7; }
.sr-cloud::after { left: 46%; width: 26%; aspect-ratio: 1.5; }
/* the sea: islands and a boat on the horizon, three rolling waves, and the sun's road of glints */
.sr-sea { position: absolute; inset: 70% 0 0; background: #ff8a7a; }
.sr-isles { position: absolute; bottom: 100%; inset-inline: 0; height: 22px; margin-bottom: -2px; }
.sr-isles svg { display: block; width: 100%; height: 100%; fill: #4a1d5e; }
.sr-boat { position: absolute; bottom: calc(100% - 4px); left: 70%; width: 30px; color: #3a1550; animation: sr-boat 9s ease-in-out infinite alternate; }
.sr-boat svg { display: block; width: 100%; fill: #3a1550; }
@keyframes sr-boat { from { translate: 0 0; rotate: -2deg; } to { translate: -40px 1px; rotate: 2deg; } }
.sr-waves { position: absolute; inset: 0; overflow: hidden; }
.sr-waves svg { position: absolute; top: 0; left: 0; width: 200%; height: 100%; }
.sr-wave { transform-box: view-box; }
.sr-wave.is-1 { animation: sr-roll 9s linear infinite; }
.sr-wave.is-2 { animation: sr-roll 7s linear infinite reverse; }
.sr-wave.is-3 { animation: sr-roll 5.5s linear infinite; }
@keyframes sr-roll { to { transform: translateX(-50%); } }
.sr-road { position: absolute; top: 4%; bottom: 0; left: 50%; width: 46%; translate: -50% 0; background: radial-gradient(50% 60% at 50% 0, rgba(255, 220, 150, .55), transparent 70%); mix-blend-mode: screen; }
.sr-road i {
  position: absolute; left: 50%; top: calc(6% + var(--i) * 10.5%); width: calc(70% - var(--i) * 5%); height: 3px; translate: -50% 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #ffe6a8 25%, #fff6d6 50%, #ffe6a8 75%, transparent); animation: sr-glint 1.4s calc(var(--i) * -.27s) ease-in-out infinite alternate;
}
.sr-road i:nth-child(odd) { width: calc(52% - var(--i) * 3%); translate: -40% 0; }
@keyframes sr-glint { from { opacity: .25; transform: scaleX(.55); } to { opacity: 1; transform: none; } }
.sr-birds { position: absolute; inset: 0; pointer-events: none; }
.sr-bird { position: absolute; top: calc(30% + var(--i) * 4%); left: -14%; width: calc(34px - var(--i) * 4px); color: #3a1550; }
.sr-bird svg { display: block; width: 100%; }
.intro.is-sunrise.go .sr-bird { animation: sr-fly 5s calc(.6s + var(--i) * .35s) linear both; }
@keyframes sr-fly { to { transform: translateX(130vw) translateY(-6vh); } }
.intro.is-sunrise .intro-in { z-index: 2; margin-top: -40svh; }
.intro.is-sunrise .intro-name span { text-shadow: 0 2px 24px rgba(80, 20, 60, .6); }

/* ---------- unicorn: a rainbow between two clouds ---------- */
.intro.is-rainbow { --gold: #ff8fd0; background: radial-gradient(120% 80% at 50% 30%, #ffe6f7 0%, #e7dcff 55%, #c9b8ff 100%); color: #4b2a7a; }
.rb-arcs { position: absolute; top: 5%; left: 50%; width: min(124vw, 720px); translate: -50% 0; pointer-events: none; }
.rb-arcs svg { display: block; width: 100%; overflow: visible; }
.rb-arcs path { fill: none; stroke-width: 14; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro.is-rainbow.go .rb-arcs path { animation: draw-in 1.2s calc(.2s + var(--i) * .1s) ease-out forwards; }
.rb-cloud { position: absolute; bottom: -8%; width: 26%; aspect-ratio: 2.2; border-radius: 999px; background: #fff; box-shadow: 0 10px 24px -12px rgba(75, 42, 122, .4); }
.rb-cloud::before, .rb-cloud::after { content: ''; position: absolute; border-radius: 50%; background: #fff; }
.rb-cloud::before { top: -42%; left: 16%; width: 48%; aspect-ratio: 1; }
.rb-cloud::after { top: -26%; right: 14%; width: 36%; aspect-ratio: 1; }
.rb-cloud.is-a { left: -4%; }
.rb-cloud.is-b { right: -4%; }
.intro.is-rainbow.go .rb-cloud { animation: intro-pop .6s .1s cubic-bezier(.2, 1.5, .4, 1) both; }
.rb-sparks i {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 16px; aspect-ratio: 1; background: #fff;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: rb-twinkle 1.4s calc(var(--i) * -.17s) ease-in-out infinite alternate;
}
@keyframes rb-twinkle { from { transform: scale(.3); opacity: .3; } to { transform: scale(1) rotate(45deg); opacity: 1; } }
.intro.is-rainbow .intro-top, .intro.is-rainbow .intro-sub { color: #6a3fa0; }
.intro.is-rainbow .intro-name span { text-shadow: 0 .05em 0 rgba(75, 42, 122, .22); }
.intro.is-rainbow .intro-name span:nth-child(6n + 1) { color: #ff4f86; }
.intro.is-rainbow .intro-name span:nth-child(6n + 2) { color: #ff8a3d; }
.intro.is-rainbow .intro-name span:nth-child(6n + 3) { color: #e0a800; }
.intro.is-rainbow .intro-name span:nth-child(6n + 4) { color: #2fae5a; }
.intro.is-rainbow .intro-name span:nth-child(6n + 5) { color: #2b8fe0; }
.intro.is-rainbow .intro-name span:nth-child(6n) { color: #8a5cf0; }

/* ---------- romantic: a heart that fills with the picture and beats ---------- */
.intro.is-heart { background: radial-gradient(120% 80% at 50% 35%, #ffd9e3 0%, #f7a6bd 45%, #c9184a 100%); }
.ht-heart { width: min(62vw, 36svh); margin-bottom: 4px; }
.ht-heart svg { display: block; width: 100%; overflow: visible; transform-origin: 50% 55%; }
.ht-line { fill: none; stroke: #fff; stroke-width: 5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .8)); }
.ht-fill { fill: #ff6b93; }
.ht-in { opacity: 0; }
.intro.is-heart.go .ht-line { animation: draw-in 1.2s .2s ease-in-out forwards; }
.intro.is-heart.go .ht-in { animation: ht-show .6s 1.3s ease-out forwards; }
.intro.is-heart.go .ht-heart svg { animation: ht-beat 1s 1.9s ease-in-out infinite; }
@keyframes ht-show { to { opacity: 1; } }
@keyframes ht-beat { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.08); } 28% { transform: scale(.97); } }
.ht-name { font-family: var(--font-sign); font-weight: var(--sign-weight, 400); }
.ht-name span { text-shadow: 0 2px 16px rgba(150, 10, 60, .45); }
.intro.is-heart.go .ht-name span { animation: ht-write .5s both; animation-delay: calc(1.6s + var(--i) * .09s); }
@keyframes ht-write { from { opacity: 0; filter: blur(6px); transform: translateY(10px); } }
.ht-petals i {
  position: absolute; top: -6%; left: calc(var(--x) * 1%); width: calc(14px * var(--s)); aspect-ratio: 1; border-radius: 80% 0 80% 0;
  background: #ff9fb8; opacity: .85; animation: ht-fall 4.2s calc(var(--d) * 1s) linear infinite;
}
.ht-petals i:nth-child(3n) { background: #fff; }
@keyframes ht-fall { to { transform: translate(40px, 112vh) rotate(540deg); } }

/* ---------- classic: velvet curtains on a gold frame ---------- */
.intro.is-curtain { background: radial-gradient(90% 70% at 50% 40%, #2a2218 0%, #120e08 70%, #070503 100%); color: #f6efe0; }
.cu-frame {
  width: min(42vw, 25svh); aspect-ratio: 4 / 5; margin-bottom: 14px; padding: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #f7e7b0, #b8862f 40%, #f2d58a 60%, #8a6420); box-shadow: 0 20px 50px -16px #000, 0 0 40px rgba(242, 213, 138, .25);
}
.cu-frame img, .cu-frame b { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #1a1610; color: #f2d58a; font-size: 2.4rem; }
.cu-name {
  font: 900 calc(min(20vw, 13svh, 130px) * min(1, 5 / var(--len))) / 1.1 'Frank Ruhl Libre', serif; color: transparent;
  background: linear-gradient(100deg, #b8862f 0%, #f7e7b0 25%, #c8a45c 45%, #fff3c4 50%, #c8a45c 55%, #8a6420 100%) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; animation: cu-foil 3s 2.4s linear infinite;
}
@keyframes cu-foil { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.cu-age { margin-top: 4px; font: 700 clamp(1.2rem, 5.4vw, 1.8rem) 'Frank Ruhl Libre', serif; letter-spacing: .04em; color: #c8a45c; }
.cu-side { position: absolute; top: 0; bottom: 0; z-index: 3; width: 52%; background: repeating-linear-gradient(90deg, #5c0d1a 0 22px, #7a1426 22px 34px, #4a0a15 34px 46px); box-shadow: inset 0 0 60px rgba(0, 0, 0, .6); }
.cu-side.is-r { right: 0; transform-origin: right; }
.cu-side.is-l { left: 0; transform-origin: left; }
.cu-top { position: absolute; inset: 0 0 auto; z-index: 4; height: 12%; background: linear-gradient(#7a1426, #4a0a15); border-bottom: 4px solid #c8a45c; border-radius: 0 0 50% 50% / 0 0 30% 30%; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.intro.is-curtain.go .cu-side { animation: cu-open 1.6s .4s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes cu-open { to { transform: scaleX(.12); } }
.intro.is-curtain.go .cu-stage > * { animation: intro-up .8s both; }
.intro.is-curtain.go .cu-frame { animation-delay: 1.1s; }
.intro.is-curtain.go .cu-stage .intro-top { animation-delay: 1.4s; }
.intro.is-curtain.go .cu-name { animation: intro-up .8s 1.7s both, cu-foil 3s 2.5s linear infinite; }
.intro.is-curtain.go .cu-age { animation-delay: 2.1s; }

/* still, for those who asked for less motion: everything in its final place */
.intro.is-calm .ht-in, .intro.is-calm .eg-shell { opacity: 1; }
.intro.is-calm .cu-side { transform: scaleX(.12); }
.intro.is-calm .ln-count, .intro.is-calm .sc-goal, .intro.is-calm .eg-crack, .intro.is-calm .eg-top { display: none; }
.intro.is-calm .ht-line, .intro.is-calm .bl-vine path, .intro.is-calm .rb-arcs path { stroke-dashoffset: 0; }

/* ---------- a round birthday or a mitzvah: a gold medal at the high point ---------- */
.intro-medal {
  position: absolute; top: max(18px, 4svh); inset-inline-start: max(16px, 5vw); z-index: 5; display: grid; place-content: center; width: clamp(84px, 24vw, 120px); aspect-ratio: 1;
  border-radius: 50%; text-align: center; color: #5a3d00; opacity: 0; rotate: -12deg;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #f2c94c 45%, #c8901e 100%);
  box-shadow: 0 0 0 5px rgba(255, 233, 160, .45), 0 0 0 9px rgba(200, 144, 30, .35), 0 14px 30px -10px rgba(0, 0, 0, .55);
}
.intro-medal b { font: 900 clamp(1.7rem, 7vw, 2.4rem)/1 'Rubik', var(--ui-font); }
.intro-medal span { font: 800 clamp(.6rem, 2.6vw, .78rem)/1.15 var(--ui-font); padding-inline: 8px; }
.intro-medal::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%) 150% 0 / 250% 100%; animation: medal-shine 2.6s 1s ease-in-out infinite; }
.intro.go .intro-medal { animation: medal-in .8s calc(var(--flash) + .2s) cubic-bezier(.2, 1.6, .4, 1) forwards; }
.intro.is-calm .intro-medal { opacity: 1; }
@keyframes medal-in { from { opacity: 0; transform: translateY(-40px) scale(.3); } to { opacity: 1; transform: none; } }
@keyframes medal-shine { to { background-position: -50% 0; } }
.intro.is-special .intro-num { --gold: #ffd76a; }
.ht-top { color: #fff; }

/* ---------- wedding: a chuppah in a garden at dusk ---------- */
.intro.is-chuppah { background: radial-gradient(110% 80% at 50% 28%, #3d2b2c 0%, #1f1519 55%, #0c080a 100%); color: #fbf3e4; }
.ch-lights { position: absolute; top: 4svh; inset-inline: 0; z-index: 1; display: flex; justify-content: space-between; padding: 0 5vw; pointer-events: none; }
.ch-lights i { width: 9px; height: 13px; border-radius: 50% 50% 45% 45%; background: #ffe7a8; translate: 0 var(--y); opacity: .12; }
.intro.is-chuppah.go .ch-lights i { animation: ch-light .5s calc(.2s + var(--i) * .06s) forwards, ch-twinkle 2.4s calc(1.4s + var(--i) * .17s) ease-in-out infinite alternate; }
@keyframes ch-light { to { opacity: 1; box-shadow: 0 0 16px 5px rgba(255, 214, 120, .55); } }
@keyframes ch-twinkle { to { opacity: .65; } }
.ch-canopy { position: absolute; top: 8svh; inset-inline: 0; bottom: 0; display: flex; justify-content: center; pointer-events: none; }
.ch-canopy svg { width: min(100%, 560px); height: 100%; overflow: visible; }
.ch-pole { fill: none; stroke: #e9d8b4; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ch-cloth { fill: rgba(255, 250, 240, .18); opacity: 0; }
.ch-drape { fill: none; stroke: #fff5e6; stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ch-hang { fill: none; stroke: rgba(255, 245, 230, .55); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ch-bloom { opacity: 0; transform-box: fill-box; transform-origin: center; }
.ch-bloom circle { fill: #f3c6cf; }
.ch-bloom circle:nth-child(2) { fill: #fffaf0; }
.ch-bloom circle:nth-child(3) { fill: #e8b7c0; }
.ch-bloom .ch-bud { fill: #e9c46a; }
.intro.is-chuppah.go .ch-pole { animation: ch-draw .9s .3s ease-out forwards; }
.intro.is-chuppah.go .ch-drape { animation: ch-draw 1s 1s ease-out forwards; }
.intro.is-chuppah.go .ch-hang { animation: ch-draw .8s 1.5s ease-out forwards; }
.intro.is-chuppah.go .ch-cloth { animation: ch-fade .8s 1.4s forwards; }
.intro.is-chuppah.go .ch-bloom { animation: ch-bloom .6s calc(1.6s + var(--i) * .12s) cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes ch-draw { to { stroke-dashoffset: 0; } }
@keyframes ch-fade { to { opacity: 1; } }
@keyframes ch-bloom { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
.ch-petals i { position: absolute; top: -6%; left: calc(var(--x) * 1%); width: calc(var(--s) * 12px); height: calc(var(--s) * 8px); border-radius: 60% 0 60% 0; background: #f3c6cf; opacity: .85; animation: ht-fall 5.4s calc(var(--d) * 1s) linear infinite; }
.ch-petals i:nth-child(3n) { background: #fffaf0; }
.ch-in { z-index: 2; margin-top: 4svh; }
.ch-arch {
  display: grid; place-items: center; width: min(42vw, 25svh); aspect-ratio: 3 / 4; margin-bottom: 12px; overflow: hidden; border-radius: 999px 999px 10px 10px;
  background: #2a1e1e; color: #f3c6cf; font-size: 2.4rem; box-shadow: 0 0 0 4px #fffaf0, 0 0 0 7px rgba(212, 175, 106, .85), 0 24px 50px -16px #000;
}
.ch-arch img { width: 100%; height: 100%; object-fit: cover; }
.ch-top { color: #f3c6cf; }
.ch-names {
  margin: .05em 0 0; padding: 0 .1em; color: transparent; font: 400 calc(min(15vw, 10svh, 104px) * min(1, 9 / var(--len))) / 1.2 'Gveret Levin', 'Bellefair', cursive;
  background: linear-gradient(100deg, #b8862f 0%, #f7e7b0 25%, #d4af6a 45%, #fff3c4 50%, #d4af6a 55%, #8a6420 100%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text;
}
.ch-sub { font-family: 'Bellefair', serif; font-weight: 400; color: #fbf3e4; }
.intro.is-chuppah.go .ch-arch { animation: intro-up .9s 1.9s both; }
.intro.is-chuppah.go .ch-in .intro-top { animation: intro-up .6s 2.1s both; }
.intro.is-chuppah.go .ch-names { animation: intro-up .9s 2.25s both, cu-foil 3s 3.1s linear infinite; }
.ch-mazal { position: absolute; inset: auto 0 9svh; z-index: 3; margin: 0; font: 400 clamp(2.8rem, 14vw, 5.4rem)/1 'Gveret Levin', 'Bellefair', cursive; color: #ffe7a8; text-shadow: 0 0 30px rgba(255, 214, 120, .6); opacity: 0; }
.intro.is-chuppah.go .ch-mazal { animation: ch-mazal 1.2s var(--flash) cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes ch-mazal { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
.intro.is-calm .ch-pole, .intro.is-calm .ch-drape, .intro.is-calm .ch-hang { stroke-dashoffset: 0; }
.intro.is-calm .ch-cloth, .intro.is-calm .ch-bloom, .intro.is-calm .ch-lights i { opacity: 1; }
.intro.is-calm .ch-mazal, .intro.is-calm .ch-petals { display: none; }

/* ---------- after the wedding: a country road at sunrise, a car with tin cans ---------- */
.intro.is-road { background: linear-gradient(#ffc9ad 0%, #ffdcc4 28%, #fff0e0 56%, #fdf3e6 100%); color: #23324a; }
.rd-clouds i { position: absolute; top: calc(12svh + var(--y, 0px)); width: 120px; height: 34px; border-radius: 40px; background: rgba(255, 255, 255, .75); filter: blur(1px); animation: rd-cloud 26s linear infinite; }
.rd-clouds i::before { content: ''; position: absolute; left: 22px; top: -18px; width: 56px; height: 44px; border-radius: 50%; background: inherit; }
.rd-clouds i:nth-child(1) { left: -10%; --y: 0px; }
.rd-clouds i:nth-child(2) { left: 55%; --y: 9svh; scale: .7; animation-duration: 34s; }
.rd-clouds i:nth-child(3) { left: 20%; --y: 30svh; scale: .55; animation-duration: 40s; opacity: .7; }
@keyframes rd-cloud { from { translate: 0 0; } to { translate: 40vw 0; } }
.rd-sun {
  position: absolute; top: 27svh; left: 50%; z-index: 0; display: grid; place-items: center; width: min(52vw, 30svh); aspect-ratio: 1; margin-left: calc(min(52vw, 30svh) / -2);
  overflow: hidden; border-radius: 50%; background: #ffd77a; color: #fff; font-size: 3rem; box-shadow: 0 0 0 6px #fff7ea, 0 0 80px 30px rgba(255, 190, 110, .6);
}
.rd-sun img { width: 100%; height: 100%; object-fit: cover; }
.rd-hills { position: absolute; bottom: 24svh; inset-inline: 0; z-index: 1; height: 13svh; }
.rd-hills svg { display: block; width: 100%; height: 100%; }
.rd-far { fill: #b7d1ac; }
.rd-near { fill: #8fb48d; }
.rd-road {
  position: absolute; inset: auto 0 0; z-index: 1; height: 24.5svh;
  background: linear-gradient(#8fb48d 0 8%, #5d6577 8% 58%, #efe2cd 58%);
}
.rd-road::after { content: ''; position: absolute; top: 32%; inset-inline: 0; height: 5px; background: repeating-linear-gradient(90deg, #fff6e6 0 36px, transparent 36px 70px); opacity: .9; }
.rd-car { position: absolute; bottom: calc(12svh - 8px); inset-inline: 0; z-index: 2; width: min(90vw, 430px); margin: 0 auto; }
.rd-car svg { display: block; width: 100%; overflow: visible; }
.rd-body { fill: #e8836b; }
.rd-glass { fill: #d6e7f5; }
.rd-trim { fill: none; stroke: #fff3e4; stroke-width: 3; }
.rd-lamp { fill: #ffe9a8; }
.rd-tail { fill: #b8402f; }
.rd-decal { fill: #fffaf2; font: 700 16px 'Playpen Sans Hebrew', 'Rubik', sans-serif; }
.rd-wheel circle { fill: #2b2f3a; }
.rd-wheel .rd-hub { fill: #efe2cd; }
.rd-spoke { stroke: #b9ab98; stroke-width: 3; }
.rd-wheel { transform-box: fill-box; transform-origin: center; }
.rd-string { fill: none; stroke: #8d97a3; stroke-width: 1.5; }
.rd-can rect { fill: #dfe4ea; stroke: #8d97a3; stroke-width: 1.5; }
.rd-can path { stroke: #8d97a3; stroke-width: 1.2; }
.rd-heart { fill: #e8836b; opacity: 0; transform-box: fill-box; transform-origin: center; }
.intro.is-road .rd-in { position: absolute; top: 6svh; inset-inline: 0; z-index: 3; margin-top: 0; padding: 0 16px; }
.rd-top { color: #c95a41; font-weight: 700; }
.rd-names { margin: .1em 0 0; font: 700 calc(min(12vw, 7.4svh, 80px) * min(1, 9 / var(--len))) / 1.2 'Playpen Sans Hebrew', 'Fredoka', sans-serif; color: #23324a; text-wrap: balance; }
.rd-sub { color: #23324a; font-family: 'Playpen Sans Hebrew', var(--ui-font); font-weight: 700; }
.intro.is-road.go .rd-sun { animation: rd-rise 1.9s .15s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes rd-rise { from { transform: translateY(75%) scale(.8); opacity: 0; } }
.intro.is-road.go .rd-car { animation: rd-drive 1.45s .25s cubic-bezier(.15, .6, .25, 1) both, rd-idle 1.3s 1.9s ease-in-out infinite; }
@keyframes rd-drive { 0% { transform: translateX(110vw); } 84% { transform: translateX(-3%); } 100% { transform: none; } }
@keyframes rd-idle { 50% { transform: translateY(-2px); } }
.intro.is-road.go .rd-wheel { animation: rd-roll .38s .25s linear 4; }
@keyframes rd-roll { to { transform: rotate(-360deg); } }
.intro.is-road.go .rd-can { animation: rd-rattle .15s .3s ease-in-out 10 alternate; }
@keyframes rd-rattle { to { translate: 0 -5px; } }
.intro.is-road.go .rd-heart { animation: rd-puff 1.5s calc(1.7s + var(--i) * .24s) ease-out both; }
@keyframes rd-puff { 0% { opacity: 0; translate: 0 0; scale: .3; } 25% { opacity: 1; } 100% { opacity: 0; translate: 46px -80px; scale: 1.6; } }
.intro.is-road.go .rd-top { animation: intro-up .6s 1.5s both; }
.intro.is-road.go .rd-names { animation: intro-up .8s 1.75s both; }
.intro.is-calm .rd-heart { display: none; }
