/* ==========================================================================
   Deep-Net Developer Hideout — static page
   Dark-first «developer hideout»: bento, kinetic type, noise, one glass accent.
   System fonts only. No !important (except reduced-motion safety net).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #06080b;
  --bg-soft: #0b1118;
  --panel: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .08);
  --text: #e8eef6;
  --muted: #8b98a9;
  --accent: #4dd6c1;
  --accent-2: #7b8cff;
  --danger: #ff6b6b;

  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --topbar-h: 60px;
}

/* ---------- 2. Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; }

a { color: inherit; }

.mono { font-family: var(--font-mono); }

[hidden] { display: none !important; }

::selection { background: rgba(77, 214, 193, .3); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 3. Decorative background (fixed, aria-hidden) ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* faint grid, faded to edges with a radial mask */
.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 80%);
}

/* two soft radial glows */
.bg__glow {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
}
.bg__glow--teal {
  top: -20vmax;
  left: -15vmax;
  background: radial-gradient(circle, rgba(77, 214, 193, .28) 0%, transparent 65%);
}
.bg__glow--amber {
  bottom: -25vmax;
  right: -15vmax;
  background: radial-gradient(circle, rgba(123, 140, 255, .22) 0%, transparent 65%);
}

/* SVG noise (feTurbulence, data URI) */
.bg__noise {
  position: absolute;
  inset: 0;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 4. Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--topbar-h);
  padding: 0 clamp(.75rem, 3vw, 2rem);
  background: rgba(6, 8, 11, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  color: #06080b;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}

.brand__name {
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* Tabs */
.tabs {
  display: flex;
  gap: .25rem;
}

.tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .5rem .8rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .85rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.tabs__num {
  font-size: .7rem;
  opacity: .7;
}

.tabs__label {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
}

.tabs__btn:hover { color: var(--text); }

.tabs__btn[aria-selected="true"] {
  color: var(--text);
  background: var(--panel);
  box-shadow: inset 0 -2px 0 0 var(--accent);
}

/* Lang switch */
.lang-switch {
  display: inline-flex;
  gap: .25rem;
  padding: .25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: .3rem .6rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.lang-switch__btn:hover { color: var(--text); }

.lang-switch__btn[aria-pressed="true"] {
  background: var(--accent);
  color: #04110f;
}

.lang-switch__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- 5. Layout: views ---------- */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) clamp(.75rem, 3vw, 2rem) 4rem;
}

.view { display: block; }

/* entrance animation for the active tab */
.view.is-active {
  animation: view-in .35s ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .7rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.btn:active { transform: scale(.97); }

.btn--primary {
  background: var(--accent);
  color: #04110f;
  box-shadow: 0 4px 20px rgba(77, 214, 193, .25);
}
.btn--primary:hover {
  box-shadow: 0 6px 28px rgba(77, 214, 193, .4);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 7. Hero (tab about) ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 5vw, 4rem) 0;
}

.hero__avatar { justify-self: center; }

.avatar-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: fit-content;
  margin-inline: auto;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent) 90%, #ffffff 100%);
}

.avatar-ring::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 214, 193, .26) 0%, transparent 70%);
  z-index: -1;
}

.avatar {
  display: block;
  width: min(260px, 62vw);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 26%, #123a31 0%, #0b1f1b 48%, #07100f 100%);
  box-shadow: inset 0 0 60px rgba(77, 214, 193, .16), 0 12px 40px rgba(0, 0, 0, .55);
}

.eyebrow {
  font-size: .85rem;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: .75rem;
}

.hero__title {
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: .75rem;
}

.hero__name {
  background: linear-gradient(100deg, var(--accent) 0%, #eef6ff 78%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cursor {
  display: inline-block;
  width: 0.12em;
  height: .9em;
  margin-left: .08em;
  vertical-align: -0.05em;
  background: var(--accent);
  animation: blink 1.1s steps(2, start) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero__tagline {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 1rem;
}

.hero__lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 46ch;
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ---------- 8. Bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 1rem;
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}

.bento__tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.bento__tile:hover {
  border-color: rgba(77, 214, 193, .55);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}

.bento__num {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.bento__text {
  font-size: .88rem;
  color: var(--muted);
}

/* split tile: 20+ сверху, OpenSource снизу */
.bento__tile--split {
  justify-content: space-between;
  gap: 1rem;
}

.bento__half {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.bento__half--bottom {
  padding-top: .9rem;
  border-top: 1px dashed var(--line);
}

/* varied spans */
.bento__tile--tall { grid-row: span 2; }
.bento__tile--wide { grid-column: span 2; }
.bento__tile--siberia { min-height: 100%; }
.bento__tile--stack { grid-column: 1 / -1; }

/* Chip colors: один акцент сайта — как заголовки и кнопки */
.stack-cloud .chip {
  border-color: rgba(77, 214, 193, .38);
  color: var(--accent);
  background: rgba(77, 214, 193, .07);
}
.stack-cloud .chip:hover {
  border-color: rgba(77, 214, 193, .8);
  color: #9ff6e7;
  background: rgba(77, 214, 193, .12);
}

/* Remove stack-shaker button styles (shaker removed) */
.stack-shaker { display: none; }

.stack-cloud {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
}

.stack-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
}

.stack-cloud .chip {
  transform:
    translate3d(var(--px, 0px), var(--py, 0px), 0)
    rotate(var(--tilt, 0deg))
    translateY(var(--lift, 0px));
  transition: transform .45s cubic-bezier(.2, .8, .3, 1), border-color .3s ease, color .3s ease;
  will-change: transform;
}

.stack-cloud .chip:hover {
  transform:
    translate3d(var(--px, 0px), var(--py, 0px), 0)
    rotate(var(--tilt, 0deg)) translateY(var(--lift, 0px)) scale(1.05);
}

.stack-cloud.is-scatter .chip {
  transition: transform .38s cubic-bezier(.2, .9, .25, 1), border-color .3s ease, color .3s ease;
}

.stack-cloud.is-returning .chip {
  transition: transform .85s cubic-bezier(.22, 1.2, .36, 1), border-color .3s ease, color .3s ease;
}

.stack-cloud.is-flying .chip { transition: none; }
.stack-cloud.is-shaking .chip {
  animation: chip-toss .55s cubic-bezier(.3, .7, .4, 1) both;
  animation-delay: calc(var(--i, 0) * 12ms);
}

@keyframes chip-toss {
  0%   { transform: rotate(var(--tilt-from, 0deg)) translateY(var(--lift-from, 0px)) scale(1); }
  35%  { transform: rotate(calc(var(--tilt-from, 0deg) * -.6)) translateY(-10px) scale(.94); }
  70%  { transform: rotate(calc(var(--tilt, 0deg) * 1.2)) translateY(4px) scale(1.02); }
  100% { transform: rotate(var(--tilt, 0deg)) translateY(var(--lift, 0px)) scale(1); }
}

.stack-shaker {
  order: -1;
  font-size: .68rem;
  letter-spacing: .06em;
  padding: .3rem .7rem;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease;
}

.stack-shaker:hover,
.stack-shaker:focus-visible {
  color: var(--accent);
  border-color: rgba(77, 214, 193, .55);
}

@media (prefers-reduced-motion: reduce) {
  .stack-cloud .chip,
  .stack-cloud.is-shaking .chip { animation: none; transition: none; }
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.chip {
  font-size: .75rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(77, 214, 193, .03);
}

/* ---------- 9. Text blocks ---------- */
.block { margin: clamp(2.5rem, 6vw, 4rem) 0; }

.block__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.block__prose p {
  max-width: 68ch;
  margin-bottom: 1rem;
  color: var(--text);
  opacity: .92;
}

.cat-card {
  margin-top: 1.5rem;
  max-width: 68ch;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-2);
  background: var(--panel);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text);
  font-size: .95rem;
}

/* ---------- 10. Socials ---------- */
.socials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.social {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease;
}

.social:hover {
  border-color: rgba(77, 214, 193, .55);
  transform: translateY(-3px);
}

.social__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent);
}

.social__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.social__name {
  font-weight: 600;
  font-size: .95rem;
}

.social__handle {
  font-size: .78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social__arr {
  margin-left: auto;
  font-size: 1rem;
  color: var(--muted);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .2s ease, transform .2s ease;
}

.social:hover .social__arr,
.social:focus-visible .social__arr {
  opacity: 1;
  transform: none;
  color: var(--accent);
}

/* ---------- 11. Games tab ---------- */
.games-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.games-sub {
  color: var(--muted);
  max-width: 52ch;
  margin: .5rem 0 2rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.game-card.is-active {
  border-color: rgba(77, 214, 193, .6);
  box-shadow: 0 0 0 1px rgba(77, 214, 193, .25), 0 0 34px rgba(77, 214, 193, .12);
}

.game-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}

.game-head__title {
  font-size: 1.15rem;
  font-weight: 700;
}

.game-head__tag {
  font-size: .72rem;
  color: var(--accent-2);
  border: 1px solid rgba(123, 140, 255, .35);
  border-radius: 999px;
  padding: .15rem .6rem;
}

.game-desc {
  font-size: .85rem;
  color: var(--muted);
  min-height: 2.6em;
}

/* stage */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #070b10;
  border: 1px solid var(--line);
}

.game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  text-align: center;
  padding: 1rem;
  background: rgba(6, 8, 11, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity .25s ease;
}

.overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.ov-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.ov-text {
  font-size: .8rem;
  color: var(--muted);
}

/* hud */
.game-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
}

.game-hud [data-score],
.game-hud [data-best] {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
}

/* touch pad (filled by games.js) */
.pad {
  display: none;
  grid-template-columns: repeat(3, 44px);
  grid-auto-rows: 44px;
  gap: 8px;
  width: 168px;
  margin-inline: auto;
}

.pad--dpad .pad-row {
  display: contents;
}

.pad--dpad .pad-btn[data-key="up"] { grid-column: 2; grid-row: 1; }
.pad--dpad .pad-btn[data-key="rotate"] { grid-column: 1; grid-row: 1; }
.pad--dpad .pad-btn[data-key="action"] { grid-column: 3; grid-row: 1; }
.pad--dpad .pad-btn[data-key="left"] { grid-column: 1; grid-row: 2; }
.pad--dpad .pad-btn[data-key="down"] { grid-column: 2; grid-row: 2; }
.pad--dpad .pad-btn[data-key="right"] { grid-column: 3; grid-row: 2; }

.pad--single {
  grid-template-columns: 1fr;
  width: 100%;
}

.pad-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.pad--single .pad-btn { width: 100%; }

.pad-btn:active {
  border-color: var(--accent);
  transform: scale(.94);
}

@media (hover: none) and (pointer: coarse) {
  .pad { display: grid; }
}

/* Панели не должны зависеть только от медиазапроса: часть мобильных браузеров
   (Samsung Internet в ряде режимов) не отдаёт pointer: coarse, поэтому класс
   is-touch ставится из JS, а узкие экраны показывают панели всегда. */
html.is-touch .pad {
  display: grid;
}

@media (max-width: 900px) {
  .pad { display: grid; }
}

html.is-touch .pad-btn {
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
}

/* Кнопки 52px не влезают в трек 44px — на тач-устройствах увеличиваем и сетку. */
html.is-touch .pad {
  grid-template-columns: repeat(3, 52px);
  grid-auto-rows: 52px;
  width: 172px;
  gap: 10px;
}

html.is-touch .pad--single {
  grid-template-columns: 1fr;
  width: 100%;
  gap: 0;
}

/* Кнопка-одиночка («Прыжок») на тач-устройствах должна тянуться по ширине,
   иначе текст обрезается жёсткими 52px. */
html.is-touch .pad--single .pad-btn {
  width: 100%;
  height: 52px;
  font-size: 1rem;
  letter-spacing: .04em;
}

.games-hint {
  margin-top: 1.5rem;
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}

/* Game switch (segmented control) */
.game-switch {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem;
  margin-bottom: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  -webkit-overflow-scrolling: touch;
}

.game-switch::-webkit-scrollbar { height: 6px; }
.game-switch::-webkit-scrollbar-track { background: transparent; }
.game-switch::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.game-switch__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  min-height: 44px;
  padding: .5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.game-switch__btn:hover { color: var(--text); }

.game-switch__btn[aria-selected="true"] {
  background: var(--accent);
  color: #04110f;
  box-shadow: 0 2px 8px rgba(77, 214, 193, .3);
}

.game-switch__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* <=560px — кнопки растягиваются равномерно */
@media (max-width: 560px) {
  .game-switch { gap: 0; }
  .game-switch__btn { flex: 1 1 0; min-width: 0; }
}

/* ---------- 11b. Games tab — wider cards ---------- */
@media (min-width: 1024px) {
  .games-grid {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin-inline: auto;
  }
}

/* ---------- 12. Thanks tab ---------- */
.thanks {
  max-width: 560px;
  margin: clamp(1rem, 5vh, 4rem) auto 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(77, 214, 193, .075), rgba(77, 214, 193, .02));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}

.thanks__badge {
  display: inline-block;
  font-size: .75rem;
  color: var(--accent);
  border: 1px solid rgba(77, 214, 193, .4);
  border-radius: 999px;
  padding: .25rem .75rem;
  margin-bottom: 1rem;
}

.thanks h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: .75rem;
}

.thanks__text {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 1.5rem;
}

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.thanks__note {
  font-size: .72rem;
  color: var(--muted);
  opacity: .8;
}

/* ---------- 13. Footer ---------- */
.footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: 1.25rem clamp(.75rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  font-size: .82rem;
  color: var(--muted);
  background: rgba(6, 8, 11, .6);
}

.footer__meta {
  font-size: .72rem;
}

.footer__top {
  color: var(--accent);
  text-decoration: none;
}
.footer__top:hover { text-decoration: underline; }

/* ---------- 14. Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .4s ease, transform .4s ease;
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- 15. Responsive ---------- */
/* 768px */
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__tile--tall { grid-row: span 1; }
  .bento__tile--stack,
  .bento__tile--wide { grid-column: span 2; }
.bento__tile--siberia { min-height: 100%; }
  .socials { grid-template-columns: repeat(2, 1fr); }
  .games-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

/* 480px */
@media (max-width: 560px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .socials { grid-template-columns: 1fr; }
}

/* 360px — tabs must fit one line */
@media (max-width: 420px) {
  .topbar { gap: .5rem; }
  .brand__name { display: none; }
  .tabs { gap: 0; }
  .tabs__btn {
    padding: .45rem .45rem;
  }
  .tabs__num { display: none; }
  .tabs__label {
    font-size: .68rem;
    letter-spacing: .03em;
  }
  .bento { grid-template-columns: 1fr; }
  .bento__tile--stack,
  .bento__tile--wide { grid-column: span 1; }
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 16. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .cursor { animation: none; }
}

/* SVG sprite is hidden but must keep its geometry available via <use> */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
