/* ==========================================================================
   Santicum — main stylesheet
   ========================================================================== */

:root {
  --bg: #0a0b10;
  --bg-2: #0f1118;
  --surface: #141722;
  --surface-2: #1b1f2c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f4f8;
  --text-2: #c9cdd6;
  --muted: #8f96a6;
  --accent: #7cf2c9;
  --accent-ink: #062018;

  --c-match: #ffd23f;
  --c-klondike: #ffd23f;
  --c-street: #ffffff;

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Manrope's contextual alternates turn "(c)" into "©" */
  font-feature-settings: "calt" 0;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.15; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

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

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

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(10, 11, 16, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.025em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.logo__mark {
  width: 36px;
  height: 36px;
  flex: none;
  transition: transform 0.4s var(--ease);
}
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.05); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.08); }

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(10, 11, 16, 0.4);
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.2s;
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-open .menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 32px) var(--gutter) 40px;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open .site-header { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mobile-menu__nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__nav a {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 6px 0;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), color 0.2s;
}
.mobile-menu__nav a[aria-current="page"] { color: var(--accent); }
.menu-open .mobile-menu__nav a { transform: none; opacity: 1; }
.menu-open .mobile-menu__nav a:nth-child(2) { transition-delay: 0.05s; }
.menu-open .mobile-menu__nav a:nth-child(3) { transition-delay: 0.1s; }
.mobile-menu__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.mobile-menu__legal a { color: var(--muted); text-decoration: none; font-weight: 600; }

body.menu-open { overflow: hidden; }

/* ---------- Buttons & badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), background-color 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(124, 242, 201, 0.55); }
.btn:active { transform: none; }
.btn svg { width: 18px; height: 18px; }

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

.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.store-badges a {
  display: block;
  border-radius: 10px;
  transition: transform 0.2s var(--ease), filter 0.2s;
}
.store-badges a:hover { transform: translateY(-2px); filter: brightness(1.15); }
.store-badges img { height: 48px; width: auto; }

.web-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s;
}
.web-link:hover { background: rgba(255, 255, 255, 0.18); }
.web-link svg {
  width: 28px; height: 28px;
  padding: 6px;
  border-radius: 50%;
  background: var(--game, var(--accent));
  color: #04121c;
}

/* ---------- Home: full-screen slides ---------- */
html.has-slides {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
  scroll-behavior: auto; /* slides are animated in main.js */
}
html.has-slides.is-sliding { scroll-snap-type: none; }

.slide {
  --game: var(--accent);
  --game-bg: var(--bg);
  position: relative;
  display: flex;
  align-items: center;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: var(--game-bg);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.slide__media { position: absolute; inset: 0; z-index: -2; }
.slide__media picture { display: block; width: 100%; height: 100%; }
.slide__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  transition: transform 1.8s var(--ease);
}
.js .slide__media img { transform: scale(1.08); }
.js .slide.is-active .slide__media img { transform: scale(1); }
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 22%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0) 70%);
}
/* Home uses a left rail (logo, dots, legal links) and a text column tied to the
   screen edge rather than to the centred container, as on the original site */
.page-home {
  --rail: clamp(20px, 2.8vw, 48px);
  --slide-x: clamp(96px, 11vw, 260px);
}
.page-home .site-header .container { max-width: none; padding-inline: var(--rail); }
.slide__inner { max-width: none; margin: 0; padding-left: var(--slide-x); padding-right: var(--rail); }
.slide__content { max-width: 680px; padding-top: var(--header-h); }

.js .slide__anim {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: 0s;
}
.js .slide.is-active .slide__anim {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--delay, 0s) + 0.15s);
}

/* Intro slide */
.slide--hero { align-items: flex-end; padding-bottom: clamp(104px, 15vh, 160px); }
/* The hero stands in the right half; keep the headline clear of him */
.slide--hero .slide__media img { object-position: 85% 50%; }
@media (min-width: 761px) and (max-width: 1199px) {
  .slide--hero .hero__title { font-size: 4.8vw; }
}
.slide--hero::after {
  background:
    linear-gradient(180deg, rgba(10, 11, 16, 0.55) 0%, rgba(10, 11, 16, 0) 30%),
    linear-gradient(0deg, rgba(10, 11, 16, 0.85) 0%, rgba(10, 11, 16, 0.35) 35%, rgba(10, 11, 16, 0) 65%),
    linear-gradient(90deg, rgba(10, 11, 16, 0.6) 0%, rgba(10, 11, 16, 0) 60%);
}
.hero__title {
  margin-top: 20px;
  font-size: clamp(48px, 5.6vw, 116px);
}
.slide--hero .slide__content { max-width: none; }
.hero__title span { display: block; white-space: nowrap; }
.hero__title span:last-child { color: var(--accent); }
.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll i {
  position: relative;
  width: 28px;
  height: 44px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: scroll-dot 1.8s var(--ease) infinite;
}
@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* Game slides */
.game--match { --game: var(--c-match); --game-bg: #2f78c9; }
.game--klondike { --game: var(--c-klondike); --game-bg: #0c8f43; }
.game--street { --game: var(--c-street); --game-bg: #9ccc1b; --shade: 0.32; }

/* Light artwork: a soft shade behind the text keeps white type readable */
.game::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0) 22%),
    linear-gradient(90deg, rgba(0, 0, 0, var(--shade, 0.22)) 0%, rgba(0, 0, 0, 0.06) 45%, rgba(0, 0, 0, 0) 65%);
}
.game .game__title,
.game .game__genre { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18); }
.game .game__genre { background: rgba(255, 255, 255, 0.2); }

.game__genre {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.game__genre::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--game);
  box-shadow: 0 0 12px var(--game);
}
.game__title {
  margin: 20px 0 32px;
  font-size: clamp(48px, 6.4vw, 104px);
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.25);
}
.game__title span { display: block; }

/* Slide navigation: dots, counter, legal links */
.slide-dots,
.slide-counter,
.home-legal { position: fixed; z-index: 90; }

.slide-dots {
  left: calc(var(--rail) - 8px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
}
.slide-dots a {
  position: relative;
  display: flex;
  justify-content: center;
  width: 24px;
  padding: 7px 0;
}
.slide-dots a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: height 0.45s var(--ease), background-color 0.3s;
}
.slide-dots a:hover::before { background: #fff; }
.slide-dots a[aria-current="true"]::before {
  height: 30px;
  background: var(--slide-accent, var(--accent));
}
.slide-dots span {
  position: absolute;
  left: 34px;
  top: 50%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 11, 16, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-6px, -50%);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.slide-dots a:hover span,
.slide-dots a:focus-visible span { opacity: 1; transform: translate(0, -50%); }

.slide-counter {
  right: var(--rail);
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}
.slide-counter b { font-size: 18px; color: #fff; }
.slide-counter i {
  position: relative;
  width: 72px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.slide-counter i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--slide-accent, var(--accent));
  transform: scaleX(var(--slide-progress, 0.25));
  transform-origin: left;
  transition: transform 0.6s var(--ease), background-color 0.3s;
}

.home-legal {
  left: var(--rail);
  bottom: 28px;
  display: flex;
  gap: 24px;
}
.home-legal a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  transition: color 0.2s;
}
.home-legal a:hover { color: #fff; }

/* Home keeps the header transparent over every slide */
.page-home .site-header.is-scrolled {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.page-home .to-top { display: none; }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(440px, 72vh, 720px);
  padding: calc(var(--header-h) + 40px) 0 clamp(40px, 7vw, 80px);
  isolation: isolate;
  overflow: hidden;
}
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 11, 16, 0.7) 0%, rgba(10, 11, 16, 0) 28%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 11, 16, 0.78) 42%, rgba(10, 11, 16, 0.3) 100%);
}
.page-hero__title {
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 54px);
  max-width: 22ch;
}
.page-hero__title span { color: var(--accent); }

.lead {
  max-width: 760px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.65;
  color: var(--text-2);
}

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight-top { padding-top: clamp(16px, 3vw, 32px); }

/* ---------- Careers ---------- */
.careers-intro {
  display: grid;
  gap: 32px;
  align-items: start;
  grid-template-columns: 1fr;
}
.careers-intro__label { font-size: clamp(26px, 3vw, 36px); font-family: var(--font-display); }

.jobs { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 64px); }
.job {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s, background-color 0.3s;
}
.job:hover { border-color: var(--line-strong); }
.job[open] { background: var(--bg-2); border-color: var(--line-strong); }
.job summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  align-items: center;
  padding: clamp(22px, 3vw, 32px) clamp(20px, 3vw, 36px);
  cursor: pointer;
  list-style: none;
}
.job summary::-webkit-details-marker { display: none; }
.job__title { font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.01em; }
.job__excerpt {
  grid-column: 1;
  color: var(--muted);
  font-size: 16px;
  max-width: 760px;
}
.job[open] .job__excerpt { display: none; }
.job__toggle {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.job__toggle i {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: transform 0.35s var(--ease), background-color 0.2s, border-color 0.2s;
}
.job__toggle i::before,
.job__toggle i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 2px;
  background: currentColor;
}
.job__toggle i::after { transform: rotate(90deg); transition: transform 0.35s var(--ease); }
.job summary:hover .job__toggle i { border-color: var(--accent); }
.job[open] .job__toggle i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.job[open] .job__toggle i::after { transform: rotate(0deg); }
.job[open] .job__toggle-more,
.job:not([open]) .job__toggle-less { display: none; }

.job__body {
  padding: 0 clamp(20px, 3vw, 36px) clamp(24px, 3vw, 36px);
  max-width: 900px;
  color: var(--text-2);
}
.job__body > * + * { margin-top: 16px; }
.job__body h3 {
  margin-top: 28px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
.job__body ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.job__body li { position: relative; padding-left: 26px; }
.job__body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.job__body li ul { margin-top: 10px; }
.job__body li li::before { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.job__body .btn { margin-top: 28px; }

/* ---------- Contacts ---------- */
.contact-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(40px, 6vw, 64px);
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 3.5vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.contact-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(124, 242, 201, 0.12);
  color: var(--accent);
}
.contact-card__icon svg { width: 24px; height: 24px; }
.contact-card h2 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.contact-card__value {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.contact-card__value:hover { color: var(--accent); }
.contact-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.contact-card__actions .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* ---------- Forms ---------- */
.form-card {
  max-width: 720px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.form-card h2 {
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; color: var(--text-2); }
.field label abbr { color: var(--accent); text-decoration: none; }
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #5f6676; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 242, 201, 0.15);
}
.field input[aria-invalid="true"] { border-color: #ff7a7a; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 26px; }
.form-status { font-size: 15px; color: var(--text-2); }
.form-status.is-error { color: #ff9b9b; }
.form-status.is-success { color: var(--accent); }

/* ---------- Legal / document pages ---------- */
.doc-hero {
  padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 0% 0%, rgba(124, 242, 201, 0.10), transparent 60%),
    var(--bg);
}
.doc-hero__title { margin-top: 16px; font-size: clamp(34px, 5.4vw, 68px); }
.doc-hero__meta { margin-top: 18px; color: var(--muted); font-weight: 600; }

.doc-layout {
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 112px);
}
.doc-layout--toc { grid-template-columns: 260px minmax(0, 1fr); }

.toc { position: relative; }
.toc__inner {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow: auto;
  padding-right: 8px;
}
.toc__title {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); }

.prose { max-width: 760px; color: var(--text-2); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2.4em;
  padding-top: 0.2em;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.prose h3 { margin-top: 2em; font-size: 20px; color: var(--text); }
.prose h4, .prose h5, .prose h6 { margin-top: 1.8em; font-size: 18px; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose strong, .prose b { color: var(--text); font-weight: 700; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--accent); }
.prose .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface); color: var(--text); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:last-child { font-weight: 700; color: var(--text); white-space: nowrap; }

.prose--wide { max-width: 1040px; }
.partner-group { margin-top: 2.4em; }
.partners { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.partner {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.partner h3 { margin: 0 0 8px; font-size: 18px; color: var(--text); }
.partner p + p { margin-top: 8px; }

/* ---------- 404 ---------- */
.not-found {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
}
.not-found__code {
  font-size: clamp(96px, 22vw, 240px);
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}
.not-found p { margin: 16px auto 32px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: clamp(40px, 6vw, 64px) 0 32px;
  font-size: 15px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer-top .logo { font-size: 30px; gap: 14px; }
.footer-top .logo__mark { width: 46px; height: 46px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a,
.footer-legal a { color: var(--text-2); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.footer-nav a:hover,
.footer-legal a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 24px;
  color: var(--muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal a { color: var(--muted); font-weight: 500; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(20, 23, 34, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s, border-color 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- Reveal on scroll (enabled only with JS) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .doc-layout--toc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .partners { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }
  .nav { display: none; }
  .menu-toggle { display: block; }
  .logo { font-size: 21px; gap: 9px; }
  .logo__mark { width: 32px; height: 32px; }

  /* Slides: phone artwork leaves the top third free for the text */
  .slide { align-items: flex-end; }
  .slide__inner { padding-left: var(--gutter); }
  .slide__content { padding: 0 0 clamp(36px, 7vh, 64px); }
  .slide__media img { object-position: 50% 100%; }
  .game { align-items: flex-start; }
  /* Anchor to the top so the empty sky above the art stays under the text on short screens */
  .game .slide__media img { object-position: 50% 0%; }
  .game .slide__content { padding: calc(var(--header-h) + clamp(4px, 2vh, 24px)) 0 0; }
  .game::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, var(--shade, 0.22)) 0%, rgba(0, 0, 0, 0) 45%);
  }
  .game__title { margin: 10px 0 16px; font-size: clamp(38px, 11.5vw, 56px); }
  .game .web-link { margin-bottom: 12px; padding-block: 6px; }
  .slide--hero { padding-bottom: 0; }
  .slide--hero .slide__media img { object-position: 50% 0%; }
  .slide--hero .slide__content { padding-bottom: clamp(48px, 10vh, 96px); }

  .slide-dots { left: auto; right: 10px; }
  .slide-dots span { display: none; }
  .slide-counter,
  .home-legal { display: none; }
  .store-badges img { height: 44px; }

  .contact-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  .job summary { grid-template-columns: 1fr; }
  .job__toggle { grid-column: 1; grid-row: auto; margin-top: 8px; }

  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Tablets ---------- */
@media (min-width: 761px) and (max-width: 1199px) {
  .game__title { font-size: 5.2vw; }
}

/* Portrait tablets: text on top, artwork below (like the phone layout),
   with dedicated 3:4 artwork for the game slides */
@media (min-width: 761px) and (max-width: 1199px) and (orientation: portrait) {
  .page-home { --slide-x: clamp(40px, 7vw, 72px); }
  .game { align-items: flex-start; }
  .game .slide__content { padding-top: calc(var(--header-h) + 3vh); }
  /* Push the 3:4 art down a little; the gap above blends into the slide colour */
  .game .slide__media { top: 9%; }
  .game .slide__media img { object-position: 50% 100%; }
  .game .slide__media::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 18%;
    z-index: 1;
    background: linear-gradient(180deg, var(--game-bg) 0%, transparent 100%);
  }
  .game::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, var(--shade, 0.22)) 0%, rgba(0, 0, 0, 0) 40%);
  }
  .game__title { font-size: 8vw; margin: 14px 0 20px; }
  .slide--hero .hero__title { font-size: 9.5vw; }
}
