/* Cognition Box Technologies Ltd - site styles */

:root {
  --ink: #0A1430;
  --ink-2: #141E3B;
  --ink-3: #1E2A4C;
  --text: #2A3350;
  --slate: #566079;
  --paper: #F4F6F9;
  --white: #FFFFFF;
  --line: #DCE1E9;
  --line-strong: #C5CCD8;
  --accent: #2F45FF;
  --accent-deep: #1E31D9;
  --accent-soft: #ECEEFF;
  --accent-glow: rgba(47, 69, 255, .18);
  --on-ink: #EEF1F8;
  --on-ink-muted: #A3ACC3;
  --on-ink-line: rgba(238, 241, 248, .12);

  --font-display: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --max: 1240px;
  --gutter: clamp(16px, 4.6vw, 48px);
  --section: clamp(88px, 11vw, 156px);
  --r-xl: 32px;
  --r-lg: 24px;
  --r: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --header-h: 72px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
address { font-style: normal; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.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: fixed;
  left: 16px; top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .875rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.display {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 620;
  letter-spacing: -.035em;
  line-height: .98;
}

.h2 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.125rem, 1rem + .45vw, 1.375rem);
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate);
}
.label::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 1px;
  flex: none;
}

.mono { font-family: var(--font-mono); font-feature-settings: normal; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  will-change: transform;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -12px var(--accent-glow), 0 6px 16px -8px rgba(10, 20, 48, .35); }
.btn .btn__inner { display: inline-flex; align-items: center; gap: 10px; transition: transform .5s var(--ease); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .arrow { transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--ghost::after { background: var(--ink); }
.btn--ghost:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--ink), 0 14px 30px -14px rgba(10, 20, 48, .45); }

.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn--light:hover { color: #fff; }

.btn--play { padding: 0 22px 0 18px; }
.btn--play .play-glyph { width: 22px; height: 22px; }
.btn--play .btn__text { display: grid; line-height: 1.1; text-align: left; }
.btn--play small { font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; opacity: .72; }
.btn--play strong { font-weight: 600; font-size: 1.0625rem; }

.text-link {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: color .3s var(--ease);
}
.text-link:hover { color: var(--accent); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  pointer-events: none;
}
.site-header__bar {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.site-header__bar::before {
  content: "";
  position: absolute;
  inset: 8px calc(var(--gutter) * -0.5);
  z-index: -1;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 0 0 1px rgba(10, 20, 48, .06), 0 12px 32px -18px rgba(10, 20, 48, .28);
  opacity: 0;
  transform: scale(1.03, 1.3);
  transition: opacity .45s var(--ease), transform .7s var(--ease);
}
.site-header.is-condensed .site-header__bar::before { opacity: 1; transform: none; }
.site-header.is-condensed .brand__mark { transform: scale(.9); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}
.brand__mark { width: 34px; height: 34px; flex: none; transition: transform .6s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.04); }
.brand__name {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 640;
  font-size: 1rem;
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
}
.brand__name span { color: var(--slate); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  font-size: .9375rem;
  text-decoration: none;
  transition: color .3s var(--ease);
}
.nav__link::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(10, 20, 48, .06);
  opacity: 0;
  transform: scale(.9);
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::before,
.nav__link[aria-current]::before { opacity: 1; transform: none; }
.nav__link { isolation: isolate; }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: .9375rem; margin-left: 8px; }

.menu-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: #fff;
  transition: transform .45s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 28px;
    padding: 96px var(--gutter) 40px;
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease), visibility 0s linear .4s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__link {
    width: 100%;
    min-height: 64px;
    padding: 0;
    font-family: var(--font-display);
    font-stretch: 112%;
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: -.025em;
    color: var(--ink);
    transform: translateY(16px);
    opacity: 0;
    transition: transform .6s var(--ease), opacity .6s var(--ease);
  }
  .nav__link::before { display: none; }
  .nav.is-open .nav__link { transform: none; opacity: 1; }
  .nav.is-open li:nth-child(2) .nav__link { transition-delay: .04s; }
  .nav.is-open li:nth-child(3) .nav__link { transition-delay: .08s; }
  .nav.is-open li:nth-child(4) .nav__link { transition-delay: .12s; }
  .nav.is-open li:nth-child(5) .nav__link { transition-delay: .16s; }
  .nav .btn { margin-left: 0; min-height: 54px; }
  .site-header.menu-open .site-header__bar::before { opacity: 0; }
  body.menu-lock { overflow: hidden; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: max(640px, min(100svh, 940px));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-h) + 72px) 0 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 85% 10%, rgba(47, 69, 255, .07), transparent 60%),
    linear-gradient(180deg, #F7F8FB 0%, var(--paper) 100%);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.hero__canvas.is-ready { opacity: 1; }
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(244, 246, 249, 0), var(--paper));
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero__eyebrow { margin-bottom: clamp(20px, 3vw, 32px); }
.hero__title {
  font-size: clamp(2.35rem, 1rem + 6.4vw, 6.75rem);
  max-width: 13ch;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > span { display: inline-block; }
.hero__title .accent-word { color: var(--accent); }
.hero__lead {
  max-width: 34rem;
  margin-top: clamp(22px, 3vw, 32px);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 40px);
}
.hero__meta {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  background: rgba(244, 246, 249, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hero__meta ul {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 12px 32px;
  list-style: none;
  padding-block: 20px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
}
.hero__meta li { white-space: nowrap; }
.hero__meta strong { color: var(--ink); font-weight: 500; }

@media (max-width: 1080px) {
  .hero__meta ul { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 48px; }
}
@media (max-width: 560px) {
  .hero { padding-top: calc(var(--header-h) + 56px); }
  .hero__meta ul { grid-template-columns: 1fr; gap: 6px; padding-block: 18px; }
  .hero__actions .btn { flex: 1 1 auto; }
}

/* Load sequence (only when JS is on and motion allowed) */
.js .hero [data-load] { opacity: 0; transform: translateY(18px); }
.js .hero__title .line > span { transform: translateY(105%); }
.js.is-loaded .hero [data-load] {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js.is-loaded .hero__title .line > span {
  transform: none;
  transition: transform 1.25s var(--ease);
  transition-delay: calc(120ms + var(--i, 0) * 110ms);
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); position: relative; }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 52rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 96px);
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* About */
.about__body { display: grid; gap: 24px; max-width: 46rem; }
.about__body .h2 { margin-bottom: 8px; }
.about__body p + p { color: var(--slate); }

/* Services */
.services { background: var(--white); border-block: 1px solid var(--line); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}
@media (max-width: 1080px) { .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .services__grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 300px;
  padding: 28px 26px 30px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), background-color .6s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -32px rgba(10, 20, 48, .35);
}
.card:hover::after { transform: scaleX(1); }
.card__top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 40px; }
.card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  transition: transform .6s var(--ease), background-color .4s var(--ease);
}
.card:hover .card__icon { transform: rotate(-6deg); background: var(--accent); }
.card__icon svg { width: 22px; height: 22px; }
.card__code {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--slate);
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.card h3 {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 600;
  font-size: 1.3125rem;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.card p { color: var(--slate); font-size: 1rem; line-height: 1.6; }

/* Games */
.games {
  background: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
}
.games .h2 { color: #fff; }
.games .label { color: var(--on-ink-muted); }
.games .label::before { background: #6F7DFF; }
.games__glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(47, 69, 255, .28), transparent 70%);
  pointer-events: none;
}

.banner-frame {
  position: relative;
  aspect-ratio: 1024 / 500;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--ink-3);
  box-shadow: 0 0 0 1px var(--on-ink-line), 0 40px 80px -40px rgba(0, 0, 0, .6);
  margin-bottom: clamp(40px, 6vw, 80px);
}
.banner-frame img {
  position: absolute;
  inset: -7% 0;
  width: 100%;
  height: 114%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.02);
  will-change: transform;
}
.banner-frame__badge {
  position: absolute;
  left: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: rgba(10, 20, 48, .62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: .875rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.banner-frame__badge img { position: static; width: 34px; height: 34px; border-radius: 9px; transform: none; inset: auto; }
.banner-frame__badge span { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

.game {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 960px) { .game { grid-template-columns: 1fr; } }

.game__id { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.game__icon {
  width: 84px; height: 84px;
  border-radius: 22px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px -16px rgba(0, 0, 0, .7);
}
.game__icon img { width: 100%; height: 100%; object-fit: cover; }
.game__name {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 640;
  font-size: clamp(2rem, 1.4rem + 1.8vw, 2.75rem);
  letter-spacing: -.035em;
  line-height: 1;
  color: #fff;
}
.game__kind { margin-top: 8px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink-muted); }
.game__pitch {
  font-family: var(--font-display);
  font-stretch: 104%;
  font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -.015em;
  color: #fff;
  margin-bottom: 18px;
  text-wrap: balance;
}
.game__text { color: var(--on-ink-muted); }
.game__facts {
  list-style: none;
  margin: 28px 0;
  border-top: 1px solid var(--on-ink-line);
}
.game__facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--on-ink-line);
  font-size: .9375rem;
}
.game__facts span:first-child { color: var(--on-ink-muted); }
.game__facts span:last-child { color: #fff; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-bottom: 32px; }
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .8125rem;
  color: var(--on-ink);
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px var(--on-ink-line);
}
.chips svg { width: 14px; height: 14px; color: #8C98FF; }
.game__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.game__actions .text-link { color: var(--on-ink); }
.game__actions .text-link:hover { color: #fff; }

/* Carousel */
.carousel { position: relative; min-width: 0; }
.carousel__viewport {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  list-style: none;
  padding: 4px 2px 8px;
  margin: -4px -2px 0;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  --bleed: calc((100vw - min(100vw - 2 * var(--gutter), var(--max))) / 2);
  margin-right: calc(-1 * var(--bleed) - 2px);
  padding-right: var(--bleed);
}
@media (max-width: 960px) {
  .carousel__viewport {
    margin-left: calc(-1 * var(--gutter));
    padding-left: var(--gutter);
    scroll-padding-left: var(--gutter);
  }
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__viewport.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.carousel__viewport.is-dragging .carousel__slide img { pointer-events: none; }
.carousel__slide {
  flex: 0 0 clamp(220px, 23vw, 296px);
  scroll-snap-align: start;
  border-radius: 20px;
  overflow: hidden;
  background: var(--ink-3);
  box-shadow: 0 0 0 1px var(--on-ink-line), 0 24px 50px -28px rgba(0, 0, 0, .8);
  transition: transform .6s var(--ease);
}
.carousel__slide img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
@media (hover: hover) { .carousel__slide:hover { transform: translateY(-6px); } }
.carousel__bar { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.carousel__progress {
  position: relative;
  flex: 1;
  height: 2px;
  background: var(--on-ink-line);
  border-radius: 2px;
  overflow: hidden;
}
.carousel__progress span {
  position: absolute; inset: 0;
  background: #fff;
  transform-origin: left;
  transform: scaleX(var(--p, .25));
  transition: transform .25s linear;
}
.carousel__count { font-family: var(--font-mono); font-size: .8125rem; color: var(--on-ink-muted); min-width: 4ch; text-align: right; }
.carousel__count b { color: #fff; font-weight: 500; }
.carousel__nav { display: flex; gap: 8px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--on-ink-line);
  cursor: pointer;
  transition: background-color .3s var(--ease), transform .5s var(--ease), opacity .3s;
}
.icon-btn:hover { background: var(--accent); }
.icon-btn:disabled { opacity: .35; cursor: default; background: rgba(255, 255, 255, .06); }
.icon-btn svg { width: 18px; height: 18px; }

/* Company register */
.register {
  border-radius: var(--r-xl);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -60px rgba(10, 20, 48, .4);
  overflow: hidden;
}
.register__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px 40px;
  padding: clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(10, 20, 48, .035) 23px 24px);
}
.register__name {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 640;
  font-size: clamp(1.35rem, 1rem + 1.5vw, 2.125rem);
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.register__number { text-align: right; }
.register__number dt { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.register__number dd { margin: 4px 0 0; font-family: var(--font-mono); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 500; letter-spacing: .04em; color: var(--accent); }
.register__rows { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.register__row {
  display: grid;
  gap: 6px;
  padding: 22px clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.register__row:nth-child(odd) { border-right: 1px solid var(--line); }
.register__row--wide { grid-column: 1 / -1; border-right: 0 !important; }
.register__row dt { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.register__row dd { margin: 0; color: var(--ink); font-size: 1.0625rem; }
.sic { list-style: none; display: grid; gap: 8px; }
.sic li { display: flex; gap: 14px; align-items: baseline; }
.sic .code { font-family: var(--font-mono); color: var(--accent); font-weight: 500; flex: none; }
.register__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 20px clamp(24px, 4vw, 44px); font-size: .9375rem; color: var(--slate); }
@media (max-width: 720px) {
  .register__rows { grid-template-columns: 1fr; }
  .register__row:nth-child(odd) { border-right: 0; }
  .register__number { text-align: left; }
}

/* Contact */
.contact { background: var(--white); border-top: 1px solid var(--line); }
.contact__email {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(1.5rem, .9rem + 3.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 6px;
  transition: background-size .7s var(--ease), color .4s var(--ease);
}
.contact__email:hover { background-size: 100% 3px; color: var(--accent); }
.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.contact__item { padding: 26px 28px 0 0; display: grid; gap: 8px; align-content: start; }
.contact__item + .contact__item { padding-left: 28px; border-left: 1px solid var(--line); }
.contact__item dt { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.contact__item dd { margin: 0; color: var(--ink); font-size: 1.0625rem; }
.contact__item a { text-decoration: none; }
.contact__item a:hover { color: var(--accent); }
.contact__cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__item, .contact__item + .contact__item { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  padding: clamp(56px, 8vw, 96px) 0 32px;
  font-size: .9375rem;
}
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--on-ink-line);
}
.site-footer .brand { color: #fff; }
.site-footer .brand__name span { color: var(--on-ink-muted); }
.site-footer__legal { margin-top: 20px; line-height: 1.7; max-width: 30rem; }
.site-footer__legal strong { color: var(--on-ink); font-weight: 500; }
.site-footer h2 { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink-muted); font-weight: 500; margin-bottom: 16px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: var(--on-ink); text-decoration: none; transition: color .3s var(--ease); }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; font-size: .8125rem; }
.site-footer :focus-visible { outline-color: #8C98FF; }
@media (max-width: 860px) { .site-footer__top { grid-template-columns: 1fr 1fr; } .site-footer__top > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__top { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }

/* ---------- Document pages (legal, game page) ---------- */

.page-hero {
  padding: calc(var(--header-h) + clamp(64px, 9vw, 120px)) 0 clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(47, 69, 255, .07), transparent 55%),
    var(--paper);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-stretch: 116%;
  font-weight: 620;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin-top: 18px;
  text-wrap: balance;
}
.page-hero p.meta { margin-top: 18px; font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .06em; color: var(--slate); }
.breadcrumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumbs a { text-decoration: none; color: var(--slate); }
.breadcrumbs a:hover { color: var(--accent); }

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46rem);
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(48px, 7vw, 96px) var(--section);
}
.doc__aside { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.doc__aside ol { list-style: none; display: grid; gap: 4px; counter-reset: toc; }
.doc__aside a {
  display: block;
  padding: 6px 0;
  color: var(--slate);
  text-decoration: none;
  font-size: .9375rem;
  transition: color .3s var(--ease), transform .4s var(--ease);
}
.doc__aside a:hover { color: var(--ink); transform: translateX(4px); }
.doc__aside .label { margin-bottom: 14px; }
.prose { color: var(--text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 600;
  font-size: clamp(1.35rem, 1.15rem + .7vw, 1.75rem);
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-top: 2.4em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose ul { padding-left: 1.2em; display: grid; gap: .5em; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent-deep); text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.summary-box {
  padding: 24px 26px;
  border-radius: var(--r);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}
.summary-box p { font-size: 1.0625rem; }
.summary-box ul { list-style: none; padding: 0; margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.summary-box li { display: flex; gap: 10px; align-items: center; font-size: .9375rem; color: var(--ink); }
.summary-box svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.contact-card { padding: 24px 26px; border-radius: var(--r); background: var(--ink); color: var(--on-ink); }
.contact-card p + p { margin-top: 6px; }
.contact-card a { color: #fff; }
.contact-card strong { color: #fff; }
@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; }
  .doc__aside { position: static; display: none; }
}
@media (max-width: 520px) { .summary-box ul { grid-template-columns: 1fr; } }

/* 404 */
.notfound {
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: calc(var(--header-h) + 40px) 0 64px;
}
.notfound__code { font-family: var(--font-mono); color: var(--accent); letter-spacing: .1em; }
.notfound h1 { font-family: var(--font-display); font-stretch: 118%; font-weight: 620; font-size: clamp(2.4rem, 1.4rem + 4.4vw, 5.25rem); letter-spacing: -.035em; line-height: 1; margin: 18px 0 20px; max-width: 14ch; }
.notfound p { max-width: 34rem; color: var(--slate); }
.notfound .hero__actions { margin-top: 32px; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal], .js .hero [data-load], .js .hero__title .line > span { opacity: 1 !important; transform: none !important; }
  .banner-frame img { transform: none !important; }
}

@media (max-width: 420px) {
  .site-header .brand__name span { display: none; }
}
.contact__lead { margin-top: 20px; max-width: 44rem; text-wrap: balance; }

/* ---------- Document pages: progress, TOC spy, game page ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #6F7DFF);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  box-shadow: 0 0 12px rgba(47, 69, 255, .45);
}
.page-hero__lead { margin-top: 20px; max-width: 40rem; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 24px); }
.prose code {
  font-family: var(--font-mono);
  font-size: .85em;
  padding: .12em .42em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  overflow-wrap: anywhere;
}
.doc__aside a { position: relative; padding-left: 16px; }
.doc__aside a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scale(0) rotate(45deg);
  transition: opacity .3s var(--ease), transform .5s var(--ease);
}
.doc__aside a[aria-current] { color: var(--ink); font-weight: 500; }
.doc__aside a[aria-current]::before { opacity: 1; transform: none; }
.games--page { padding-top: clamp(48px, 6vw, 88px); }
.contact-card a { text-underline-offset: 3px; }

/* Page hero: drifting dot lattice + floating app art */
.page-hero { position: relative; overflow: hidden; }
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(10, 20, 48, .15) 1.1px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(50% 95% at 88% 30%, #000 0%, transparent 72%);
          mask-image: radial-gradient(50% 95% at 88% 30%, #000 0%, transparent 72%);
  animation: dots-drift 22s linear infinite;
  pointer-events: none;
}
@keyframes dots-drift { to { background-position: 28px -28px; } }
.page-hero > .container { position: relative; }
.page-hero__art-wrap {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  width: clamp(132px, 15vw, 212px);
  margin-top: calc(clamp(132px, 15vw, 212px) / -2 + 18px);
}
.page-hero__art {
  display: block;
  aspect-ratio: 1;
  border-radius: 24%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(10, 20, 48, .06), 0 34px 64px -26px rgba(10, 20, 48, .5);
  animation: art-float 6.5s var(--ease-io) infinite alternate;
}
.page-hero__art img { width: 100%; height: 100%; object-fit: cover; }
@keyframes art-float {
  from { transform: translate3d(0, 6px, 0) rotate(7deg); }
  to { transform: translate3d(0, -10px, 0) rotate(3deg); }
}
.page-hero__art-wrap::after {
  content: "";
  position: absolute;
  left: 14%; right: 14%; bottom: -26px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(10, 20, 48, .18), transparent);
  animation: art-shadow 6.5s var(--ease-io) infinite alternate;
}
@keyframes art-shadow { from { transform: scaleX(1); opacity: 1; } to { transform: scaleX(.82); opacity: .6; } }
@media (max-width: 760px) { .page-hero__art-wrap { display: none; } }
