/* Blockstate — the website: one full-screen stage of the game's own films (site.js), the scene's words over it. */
:root {
  --ink: #0b0f1e;
  --white: #ffffff;
  --soft: rgba(255, 255, 255, 0.9);
  --pink: #ff8fb8;
  --gold-a: #ffe58a;
  --gold-b: #f2a516;
  --gold-ink: #3b1f00;
  --navy: #0a185a;
  --display: 'Fredoka', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gut: 16px;
  --top: env(safe-area-inset-top, 0px);
  --bot: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--white); overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--body); -webkit-font-smoothing: antialiased; touch-action: none; }
a { color: inherit; }
img { max-width: 100%; }

/* ------------------------------------------------------------------ the stage */
#stage { position: fixed; inset: 0; overflow: hidden; background: var(--ink); }
#stage video, #stage .poster, #stage .snap { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
#stage video[data-on], #stage .poster[data-on] { opacity: 1; }
#stage .snap { pointer-events: none; transition: opacity 0.3s ease; }
#stage .snap.cut { transition: none; }
#stage .vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(125% 95% at 50% 45%, rgba(0, 0, 0, 0) 58%, rgba(4, 6, 20, 0.34) 100%); }
#stage .petals { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#stage .dip { position: absolute; inset: 0; background: #070914; opacity: 0; pointer-events: none; transition: opacity 0.24s ease; }
#stage .dip.on { opacity: 1; }

/* ------------------------------------------------------------------ the bar */
.bar { position: fixed; z-index: 5; top: calc(var(--top) + 12px); left: var(--gut); right: var(--gut); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.mark { display: block; width: 104px; opacity: 0; transform: translateY(-6px); transition: opacity 0.4s ease, transform 0.4s ease; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45)); }
.mark img { display: block; width: 100%; height: auto; }
body.past .mark { opacity: 1; transform: none; }
/* the studio's Discord and X, round glass icons at the bar's right end on every scene */
.soc { display: flex; gap: 8px; margin-left: auto; }
.soc a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--white); background: rgba(10, 14, 34, 0.42); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.15s ease, transform 0.15s ease; }
.soc a:hover { background: rgba(10, 14, 34, 0.62); }
.soc a:active { transform: scale(0.94); }
.soc a:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.soc svg { width: 19px; height: 19px; fill: currentColor; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 17px/1 var(--display); letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; cursor: pointer; border: 0; transition: transform 0.15s ease, filter 0.15s ease; }
.btn:active { transform: scale(0.97); }
.btn.gold { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-a), var(--gold-b)); box-shadow: 0 6px 18px rgba(242, 165, 22, 0.35), inset 0 -2px 0 rgba(120, 60, 0, 0.25); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.glass { color: var(--white); background: rgba(10, 14, 34, 0.42); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn.glass:hover { background: rgba(10, 14, 34, 0.58); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn:focus-visible, .dots button:focus-visible, .hint:focus-visible, .mark:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
/* phones: the logo and both buttons on one line, clear of the scene's title (after the base rules, which they override) */
@media (max-width: 560px) {
  .bar { gap: 8px; }
  .mark { flex: none; width: 78px; }
  .soc { gap: 6px; }
  .soc a { width: 34px; height: 34px; }
  .soc svg { width: 16px; height: 16px; }
  .bar-actions { flex-wrap: nowrap; gap: 6px; }
  .bar-actions .btn.small { min-height: 32px; padding: 0 10px; font-size: 11.5px; }
}
@media (max-width: 380px) {
  .mark { width: 66px; }
  .bar-actions .btn.small { padding: 0 8px; font-size: 11px; }
}
@media (max-width: 340px) {
  .mark { width: 54px; }
  .bar-actions { gap: 4px; }
  .bar-actions .btn.small { padding: 0 7px; font-size: 10px; }
}
/* ------------------------------------------------------------------ the scenes' words */
#scenes { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.cap { position: absolute; left: var(--gut); right: var(--gut); top: calc(var(--top) + 76px); display: flex; flex-direction: column; align-items: center; text-align: center; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.4s; }
.cap.on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.45s ease 0.05s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s, visibility 0s; }
.cap.on .btn, .cap.on a { pointer-events: auto; }
.cap::before { content: ''; position: absolute; z-index: -1; inset: -18% -12% -26%; background: radial-gradient(closest-side, rgba(5, 8, 26, 0.5), rgba(5, 8, 26, 0)); pointer-events: none; }
.cap h1, .cap h2 { margin: 0; font: 600 clamp(34px, 9.6vw, 72px)/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--white); text-shadow: 0 2px 0 rgba(10, 24, 90, 0.5), 0 8px 28px rgba(0, 0, 0, 0.5); text-wrap: balance; }
.cap h2 span { white-space: nowrap; }
.cap .rule { display: block; width: min(260px, 70%); height: 16px; margin: 12px 0 10px; background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23ff8fb8'%3E%3Cellipse cx='12' cy='7.2' rx='2.6' ry='3.6'/%3E%3Cellipse cx='12' cy='7.2' rx='2.6' ry='3.6' transform='rotate(72 12 12)'/%3E%3Cellipse cx='12' cy='7.2' rx='2.6' ry='3.6' transform='rotate(144 12 12)'/%3E%3Cellipse cx='12' cy='7.2' rx='2.6' ry='3.6' transform='rotate(216 12 12)'/%3E%3Cellipse cx='12' cy='7.2' rx='2.6' ry='3.6' transform='rotate(288 12 12)'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.9' fill='%23ffe58a'/%3E%3C/svg%3E") center / 16px 16px no-repeat,
  linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0) 54%, rgba(255, 255, 255, 0.85) 70%, rgba(255, 255, 255, 0)) center / 100% 1.5px no-repeat; }
.cap p { margin: 0; max-width: 34ch; font: 700 clamp(15px, 4.1vw, 20px)/1.4 var(--body); color: var(--soft); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.5); text-wrap: pretty; }
.cap .ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.cap.hero .logo { width: min(300px, 68vw); height: auto; margin: -10px 0 4px; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.45)); }
.cap.hero h1 { font-size: clamp(30px, 8.4vw, 60px); }
.cap .foot { margin-top: 14px; font: 700 12px var(--body); color: rgba(255, 255, 255, 0.6); }
/* where to play (2026-11-27): the two badges, each under its own label: Google Play is Early Access (the sign-up at
   /early-access), the App Store badge opens the game page with the iPhone's install steps (/play?install=ios). Play
   Now on Web went (the user: "Why is Play on the web still here?"): the badges are the ways in */
.stores { display: grid; justify-items: center; gap: 7px; margin-top: 18px; }
.store-a { display: grid; justify-items: center; gap: 6px; text-decoration: none; transition: transform 0.15s; }
.store-a:hover, .store-a:focus-visible { transform: translateY(-2px); }
.store-a:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 8px; }
.stores-t { padding: 5px 11px 4px; border-radius: 999px; font: 800 10.5px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--white); background: rgba(10, 14, 34, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.stores-b { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stores .stores-b img { display: block; width: auto; height: 40px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)); }
.site-foot .stores { justify-items: start; margin-top: 16px; }
.site-foot .stores-t { padding: 0; color: var(--pink); background: none; }
.site-foot .stores-b { justify-content: flex-start; }
.site-foot .store-a { justify-items: start; }
@media (max-width: 560px) { .stores-b { gap: 6px; } .stores-t { padding: 4px 9px 3px; font-size: 9.5px; letter-spacing: 0.14em; } .stores .stores-b img { height: 34px; } }
@media (max-width: 380px) { .stores .stores-b img { height: 31px; } }
@media (max-width: 340px) { .stores-b { gap: 4px; } .stores .stores-b img { height: 28px; } }

/* ------------------------------------------------------------------ the BSG scene: the game's currencies */
.cap .cur { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(100%, 420px); }
.cap .cur li { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 10px 6px 9px; border-radius: 16px; background: rgba(8, 12, 34, 0.42); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cap .cur img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35)); }
.cap .cur b { font: 600 16px/1.1 var(--display); letter-spacing: 0.01em; }
.cap .cur span { font: 700 12px/1.25 var(--body); color: rgba(255, 255, 255, 0.78); }

/* ------------------------------------------------------------------ the dots and the hint */
.dots { position: fixed; z-index: 4; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.dots button { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); transition: transform 0.25s ease, background 0.25s ease; }
.dots button[aria-current='true']::after { background: var(--pink); transform: scale(1.6); box-shadow: 0 0 0 3px rgba(255, 143, 184, 0.28), 0 0 8px rgba(0, 0, 0, 0.5); }
.hint { position: fixed; z-index: 4; left: 50%; bottom: calc(var(--bot) + 18px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 12px; border: 0; background: none; color: var(--white); font: 800 13px var(--body); letter-spacing: 0.12em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); cursor: pointer; transition: opacity 0.3s ease; }
.hint svg { width: 22px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.6s ease-in-out infinite; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.6)); }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
/* the hint only on the opening scene: by the second, the way on is known */
body.past .hint, body.last .hint, body.busy .hint { opacity: 0; pointer-events: none; }
/* the sound: a round glass button in the bottom-left corner, a cross when off, waves when on */
.snd { position: fixed; z-index: 4; left: max(var(--gut), env(safe-area-inset-left, 0px)); bottom: calc(var(--bot) + 18px); width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--white); background: rgba(10, 14, 34, 0.42); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; transition: background 0.15s ease, transform 0.15s ease; }
.snd:hover { background: rgba(10, 14, 34, 0.58); }
.snd:active { transform: scale(0.94); }
.snd:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.snd svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.snd .spk { fill: currentColor; }
.snd .w1, .snd .w2 { display: none; }
.snd[aria-pressed="true"] .x { display: none; }
.snd[aria-pressed="true"] .w1, .snd[aria-pressed="true"] .w2 { display: inline; animation: snd-w 1.6s ease-in-out infinite; }
.snd[aria-pressed="true"] .w2 { animation-delay: 0.2s; }
@keyframes snd-w { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
body.foot-on .snd { opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------------ play on your phone (computers) */
.qr { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(4, 6, 20, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.qr[hidden] { display: none; }
.qr-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 30px 22px; border-radius: 22px; background: #fff; color: #0b1554; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.qr-card b { font: 600 22px var(--display); }
.qr-card span { font: 700 14px var(--body); color: #4a5378; }
.qr-card img { width: 180px; height: 180px; margin: 10px 0 2px; }
.qr-card em { font: 800 13px var(--body); font-style: normal; letter-spacing: 0.04em; color: #4a5378; }
.qr-x { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border: 0; background: none; font-size: 26px; color: #4a5378; cursor: pointer; border-radius: 50%; }
.qr-x:hover { background: #eef0f7; }

/* ------------------------------------------------------------------ the footer, after the last scene */
.site-foot { position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 28px max(var(--gut), env(safe-area-inset-right, 0px)) calc(var(--bot) + 16px) max(var(--gut), env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(9, 12, 30, 0.9), rgba(5, 7, 19, 0.97) 55%);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(102%); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
body.foot-on .site-foot { transform: none; }
body.foot-on { touch-action: pan-y; }
.sf-in { display: grid; gap: 24px; max-width: 1180px; margin: 0 auto; }
.sf-brand img { display: block; width: 156px; height: auto; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4)); }
.sf-brand p { margin: 10px 0 0; max-width: 42ch; font: 700 15px/1.45 var(--body); color: rgba(255, 255, 255, 0.78); text-wrap: pretty; }
.sf-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 18px; }
.sf-col { display: flex; flex-direction: column; align-items: flex-start; }
.sf-col b { margin-bottom: 6px; font: 800 12px var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--pink); }
.sf-col a { padding: 6px 0; font: 700 15px var(--body); color: rgba(255, 255, 255, 0.86); text-decoration: none; }
.sf-col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.sf-col a:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; border-radius: 4px; }
.sf-qr { display: none; }
.sf-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; max-width: 1180px; margin: 22px auto 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.1); font: 700 12.5px var(--body); color: rgba(255, 255, 255, 0.55); }
.sf-base a { color: inherit; text-decoration: none; }
.sf-base a:hover { color: #fff; }
.dots { transition: opacity 0.3s ease; }
body.foot-on .dots { opacity: 0; pointer-events: none; }
/* on a phone the footer covers the last scene's words */
body.foot-on .cap.on { opacity: 0; visibility: hidden; }

/* ------------------------------------------------------------------ the loading screen */
#loader { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: var(--ink); transition: opacity 0.7s ease, visibility 0s linear 0.7s; }
#loader.gone { opacity: 0; visibility: hidden; }
#loader .ld-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(22px) brightness(0.55) saturate(1.1); }
#loader .ld-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
#loader .ld-icon { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
#loader .ld-bar { width: min(240px, 60vw); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
#loader .ld-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), #ffe58a); border-radius: 3px; transition: width 0.3s ease; }
#loader .ld-t { font: 700 14px var(--body); letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.8); }

/* ------------------------------------------------------------------ wide screens: the words beside the scene */
@media (min-aspect-ratio: 1/1) and (min-width: 720px) {
  :root { --gut: 28px; }
  .mark { width: 132px; }
  .cap { top: 0; bottom: 0; justify-content: center; width: min(560px, 40vw); right: auto; }
  .cap.left { left: clamp(28px, 6vw, 110px); align-items: flex-start; text-align: left; }
  .cap.right { left: auto; right: clamp(70px, 7vw, 130px); align-items: flex-end; text-align: right; }
  .cap.left .rule, .cap.right .rule { width: 200px; }
  .cap.left .rule { background-position: 22px center, left center; }
  .cap.right .rule { background-position: calc(100% - 22px) center, right center; }
  .cap.hero { left: 0; right: 0; width: auto; top: calc(var(--top) + 9vh); bottom: auto; }
  .cap h1, .cap h2 { font-size: clamp(40px, 4.6vw, 76px); }
  .cap.hero h1 { font-size: clamp(36px, 3.8vw, 60px); }
  .cap p { font-size: clamp(16px, 1.35vw, 21px); }
  .cap.hero .logo { width: clamp(260px, 24vw, 420px); }
  .cap.end { top: calc(var(--top) + 7vh); }
  /* words at the foot of the frame, under a scene that fills the rest: centred, or to the right */
  .cap.low { top: auto; bottom: calc(var(--bot) + 6vh); justify-content: flex-end; }
  .cap.low:not(.left):not(.right) { left: 0; right: 0; width: auto; align-items: center; text-align: center; }
  .cap.low:not(.left):not(.right) .rule { background-position: center, center; }
  /* the currencies as a column beside the token */
  .cap .cur { grid-template-columns: 1fr; width: min(100%, 340px); gap: 8px; }
  .cap .cur li { grid-template-columns: 48px 1fr; grid-template-rows: auto auto; justify-items: start; text-align: left; column-gap: 12px; padding: 8px 14px 8px 10px; }
  .cap .cur img { grid-row: 1 / 3; align-self: center; }
  .cap .cur b { align-self: end; font-size: 18px; }
  .cap .cur span { align-self: start; font-size: 13px; }
  .dots { right: 18px; gap: 6px; }
  /* the footer: the brand, the links and the code to scan side by side, under the last scene's words */
  .site-foot { padding-top: 34px; }
  .sf-in { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: start; gap: 48px; }
  .sf-brand img { width: 184px; }
  .sf-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .sf-qr img { width: 118px; height: 118px; padding: 8px; border-radius: 14px; background: #ffffff; }
  .sf-qr span { font: 700 12.5px var(--body); color: rgba(255, 255, 255, 0.7); }
  body.foot-on .cap.on { opacity: 1; visibility: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .cap, .cap.on { transition: opacity 0.3s ease; transform: none; }
  .hint svg { animation: none; }
  .snd svg path { animation: none !important; }
}
