/* PRIORITY website (D-071). The game's own night-glass look: night blue,
   a cyan rim light, the gold "1" slot, teal for right and coral for wrong.
   Fonts are the game's own (Fredoka, Nunito; SIL OFL), served from here. */

@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka.woff") format("woff");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito.woff") format("woff");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0d1230;
  --night-2: #141b45;
  --night-3: #1c2560;
  --glass: rgba(28, 37, 96, 0.62);
  --line: rgba(127, 231, 255, 0.18);
  --line-strong: rgba(127, 231, 255, 0.42);
  --cyan: #7fe7ff;
  --sun: #f5b83d;
  --sun-deep: #c98a12;
  --teal: #2cc2b4;
  --teal-deep: #146b64;
  --coral: #f26b5b;
  --plum: #9b7ed0;
  --paper: #fff8ee;
  --muted: #b3bbe0;
  --faint: #7f88b8;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(3, 6, 24, 0.55);
  --display: "Fredoka", "Trebuchet MS", sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--sun); color: var(--night); padding: 10px 16px; border-radius: 10px; font-weight: 800; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; font-weight: 600; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-stretch: 118%; letter-spacing: -0.01em; }
h3 { font-size: 1.45rem; font-stretch: 108%; }
p { margin: 0; }

/* ---------------------------------------------------------- notice + header */

.notice { background: var(--sun); color: var(--night); text-align: center; font-weight: 800; padding: 8px var(--gutter); font-size: 0.95rem; }
.notice[hidden] { display: none; }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(13, 18, 48, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); font-family: var(--display); font-weight: 650; font-stretch: 125%; font-size: 1.3rem; letter-spacing: 0.02em; }
.brand img { width: 34px; height: 34px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); background: rgba(127, 231, 255, 0.08); }
.nav .cta { color: var(--night); background: var(--sun); margin-left: 6px; }
.nav .cta:hover { color: var(--night); background: #ffd06a; }
.menu-btn { display: none; margin-left: auto; background: transparent; color: var(--paper); border: 1px solid var(--line-strong); border-radius: 12px; padding: 8px 14px; font: 700 1rem var(--body); cursor: pointer; }

@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px var(--gutter) 18px; background: var(--night-2); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav .cta { margin: 8px 0 0; text-align: center; }
}

/* ------------------------------------------------------------------ buttons */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 16px; font: 800 1.05rem var(--body); text-decoration: none; border: 0; cursor: pointer; transition: transform 0.15s ease, background-color 0.15s ease; }
.btn:active { transform: translateY(1px); }
.btn-sun { background: var(--sun); color: var(--night); }
.btn-sun:hover { background: #ffd06a; color: var(--night); }
.btn-ghost { background: transparent; color: var(--paper); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(127, 231, 255, 0.08); color: var(--paper); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-width: 190px; min-height: 58px; padding: 8px 20px; border-radius: 16px; background: var(--paper); color: var(--night); text-decoration: none; line-height: 1.15; }
.store small { font-size: 0.78rem; font-weight: 700; color: #4b5175; }
.store strong { font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
.store:hover { background: #ffffff; color: var(--night); }
.store[hidden], .soon[hidden] { display: none; }
.soon { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px; border: 1px dashed var(--line-strong); color: var(--muted); font-weight: 700; }
.soon b { color: var(--paper); }

/* --------------------------------------------------------------------- hero */

.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 110px); overflow: hidden; isolation: isolate; }
.hero::before { /* the horizon glow behind the console */
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 980px; max-height: 980px; z-index: -2;
  background: radial-gradient(closest-side, rgba(127, 231, 255, 0.16), rgba(245, 184, 61, 0.06) 55%, transparent 72%);
}
.hero::after { /* a faint grid floor, the game's background grid in perspective */
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -1px; height: 46%; z-index: -1;
  background-image: linear-gradient(rgba(127, 231, 255, 0.11) 1px, transparent 1px), linear-gradient(90deg, rgba(127, 231, 255, 0.11) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 10%, transparent 92%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 92%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(3.1rem, 8.4vw, 7.4rem); font-stretch: 125%; font-weight: 650; line-height: 0.93; letter-spacing: -0.015em; }
.hero .lede { margin-top: 26px; font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--muted); max-width: 34em; }
.hero .lede b { color: var(--paper); }
.hero .stores { margin-top: 32px; }
.facts { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; list-style: none; color: var(--muted); font-weight: 700; font-size: 0.98rem; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

/* ------------------------------------------- the console (playable round) */

.console { position: relative; width: 100%; max-width: 480px; justify-self: center; padding: 16px; border-radius: 34px; background: linear-gradient(180deg, rgba(36, 47, 118, 0.85), rgba(20, 27, 69, 0.92)); border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 0 6px rgba(127, 231, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.console-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 12px; color: var(--muted); font-weight: 800; font-size: 0.9rem; }
.console-top .count { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--paper); }
.console-top button { background: none; border: 0; color: var(--cyan); font: 800 0.92rem var(--body); cursor: pointer; padding: 6px 4px; }
.console-top button:hover { color: var(--paper); }
.scene { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 330px; width: 100%; margin: 0 auto; background: var(--night-3); transition: max-height 0.35s ease; }
.scene img { width: 100%; height: 100%; object-fit: cover; }
.console.answered .scene { max-height: 150px; }
.prompt { font-family: var(--display); font-weight: 600; font-size: 1.32rem; line-height: 1.2; text-align: center; margin: 14px 6px 4px; min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
.clue { text-align: center; color: var(--muted); font-size: 0.95rem; min-height: 1.5em; margin: 0 6px 8px; }
.clue strong { color: var(--paper); }

.slot { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 14px; border-radius: 16px; border: 2px dashed rgba(245, 184, 61, 0.55); background: rgba(245, 184, 61, 0.05); color: var(--muted); font-weight: 700; transition: border-color 0.15s ease, background-color 0.15s ease; }
.slot .one { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sun); color: var(--night); font: 700 1.2rem var(--display); box-shadow: 0 0 0 4px rgba(245, 184, 61, 0.2); }
.slot img { width: 54px; height: 36px; border-radius: 8px; object-fit: cover; }
.slot.over { border-color: var(--sun); background: rgba(245, 184, 61, 0.14); }
.slot.right { border-style: solid; border-color: var(--teal); background: rgba(44, 194, 180, 0.16); color: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .slot.waiting .one { animation: pulse 2.4s ease-in-out infinite; }
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(245, 184, 61, 0.2); } 50% { box-shadow: 0 0 0 9px rgba(245, 184, 61, 0.05); } }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.card { position: relative; display: flex; flex-direction: column; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--night-2); color: var(--paper); cursor: grab; text-align: center; font: 700 0.98rem var(--body); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.2s ease; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; pointer-events: none; }
.card span { padding: 8px 6px 10px; line-height: 1.2; min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card:disabled { cursor: default; transform: none; }
.card.wrong { border-color: var(--coral); opacity: 0.55; }
.card.wrong::after, .card.correct::after { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 0.95rem var(--body); }
.card.wrong::after { content: "\2715"; background: var(--coral); color: var(--night); }
.card.correct { border: 2px solid var(--teal); box-shadow: 0 0 24px rgba(44, 194, 180, 0.35); }
.card.correct::after { content: "\2713"; background: var(--teal); color: var(--night); }
.card.dim { opacity: 0.45; }
.card.dragging { opacity: 0.25; }
.ghost { position: fixed; z-index: 60; width: 150px; pointer-events: none; border-radius: 16px; overflow: hidden; border: 2px solid var(--sun); background: var(--night-2); box-shadow: var(--shadow); transform: rotate(-3deg); }
.ghost img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .card.shake { animation: shake 0.32s ease; }
  .cards.deal .card { animation: deal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.2) both; }
  .cards.deal .card:nth-child(2) { animation-delay: 0.08s; }
  .cards.deal .card:nth-child(3) { animation-delay: 0.16s; }
  .cards.deal .card:nth-child(4) { animation-delay: 0.24s; }
}
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes deal { from { opacity: 0; transform: translateY(26px) scale(0.94); } to { opacity: 1; transform: none; } }

.verdict { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(13, 18, 48, 0.75); border: 1px solid var(--line); }
.verdict[hidden] { display: none; }
.verdict h3 { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.verdict h3::before { content: "\2713"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: var(--night); font: 800 1rem var(--body); }
.verdict p { margin-top: 6px; color: var(--muted); }
.verdict .btn { margin-top: 12px; width: 100%; min-height: 48px; }
.how-to { margin-top: 12px; text-align: center; color: var(--faint); font-size: 0.88rem; }

/* -------------------------------------------------------------- sections */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.15rem; }
.band { background: linear-gradient(180deg, var(--night) 0%, #111842 45%, var(--night) 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Scene strip: every tile loads its scene into the console above. */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 14px; overflow-x: auto; padding: 4px var(--gutter) 18px; margin: 0 calc(var(--gutter) * -1); scroll-snap-type: x mandatory; scrollbar-color: var(--night-3) transparent; }
.tile { scroll-snap-align: start; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--night-2); color: var(--paper); text-align: left; cursor: pointer; font: 700 0.98rem var(--body); transition: border-color 0.15s ease, transform 0.15s ease; }
.tile img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.tile span { padding: 12px 14px 14px; line-height: 1.3; }
.tile:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.tile[aria-pressed="true"] { border-color: var(--sun); }

/* Steps of a round (a real sequence, so numbered). */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 36px); counter-reset: step; }
.steps li { counter-increment: step; }
.steps .phone { margin-bottom: 22px; }
.steps h3::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 12px; border-radius: 50%; background: var(--sun); color: var(--night); font: 700 1.1rem var(--display); vertical-align: 2px; }
.steps p { margin-top: 10px; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; max-width: 420px; } }

.phone { position: relative; border-radius: 30px; padding: 9px; background: #060918; border: 1px solid var(--line-strong); box-shadow: var(--shadow); max-width: 300px; }
.phone img { border-radius: 22px; width: 100%; aspect-ratio: 540 / 1230; object-fit: cover; object-position: top; }

/* Ways to play: one row per mode, picture and words side by side. */
.modes { display: grid; gap: clamp(40px, 5vw, 64px) clamp(32px, 4vw, 56px); }
.mode { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: clamp(22px, 3vw, 36px); align-items: center; }
.mode h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-stretch: 118%; }
.mode p { margin-top: 12px; color: var(--muted); font-size: 1.08rem; max-width: 36em; }
.mode ul { margin: 16px 0 0; padding-left: 1.2em; color: var(--muted); }
.mode li { margin: 6px 0; }
.mode li::marker { color: var(--sun); }
@media (min-width: 1000px) {
  .modes { grid-template-columns: 1fr 1fr; }
  .mode:last-child { grid-column: 1 / -1; max-width: calc(50% - 28px); justify-self: center; }
}
@media (max-width: 560px) {
  .mode { grid-template-columns: 1fr; }
  .mode .phone { max-width: 240px; }
}

/* The cast. */
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.cast li { border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--night-2); overflow: hidden; }
.cast img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #10173c; }
.cast div { padding: 10px 12px 14px; }
.cast b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.cast span { display: block; color: var(--muted); font-size: 0.9rem; }
.cast em { display: block; margin-top: 6px; font-style: normal; color: var(--sun); font-weight: 800; font-size: 0.85rem; }

/* Fair by design. */
.promises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); margin: 0; padding: 0; list-style: none; }
.promises li { padding: 20px 0; border-top: 1px solid var(--line); }
.promises b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.25rem; }
.promises span { display: block; margin-top: 6px; color: var(--muted); }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } }

.langs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.langs li { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 800; }
.langs li small { color: var(--faint); font-weight: 700; margin-left: 4px; }

/* FAQ. */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative; font-family: var(--display); font-weight: 600; font-size: 1.22rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 600 1.8rem var(--display); color: var(--sun); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 22px; color: var(--muted); max-width: 64ch; }
.faq details > div p + p { margin-top: 10px; }

/* Download band. */
.download { text-align: center; }
.download .big-one { width: 96px; height: 96px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: var(--night); font: 700 3.4rem var(--display); box-shadow: 0 0 0 14px rgba(245, 184, 61, 0.12), 0 0 80px rgba(245, 184, 61, 0.35); }
.download h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); font-stretch: 125%; }
.download p { margin: 18px auto 0; max-width: 34em; color: var(--muted); font-size: 1.15rem; }
.download .stores { justify-content: center; margin-top: 30px; }

/* ------------------------------------------------------------------ footer */

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.site-footer h2 { font-size: 1rem; font-stretch: 100%; color: var(--paper); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.site-footer .made { margin-top: 14px; }
.site-footer .legal-line { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; color: var(--faint); font-size: 0.88rem; }
.social[hidden] { display: none; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* ------------------------------------------------------------ legal pages */

.doc { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 100px); }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-stretch: 120%; }
.doc .meta { margin-top: 14px; color: var(--faint); font-size: 0.95rem; }
.doc .draft { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid rgba(245, 184, 61, 0.45); background: rgba(245, 184, 61, 0.08); color: var(--paper); font-size: 0.97rem; }
.doc h2 { font-size: 1.55rem; font-stretch: 110%; margin: 40px 0 12px; }
.doc p, .doc li { color: #d6dbf3; max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 10px 0 0; }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--sun); }
.doc .tbc { color: var(--sun); font-weight: 700; }
.doc .card-box { margin-top: 22px; padding: 20px 22px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--night-2); }
.doc .card-box h2 { margin-top: 0; }
.doc pre.rules { white-space: pre-wrap; font: inherit; color: #d6dbf3; margin: 0; }
.doc .steps-list li { margin: 12px 0; }

.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found h1 { font-size: clamp(2.6rem, 8vw, 5rem); font-stretch: 125%; }
.not-found p { margin: 16px auto 28px; color: var(--muted); max-width: 30em; }
