/* Riddlewerk: site styles. No external resources: fonts, images and scripts are all served from this site. */

/* ------------------------------------------------------------------ fonts (Nunito, SIL OFL 1.1, subset) */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;

  --bg: #080d16;
  --bg-raise: #0c1320;
  --tile: #1e2130;
  --tile-hi: #2a2f44;
  --tile-lo: #151826;
  --tile-lip: #0f111b;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);

  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #94a3b8;

  --amber: #f59e0b;
  --amber-rgb: 245, 158, 11;
  --sky: #38bdf8;
  --sky-rgb: 56, 189, 248;

  --accent: var(--amber);
  --accent-rgb: var(--amber-rgb);

  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --radius-lg: 32px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--sky);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: #7dd3fc;
}

strong {
  color: var(--text);
  font-weight: 800;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection {
  background: rgba(var(--amber-rgb), 0.35);
  color: var(--text);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--amber);
  color: var(--bg);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(72px, 10vw, 136px);
}

.section--tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  transform: rotate(22deg);
  flex: none;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
}

.section-head p {
  margin-top: 18px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--text-2);
}

/* ------------------------------------------------------------------ buttons and pills */
.btn {
  --b: var(--amber);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 16px;
  background: var(--b);
  color: var(--bg);
  font: inherit;
  font-weight: 900;
  font-size: 1.0625rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 14px 32px -12px rgba(var(--amber-rgb), 0.6);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s;
}

.btn:hover {
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35), 0 18px 36px -12px rgba(var(--amber-rgb), 0.7);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 8px 20px -12px rgba(var(--amber-rgb), 0.6);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 4px 0 rgba(0, 0, 0, 0.35);
}

.btn--ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 6px 0 rgba(0, 0, 0, 0.35);
}

.btn--ghost:active {
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 rgba(0, 0, 0, 0.35);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 13, 22, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  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;
  color: var(--text);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}

.brand:hover {
  color: var(--text);
}

.brand svg {
  width: 34px;
  height: 34px;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 12px;
  color: var(--text-2);
  font-weight: 800;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.lang {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 14px;
  background: var(--tile-lo);
  box-shadow: inset 0 0 0 1px var(--line);
}

.lang a {
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 900;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
}

.lang a:hover {
  color: var(--text);
}

.lang a[aria-current="true"],
.lang a[aria-current="page"] {
  background: var(--tile-hi);
  color: var(--text);
  box-shadow: 0 2px 0 var(--tile-lip);
}

@media (max-width: 719px) {
  .nav {
    display: none;
  }
}

/* ------------------------------------------------------------------ keycap tiles (shared) */
.keys {
  --s: 56px;
  display: inline-flex;
  align-items: flex-end;
  gap: calc(var(--s) * 0.14);
}

.key {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  border-radius: calc(var(--s) * 0.22);
  background: linear-gradient(180deg, var(--tile-hi) 0%, var(--tile) 62%, #1a1d2b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 calc(var(--s) * 0.07) 0 var(--tile-lip),
    0 calc(var(--s) * 0.22) calc(var(--s) * 0.4) rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-weight: 900;
  font-size: calc(var(--s) * 0.5);
  line-height: 1;
}

/* Game wordmarks: underline inside the cap, in the game's colour, as in the apps. */
.keys--game .key::after {
  content: "";
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 13%;
  height: calc(var(--s) * 0.05);
  min-height: 2px;
  border-radius: 99px;
  background: var(--accent);
}

/* ------------------------------------------------------------------ the Riddlewerk wordmark */
.wordmark {
  --s: clamp(25px, 6.4vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.2vw, 28px);
}

.wordmark__mark {
  width: calc(var(--s) * 1.55);
  height: auto;
  flex: none;
  margin-top: calc(var(--s) * -0.3);
}

.wordmark .keys {
  --s: inherit;
  gap: calc(var(--s) * 0.12);
  padding-bottom: calc(var(--s) * 0.3);
}

.wordmark .key {
  height: calc(var(--s) * 1.1);
  font-size: calc(var(--s) * 0.56);
}

/* Underlines below each cap, alternating amber and blue, like the brand banner. */
.wordmark .key::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: calc(var(--s) * -0.3);
  height: calc(var(--s) * 0.075);
  border-radius: 99px;
  background: var(--amber);
}

.wordmark .key:nth-child(even)::after {
  background: var(--sky);
}

/* The last cap is tipped: the brand's one tile that is not in line. */
.wordmark .key:last-child {
  transform: translateY(-22%) rotate(15deg);
}

.wordmark .key:last-child::after {
  transform: translate(8%, 40%) rotate(-8deg);
}

@media (max-width: 599px) {
  .wordmark {
    --s: clamp(24px, 7.4vw, 48px);
  }

  .wordmark__mark {
    display: none;
  }
}

/* Drop-in, cap by cap. Off for reduced motion (see the end of this file). */
@keyframes key-drop {
  0% {
    opacity: 0;
    transform: translateY(-70%);
  }
  60% {
    opacity: 1;
    transform: translateY(6%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes key-tip {
  0% {
    opacity: 0;
    transform: translateY(-90%) rotate(0deg);
  }
  55% {
    opacity: 1;
    transform: translateY(-14%) rotate(0deg);
  }
  78% {
    transform: translateY(-26%) rotate(19deg);
  }
  100% {
    opacity: 1;
    transform: translateY(-22%) rotate(15deg);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.wordmark .key {
  animation: key-drop 0.62s var(--ease) both;
}

.wordmark .key:nth-child(1) { animation-delay: 0.05s; }
.wordmark .key:nth-child(2) { animation-delay: 0.1s; }
.wordmark .key:nth-child(3) { animation-delay: 0.15s; }
.wordmark .key:nth-child(4) { animation-delay: 0.2s; }
.wordmark .key:nth-child(5) { animation-delay: 0.25s; }
.wordmark .key:nth-child(6) { animation-delay: 0.3s; }
.wordmark .key:nth-child(7) { animation-delay: 0.35s; }
.wordmark .key:nth-child(8) { animation-delay: 0.4s; }
.wordmark .key:nth-child(9) { animation-delay: 0.45s; }

.wordmark .key:last-child {
  animation: key-tip 0.95s var(--ease) 0.55s both;
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 11vw, 140px) clamp(72px, 10vw, 128px);
  text-align: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(42% 52% at 14% 22%, rgba(var(--amber-rgb), 0.16), transparent 70%),
    radial-gradient(40% 50% at 88% 30%, rgba(var(--sky-rgb), 0.14), transparent 70%),
    radial-gradient(60% 40% at 50% 110%, rgba(30, 33, 48, 0.9), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 20%, transparent 75%);
}

.hero__float {
  position: absolute;
  z-index: -1;
  border-radius: 28%;
  pointer-events: none;
}

.hero__float--1 {
  width: 46px;
  height: 46px;
  left: max(24px, calc(50% - 600px));
  top: 22%;
  background: linear-gradient(160deg, #fbbf24, var(--amber) 55%, #d97706);
  box-shadow: 0 18px 30px -10px rgba(0, 0, 0, 0.7), 0 0 40px -8px rgba(var(--amber-rgb), 0.6);
  transform: rotate(22deg);
  animation: float-a 9s ease-in-out infinite;
}

.hero__float--2 {
  width: 34px;
  height: 34px;
  right: max(24px, calc(50% - 590px));
  top: 30%;
  background: linear-gradient(160deg, #7dd3fc, var(--sky) 55%, #0ea5e9);
  box-shadow: 0 16px 26px -10px rgba(0, 0, 0, 0.7), 0 0 36px -8px rgba(var(--sky-rgb), 0.6);
  transform: rotate(-14deg);
  animation: float-b 8s ease-in-out infinite;
}

.hero__float--3 {
  width: 220px;
  height: 220px;
  right: max(-90px, calc(50% - 760px));
  bottom: -40px;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: rotate(22deg);
  opacity: 0.7;
  animation: float-a 18s ease-in-out infinite reverse;
}

.hero__float--4 {
  width: 120px;
  height: 120px;
  left: max(-50px, calc(50% - 640px));
  bottom: 8%;
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(var(--sky-rgb), 0.22);
  transform: rotate(-8deg);
  animation: float-b 16s ease-in-out infinite;
}

@keyframes float-a {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -18px;
  }
}

@keyframes float-b {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 14px;
  }
}

@media (max-width: 719px) {
  .hero__float--1 {
    width: 26px;
    height: 26px;
    left: 18px;
    top: 18px;
  }
  .hero__float--2 {
    width: 20px;
    height: 20px;
    right: 24px;
    top: 30px;
  }
  .hero__float--3,
  .hero__float--4 {
    display: none;
  }
}

.hero .eyebrow {
  margin-bottom: clamp(28px, 4vw, 44px);
  padding: 8px 16px 8px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  letter-spacing: 0.1em;
  animation: fade-up 0.6s var(--ease) both;
}

.hero h1 {
  margin: 0;
}

.hero__lead {
  max-width: 34ch;
  margin: clamp(36px, 5vw, 56px) auto 0;
  color: var(--text);
  font-size: clamp(1.375rem, 3vw, 2.125rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  animation: fade-up 0.7s var(--ease) 0.75s both;
}

.hero__sub {
  max-width: 54ch;
  margin: 18px auto 0;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  animation: fade-up 0.7s var(--ease) 0.85s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  animation: fade-up 0.7s var(--ease) 0.95s both;
}

@media (max-width: 479px) {
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: min(100%, 320px);
  }
}

.hero__games {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  animation: fade-up 0.7s var(--ease) 1.05s both;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.18s var(--ease);
}

.chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.chip img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.chip small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
}

.chip span {
  text-align: left;
  line-height: 1.2;
}

/* ------------------------------------------------------------------ games */
.games {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}

.game {
  --accent: var(--amber);
  --accent-rgb: var(--amber-rgb);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas:
    "intro visual"
    "details visual";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 5vw, 72px);
  row-gap: 0;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 80% at 0% 0%, rgba(var(--accent-rgb), 0.12), transparent 60%),
    linear-gradient(180deg, #121624 0%, #0d111c 100%);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  isolation: isolate;
}

.game::before {
  /* the game's colour as a hairline along the top edge */
  content: "";
  position: absolute;
  left: clamp(28px, 5vw, 64px);
  top: 0;
  width: 96px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
}

.game--zehn {
  --accent: var(--sky);
  --accent-rgb: var(--sky-rgb);
}

/* Every second game mirrors its layout, so a third or fourth game is one more <article>. */
.game:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas:
    "visual intro"
    "visual details";
  background:
    radial-gradient(70% 80% at 100% 0%, rgba(var(--accent-rgb), 0.12), transparent 60%),
    linear-gradient(180deg, #121624 0%, #0d111c 100%);
}

.game__intro {
  grid-area: intro;
  align-self: end;
}

.game__details {
  grid-area: details;
  align-self: start;
}

.game__visual {
  grid-area: visual;
  align-self: center;
}

.game:nth-child(even)::before {
  left: auto;
  right: clamp(28px, 5vw, 64px);
}

.game__head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.game__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 24px -10px rgba(0, 0, 0, 0.8);
  flex: none;
}

.game__title .keys {
  --s: clamp(38px, 4vw, 48px);
}

.game__genre {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.game__tagline {
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.game__tagline q {
  quotes: none;
}

.game__text {
  max-width: 52ch;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.stat {
  padding: 14px 12px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px var(--line), 0 3px 0 rgba(0, 0, 0, 0.35);
}

.stat b {
  display: block;
  color: var(--accent);
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.3;
}

.features {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.features li {
  position: relative;
  padding-left: 28px;
}

.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--accent);
  transform: rotate(22deg);
  box-shadow: -3px 3px 0 rgba(var(--accent-rgb), 0.25);
}

.availability {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.availability li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.3);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 800;
}

.availability li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18);
  flex: none;
}

@media (max-width: 959px) {
  .game,
  .game:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "visual"
      "details";
    grid-template-rows: auto;
  }

  .game__visual {
    margin: 12px 0 8px;
  }
}

@media (max-width: 599px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game__head {
    gap: 14px;
  }

  .game__icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }

  .game__title .keys {
    --s: 34px;
  }
}

/* ------------------------------------------------------------------ DREH: real screenshots in phone frames */
.phones {
  --w: clamp(148px, 17vw, 236px);
  position: relative;
  display: flex;
  justify-content: center;
  padding: 16px 0 24px;
}

.phone {
  position: relative;
  z-index: 2;
  width: var(--w);
  padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.15);
  background: linear-gradient(160deg, #2a3045 0%, #12161f 45%, #1d2232 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    0 40px 70px -24px rgba(0, 0, 0, 0.9),
    0 0 90px -30px rgba(var(--accent-rgb), 0.55);
  margin: 0;
}

.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  border-radius: calc(var(--w) * 0.12);
  background: #111;
}

.phone--side {
  position: absolute;
  z-index: 1;
  top: 9%;
  width: calc(var(--w) * 0.8);
  filter: brightness(0.62) saturate(0.9);
}

.phone--left {
  right: calc(50% + var(--w) * 0.02);
  transform: rotate(-7deg);
  transform-origin: 100% 100%;
}

.phone--right {
  left: calc(50% + var(--w) * 0.02);
  transform: rotate(7deg);
  transform-origin: 0% 100%;
}

@media (max-width: 599px) {
  .phones {
    --w: min(44vw, 184px);
  }
}

.shot-caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* ------------------------------------------------------------------ ZEHN: illustration, not a screenshot */
.zehn-art {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.zehn-art::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--sky-rgb), 0.28), transparent);
}

.zehn-art__back,
.zehn-art__front {
  position: absolute;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 14%;
}

.zehn-art__back {
  left: 19%;
  top: 19%;
  background: #262b3f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.zehn-art__front {
  left: 31%;
  top: 31%;
  background: linear-gradient(160deg, #5ccbfa 0%, var(--sky) 45%, #1fa9ea 100%);
  transform: rotate(22deg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.zehn-art__front::before,
.zehn-art__front::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  height: 13%;
  border-radius: 99px;
  background: #0a0f18;
  translate: -50% -50%;
}

.zehn-art__front::after {
  rotate: 90deg;
}

.zehn-art .key {
  --s: clamp(40px, 11vw, 58px);
  position: absolute;
  color: var(--sky);
}

.zehn-art .key.is-white {
  color: var(--text);
}

.zehn-art .k1 { left: 2%;  top: 8%;  rotate: -12deg; animation: float-a 9s ease-in-out infinite; }
.zehn-art .k2 { right: 6%; top: 2%;  rotate: 10deg;  animation: float-b 11s ease-in-out infinite; }
.zehn-art .k3 { right: 0;  top: 44%; rotate: -8deg;  animation: float-a 12s ease-in-out infinite; }
.zehn-art .k4 { left: 0;   top: 60%; rotate: 14deg;  animation: float-b 10s ease-in-out infinite; }
.zehn-art .k5 { left: 30%; bottom: 0; rotate: -6deg; animation: float-a 13s ease-in-out infinite; }
.zehn-art .k6 { right: 18%; bottom: 4%; rotate: 18deg; animation: float-b 9.5s ease-in-out infinite; }

.zehn-art .key sup {
  font-size: 0.55em;
  line-height: 0;
  position: relative;
  top: -0.15em;
}

/* ------------------------------------------------------------------ studio */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.studio__story h2 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  margin-bottom: 24px;
}

.studio__story p:not(.eyebrow) {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
}

@media (max-width: 899px) {
  .studio {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The playable example */
.demo {
  position: relative;
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(var(--amber-rgb), 0.1), transparent 70%),
    linear-gradient(180deg, #131826 0%, #0d111c 100%);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.demo__title {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 900;
}

.demo__source {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.875rem;
}

.demo__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--sky);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.demo__word {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  margin: 0;
}

.demo__word .key {
  --s: clamp(40px, 9vw, 54px);
}

.demo__word--target .key {
  --s: clamp(34px, 7.5vw, 44px);
  background: #0a0f1a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.demo__word.is-solved .key {
  background: linear-gradient(180deg, #1f7a5a 0%, #16624a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 0 #0c3b2c, 0 12px 24px -8px rgba(16, 185, 129, 0.5);
}

.demo__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px auto;
  max-width: 320px;
  color: var(--sky);
}

.demo__divider::before,
.demo__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.demo__divider svg {
  width: 18px;
  height: 18px;
}

.demo__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 92px;
  padding: 12px 12px 12px 14px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #262b3d 0%, #1c2030 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 0 var(--tile-lip), 0 14px 24px -14px rgba(0, 0, 0, 0.9);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  font-size: 0.9375rem;
  text-align: left;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), opacity 0.2s;
}

.card:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 6px 0 var(--tile-lip), 0 18px 28px -14px rgba(0, 0, 0, 0.9);
}

.card:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 0 var(--tile-lip);
}

.card:disabled {
  cursor: default;
  opacity: 0.35;
  transform: translateY(3px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 1px 0 var(--tile-lip);
}

.card__icon {
  color: var(--amber);
  font-size: 1.125rem;
  line-height: 1;
}

.card__icon svg {
  width: 26px;
  height: 22px;
}

.card .chipl {
  display: inline-grid;
  place-items: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 0.2em;
  border-radius: 6px;
  background: rgba(var(--amber-rgb), 0.14);
  box-shadow: inset 0 0 0 1px rgba(var(--amber-rgb), 0.45);
  color: var(--amber);
  font-size: 0.875em;
}

.card .nw {
  white-space: nowrap;
}

.card__step {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 900;
}

.demo__status {
  min-height: 3.2em;
  margin: 0 0 14px;
  color: var(--text-2);
}

.demo__status strong {
  color: var(--text);
}

.demo__status.is-win strong {
  color: #34d399;
}

.demo__reset {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.9375rem;
}

.demo:not(.is-live) .demo__reset {
  visibility: hidden;
}

@keyframes flip {
  0% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

.demo__word .key.is-new {
  animation: flip 0.32s var(--ease);
}

@keyframes refuse {
  0%,
  100% {
    translate: 0 0;
  }
  25% {
    translate: -6px 0;
  }
  75% {
    translate: 6px 0;
  }
}

.card.is-refused {
  animation: refuse 0.28s ease-in-out;
}

/* Principles */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: clamp(56px, 8vw, 96px) 0 0;
  padding: 0;
  list-style: none;
}

.principle {
  padding: 24px 22px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--line);
}

.principle__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--tile);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 0 var(--tile-lip);
  color: var(--amber);
}

.principle:nth-child(even) .principle__icon {
  color: var(--sky);
}

.principle__icon svg {
  width: 22px;
  height: 22px;
}

.principle h3 {
  margin-bottom: 8px;
  font-size: 1.1875rem;
}

.principle p {
  margin: 0;
  font-size: 0.9688rem;
  color: var(--text-2);
}

@media (max-width: 1023px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------ AI notice */
.notice {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--line);
}

.notice .key {
  --s: 48px;
  flex: none;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--sky);
}

.notice h2 {
  margin: 2px 0 6px;
  font-size: 1.125rem;
}

.notice p {
  margin: 0;
  color: var(--text-2);
}

/* ------------------------------------------------------------------ contact */
.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 90% at 100% 100%, rgba(var(--sky-rgb), 0.14), transparent 60%),
    radial-gradient(60% 90% at 0% 0%, rgba(var(--amber-rgb), 0.12), transparent 60%),
    linear-gradient(180deg, #121624 0%, #0d111c 100%);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
}

.contact h2 {
  font-size: clamp(1.875rem, 4.4vw, 3rem);
}

.contact > p {
  max-width: 52ch;
  margin: 16px auto 0;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
}

.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin-top: 30px;
  padding: 16px 26px;
  border-radius: 18px;
  background: var(--tile);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 5px 0 var(--tile-lip), 0 20px 40px -16px rgba(0, 0, 0, 0.8);
  color: var(--text);
  font-size: clamp(1.0625rem, 2.6vw, 1.5rem);
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform 0.18s var(--ease);
}

.contact__mail:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.contact__mail svg {
  width: 24px;
  height: 24px;
  color: var(--amber);
  flex: none;
}

.contact__help {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
  margin: 40px auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.contact__help li {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(8, 13, 22, 0.5);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem;
}

.contact__help b {
  display: block;
  color: var(--text);
  font-weight: 900;
}

@media (max-width: 599px) {
  .contact {
    padding: 36px 20px 22px;
  }

  .contact__mail {
    padding: 14px 18px;
    font-size: 1.0625rem;
  }

  .contact__help {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 400px) {
  .contact__mail svg {
    display: none;
  }
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 19, 32, 0.6), var(--bg));
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-block: 56px 40px;
}

.footer-grid--3 {
  grid-template-columns: minmax(0, 2.4fr) repeat(2, minmax(0, 1fr));
}

.footer-brand p {
  max-width: 32ch;
  margin-top: 14px;
  color: var(--muted);
}

.footer-col h2 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--text-2);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

@media (max-width: 899px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 339px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------ legal pages */
.legal {
  max-width: 800px;
  margin-inline: auto;
  padding-block: clamp(40px, 7vw, 88px) 24px;
}

.legal__switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 40px;
  padding: 14px 16px 14px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal__switch p {
  margin: 0;
}

.legal h1 {
  font-size: clamp(1.75rem, 8.4vw, 3.25rem);
}

.legal h1,
.legal h2,
.legal p,
.legal li {
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal .meta {
  margin: 12px 0 36px;
  color: var(--muted);
}

.legal h2 {
  margin: 48px 0 14px;
  padding-top: 8px;
  font-size: clamp(1.3125rem, 2.4vw, 1.625rem);
}

.legal h3 {
  margin: 28px 0 10px;
  font-size: 1.125rem;
  font-weight: 800;
}

.legal h2 + h3 {
  margin-top: 8px;
}

.legal ul {
  padding-left: 1.2em;
}

.legal li {
  margin-bottom: 6px;
}

.legal li::marker {
  color: var(--amber);
}

.legal address {
  font-style: normal;
}

.legal .card-box {
  margin: 18px 0;
  padding: 20px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px var(--line);
}

.legal .card-box p:last-child {
  margin-bottom: 0;
}

.legal .toc {
  margin: 0 0 32px;
  padding: 18px 22px 18px 40px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--line);
}

.legal .toc li {
  margin-bottom: 4px;
}

.legal .toc a {
  color: var(--text-2);
  text-decoration: none;
}

.legal .toc a:hover {
  color: var(--text);
  text-decoration: underline;
}

.placeholder {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(var(--amber-rgb), 0.14);
  box-shadow: inset 0 0 0 1px rgba(var(--amber-rgb), 0.4);
  color: #fcd34d;
  font-weight: 800;
}

.legal-lang + .legal-lang {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.legal-lang[hidden] {
  display: none;
}

.legal-lang[hidden] + .legal-lang {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.licence-text {
  max-height: 420px;
  overflow: auto;
  margin: 16px 0 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: #05080e;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font: 600 0.8125rem/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

/* 404 */
.lost {
  padding-block: clamp(72px, 12vw, 160px);
  text-align: center;
}

.lost .keys {
  --s: clamp(56px, 14vw, 104px);
  margin-bottom: 40px;
}

.lost .key:last-child {
  transform: translateY(-14%) rotate(15deg);
}

.lost h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.lost p {
  margin: 14px auto 0;
  max-width: 46ch;
}

.lost .hero__actions {
  animation: none;
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
