/* Onym design tokens (from _ds_bundle.css). Theme follows the system. */
:root {
  color-scheme: light dark;
  --on-bg: #ffffff;
  --on-surface: #f5f5f7;
  --on-surface2: #ffffff;
  --on-surface3: #ebebef;
  --on-text: #0a0a0c;
  --on-text2: rgba(10, 10, 12, 0.62);
  --on-text3: rgba(10, 10, 12, 0.42);
  --on-hairline: rgba(0, 0, 0, 0.06);
  --on-hairline-strong: rgba(0, 0, 0, 0.12);
  --on-blue: #1f86e0;
  --on-on-accent: #ffffff;
  --on-accent-orange: #e85f2a;
  --on-glass: rgba(255, 255, 255, 0.58);
  --on-glass-bd: rgba(255, 255, 255, 0.6);
  --on-glass-hi: rgba(255, 255, 255, 0.9);
  --on-glass-shadow: 0 10px 32px -6px rgba(24, 24, 40, 0.22);
  --on-font: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", sans-serif;
  --on-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --un-rounded: ui-rounded, "SF Pro Rounded", Nunito, system-ui, sans-serif;
  --un-ring: 0 0 0 3px var(--on-surface), 0 0 0 6px var(--on-blue);
}
@media (prefers-color-scheme: dark) {
  :root {
    --on-bg: #000000;
    --on-surface: #0e0e10;
    --on-surface2: #17171a;
    --on-surface3: #1f1f23;
    --on-text: #f2f2f4;
    --on-text2: rgba(242, 242, 244, 0.62);
    --on-text3: rgba(242, 242, 244, 0.4);
    --on-hairline: rgba(255, 255, 255, 0.07);
    --on-hairline-strong: rgba(255, 255, 255, 0.12);
    --on-blue: #3fa8ff;
    --on-on-accent: #000000;
    --on-accent-orange: #ff7a45;
    --on-glass: rgba(58, 58, 62, 0.48);
    --on-glass-bd: rgba(255, 255, 255, 0.13);
    --on-glass-hi: rgba(255, 255, 255, 0.12);
    --on-glass-shadow: 0 12px 34px -8px rgba(0, 0, 0, 0.65);
  }
}

/* Self-hosted so the site makes no third-party requests (SIL Open Font License). */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/nunito-900-latin.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--on-surface);
  color: var(--on-text);
  font: 16px/1.35 var(--on-font);
  -webkit-font-smoothing: antialiased;
}

.on-glass {
  background: var(--on-glass);
  border: 0.5px solid var(--on-glass-bd);
  box-shadow: var(--on-glass-shadow), inset 0 1px 0 var(--on-glass-hi);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
}

.un-site { container-type: inline-size; width: 100%; }
.un-site a { color: var(--on-blue); text-underline-offset: 3px; }
.un-site a:hover { text-decoration: underline; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3.4cqw, 32px);
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}
.un-site a.wordmark {
  font: 900 34px/1 var(--un-rounded);
  letter-spacing: -1.2px;
  color: var(--on-accent-orange);
  text-decoration: none;
}
.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--on-surface3);
}
.lang button {
  min-width: 52px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  font: 600 15px var(--on-font);
  cursor: pointer;
  background: transparent;
  color: var(--on-text2);
}
.lang button[aria-checked="true"] {
  background: var(--on-surface2);
  color: var(--on-text);
  box-shadow: 0 0 0 0.5px var(--on-hairline-strong);
}
.lang button:focus-visible { outline: 2px solid var(--on-blue); outline-offset: 2px; }

/* Hero */
.hero {
  padding: clamp(56px, 8cqw, 112px) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 1.8cqw, 24px);
  text-align: center;
}
.hero h1 {
  margin: 0;
  font: 700 clamp(46px, 8cqw, 108px)/1 var(--on-font);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero p {
  margin: 0;
  max-width: 34em;
  font: 400 clamp(18px, 1.6cqw, 22px)/1.45 var(--on-font);
  color: var(--on-text2);
  text-wrap: pretty;
}

/* Video still */
.video {
  margin: clamp(40px, 5cqw, 72px) 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.still {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: #c48a52;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 28px 56px -28px rgba(20, 12, 4, .35);
}
.planks { position: absolute; inset: 0; display: flex; flex-direction: column; }
.planks i { flex: 1; border-bottom: 2px solid #a8703d; }
.planks i:nth-child(1) { background: #c48a52; }
.planks i:nth-child(2) { background: #bd8249; }
.planks i:nth-child(3) { background: #c99158; }
.planks i:nth-child(4) { background: #c28750; }
.planks i:nth-child(5) { background: #c68d55; border-bottom: 0; }

.toy { position: absolute; }
.toy-body { position: absolute; inset: 13%; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .14), 0 18px 22px -10px rgba(50, 25, 0, .55); }
.toy-frame {
  position: absolute; inset: 0; border-radius: 18px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .45), inset 0 0 0 1.5px rgba(0, 0, 0, .3);
}
.toy-num {
  position: absolute; left: -14px; top: -14px;
  width: clamp(30px, 4.2cqw, 56px); aspect-ratio: 1;
  border-radius: 50%;
  background: #fff; color: #0a0a0c;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .55), 0 6px 14px rgba(0, 0, 0, .3);
  display: flex; align-items: center; justify-content: center;
  font: 900 clamp(16px, 2.3cqw, 30px)/1 var(--un-rounded);
}
.toy-1 { left: 14%; top: 22%; width: 18%; aspect-ratio: 5 / 4; }
.toy-1 .toy-body { border-radius: 26%; background: #d8402f; }
.toy-2 { left: 31%; top: 60%; width: 13%; aspect-ratio: 1; }
.toy-2 .toy-body { border-radius: 50%; background: #f2bf2a; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .1), 0 18px 22px -10px rgba(50, 25, 0, .55); }
.toy-3 { left: 71%; top: 30%; width: 11%; aspect-ratio: 4 / 5; }
.toy-3 .toy-body { border-radius: 38%; background: #3a6cd0; }

.play {
  position: absolute; left: 50%; top: 50%;
  width: clamp(64px, 7cqw, 96px); aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  color: #0a0a0c; cursor: pointer; padding: 0;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.play:hover { transform: translate(-50%, -50%) scale(1.06); }
.play:focus-visible { outline: 3px solid var(--on-blue); outline-offset: 4px; }
.play svg { width: 38%; height: 38%; margin-left: 7%; }

.video figcaption {
  font-size: 15px; line-height: 1.4;
  color: var(--on-text2);
  text-align: center;
  text-wrap: pretty;
}

/* CTA */
.cta {
  margin-top: clamp(44px, 5cqw, 64px);
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; text-align: center;
  scroll-margin-top: 24px;
}
.un-site a.cta-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 30px;
  border-radius: 999px;
  background: var(--on-blue); color: var(--on-on-accent);
  font: 600 17px/1.2 var(--on-font);
  text-decoration: none;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.un-site a.cta-button:hover { background: color-mix(in srgb, var(--on-blue) 84%, #000); text-decoration: none; }
.un-site a.cta-button:focus-visible { outline: none; box-shadow: var(--un-ring); }
.un-site a.cta-button:active { transform: scale(.97); background: color-mix(in srgb, var(--on-blue) 84%, #000); }
.cta-button svg { margin-top: -3px; flex: none; }
.cta-note { font-size: 15px; color: var(--on-text2); }

/* Platforms */
.platforms {
  margin-top: clamp(64px, 7.5cqw, 104px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.tile {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 28px; min-height: 150px; padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--on-hairline-strong);
  color: var(--on-text2);
}
.tile svg { color: var(--on-text3); }
.tile-label { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tile-name { font: 600 17px/1.25 var(--on-font); }
.tile-badge {
  padding: 4px 10px; border-radius: 999px;
  background: var(--on-surface3); color: var(--on-text2);
  font: 600 12.5px/1.2 var(--on-font);
}
.un-site a.tile-active {
  background: var(--on-surface2);
  color: var(--on-text);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tile-active svg { color: var(--on-blue); }
.tile-active .tile-badge { background: var(--on-blue); color: var(--on-on-accent); }
.un-site a.tile-active:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .3);
  border-color: color-mix(in srgb, var(--on-blue) 45%, transparent);
  text-decoration: none;
}
.un-site a.tile-active:focus-visible { outline: none; box-shadow: var(--un-ring); }

/* Team */
.team {
  margin-top: clamp(72px, 8cqw, 112px);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(24px, 3cqw, 36px);
}
.team h2 {
  margin: 0;
  font: 500 12.5px/1.2 var(--on-font);
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--on-text2);
}
.people {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 28px clamp(28px, 5cqw, 64px);
}
.people li {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font: 600 15px/1.3 var(--on-font);
  text-align: center;
}
.avatar {
  width: clamp(104px, 12cqw, 136px); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
  background: var(--on-surface3);
  box-shadow: 0 0 0 1px var(--on-hairline-strong);
}
.avatar video, .avatar img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
/* The source clip has its own circle mask baked in; zoom past its edge. */
.avatar video { transform: scale(1.08); }

/* Footer */
.footer {
  margin-top: clamp(72px, 8cqw, 112px);
  padding: 24px 0 40px;
  border-top: 1px solid var(--on-hairline-strong);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 10px 24px;
  font-size: 14px; line-height: 1.5;
  color: var(--on-text2);
}
.footer span:first-child { text-wrap: pretty; }

@media (prefers-reduced-motion: reduce) {
  .un-site * { transition: none !important; }
}

.avatar.has-sound { cursor: pointer; transition: box-shadow .2s ease; }
.avatar.has-sound[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--on-blue); }
.avatar.has-sound:focus-visible { outline: none; box-shadow: var(--un-ring); }

/* Text pages (privacy) */
html[lang="ru"] [data-lang-block="en"],
html:not([lang="ru"]) [data-lang-block="ru"] { display: none; }
.doc {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(40px, 6cqw, 80px) 0 0;
  font: 400 17px/1.6 var(--on-font);
  color: var(--on-text);
}
.doc h1 {
  margin: 0 0 8px;
  font: 700 clamp(34px, 5cqw, 48px)/1.1 var(--on-font);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.doc .updated { margin: 0 0 32px; font-size: 15px; color: var(--on-text2); }
.doc .lead {
  margin: 0 0 8px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--on-surface2);
  border: 1px solid var(--on-hairline-strong);
  font-size: 18px;
  text-wrap: pretty;
}
.doc h2 { margin: 40px 0 10px; font: 600 21px/1.3 var(--on-font); letter-spacing: -0.01em; }
.doc h3 { margin: 24px 0 6px; font: 600 17px/1.4 var(--on-font); }
.doc p, .doc ul { margin: 0 0 14px; text-wrap: pretty; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--on-text3); }
.doc strong { font-weight: 600; }

/* Easter egg: hover Rinat's name. Both spellings share one grid cell, so the
   wider one sets the width and nothing shifts when they swap. */
.egg { display: inline-grid; cursor: default; }
.egg > span { grid-area: 1 / 1; transition: opacity .15s ease; }
.egg .egg-alt { opacity: 0; }
.egg:hover > span:first-child { opacity: 0; }
.egg:hover .egg-alt { opacity: 1; }

/* macOS alpha: a live download, but marked as rougher than the TestFlight build. */
.tile-note { display: block; margin-top: 2px; font: 400 13px/1.3 var(--on-font); color: var(--on-text2); }
.tile-alpha .tile-badge {
  background: color-mix(in srgb, var(--on-blue) 14%, transparent);
  color: var(--on-blue);
}

/* A line under a team member's name; pulled up to sit with the name. */
.people .role { margin-top: -10px; font: 400 13px/1.3 var(--on-font); color: var(--on-text2); }
