/* AP Karting — base: tokens, reset, type, buttons, header, footer.
   build.mjs joins src/styles/*.css in name order into assets/css/site.css. */

@font-face {
  font-family: "AP Display";
  src: url("../fonts/Roboto-BoldCondensedItalic.ttf?v=1117eab9f4") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "AP Label";
  src: url("../fonts/Roboto-BoldCondensed.ttf?v=2c9245c024") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e1013;
  --bg-raise: #13161a;
  --panel: #181b20;
  --panel-2: #20242a;
  --field: #0f1114;
  --line: rgba(242, 239, 233, 0.09);
  --line-2: rgba(242, 239, 233, 0.17);
  --text: #f2efe9;
  --text-2: #d8d4cc;
  --muted: #aaa59c;
  --faint: #8d8981;
  --orange: #ff6a1a;
  --orange-hi: #ff8547;
  --orange-ink: #140902;
  --orange-soft: rgba(255, 106, 26, 0.12);
  --ok: #4fd18b;
  --danger: #ff7a7a;
  --radius: 6px;
  --radius-lg: 12px;
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-display: "AP Display", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --font-label: "AP Label", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Georgian", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* Georgian has no face in Roboto and no capitals in everyday text: the display
   type falls back to the system's Georgian face, and nothing is uppercased
   (Mtavruli capitals are missing from most of those faces). */
:root:lang(ka) {
  --font-display: "Noto Sans Georgian", "BPG Arial", "Segoe UI", "Sylfaen", system-ui, sans-serif;
  --font-label: "Noto Sans Georgian", "Segoe UI", "Sylfaen", system-ui, sans-serif;
}

:lang(ka) .eyebrow,
:lang(ka) .btn,
:lang(ka) .hero__title,
:lang(ka) .final__title,
:lang(ka) .sticker,
:lang(ka) .status,
:lang(ka) .badge,
:lang(ka) .segmented__tab,
:lang(ka) .site-footer__tagline,
:lang(ka) .classes__title,
:lang(ka) .control__platform,
:lang(ka) .legal__toc-title,
:lang(ka) .band__cta {
  text-transform: none;
  letter-spacing: 0;
}

*,
*::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) + 20px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-color: rgba(255, 106, 26, 0.65);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s;
}

a:hover {
  color: var(--orange-hi);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

::selection {
  background: rgba(255, 106, 26, 0.35);
  color: #fff;
}

[hidden] {
  display: none !important;
}

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

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--orange);
  color: var(--orange-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Type ─────────────────────────────────────────────────────────────── */

.wordmark {
  display: inline-block;
  font-family: "AP Display", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.62rem;
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
  color: var(--text);
  text-transform: uppercase;
}

.wordmark__ap {
  color: var(--orange);
}

.wordmark--lg {
  font-size: 2.2rem;
}

.wordmark--xl {
  font-size: clamp(3rem, 11vw, 6.4rem);
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35em 0.6em;
  color: var(--orange);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow__num {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.eyebrow__sep {
  color: var(--faint);
}

.eyebrow .badge {
  margin-left: 0.4em;
}

.section-title,
.page-title {
  margin-top: 0.4em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

:lang(ka) .section-title,
:lang(ka) .page-title {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.12;
}

.section-title--stack > span {
  display: block;
}

.dot {
  color: var(--orange);
}

.section-lead {
  max-width: 60ch;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.3vw, 1.18rem);
  line-height: 1.62;
}

.note {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 1rem;
  color: var(--faint);
  font-size: 0.9rem;
}

.note .icon {
  color: var(--orange);
  width: 1.05em;
  height: 1.05em;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28em 0.6em;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: var(--orange);
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--orange);
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.16);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.link-arrow .icon {
  color: var(--orange);
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 46px;
  padding: 0.65em 1.2em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s var(--ease);
}

.btn .icon {
  width: 1.1em;
  height: 1.1em;
  stroke-width: 2;
}

.btn--primary {
  background: var(--orange);
  color: var(--orange-ink);
}

.btn--primary:hover {
  background: var(--orange-hi);
  color: var(--orange-ink);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--ghost {
  border-color: var(--line-2);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--orange);
  color: var(--text);
}

.btn--sm {
  min-height: 38px;
  padding: 0.45em 0.95em;
  font-size: 0.9rem;
}

.btn--lg {
  min-height: 54px;
  padding: 0.8em 1.45em;
  font-size: 1.08rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.72;
  cursor: progress;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(19, 22, 26, 0.85);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}

.icon-btn:hover {
  border-color: var(--orange);
}

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s;
}

.site-header.is-solid,
.site-header.is-open {
  background: rgba(14, 16, 19, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.site-header__brand {
  text-decoration: none;
}

.site-nav {
  margin-inline: auto;
}

.site-nav ul {
  display: flex;
  gap: clamp(14px, 1.9vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

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

.site-header__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.lang {
  position: relative;
}

.lang summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  list-style: none;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary .icon {
  width: 1.05em;
  height: 1.05em;
}

.lang summary:hover,
.lang[open] summary {
  border-color: var(--orange);
  color: var(--text);
}

.lang__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.lang__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
}

.lang__list a:hover,
.lang__list a[aria-current="true"] {
  background: var(--panel-2);
  color: var(--text);
}

.lang__list a[aria-current="true"]::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.nav-toggle {
  display: none;
}

.nav-toggle .icon + .icon,
.site-header.is-open .nav-toggle .icon:first-of-type {
  display: none;
}

.site-header.is-open .nav-toggle .icon + .icon {
  display: block;
}

/* Wide enough for the longest header of the seven languages (Georgian and
   Spanish) to sit between the wordmark and the tools. */
@media (max-width: 1240px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    margin: 0;
    padding: 8px var(--gutter) 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(14, 16, 19, 0.98);
  }

  .site-header.is-open .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 1.15rem;
  }
}

@media (max-width: 560px) {
  .site-header__cta {
    display: none;
  }

  .wordmark {
    font-size: 1.4rem;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  padding-block: 56px 36px;
  border-top: 1px solid var(--line);
  background: #0a0b0d;
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 36px;
}

.site-footer__brand {
  text-decoration: none;
}

.site-footer__tagline,
.site-footer__label {
  margin-top: 14px;
  color: var(--faint);
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer__label {
  margin-top: 0;
  margin-bottom: 12px;
}

.site-footer__links {
  display: grid;
  gap: 10px;
}

.site-footer__links a,
.site-footer__langs a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__langs a:hover,
.site-footer__langs a[aria-current="true"] {
  color: var(--text);
}

.site-footer__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.95rem;
}

.site-footer__langs a[aria-current="true"] {
  text-decoration: underline;
  text-decoration-color: var(--orange);
}

.site-footer__bottom {
  display: grid;
  gap: 10px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}

.site-footer__bottom a {
  color: var(--muted);
}

.site-footer__tm {
  max-width: 110ch;
  font-size: 0.78rem;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@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;
  }
}

/* AP Karting — the landing page's sections. */

.section {
  position: relative;
  padding-block: clamp(76px, 10vw, 140px);
  border-top: 1px solid var(--line);
}

.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 20px 56px;
  margin-bottom: clamp(34px, 4vw, 56px);
}

.section-head--split .section-lead {
  margin-top: 0;
}

@media (max-width: 860px) {
  .section-head--split {
    grid-template-columns: 1fr;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100svh, 960px);
  padding-top: calc(var(--header-h) + clamp(28px, 5vw, 64px));
  padding-bottom: clamp(44px, 6vw, 84px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(56% 70% at 73% 50%, #24272e 0%, rgba(36, 39, 46, 0.62) 42%, rgba(14, 16, 19, 0) 76%),
    linear-gradient(180deg, #101216 0%, var(--bg) 100%);
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__track {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 62%;
  /* The line belongs to the kart's side: it fades out before it reaches the copy. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 62%);
}

.hero__track-road {
  fill: none;
  stroke: rgba(242, 239, 233, 0.045);
  stroke-width: 110;
}

.hero__track-line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 2.5;
  stroke-dasharray: 2200;
  stroke-dashoffset: 2200;
  opacity: 0.8;
  animation: draw-line 2.4s 0.3s var(--ease) forwards;
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
}

.hero__title {
  margin-top: 0.34em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3.1rem, 7.2vw, 6.9rem);
  line-height: 0.88;
  letter-spacing: -0.012em;
  text-transform: uppercase;
}

.hero__line {
  display: block;
}

:lang(ka) .hero__title {
  font-size: clamp(2.3rem, 4.8vw, 4.4rem);
  line-height: 1.08;
}

:lang(uk) .hero__title,
:lang(pl) .hero__title,
:lang(it) .hero__title {
  font-size: clamp(2.8rem, 6.4vw, 6.2rem);
}

.hero__lead {
  max-width: 34em;
  margin-top: 1.5rem;
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.4vw, 1.24rem);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2.1rem;
}

.hero__note {
  margin-top: 1.1rem;
  color: var(--faint);
  font-size: 0.92rem;
}

.hero__art {
  position: relative;
}

.hero__kart {
  width: 116%;
  max-width: none;
  margin-left: -6%;
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
  animation: kart-in 1.1s var(--ease) both;
}

@keyframes kart-in {
  from {
    opacity: 0;
    transform: translateX(4%) scale(0.98);
  }
}

.sticker {
  position: absolute;
  top: 3%;
  right: 2%;
  z-index: 1;
  color: rgba(242, 239, 233, 0.3);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 1.7vw, 1.55rem);
  line-height: 1.04;
  text-align: right;
  text-transform: uppercase;
  transform: rotate(-11deg);
}

.sticker span {
  display: block;
}

@media (max-width: 1180px) {
  .sticker {
    display: none;
  }
}

.sticker::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 12px 0 0 auto;
  background: var(--orange);
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__art {
    max-width: 620px;
    margin: -8px auto 0;
  }

  .hero__kart {
    width: 100%;
    margin: 0;
  }
}

/* ── Platform band and figures ────────────────────────────────────────── */

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise);
}

.band__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.band__grid > li + li {
  border-left: 1px solid var(--line);
}

.band__item {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 22px clamp(14px, 2.4vw, 34px);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s;
}

.band__item:hover {
  background: var(--panel);
  color: var(--text);
}

.band__item > .icon {
  width: 34px;
  height: 34px;
  stroke-width: 1.35;
}

.band__text {
  display: grid;
  line-height: 1.3;
}

.band__name {
  font-size: 1.1rem;
  font-weight: 600;
}

.band__store {
  color: var(--faint);
  font-size: 0.86rem;
}

.band__side {
  position: relative;
  display: grid;
  justify-items: end;
  margin-left: auto;
}

.band__cta {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--text);
  font-family: var(--font-label);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-6px, -50%);
  transition: opacity 0.2s, transform 0.2s var(--ease);
}

.band__cta .icon {
  color: var(--orange);
}

.band__item:hover .status,
.band__item:focus-visible .status {
  opacity: 0;
}

.band__item:hover .band__cta,
.band__item:focus-visible .band__cta {
  opacity: 1;
  transform: translate(0, -50%);
}

@media (max-width: 760px) {
  .band__grid {
    grid-template-columns: 1fr;
  }

  .band__grid > li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.stats {
  padding-block: clamp(38px, 5vw, 60px);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 4px clamp(14px, 2vw, 30px);
  border-left: 1px solid var(--line);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat__value {
  font-family: "AP Display", var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.1rem, 3.7vw, 3.3rem);
  line-height: 1;
  white-space: nowrap;
}

.stat__label {
  max-width: 24ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 30px;
  }

  .stat:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
}

/* ── Gallery and lightbox ─────────────────────────────────────────────── */

.gallery__rows {
  display: grid;
  gap: clamp(16px, 2vw, 26px);
}

.gallery__row {
  display: flex;
  gap: clamp(10px, 1.2vw, 16px);
}

.shot {
  flex-basis: 0;
  min-width: 0;
}

.shot--r218 {
  flex-grow: 2.18;
}

.shot--r120 {
  flex-grow: 1.2;
}

.shot--r178 {
  flex-grow: 1.778;
}

.shot__open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--panel);
  cursor: zoom-in;
}

.shot--r218 .shot__open {
  aspect-ratio: 2.18 / 1;
}

.shot--r120 .shot__open {
  aspect-ratio: 1.2 / 1;
}

.shot--r178 .shot__open {
  aspect-ratio: 16 / 9;
}

.shot__open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.shot__open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.shot__open:hover img {
  transform: scale(1.035);
}

.shot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .gallery__rows {
    display: flex;
    gap: 12px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .gallery__rows::-webkit-scrollbar {
    display: none;
  }

  .gallery__row {
    display: contents;
  }

  .shot {
    flex: 0 0 84%;
    scroll-snap-align: center;
  }

  .shot .shot__open {
    aspect-ratio: 16 / 10;
  }
}

.lightbox {
  width: min(96vw, 1680px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(6, 7, 9, 0.93);
}

.lightbox[open] {
  animation: fade-in 0.25s ease both;
}

.lightbox__img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #000;
}

.lightbox__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.lightbox__caption {
  flex: 1;
  color: var(--muted);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ── Physics ──────────────────────────────────────────────────────────── */

.physics__intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(30px, 5vw, 76px);
}

.physics__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.physics__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.physics__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(14, 16, 19, 0.5), transparent 38%);
  pointer-events: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(44px, 5vw, 68px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.card {
  padding: clamp(22px, 2.6vw, 36px);
  background: var(--bg);
  transition: background-color 0.25s;
}

.card:hover {
  background: #111418;
}

.card__figure {
  color: var(--orange);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.2vw, 2.05rem);
  line-height: 1.05;
}

.card__title {
  margin-top: 0.75rem;
  font-size: 1.12rem;
  font-weight: 650;
  line-height: 1.3;
}

.card__text {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.classes {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  align-items: start;
  gap: 24px;
  margin-top: clamp(44px, 5vw, 68px);
}

.classes__title {
  padding-top: 0.9rem;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.classes__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
}

.kclass {
  padding: 18px 18px 0 0;
}

.kclass + .kclass {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.kclass__power {
  font-family: "AP Display", var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1;
  white-space: nowrap;
}

.kclass__name {
  margin-top: 0.55rem;
  font-weight: 650;
}

.kclass__text {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 960px) {
  .physics__intro,
  .classes {
    grid-template-columns: 1fr;
  }

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

  .classes__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }

  .kclass:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* ── Weather ──────────────────────────────────────────────────────────── */

.weather__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: start;
  gap: clamp(30px, 5vw, 68px);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.5rem;
}

.tags li {
  padding: 0.38em 0.75em;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--text-2);
  font-size: 0.88rem;
}

.weather__puddle {
  margin-top: 2.2rem;
}

.weather__puddle img {
  width: 100%;
  aspect-ratio: 2.15 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.weather__puddle figcaption {
  margin-top: 10px;
  color: var(--faint);
  font-size: 0.88rem;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-raise);
}

.segmented__tab {
  min-height: 40px;
  padding: 0.5em 1.05em;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

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

.segmented__tab[aria-selected="true"] {
  background: var(--orange);
  color: var(--orange-ink);
}

.weather__frames {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--panel);
  aspect-ratio: 16 / 9;
}

.weather__frame {
  position: absolute;
  inset: 0;
  animation: fade-in 0.45s ease both;
}

.weather__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* ── Online ───────────────────────────────────────────────────────────── */

.online {
  background:
    radial-gradient(70% 55% at 100% 0%, rgba(255, 106, 26, 0.08), transparent 62%),
    var(--bg-raise);
}

.online__head {
  max-width: 820px;
}

.online__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(30px, 5vw, 72px);
  margin-top: clamp(36px, 4vw, 60px);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 32px;
}

.feature {
  position: relative;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
}

.feature::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--orange);
}

.feature__title {
  font-size: 1.07rem;
  font-weight: 650;
  line-height: 1.3;
}

.feature__text {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.online__visual {
  position: relative;
  padding-bottom: 72px;
}

.online__shot img {
  width: 100%;
  border-radius: var(--radius-lg);
}

.online__shot figcaption {
  margin-top: 10px;
  color: var(--faint);
  font-size: 0.88rem;
}

.lobby {
  position: absolute;
  left: -36px;
  bottom: 0;
  width: min(350px, 72%);
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: rgba(19, 22, 26, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  font-size: 0.88rem;
}

.lobby__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.lobby__title {
  font-family: var(--font-label);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lobby__meta {
  color: var(--faint);
  font-size: 0.8rem;
}

.lobby__code {
  display: grid;
  justify-items: end;
  color: var(--faint);
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: right;
}

.lobby__code strong {
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  letter-spacing: 0.14em;
}

.lobby__rows {
  display: grid;
  gap: 2px;
  margin-block: 10px;
}

.lobby__row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
}

.lobby__n {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.lobby__name em {
  margin-left: 4px;
  color: var(--orange);
  font-size: 0.72rem;
  font-style: normal;
}

.lobby__platform {
  color: var(--faint);
  font-size: 0.76rem;
}

.lobby__state {
  font-size: 0.76rem;
}

.lobby__row--ready .lobby__state {
  color: var(--ok);
}

.lobby__row--waiting .lobby__state {
  color: var(--muted);
}

.lobby__row--ai .lobby__name {
  color: var(--faint);
}

.lobby__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lobby__illustration {
  color: var(--faint);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lobby__start {
  padding: 0.45em 0.8em;
  border-radius: 4px;
  background: var(--orange);
  color: var(--orange-ink);
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.online__lan {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 4vw, 48px);
  color: var(--muted);
}

.online__lan .icon {
  color: var(--orange);
}

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

  .online__visual {
    padding-bottom: 0;
  }

  .lobby {
    position: relative;
    left: auto;
    width: min(100%, 380px);
    margin: -48px 12px 0 auto;
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }

  .lobby {
    margin: 16px 0 0;
  }
}

/* ── Track designer ───────────────────────────────────────────────────── */

.designer__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(30px, 5vw, 76px);
}

.designer__figure figcaption {
  margin-top: 12px;
  color: var(--faint);
  font-size: 0.88rem;
}

.designer__figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.features--compact {
  margin-top: 2rem;
}

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

  .designer__copy {
    order: -1;
  }
}

/* ── Platforms and controls ───────────────────────────────────────────── */

.platforms__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(30px, 5vw, 76px);
}

.controls {
  display: grid;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.control {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.control__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--orange);
}

.control__icon .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}

.control__title {
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.3;
}

.control__platform {
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--font-label);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.control__text {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.phone {
  margin: 0;
}

.phone__frame {
  padding: 13px;
  border-radius: 40px;
  background: linear-gradient(150deg, #2b2f36 0%, #0b0c0e 70%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.09),
    0 44px 90px rgba(0, 0, 0, 0.55);
  transform: rotate(-2.5deg);
}

.phone__frame img {
  width: 100%;
  aspect-ratio: 1266 / 585;
  object-fit: cover;
  border-radius: 28px;
}

.phone figcaption {
  margin-top: 30px;
  color: var(--faint);
  font-size: 0.9rem;
  text-align: center;
}

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

/* ── Beta ─────────────────────────────────────────────────────────────── */

.beta {
  background: linear-gradient(180deg, var(--bg) 0%, #111317 100%);
}

.beta__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(30px, 5vw, 76px);
}

.beta__copy {
  position: sticky;
  top: calc(var(--header-h) + 36px);
}

.perks {
  display: grid;
  gap: 13px;
  margin-top: 1.9rem;
}

.perks li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  color: var(--text-2);
}

.perks .icon {
  margin-top: 2px;
  color: var(--orange);
  stroke-width: 2.2;
}

.steps {
  display: grid;
  margin-top: 2.4rem;
  margin-left: 14px;
  border-left: 1px solid var(--line-2);
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 0 0 24px 30px;
}

.steps li:last-child {
  padding-bottom: 0;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -2px;
  left: -15px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--orange);
  border-radius: 50%;
  background: var(--bg);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.steps__title {
  font-size: 1.02rem;
  font-weight: 650;
}

.steps__text {
  color: var(--muted);
  font-size: 0.95rem;
}

.panel {
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

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

  .beta__copy {
    position: static;
  }
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(30px, 5vw, 76px);
}

.qa {
  border-top: 1px solid var(--line);
}

.qa:last-child {
  border-bottom: 1px solid var(--line);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 0;
  font-size: 1.1rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary:hover {
  color: var(--orange-hi);
}

.qa summary .icon {
  color: var(--orange);
  transition: transform 0.25s var(--ease);
}

.qa[open] summary .icon {
  transform: rotate(45deg);
}

.qa__answer {
  padding: 0 52px 22px 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .faq__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Closing call ─────────────────────────────────────────────────────── */

.final {
  padding-block: clamp(76px, 10vw, 136px);
  border-top: 1px solid var(--line);
  background: radial-gradient(55% 90% at 0% 100%, rgba(255, 106, 26, 0.13), transparent 70%);
}

.final__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  align-items: center;
  gap: 44px;
}

.final__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.7rem, 6.2vw, 5.6rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
}

:lang(ka) .final__title {
  font-size: clamp(2.1rem, 4.4vw, 3.8rem);
  line-height: 1.1;
}

.final__lead {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.18rem;
}

.final .btn {
  margin-top: 2rem;
}

.final__platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(19, 22, 26, 0.6);
}

.final__platforms li {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 20px;
}

.final__platforms li + li {
  border-left: 1px solid var(--line);
}

.final__platforms .icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.4;
}

.final__name {
  font-weight: 600;
}

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

@media (max-width: 520px) {
  .final__platforms {
    grid-template-columns: 1fr;
  }

  .final__platforms li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* Sections rise into place once, as they are reached. site.js adds .js to
   <html>; without it nothing is hidden. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* AP Karting — forms: the beta application and the contact form. */

.form {
  display: grid;
  gap: 20px;
}

.form__head {
  display: grid;
  gap: 6px;
}

.form__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  line-height: 1.05;
}

:lang(ka) .form__title {
  line-height: 1.25;
}

.form__note {
  color: var(--faint);
  font-size: 0.86rem;
}

/* A field for bots only: out of sight and out of the tab order. */
.form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 620px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > label,
.field > legend {
  padding: 0;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.field > legend {
  margin-bottom: 8px;
}

.req {
  margin-left: 3px;
  color: var(--orange);
}

.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}

.field select {
  padding-right: 40px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa59c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 18px;
  cursor: pointer;
}

.field select option {
  background: var(--panel);
  color: var(--text);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6d6a64;
}

.field input:not([type="checkbox"]):hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(242, 239, 233, 0.28);
}

.field input:not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--orange);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 106, 26, 0.22);
}

.field__hint {
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.4;
}

.field__error {
  color: var(--danger);
  font-size: 0.85rem;
  line-height: 1.4;
}

.field.is-invalid input:not([type="checkbox"]),
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
}

.field.is-invalid .chip span {
  border-color: rgba(255, 122, 122, 0.55);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  display: inline-flex;
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.2;
  user-select: none;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.chip span::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 11px;
}

.chip:hover span {
  color: var(--text);
  border-color: rgba(242, 239, 233, 0.3);
}

.chip input:checked + span {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--text);
}

.chip input:checked + span::before {
  border-color: var(--orange);
  background-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23140902' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.chip input:focus-visible + span {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  color: var(--text-2);
  font-size: 0.93rem;
  line-height: 1.5;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--orange);
  cursor: pointer;
}

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

.field--check.is-invalid .check {
  color: #ffd0d0;
}

.form__status {
  padding: 12px 14px;
  border: 1px solid rgba(255, 122, 122, 0.4);
  border-radius: var(--radius);
  background: rgba(255, 122, 122, 0.08);
  color: #ffd6d6;
  font-size: 0.93rem;
}

.form__status a {
  color: #fff;
}

.form__noscript {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-success {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding-block: 8px;
  animation: fade-in 0.4s ease both;
}

.form-success:focus {
  outline: none;
}

.form-success__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(79, 209, 139, 0.12);
  color: var(--ok);
}

.form-success__icon .icon {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}

.form-success__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.form-success__text {
  max-width: 46ch;
  color: var(--muted);
}

.form-success__text strong {
  color: var(--text);
  font-weight: 600;
}

/* AP Karting — contact, legal, root and not-found pages. */

.page {
  padding-top: calc(var(--header-h) + clamp(36px, 6vw, 76px));
}

.page > .section:first-child {
  padding-top: 0;
  border-top: 0;
}

.page-title {
  font-size: clamp(2.7rem, 6vw, 4.8rem);
}

/* ── Contact ──────────────────────────────────────────────────────────── */

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(30px, 5vw, 76px);
}

.contact__aside {
  display: grid;
  gap: 24px;
  margin-top: 2.4rem;
}

.aside-card {
  padding-left: 18px;
  border-left: 2px solid var(--orange);
}

.aside-card__title {
  font-size: 1.06rem;
  font-weight: 650;
}

.aside-card p {
  margin-top: 0.35rem;
  color: var(--muted);
}

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

/* ── Legal ────────────────────────────────────────────────────────────── */

.legal {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  align-items: start;
  gap: clamp(30px, 5vw, 76px);
  padding-bottom: clamp(76px, 9vw, 128px);
}

.legal__aside {
  position: sticky;
  top: calc(var(--header-h) + 26px);
  max-height: calc(100vh - var(--header-h) - 52px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.legal__toc-title {
  color: var(--faint);
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal__toc ol {
  display: grid;
  gap: 1px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.legal__toc ol a {
  display: block;
  padding: 6px 12px;
  border-left: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
}

.legal__toc ol a:hover,
.legal__toc ol a.is-active {
  border-left-color: var(--orange);
  color: var(--text);
}

.legal__toc-other {
  margin-top: 22px;
  font-size: 0.92rem;
}

.legal__doc {
  max-width: 78ch;
}

/* A document without a table of contents beside it. */
.legal--single {
  display: block;
}

.legal__title {
  margin-top: 0.4em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
}

:lang(ka) .legal__title {
  line-height: 1.2;
}

.legal__meta {
  margin-top: 1rem;
  color: var(--faint);
  font-size: 0.92rem;
}

.legal__note {
  margin-top: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
}

.legal__intro {
  margin-top: 2rem;
}

.legal__section {
  padding-top: 2.6rem;
}

.legal__doc h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
}

.legal__doc h3 {
  margin-top: 1.6rem;
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.35;
}

.legal__doc p,
.legal__doc ul,
.legal__doc ol,
.legal__doc dl {
  margin-top: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
}

.legal__doc ul,
.legal__doc ol {
  padding-left: 1.35em;
}

.legal__doc li + li {
  margin-top: 0.45rem;
}

.legal__doc strong {
  color: var(--text);
  font-weight: 650;
}

.legal__doc a {
  overflow-wrap: anywhere;
}

.legal__summary {
  padding: 20px 24px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.legal__summary > :first-child {
  margin-top: 0;
}

.legal__identity {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 22px;
}

.legal__identity dt {
  color: var(--faint);
}

.legal__identity dd {
  color: var(--text);
}

.table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal__doc table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.5;
}

.legal__doc th,
.legal__doc td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  text-align: left;
  vertical-align: top;
}

.legal__doc tr:last-child td {
  border-bottom: 0;
}

.legal__doc th {
  background: var(--bg-raise);
  color: var(--text);
  font-weight: 650;
}

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

  .legal__aside {
    position: static;
    max-height: none;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 560px) {
  .legal__identity {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .legal__identity dd + dt {
    margin-top: 10px;
  }
}

/* ── Root language chooser and not-found ──────────────────────────────── */

.page-root {
  display: grid;
  min-height: 100svh;
  place-items: center;
  background: radial-gradient(60% 60% at 50% 40%, #1f2228 0%, var(--bg) 70%);
}

.root {
  padding: 48px 20px;
  text-align: center;
}

.root__brand {
  font-size: 1rem;
}

.root__langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
  margin-top: 36px;
}

.root__langs .btn {
  text-transform: none;
  letter-spacing: 0;
}

.notfound {
  min-height: 50vh;
}

.notfound__actions {
  margin-top: 2rem;
}

@media print {
  .site-header,
  .site-footer,
  .legal__aside,
  .skip {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page {
    padding-top: 0;
  }

  .legal {
    display: block;
  }

  .legal__doc,
  .legal__doc p,
  .legal__doc li,
  .legal__doc td,
  .legal__doc th,
  .legal__doc strong,
  .legal__identity dd,
  .legal__title {
    color: #000 !important;
  }
}

