/* /assets/css/genie-intro.css */
/* Welcome genie (v5.0.2): a golden genie beside the words (right in Arabic, left in English) greets first-time
   visitors in a starry sky, opens with a puff of magic and talks word by word with his hands. At the end his son,
   the site's own little genie, pops out, says hello and flies to his place on the site while the screen fades. */
.gi-screen { display: none; }
html.gi-on, html.gi-on body { overflow: hidden !important; }
/* v5.0.2: the scrollbar's place is kept while the welcome plays, so the page does not reflow when it comes back */
html.gi-on, html.gi-out, html.gi-hold { scrollbar-gutter: stable; }
html.gi-on .gi-screen, html.gi-out .gi-screen {
    position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center;
    /* v5.0.1: the nebula is part of the painted background (no extra moving layer, so nothing to repaint while he talks) */
    background: radial-gradient(38% 30% at 24% 30%, rgba(124, 84, 230, .18), transparent 70%), radial-gradient(34% 28% at 78% 64%, rgba(40, 140, 225, .13), transparent 70%),
        radial-gradient(28% 22% at 56% 88%, rgba(246, 182, 72, .07), transparent 70%), radial-gradient(ellipse at 50% 40%, #151a35 0%, #080a16 55%, #020308 100%);
    color: #f4f2f8; font-family: inherit; overflow: hidden; isolation: isolate;
    transition: opacity .75s cubic-bezier(.4, 0, .2, 1);
}
html.gi-on .gn-layer, html.gi-on .gn-lamp, html.gi-hold .gn-layer, html.gi-hold .gn-lamp { visibility: hidden !important; }
/* nothing behind the welcome needs painting while it plays */
html.gi-on body > :not(.gi-screen):not(.gi-junior) { visibility: hidden; }
/* a moment before leaving, the site paints once under the still-opaque welcome so the reveal does not stutter */
html.gi-on.gi-pre body > :not(.gi-screen):not(.gi-junior) { visibility: visible; }
/* v5.0.2: from then until the little genie lands, the site underneath stands still (it is painted once, nothing
   on it repaints while he talks and flies) and wakes up when he arrives */
html.gi-still body > :not(.gi-screen):not(.gi-junior), html.gi-still body > :not(.gi-screen):not(.gi-junior) * { animation-play-state: paused !important; }
/* choosing the other language opens the other page: Chrome cross-fades between the two instead of cutting */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: ease; }
.gi-screen.is-leaving { opacity: 0; pointer-events: none; }
.gi-sky, .gi-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gi-sky { z-index: 0; }
.gi-fx { z-index: 2; }

/* two columns: the genie on the reading-start side, the words beside him */
.gi-stage { position: relative; z-index: auto; width: min(1180px, 94vw); display: grid; grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
    align-items: center; column-gap: clamp(16px, 4vw, 64px); padding-bottom: 2vh; }
.gi-genie { position: relative; z-index: 1; justify-self: center; width: clamp(250px, 50vh, 460px); aspect-ratio: 160 / 232;
    transition: transform 1.1s cubic-bezier(.6, 0, .2, 1), opacity .9s ease; opacity: 0; }
/* he rises only once the page has settled, so his entrance is not interrupted by the page still loading */
.gi-screen.is-ready .gi-genie { opacity: 1; animation: giEnter 1.3s cubic-bezier(.2, .9, .25, 1.08) backwards; }
.gi-genie::before { content: ""; position: absolute; inset: 8% 4% 18%; border-radius: 50%; z-index: -1;
    background: radial-gradient(circle, rgba(var(--gn-rgb, 246, 182, 72), .26), transparent 68%); }
.gi-genie svg { width: 100%; height: 100%; overflow: visible; display: block; }
.gi-genie .gi-aura { animation: giAura 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* hands: one shape at a time, swapped with a tiny pop */
.gi-genie .gi-palm, .gi-genie .gi-point, .gi-genie .gi-fist { opacity: 0; transform: scale(.6); transform-box: fill-box; transform-origin: left center; transition: opacity .16s, transform .24s cubic-bezier(.3, 1.6, .5, 1); }
.gi-genie [data-pose="palm"] .gi-palm, .gi-genie [data-pose="point"] .gi-point, .gi-genie [data-pose="fist"] .gi-fist { opacity: 1; transform: none; }

/* face: blinking, the wink, and the mouth that follows the mood and the words */
.gi-genie .gi-eye { transform-box: fill-box; transform-origin: center; transition: transform .09s; }
.gi-genie.is-blink .gi-eye, .gi-genie[data-mood="wink"] .gi-eye-r { transform: scaleY(.1); }
.gi-genie .gi-brow { transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.gi-genie .gi-m-grin, .gi-genie .gi-m-open { opacity: 0; transition: opacity .1s; }
.gi-genie[data-mood="joy"] .gi-m-grin, .gi-genie[data-mood="wink"] .gi-m-grin, .gi-genie[data-mood="sly"] .gi-m-grin { opacity: 1; }
.gi-genie[data-mood="joy"] .gi-m-smile, .gi-genie[data-mood="wink"] .gi-m-smile, .gi-genie[data-mood="sly"] .gi-m-smile { opacity: 0; }
.gi-genie[data-mood="surprised"] .gi-m-open, .gi-genie.is-talk .gi-m-open { opacity: 1; }
.gi-genie[data-mood="surprised"] .gi-m-smile, .gi-genie[data-mood="surprised"] .gi-m-grin,
.gi-genie.is-talk .gi-m-smile, .gi-genie.is-talk .gi-m-grin { opacity: 0; }
.gi-screen.is-warp .gi-genie { transform: scale(2.4) translateY(4%); opacity: 0; }
.gi-screen.is-bye .gi-genie { transform: scale(.72) translateY(-5%); opacity: 0; transition: transform .9s cubic-bezier(.5, 0, .2, 1), opacity .6s ease; }

/* the little genie: the site's own genie (same drawing), placed and scaled by the script */
.gi-junior { display: none; }
.gi-junior { --jw: clamp(96px, 17vh, 150px); }
html.gi-on .gi-junior, html.gi-out .gi-junior, html.gi-hold .gi-junior { display: block; position: fixed; left: 0; top: 0; z-index: 2147483001; pointer-events: none;
    width: var(--jw); height: calc(var(--jw) * 1.34); margin-left: calc(var(--jw) * -.5); margin-top: calc(var(--jw) * -.5); transform-origin: 50% 37.3%; will-change: transform; transition: opacity .45s ease; }
/* the same look and life as the site genie (genie.css) */
.gi-junior svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; filter: drop-shadow(0 0 10px rgba(var(--gn-rgb, 246, 182, 72), .5)); }
.gi-junior .jr-eye { transform-box: fill-box; transform-origin: center; animation: jrBlink 3.6s infinite; }
.gi-junior .jr-happy, .gi-junior .jr-mouth-o { opacity: 0; transition: opacity .1s; }
.gi-junior.is-happy .jr-happy { opacity: 1; }
.gi-junior.is-happy .jr-eye { opacity: 0; }
.gi-junior.is-talk .jr-mouth-o { opacity: 1; }
.gi-junior.is-talk .jr-mouth { opacity: 0; }
.gi-junior .jr-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: jrFlame .45s ease-in-out infinite alternate; }
.gi-junior .jr-emblem { animation: jrGlow 2.4s ease-in-out infinite; }
.gi-junior .jr-spark { transform-box: fill-box; transform-origin: center; animation: jrTwinkle 1.8s ease-in-out infinite; }
.gi-junior .jr-spark:nth-of-type(2) { animation-delay: -.6s; } .gi-junior .jr-spark:nth-of-type(3) { animation-delay: -1.2s; }
.gi-junior.is-gone { opacity: 0; }
.gi-board.is-junior .gi-word.is-now { color: #8fe9ff; text-shadow: 0 0 22px rgba(56, 217, 255, .55); }
.gi-tag { display: table; margin: 0 0 .35em; font-size: .38em; font-weight: 800; letter-spacing: .02em; padding: .3em .9em; border-radius: 999px;
    color: #bff3ff; background: rgba(56, 217, 255, .12); border: 1px solid rgba(56, 217, 255, .35); animation: giTag .5s cubic-bezier(.2, .9, .3, 1.3) backwards; }
@media (max-width: 860px) { .gi-tag { margin-inline: auto; } }

/* the words */
.gi-board { position: relative; z-index: 3; min-height: 4.2em; text-align: start; font-size: clamp(26px, 2.9vw, 48px); line-height: 1.5; font-weight: 800;
    letter-spacing: -.01em; transition: opacity .35s ease, transform .4s cubic-bezier(.4, 0, .2, 1); text-wrap: balance; }
.gi-board.is-out { opacity: 0; transform: translateY(-10px); }
.gi-word { position: relative; display: inline-block; opacity: 0; transform: translateY(.22em) scale(.96); margin: 0 .12em;
    transition: opacity .3s ease, transform .5s cubic-bezier(.2, .9, .25, 1.15), color .5s, text-shadow .5s; }
.gi-word.is-in { opacity: 1; transform: none; }
.gi-word::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: .02em; height: .07em; min-height: 2px; border-radius: 2px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 220, 140, 1), transparent); transform: scaleX(0); opacity: 0; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .6s ease; }
.gi-word.is-now { color: #ffe0a0; text-shadow: 0 0 24px rgba(255, 211, 107, .6); }
.gi-word.is-now::after { transform: scaleX(1); opacity: 1; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .15s; }
.gi-board.is-junior .gi-word::after { background: linear-gradient(90deg, transparent, rgba(160, 238, 255, 1), transparent); }
.gi-board.is-talking:not(.is-magic) .gi-word.is-in:not(.is-now):not(.is-name) { color: rgba(244, 242, 248, .8); }
.gi-word.is-name { background: linear-gradient(90deg, #ffe3a0, #f6b648 50%, #ffe3a0); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.gi-board.is-magic .gi-word { background: linear-gradient(100deg, #fff1c9 10%, #ffcf5c 40%, #c9a2ff 70%, #fff1c9 95%); background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; animation: giShimmer 2.4s linear infinite; }
.gi-board.is-magic .gi-word.is-in { filter: drop-shadow(0 0 14px rgba(200, 160, 255, .45)); }

.gi-skip { position: absolute; top: max(16px, env(safe-area-inset-top)); inset-inline-end: 18px; z-index: 4; display: inline-flex; gap: 8px; align-items: center;
    border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #e8e5ef; font: inherit; font-size: 14px; font-weight: 700;
    padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, border-color .2s; }
.gi-skip:hover, .gi-skip:focus-visible { background: rgba(255, 255, 255, .16); border-color: rgba(255, 211, 107, .6); outline: none; }
.gi-enter { margin-top: 10px; border: 0; border-radius: 999px; padding: 13px 26px; font: inherit; font-size: 16px; font-weight: 900; cursor: pointer;
    background: linear-gradient(135deg, #ffd36b, #f6b648); color: #1a1205; box-shadow: 0 12px 34px rgba(246, 182, 72, .35); animation: giPulse 1.6s ease-in-out infinite; }

@keyframes giEnter { from { transform: translateY(30vh) scale(.4) rotate(-10deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes giAura { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes giPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
/* the language question: two lanterns (عربي / English) and "meet the engineer first" */
.gi-board.is-ask { text-align: center; }
.gi-ask { display: grid; gap: .15em; margin-bottom: .45em; animation: giAskIn .6s cubic-bezier(.2, .9, .3, 1.1) backwards; }
.gi-ask span { display: block; }
.gi-ask span[lang=ar] { background: linear-gradient(180deg, #fff 30%, #e6dcff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gi-ask span[lang=en] { font-size: .58em; font-weight: 700; color: #c9c2e2; letter-spacing: .005em; }

/* v5 lanterns: a gold frame, dark glass and a living flame; hover lifts, tilts towards the pointer and lights it up */
@property --hot { syntax: '<number>'; inherits: true; initial-value: 0; }
.gi-langs { display: flex; justify-content: center; align-items: flex-start; gap: clamp(30px, 5vw, 72px); margin: .1em 0 .5em; }
.gi-lang { --g: 255, 196, 84; --g2: 255, 240, 196; --hot: 0; position: relative; display: grid; justify-items: center; gap: 12px; border: 0; background: none; padding: 0 8px 6px; cursor: pointer; color: #fff; font: inherit;
    -webkit-tap-highlight-color: transparent; transform-origin: 50% 0; transition: --hot .45s ease;
    animation: giLampIn .9s cubic-bezier(.2, .9, .25, 1.2) backwards, giSwing 4.4s ease-in-out infinite; animation-delay: var(--d, 0ms), calc(var(--d, 0ms) + .9s); }
.gi-lang[data-l=en] { --g: 110, 186, 255; --g2: 214, 238, 255; animation-delay: var(--d, 0ms), calc(var(--d, 0ms) - 1.3s); }
.gi-lang:hover, .gi-lang.is-hot { --hot: 1; }
.gi-lang.is-guess .gi-lamp-halo::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(var(--g), .34), transparent 62%); animation: giBreath 2.6s ease-in-out infinite 1.4s; transition: opacity .4s; }
.gi-lang.is-guess:hover .gi-lamp-halo::after, .gi-lang.is-guess.is-hot .gi-lamp-halo::after { opacity: 0; animation: none; }
.gi-lamp-string { width: 1.5px; height: 30px; margin-bottom: -12px; background: linear-gradient(rgba(255, 230, 170, 0), rgba(255, 230, 170, .75)); }
.gi-lamp { position: relative; display: grid; justify-items: center; will-change: transform;
    transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(calc(var(--hot) * -10px)) scale(calc(1 + var(--hot) * .07));
    transition: transform .55s cubic-bezier(.2, .9, .3, 1.2); }
.gi-lang:not(:hover):not(.is-hot) .gi-lamp { transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.gi-lamp-ring { width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid #e6b450; margin-bottom: -3px; box-shadow: 0 0 6px rgba(255, 210, 120, .4); }
.gi-lamp-top { width: 50px; height: 20px; position: relative; z-index: 1; background: linear-gradient(90deg, #8a5a14, #f6d488 30%, #fff3cc 45%, #d39b35 65%, #7c5212);
    clip-path: polygon(32% 0, 68% 0, 100% 100%, 0 100%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.gi-lamp-glass { width: clamp(94px, 9.4vw, 124px); aspect-ratio: 1 / 1.16; margin-top: -2px; position: relative; display: grid; place-items: center; overflow: hidden;
    border-radius: 30% 30% 38% 38% / 22% 22% 32% 32%; border: 2.5px solid transparent;
    background: radial-gradient(62% 56% at 50% 58%, rgba(var(--g), calc(.42 + var(--hot) * .45)), rgba(var(--g), calc(.1 + var(--hot) * .14)) 62%, transparent 78%) padding-box,
        linear-gradient(180deg, #17142c, #0b0a1a) padding-box,
        linear-gradient(160deg, #fff1c4, #d9a441 32%, #7c5212 58%, #f3cf7a 82%, #a8741f) border-box;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 calc(26px + var(--hot) * 56px) rgba(var(--g), calc(.25 + var(--hot) * .45)), inset 0 0 calc(10px + var(--hot) * 16px) rgba(var(--g), calc(.25 + var(--hot) * .3)); }
.gi-lamp-glass::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: repeating-linear-gradient(90deg, transparent 0 23%, rgba(214, 160, 60, .35) 23% 24.4%, transparent 24.4% 25%),
        linear-gradient(180deg, rgba(214, 160, 60, .35), transparent 14%, transparent 86%, rgba(214, 160, 60, .35)); }
.gi-lamp-glass::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; border-radius: inherit;
    background: linear-gradient(118deg, rgba(255, 255, 255, .2) 0 16%, transparent 34%, transparent 70%, rgba(255, 255, 255, .06) 86%); }
.gi-lamp-flame { position: absolute; left: 50%; top: 56%; width: 74%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(calc(.8 + var(--hot) * .35)); z-index: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, .9) 0, rgba(var(--g2), .7) 16%, rgba(var(--g), .45) 38%, transparent 68%); animation: giFlame 2.2s ease-in-out infinite; }
.gi-lamp-glass b { position: relative; z-index: 1; font-size: clamp(38px, 4.1vw, 54px); font-weight: 900; line-height: 1; color: rgb(var(--g2));
    text-shadow: 0 0 10px rgba(var(--g), 1), 0 0 calc(22px + var(--hot) * 26px) rgba(var(--g), .85); transition: text-shadow .45s; }
.gi-lang[data-l=en] .gi-lamp-glass b { font-family: Georgia, 'Times New Roman', serif; }
.gi-lamp-base { width: 64px; height: 12px; margin-top: -3px; border-radius: 3px 3px 12px 12px; position: relative; z-index: 1;
    background: linear-gradient(90deg, #7c5212, #f3cf7a 32%, #fff1c4 46%, #c58e2c 66%, #6e4810); box-shadow: 0 4px 8px rgba(0, 0, 0, .45); }
.gi-lamp-base::after { content: ""; position: absolute; left: 50%; top: 100%; width: 9px; height: 13px; transform: translateX(-50%); border-radius: 0 0 50% 50% / 0 0 100% 100%;
    background: linear-gradient(90deg, #8a5a14, #f3cf7a, #8a5a14); }
.gi-lamp-halo { position: absolute; left: 50%; top: 56%; width: 230%; aspect-ratio: 1; border-radius: 50%; z-index: -1; pointer-events: none;
    transform: translate(-50%, -50%) scale(calc(.55 + var(--hot) * .45)); opacity: calc(.25 + var(--hot) * .75);
    background: radial-gradient(circle, rgba(var(--g), .32), rgba(var(--g), .08) 45%, transparent 68%); }
.gi-lamp-name { margin-top: 6px; padding: 5px 16px; border-radius: 999px; font-size: clamp(14px, 1.25vw, 17px); font-weight: 900; letter-spacing: calc(var(--hot) * .03em);
    color: rgb(var(--g2)); border: 1px solid rgba(var(--g), calc(.28 + var(--hot) * .45)); background: rgba(var(--g), calc(.06 + var(--hot) * .12));
    box-shadow: 0 0 calc(var(--hot) * 22px) rgba(var(--g), .35); text-shadow: 0 0 12px rgba(var(--g), .55); }
.gi-lang:focus, .gi-lang:focus-visible, .gi-about:focus { outline: none !important; box-shadow: none !important; }
.gi-lang:focus-visible .gi-lamp-name { outline: 2px solid rgba(var(--g), .85); outline-offset: 3px; }
.gi-langs.is-nudge .gi-lang { animation: giNudge .8s cubic-bezier(.3, 1.4, .5, 1) 2, giSwing 4.4s ease-in-out infinite .8s; }
.gi-langs.is-done .gi-lang { pointer-events: none; }
.gi-langs.is-done .gi-lang:not(.is-picked) { animation: giLampOut .45s ease forwards; }
.gi-lang.is-picked { --hot: 1; animation: giPicked .8s cubic-bezier(.2, .9, .3, 1.3) forwards; }
.gi-lang.is-picked .gi-lamp-glass b { animation: giFlash .7s ease-out; }
.gi-about { position: relative; overflow: hidden; margin-top: .5em; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .055); color: #e8e3f5; font: inherit; font-size: clamp(13px, 1.1vw, 15px); font-weight: 800;
    padding: 10px 20px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); transition: background .25s, border-color .25s, transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.gi-about::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .16) 50%, transparent 70%); transform: translateX(-120%); animation: giSheen 4.5s ease-in-out infinite 2s; pointer-events: none; }
.gi-about:hover, .gi-about:focus-visible { background: rgba(201, 162, 255, .14); border-color: rgba(201, 162, 255, .5); outline: none; transform: translateY(-2px); }
.gi-board.is-ask:has(.gi-langs.is-done) .gi-about, .gi-board.is-ask:has(.gi-langs.is-done) .gi-nudge { opacity: 0; transition: opacity .3s; }
.gi-nudge { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: .42em; font-weight: 800; color: #ffdc8f; margin: .1em 0 .3em; animation: giAskIn .45s ease backwards; text-shadow: 0 0 14px rgba(255, 211, 107, .4); }
.gi-nudge span { unicode-bidi: isolate; }
@keyframes giAskIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes giLampIn { from { opacity: 0; transform: translateY(-60px) scale(.6); } 60% { opacity: 1; } }
@keyframes giLampOut { to { opacity: 0; transform: translateY(18px) scale(.8); } }
@keyframes giSwing { 0%, 100% { transform: rotate(-2.6deg); } 50% { transform: rotate(2.6deg); } }
@keyframes giBreath { 0%, 100% { opacity: .2; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
@keyframes giFlame { 0%, 100% { opacity: .95; } 30% { opacity: .78; } 55% { opacity: 1; } 75% { opacity: .86; } }
@keyframes giNudge { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px) rotate(-4deg); } 70% { transform: translateY(0) rotate(3deg); } }
@keyframes giPicked { 40% { transform: scale(1.2) translateY(-12px); } to { transform: scale(1.14) translateY(-8px); filter: drop-shadow(0 0 34px rgba(var(--g), .85)); } }
@keyframes giFlash { 0% { color: #fff; text-shadow: 0 0 30px #fff, 0 0 60px rgba(var(--g), 1); } }
@keyframes giSheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (max-width: 860px) { .gi-lamp-glass { width: 84px; } .gi-langs { gap: 34px; } .gi-lamp-string { height: 18px; } }
@keyframes jrBlink { 0%, 92%, 100% { transform: none; } 95% { transform: scaleY(.12); } }
@keyframes jrFlame { from { transform: scale(.92, .86) rotate(-4deg); } to { transform: scale(1.04, 1.1) rotate(4deg); } }
@keyframes jrGlow { 50% { opacity: .55; } }
@keyframes jrTwinkle { 0%, 100% { opacity: 0; transform: scale(.3); } 50% { opacity: 1; transform: scale(1); } }
@keyframes giTag { from { opacity: 0; transform: translateY(8px) scale(.9); } }
@keyframes giShimmer { from { background-position: 120% 0; } to { background-position: -100% 0; } }

/* phones and narrow windows: the genie on top, the words under him */
@media (max-width: 860px) {
    .gi-stage { grid-template-columns: 1fr; row-gap: 6px; justify-items: center; }
    .gi-genie { width: clamp(190px, 34vh, 290px); }
    .gi-board { text-align: center; font-size: clamp(22px, 6.2vw, 30px); min-height: 3.4em; padding: 0 6px; }
    .gi-skip { font-size: 13px; padding: 8px 13px; }
}
@media (prefers-reduced-motion: reduce) { .gi-screen { display: none !important; } }

/* /assets/css/echo-intro.css */
/* Echo welcome (v1.0.1): rides on the genie welcome's page rules (genie-intro.css: gi-on / gi-pre / gi-still / gi-out),
   with its own screen, words and language portals. */
html.gi-on .gi-screen.ec-screen, html.gi-out .gi-screen.ec-screen {
    background: radial-gradient(60% 50% at 50% 34%, rgba(var(--ec-main, 246, 182, 72), .07), transparent 70%), radial-gradient(ellipse at 50% 40%, #0a0c18 0%, #04050b 60%, #010103 100%);
    color: #f3efe6; display: block; transition: opacity 1s cubic-bezier(.4, 0, .2, 1);
}
.ec-rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
html.gi-on .gi-junior.ec-face, html.gi-out .gi-junior.ec-face, html.gi-hold .gi-junior.ec-face {
    margin: 0; transform-origin: 50% 50%; z-index: 2147483001; transition: none; }  /* v1.0.1: no filter here: it was redrawn on every frame of the face and made the welcome stutter */
.gi-junior.ec-face { display: none; }

.ec-board { position: absolute; left: 50%; top: var(--ec-board-top, 66vh); transform: translateX(-50%); z-index: 3; width: min(92vw, 940px); text-align: center;
    font-size: clamp(22px, 2.7vw, 40px); font-weight: 800; line-height: 1.45; letter-spacing: -.005em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .9); transition: opacity .32s ease, transform .4s ease; }
.ec-board.is-out { opacity: 0; transform: translateX(-50%) translateY(-6px); }
.ec-line { display: block; }
.ec-word { display: inline-block; opacity: 0; transform: translateY(.18em); transition: opacity .2s ease, transform .4s cubic-bezier(.2, .9, .25, 1.15), color .5s, text-shadow .5s; unicode-bidi: isolate; }
.ec-word.is-in { opacity: 1; transform: none; }
.ec-word.is-now { color: rgb(var(--ec-hot, 255, 244, 218)); text-shadow: 0 0 22px rgba(var(--ec-main, 246, 182, 72), .75), 0 2px 18px rgba(0, 0, 0, .9); }

.ec-ask { display: grid; gap: .1em; margin-bottom: .55em; }
.ec-ask span { display: block; min-height: 1.3em; }
.ec-ask span[lang=en] { font-size: .55em; font-weight: 700; color: rgba(var(--ec-main, 246, 182, 72), .9); letter-spacing: .02em; }
.ec-nudge { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: .55em; font-size: .42em; font-weight: 800; color: rgb(var(--ec-eye, 56, 217, 255)); text-shadow: 0 0 14px rgba(var(--ec-eye, 56, 217, 255), .5); }

/* the language portals: rings of changing glyphs around one big letter */
.ec-portals { display: flex; justify-content: center; gap: clamp(26px, 5vw, 70px); }
.ec-portal { --s: clamp(104px, 10vw, 136px); position: relative; width: var(--s); height: var(--s); border-radius: 50%; border: 0; padding: 0; cursor: pointer; color: #fff; font: inherit;
    background: radial-gradient(circle, rgba(var(--ec-main, 246, 182, 72), .16), rgba(4, 5, 11, .92) 62%); display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 0 0 1px rgba(var(--ec-main, 246, 182, 72), .3), 0 0 34px rgba(var(--ec-main, 246, 182, 72), .14), inset 0 0 26px rgba(var(--ec-main, 246, 182, 72), .14);
    animation: ecPortalIn .8s cubic-bezier(.2, .9, .3, 1.2) backwards; animation-delay: var(--d, 0ms);
    transition: transform .45s cubic-bezier(.2, .9, .3, 1.25), box-shadow .4s ease; }
.ec-portal[data-l=en] { --ec-main: var(--ec-eye, 56, 217, 255); }
.ec-portal b { position: relative; z-index: 1; font-size: calc(var(--s) * .36); font-weight: 900; line-height: 1; color: rgb(var(--ec-hot, 255, 244, 218));
    text-shadow: 0 0 14px rgba(var(--ec-main, 246, 182, 72), 1), 0 0 34px rgba(var(--ec-main, 246, 182, 72), .7); transition: text-shadow .4s, transform .45s; }
.ec-portal[data-l=en] b { font-family: Georgia, 'Times New Roman', serif; }
.ec-portal em { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: clamp(14px, 1.2vw, 17px); font-weight: 900;
    color: rgb(var(--ec-main, 246, 182, 72)); text-shadow: 0 0 12px rgba(var(--ec-main, 246, 182, 72), .5); letter-spacing: .02em; transition: letter-spacing .4s; }
.ec-ring { position: absolute; inset: 0; border-radius: 50%; animation: ecSpin 16s linear infinite; pointer-events: none; }
.ec-ring i { position: absolute; left: 50%; top: 50%; width: 1em; margin: -.5em 0 0 -.5em; font-style: normal; font-size: calc(var(--s) * .1); font-weight: 800; line-height: 1; text-align: center;
    color: rgba(var(--ec-main, 246, 182, 72), .75); transform: rotate(calc(var(--i) * 16.36deg)) translateY(calc(var(--s) * -.43)); }
.ec-ring.is-in { inset: 16%; animation-direction: reverse; animation-duration: 11s; opacity: 0; transition: opacity .4s; }
.ec-ring.is-in i { font-size: calc(var(--s) * .075); transform: rotate(calc(var(--i) * 16.36deg)) translateY(calc(var(--s) * -.3)); color: rgba(var(--ec-hot, 255, 244, 218), .7); }
.ec-portal:hover, .ec-portal.is-hot { transform: scale(1.1); box-shadow: 0 0 0 1px rgba(var(--ec-main, 246, 182, 72), .7), 0 0 60px rgba(var(--ec-main, 246, 182, 72), .45), inset 0 0 40px rgba(var(--ec-main, 246, 182, 72), .35); }
.ec-portal:hover .ec-ring.is-in, .ec-portal.is-hot .ec-ring.is-in { opacity: 1; }
.ec-portal:hover b, .ec-portal.is-hot b { text-shadow: 0 0 18px #fff, 0 0 46px rgba(var(--ec-main, 246, 182, 72), 1); }
.ec-portal:hover em, .ec-portal.is-hot em { letter-spacing: .08em; }
.ec-portal.is-guess:not(:hover):not(.is-hot) { animation: ecPortalIn .8s cubic-bezier(.2, .9, .3, 1.2) backwards, ecBreath 2.6s ease-in-out infinite 1.4s; animation-delay: var(--d, 0ms), 1.4s; }
.ec-portal:focus { outline: none; }
.ec-portal:focus-visible em { outline: 2px solid rgba(var(--ec-main, 246, 182, 72), .8); outline-offset: 4px; border-radius: 6px; }
.ec-portals.is-nudge .ec-portal { animation: ecNudge .7s cubic-bezier(.3, 1.4, .5, 1) 2; }
.ec-portals.is-done .ec-portal { pointer-events: none; }
.ec-portals.is-done .ec-portal:not(.is-picked) { opacity: 0; transform: scale(.7); transition: opacity .35s, transform .4s; }
.ec-portal.is-picked { animation: ecPicked .7s cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes ecSpin { to { transform: rotate(360deg); } }
@keyframes ecPortalIn { from { opacity: 0; transform: scale(.4); filter: blur(6px); } }
@keyframes ecBreath { 0%, 100% { box-shadow: 0 0 0 1px rgba(var(--ec-main, 246, 182, 72), .3), 0 0 34px rgba(var(--ec-main, 246, 182, 72), .14), inset 0 0 26px rgba(var(--ec-main, 246, 182, 72), .14); }
    50% { box-shadow: 0 0 0 1px rgba(var(--ec-main, 246, 182, 72), .55), 0 0 54px rgba(var(--ec-main, 246, 182, 72), .32), inset 0 0 34px rgba(var(--ec-main, 246, 182, 72), .26); } }
@keyframes ecNudge { 0%, 100% { transform: none; } 40% { transform: translateY(-14px) scale(1.06); } 70% { transform: translateY(0) scale(.98); } }
@keyframes ecPicked { 40% { transform: scale(1.3); filter: brightness(1.8); } to { transform: scale(1.18); filter: brightness(1.3); } }
@media (max-width: 700px) { .ec-board { font-size: clamp(19px, 5.6vw, 26px); } .ec-portals { gap: 30px; } }

