/* ── start-up intro: brand gradients (never black), one product per scene ── */
#intro { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
         gap: 22px; overflow: hidden; color: #fff; text-align: center;
         --c1: #6d28d9; --c2: #4f46e5; --c3: #0891b2;
         /* deep space in brand colours (never black): violet, indigo and teal night sky, tinted by each product */
         background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--c2) 55%, #3730a3) 0%, #4c1d95 48%, #3730a3 75%, #155e75 100%);
         transition: background 1s ease; }
#intro-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#intro[hidden], #intro [hidden] { display: none !important; }
.intro-bg span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; background: #fff; animation: intro-float 9s ease-in-out infinite alternate; }
.intro-bg .b1 { width: 420px; height: 420px; left: -120px; top: -100px; background: var(--c3); }
.intro-bg .b2 { width: 360px; height: 360px; right: -80px; bottom: -120px; background: var(--c1); animation-delay: -3s; }
.intro-bg .b3 { width: 260px; height: 260px; left: 55%; top: 12%; background: #fbcfe8; opacity: .25; animation-delay: -6s; }
@keyframes intro-float { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }
.intro-brand { position: relative; margin: 0; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; opacity: .85; }
.intro-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 420px; max-width: 70vw;
              padding: 34px 48px; border-radius: 28px; cursor: pointer; color: #fff; font: inherit;
              background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45);
              box-shadow: 0 24px 60px rgba(30, 27, 75, .25); backdrop-filter: blur(14px); }
.intro-card:hover { background: rgba(255, 255, 255, .24); }
.intro-card b { font-size: 46px; line-height: 1.1; }
.intro-card span { font-size: 18px; opacity: .95; }
.intro-card em { margin-top: 8px; font-style: normal; font-size: 14px; padding: 7px 18px; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.intro-card.in { animation: intro-in .8s .75s cubic-bezier(.2, .8, .2, 1) both; }
.intro-card.in b { animation: intro-rise .9s .85s cubic-bezier(.2, .8, .2, 1) both; }
.intro-card.in span { animation: intro-rise .9s 1s cubic-bezier(.2, .8, .2, 1) both; }
.intro-card.in em { animation: intro-rise .9s 1.15s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes intro-in { from { opacity: 0; transform: scale(.92) translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes intro-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.intro-all { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; animation: intro-in .8s .75s both; }
.intro-all b { font-size: 38px; }
#intro-all-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; }
#intro-all-list button { min-width: 150px; padding: 10px 16px; border-radius: 14px; color: #fff; font: inherit; cursor: pointer;
                         background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .5); }
#intro-all-list button:hover { background: rgba(255, 255, 255, .3); }
.intro-dots { position: relative; display: flex; gap: 8px; }
.intro-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: all .3s; }
.intro-dots span.past { background: rgba(255, 255, 255, .7); }
.intro-dots span.now { width: 26px; border-radius: 9px; background: #fff; }
.intro-controls { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 14px; align-items: center; font-size: 13px; }
.intro-controls button, .intro-controls select { min-width: 140px; padding: 7px 12px; border-radius: 12px; color: #fff; font: inherit; cursor: pointer;
                                                 background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .5); }
.intro-controls select option { color: #1e1b4b; }
#intro .intro-controls select { background: rgba(255, 255, 255, .18) !important; background-image: none !important; color: #fff !important; }   /* a site's own select style must not paint it white */
.intro-controls label { display: flex; gap: 8px; align-items: center; }
.intro-skip { position: absolute; top: 20px; right: 24px; min-width: 110px; padding: 8px 18px; border-radius: 999px; color: #fff; font: inherit;
              font-size: 15px; cursor: pointer; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .6); }
.intro-skip:hover { background: rgba(255, 255, 255, .34); }
/* reduce motion: a simple fade, nothing moves */
#intro.reduce, #intro.reduce * { transition: opacity .6s !important; }
#intro.reduce .intro-bg span { animation: none; }
#intro.reduce .intro-card.in, #intro.reduce .intro-card.in *, #intro.reduce .intro-all { animation: intro-fade .6s both !important; }
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── the space intro (2026-11-27): WebGL Earth + galaxy behind, craft on a canvas above, products as glass cards ── */
#intro { background: radial-gradient(ellipse at 50% 45%, #312e81 0%, #2e1065 55%, #155e75 100%); justify-content: flex-end; padding-bottom: 96px; }
#intro-earth { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.intro-title { position: absolute; left: 0; right: 0; top: 7%; text-align: center; pointer-events: none; animation: intro-title 1.4s 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.intro-title b { display: block; font-size: clamp(34px, 5vw, 60px); letter-spacing: -.02em; line-height: 1.05;
                 background: linear-gradient(120deg, #fff, #c7d2fe 45%, #a5f3fc); -webkit-background-clip: text; background-clip: text; color: transparent;
                 text-shadow: 0 0 40px rgba(165, 180, 252, .25); }
.intro-title span { display: block; margin-top: 8px; font-size: 16px; letter-spacing: .04em; opacity: .9; }
@keyframes intro-title { from { opacity: 0; transform: translateY(-16px); letter-spacing: .08em; } to { opacity: 1; transform: none; } }
#intro.products .intro-title { opacity: .9; transform: scale(.7); top: 3%; transition: all .9s ease; animation: none; }
#intro .intro-card { margin-bottom: 8vh; }
#intro.products .intro-card { background: rgba(30, 27, 75, .28); border-color: rgba(255, 255, 255, .5); }
.intro-card b { background: linear-gradient(120deg, #fff, color-mix(in srgb, var(--c3) 35%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-card em { background: linear-gradient(120deg, var(--c1), var(--c3)); }
.intro-dots { margin-bottom: 4px; }
#intro .intro-card.in { animation-delay: .1s; }
#intro .intro-card.in b { animation-delay: .2s; }
#intro .intro-card.in span { animation-delay: .32s; }
#intro .intro-card.in em { animation-delay: .44s; }
#intro .intro-all { animation-delay: .1s; }
#intro.products .intro-card { margin-bottom: 36vh; }
#intro.products .intro-all { margin-bottom: 30vh; }
.intro-title { top: 2.5%; }
.intro-title b { font-size: clamp(30px, 4.2vw, 52px); }
.intro-title span { margin-top: 4px; font-size: 15px; }
#intro:not(.products) .intro-dots { visibility: hidden; }

/* ── website additions (web-intro): fonts, phones, controls toggle, the page waits behind the intro ── */
#intro { font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; z-index: 2147483000; }
#intro button { font-family: inherit; }
html.intro-playing body { overflow: hidden; }
html.intro-playing #site { visibility: hidden; }                 /* the site appears only after the intro (owner) */
#intro.no-controls .intro-controls { display: none; }
@media (max-width: 640px) {
  .intro-card { min-width: 0; width: calc(100vw - 40px); padding: 24px 20px; }
  .intro-card b { font-size: 32px; }
  .intro-card span { font-size: 15px; }
  .intro-all b { font-size: 28px; }
  #intro-all-list button { min-width: 0; flex: 1 1 40%; }
  .intro-controls { flex-wrap: wrap; bottom: 12px; gap: 8px; }
  .intro-controls button, .intro-controls select { min-width: 0; }
  .intro-skip { top: 12px; right: 12px; min-width: 0; }
}

/* the astronaut floating above the cards (owner, 2026-11-28; same as Brainmify Browser 0.1.4): a real NASA spacewalk photo
   (public domain, NASA S84-27017), logos retouched out, a small globe on the chest; appears with the first card, stays to the end */
.intro-astro { position: absolute; left: 50%; top: 0; height: clamp(84px, 14vh, 140px); width: auto; pointer-events: none;
               transform: translateX(-50%); filter: drop-shadow(0 10px 18px rgba(15, 10, 60, .45)); opacity: 0; transition: opacity 1s ease; }
.intro-astro.on { opacity: 1; animation: astro-float 16s ease-in-out 1.4s infinite; }
@keyframes astro-float { 0% { transform: translateX(-50%) translateY(0) rotate(0deg); }
                         25% { transform: translateX(-54%) translateY(-6px) rotate(-7deg); }
                         50% { transform: translateX(-50%) translateY(-10px) rotate(0deg); }
                         75% { transform: translateX(-46%) translateY(-5px) rotate(7deg); }
                         100% { transform: translateX(-50%) translateY(0) rotate(0deg); } }
#intro.reduce .intro-astro.on { animation: none; }

/* Spacify website (owner, 2026-11-28): compact cards, so the astronaut above them gets a medium size (it fills the gap
   between the title and the card). Same look, less padding and slightly smaller text. */
#intro .intro-card { min-width: 340px; max-width: min(640px, 80vw); gap: 6px; padding: 18px 30px 16px; border-radius: 22px; }
#intro .intro-card b { font-size: clamp(28px, 3vw, 36px); }
#intro .intro-card span { font-size: 16px; }
#intro .intro-card em { margin-top: 4px; font-size: 13px; padding: 5px 15px; }
@media (max-width: 640px) {
  #intro .intro-card { min-width: 0; width: calc(100vw - 48px); padding: 14px 16px 12px; }
  #intro .intro-card b { font-size: 26px; }
  #intro .intro-card span { font-size: 14px; }
}

/* launch gate (2026-12-03): shown only when the browser blocks sound; one tap starts the story and the music together */
.intro-gate { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px;
              padding-bottom: 84px; pointer-events: none;
              --g1: #1d4ed8; --g2: #4338ca; --g3: #f97316; animation: intro-in .7s both; }
.intro-gate.out { animation: intro-gate-out .45s ease-in both; }
@keyframes intro-gate-out { to { opacity: 0; transform: scale(1.15); } }
.intro-go { position: relative; width: 166px; height: 166px; pointer-events: auto; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font: inherit;
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
            background: linear-gradient(135deg, var(--g1), var(--g2) 55%, var(--g3));
            box-shadow: 0 0 0 6px rgba(255, 255, 255, .2), 0 0 70px color-mix(in srgb, var(--g3) 65%, transparent), 0 22px 50px rgba(30, 27, 75, .5);
            transition: transform .25s cubic-bezier(.2, .8, .2, 1); animation: intro-breathe 2.2s ease-in-out infinite; }
.intro-go:hover, .intro-go:focus-visible { transform: scale(1.07); outline: none; }
.intro-go-rocket { font-style: normal; font-size: 34px; line-height: 1; margin-bottom: 2px; }
.intro-go b { font-size: 26px; line-height: 1.05; letter-spacing: .02em; }
.intro-go small { margin-top: 3px; font-size: 11.5px; line-height: 1.3; opacity: .95; letter-spacing: .08em; text-transform: uppercase; }
.intro-go::before, .intro-go::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6);
                                      animation: intro-ring 2.4s ease-out infinite; pointer-events: none; }
.intro-go::after { animation-delay: 1.2s; }
@keyframes intro-ring { from { transform: scale(1); opacity: .85; } to { transform: scale(1.75); opacity: 0; } }
@keyframes intro-breathe { 50% { box-shadow: 0 0 0 9px rgba(255, 255, 255, .26), 0 0 110px color-mix(in srgb, var(--g3) 80%, transparent), 0 22px 50px rgba(30, 27, 75, .5); } }
.intro-gate-tip { margin: 12px 0 0; padding: 6px 16px; border-radius: 999px; font-size: 15px; background: rgba(30, 27, 75, .45); backdrop-filter: blur(8px); }
.intro-quiet { pointer-events: auto; padding: 4px 10px; background: none; border: 0; color: #fff; opacity: .78; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.intro-quiet:hover { opacity: 1; }
#intro.reduce .intro-go, #intro.reduce .intro-go::before, #intro.reduce .intro-go::after { animation: none; }
@media (max-width: 600px) { .intro-gate { padding-bottom: 96px; } .intro-go { width: 146px; height: 146px; } .intro-go b { font-size: 22px; } .intro-go-rocket { font-size: 28px; } .intro-gate-tip { font-size: 14px; padding: 0 20px; } }

/* "Getting ready" note while the globe pictures and music load (slow first start after a laptop restart) */
.intro-wait { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); color: #fff;
  font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; backdrop-filter: blur(6px); white-space: nowrap; }
.intro-wait[hidden] { display: none; }
.intro-wait i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: intro-spin .8s linear infinite; }
@keyframes intro-spin { to { transform: rotate(360deg); } }
