/* Airsoft Group — site styles. Design: Figma "ASG — Landing (Desktop 1440)". */

/* Subset WOFF2 (Latin + Uzbek; Onest adds Cyrillic). Bricolage is pinned to wdth 100 / opsz 48 to stay small. */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/BricolageGrotesque.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
/* Neither family has Cyrillic: the Russian page uses Onest for everything. */
@font-face { font-family: "Onest"; src: url("../fonts/Onest.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #F3EEE8;
  --panel: #FFFFFF;
  --ink: #2B2621;
  --on-ink: #F3EEE8;
  --text: #2B2621;
  --soft: #6F6659;
  --line: #E2D9CE;
  --art: #2B2621;
  --band: #2B2621;
  --green: #7FB8A4;
  --yellow: #E8C468;
  --terra: #E09A78;
  --lilac: #9C8FE8;
  --blob-alpha: 0.42;
  --ghost: rgba(43, 38, 33, 0.05);
  --nav-bg: rgba(243, 238, 232, 0.72);

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 120px;
  --logo-ring: none;
  --art-border: transparent;
  color-scheme: light;
}
/* Dark: follows the system unless the visitor picked a theme with the toggle (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141110;
    --panel: #1F1B18;
    --ink: #F0E9DF;
    --on-ink: #141110;
    --text: #F0E9DF;
    --soft: #A89C8E;
    --line: #3A332C;
    --art: #221D19;
    --band: #221D19;
    --blob-alpha: 0.22;
    --ghost: rgba(240, 233, 223, 0.04);
    --nav-bg: rgba(20, 17, 16, 0.7);
    --logo-ring: 0 0 0 1px rgba(240, 233, 223, .22);
    --art-border: var(--line);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141110;
  --panel: #1F1B18;
  --ink: #F0E9DF;
  --on-ink: #141110;
  --text: #F0E9DF;
  --soft: #A89C8E;
  --line: #3A332C;
  --art: #221D19;
  --band: #221D19;
  --blob-alpha: 0.22;
  --ghost: rgba(240, 233, 223, 0.04);
  --nav-bg: rgba(20, 17, 16, 0.7);
  --logo-ring: 0 0 0 1px rgba(240, 233, 223, .22);
  --art-border: var(--line);
  color-scheme: dark;
}
html[lang="ru"] { --display: "Onest", system-ui, sans-serif; --body: "Onest", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; border-radius: 8px; }

/* ---------- moving background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; opacity: var(--blob-alpha);
  background: radial-gradient(circle at center, var(--c) 0%, transparent 68%);
  will-change: transform;
  animation: drift var(--t, 26s) ease-in-out infinite alternate;
}
.b1 { --c: var(--terra);  width: 760px; height: 760px; top: -260px; right: -180px; --t: 24s; }
.b2 { --c: var(--green);  width: 680px; height: 680px; top: 160px; left: -260px; --t: 28s; animation-delay: -6s; }
.b3 { --c: var(--lilac);  width: 600px; height: 600px; top: 46%; left: 30%; --t: 32s; animation-delay: -12s; }
.b4 { --c: var(--yellow); width: 560px; height: 560px; bottom: -160px; right: 4%; --t: 30s; animation-delay: -3s; }
.b5 { --c: var(--green);  width: 520px; height: 520px; bottom: -220px; left: -120px; --t: 34s; animation-delay: -18s; }
.b6 { --c: var(--terra);  width: 420px; height: 420px; top: 30%; right: 18%; --t: 22s; animation-delay: -9s; opacity: calc(var(--blob-alpha) * 0.6); }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(90px, 60px, 0) scale(1.08); }
  66%  { transform: translate3d(-70px, 110px, 0) scale(0.94); }
  100% { transform: translate3d(40px, -80px, 0) scale(1.04); }
}
.ghost { position: absolute; fill: none; stroke: var(--ghost); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; animation: sway 18s ease-in-out infinite alternate; }
.g1 { width: 900px; left: -180px; top: 55%; }
.g2 { width: 560px; right: -120px; top: 12%; animation-duration: 22s; animation-direction: alternate-reverse; }
@keyframes sway { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-40px) rotate(3deg); } }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: var(--nav-bg); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font: 700 20px/1.2 var(--display); letter-spacing: -0.01em; }
.brand-text small { font-size: 13px; font-weight: 500; color: var(--soft); }
.links { display: flex; gap: 36px; font-weight: 500; }
.links a { position: relative; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.links a:hover::after { transform: scaleX(1); }
.langs { display: flex; gap: 6px; }
.langs a {
  font: 600 13px/1 var(--body); letter-spacing: .03em; padding: 8px 14px; border-radius: 999px;
  color: var(--soft); border: 1px solid var(--line);
}
.langs a:hover { color: var(--text); }
.langs a[aria-current="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
/* The ink logo would sink into the dark page: give it a hairline ring. */
.brand img { border-radius: 12px; }
.brand img { box-shadow: var(--logo-ring); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 520px; gap: 64px; align-items: center; padding-top: 72px; padding-bottom: 96px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--soft); font-size: 14px; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.hero h1 { margin-top: 28px; font-size: clamp(44px, 5.6vw, 76px); line-height: 1; letter-spacing: -0.03em; font-weight: 700; }
.hero h1 span { display: block; }
.lead { margin-top: 28px; max-width: 560px; font-size: 20px; line-height: 1.5; color: var(--soft); }
.ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px; font-weight: 600; font-size: 17px; line-height: 1; transition: transform .15s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { box-shadow: 0 10px 24px -10px rgba(43, 38, 33, .45); }
.btn-secondary { border: 1.5px solid var(--ink); }
.btn-light { background: #F3EEE8; color: #2B2621; padding: 18px 28px; white-space: nowrap; }

.hero-art { position: relative; aspect-ratio: 1; border-radius: 48px; background: var(--art); overflow: hidden; isolation: isolate; }
.hero-art { border: 1px solid var(--art-border); }
.hero-art::before { content: ""; position: absolute; inset: 8% 10% 12%; border-radius: 50%; background: radial-gradient(circle, rgba(224, 154, 120, .32), transparent 65%); z-index: -1; animation: glow 9s ease-in-out infinite alternate; }
@keyframes glow { from { transform: scale(.92); opacity: .8; } to { transform: scale(1.06); opacity: 1; } }
.hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flight path { fill: none; stroke: rgba(243, 238, 232, .3); stroke-width: 2.5; stroke-dasharray: 2 12; stroke-linecap: round; animation: dash 30s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -280; } }
.peak path { fill: none; stroke: #F3EEE8; stroke-width: 44; stroke-linecap: round; stroke-linejoin: round; }
.sg { position: absolute; left: 0; right: 0; bottom: 9%; text-align: center; font: 800 clamp(40px, 6.6vw, 72px)/1 "Bricolage Grotesque", sans-serif; letter-spacing: .1em; color: var(--terra); }
.pill { position: absolute; top: 5.4%; left: 5.4%; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 14px; border-radius: 999px; background: rgba(243, 238, 232, .1); color: #F3EEE8; font-size: 13px; font-weight: 600; }
.chip {
  position: absolute; display: grid; place-items: center; overflow: hidden; border-radius: 26%;
  font: 800 clamp(20px, 2.6vw, 27px)/1 "Bricolage Grotesque", sans-serif; color: #2B2621;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  animation: bob 6s ease-in-out infinite alternate; transition: scale .2s ease;
}
.chip:hover { scale: 1.08; }
.chip img { width: 100%; height: 100%; object-fit: cover; }
.c-blk   { --r: -6deg; width: 16%; left: 21.5%; top: 21.5%; }
.c-subs  { --r: 7deg;  width: 17.7%; left: 61%; top: 13.5%; animation-delay: -2s; }
.c-unjam { --r: -8deg; width: 12.3%; left: 8.8%; top: 55%; background: var(--terra); animation-delay: -4s; }
.c-port  { --r: 9deg;  width: 12.3%; left: 80.8%; top: 45.4%; background: var(--yellow); animation-delay: -1s; }
.chip { aspect-ratio: 1; rotate: var(--r); }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -10px; } }

/* ---------- facts ---------- */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.facts li { padding: 28px 32px; display: flex; flex-direction: column; gap: 4px; }
.facts li + li { border-left: 1px solid var(--line); }
.facts b { font: 700 44px/1.1 var(--display); letter-spacing: -0.04em; }
.facts span { color: var(--soft); font-size: 15px; font-weight: 500; }

/* ---------- sections ---------- */
.section { padding-top: 96px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.section h2 { margin-top: 12px; font-size: clamp(36px, 4vw, 52px); line-height: 1.1; font-weight: 700; }
.sub { margin-top: 12px; max-width: 640px; font-size: 19px; line-height: 1.5; color: var(--soft); }

.grid { margin-top: 40px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 20px; transition: transform .2s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(43, 38, 33, .35); }
.card-top { display: flex; align-items: center; gap: 16px; }
.card h3 { font-size: 28px; letter-spacing: -0.03em; font-weight: 700; line-height: 1.15; }
.icon { width: 64px; height: 64px; border-radius: 18px; flex: none; }
.letter { display: grid; place-items: center; font: 800 28px/1 "Bricolage Grotesque", sans-serif; color: #2B2621; }
.letter.terra { background: var(--terra); }
.letter.yellow { background: var(--yellow); }
.card > p { color: var(--soft); line-height: 1.5; }
.card-links { display: flex; gap: 20px; font-size: 15px; font-weight: 500; color: var(--soft); margin-top: auto; }
.card-links a:hover { color: var(--text); }
.card-links .more { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tag { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.4; }
.tag.live { background: var(--green); color: #2B2621; }
.tag.soon { background: var(--line); color: var(--soft); }

.principles { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.principle { border-top: 2px solid var(--text); padding-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.principle h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.principle p { color: var(--soft); line-height: 1.5; }
.sq { width: 20px; height: 20px; border-radius: 6px; }
.sq.green { background: var(--green); } .sq.lilac { background: var(--lilac); } .sq.terra { background: var(--terra); }

.band { margin-top: 24px; background: var(--band); color: #F3EEE8; border-radius: 40px; padding: 64px; display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.band h2 { margin: 0; max-width: 640px; font-size: clamp(30px, 3.4vw, 44px); }
.band p { margin-top: 14px; color: #B9AEA1; font-size: 19px; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 72px; padding-bottom: 56px; color: var(--soft); font-size: 15px; font-weight: 500; }
.brand.small { gap: 12px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a:hover { color: var(--text); }

/* ---------- entrance ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 48px; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-art { max-width: 520px; width: 100%; justify-self: center; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .nav-row { height: 72px; }
  .links { display: none; }
  .brand-text small { display: none; }
  .langs a { padding: 7px 10px; }
  .hero { gap: 40px; padding-bottom: 56px; }
  .lead { font-size: 18px; }
  .hero-art { border-radius: 32px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts li { padding: 20px; }
  .facts li + li { border-left: 0; }
  .facts li:nth-child(even) { border-left: 1px solid var(--line); }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts b { font-size: 36px; }
  .section { padding-top: 72px; }
  .grid, .principles { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .band { flex-direction: column; align-items: flex-start; padding: 32px 24px; border-radius: 28px; gap: 28px; }
  .btn-light { font-size: 15px; padding: 16px 20px; max-width: 100%; }
  .btn-light span { display: none; }
  .footer { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .ghost, .chip, .flight path, .hero-art::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =====================================================================
   Inner pages: project pages, legal documents, 404
   ===================================================================== */

.crumb { display: inline-flex; gap: 6px; margin-top: 16px; color: var(--soft); font-size: 15px; font-weight: 600; }
.crumb:hover { color: var(--text); }
.links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- project header ---------- */
.p-head { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; padding-top: 40px; }
.p-id { display: flex; align-items: center; gap: 24px; }
.p-icon { width: 112px; height: 112px; border-radius: 28px; flex: none; box-shadow: 0 14px 30px -18px rgba(43, 38, 33, .5); }
.p-icon.letter { font-size: 52px; }
.p-id h1 { font-size: clamp(44px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 700; }
.p-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; color: var(--soft); font-size: 15px; font-weight: 500; }
.p-meta .tag { margin-top: 0; }
.tagline { margin-top: 28px; max-width: 700px; font: 500 clamp(21px, 2vw, 26px)/1.3 var(--display); letter-spacing: -0.02em; }
.stores { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 12px 24px 12px 20px; border-radius: 16px; line-height: 1.2; transition: transform .15s ease; }
.store:hover { transform: translateY(-1px); }
.store small { display: block; font-size: 12px; font-weight: 500; opacity: .75; }
.store strong { display: block; font-size: 18px; font-weight: 700; }
.store svg { width: 28px; height: 28px; flex: none; }
.store.live { background: var(--ink); color: var(--on-ink); }
.store.soon { border: 1.5px solid var(--line); color: var(--soft); cursor: default; }
.store.soon:hover { transform: none; }
/* Official Google Play badge: the artwork carries its own transparent margin, offset so it lines up. */
.badge { display: inline-block; margin: -9px -10px; transition: transform .15s ease; }
.badge:hover { transform: translateY(-1px); }
.badge img { height: 74px; width: auto; }

.info { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 12px 28px; margin: 0; }
.info div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-size: 15px; }
.info div + div { border-top: 1px solid var(--line); }
.info dt { color: var(--soft); font-weight: 500; }
.info dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- screenshots ---------- */
.shots { margin-top: 28px; display: flex; gap: 24px; justify-content: space-between; padding: 40px 36px; border-radius: 32px; background: color-mix(in srgb, var(--accent, var(--lilac)) 22%, transparent); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots img, .shots .ph { width: 164px; aspect-ratio: 9 / 16; height: auto; border-radius: 20px; flex: none; scroll-snap-align: center; box-shadow: 0 12px 28px rgba(43, 38, 33, .12); background: var(--panel); object-fit: cover; }
.shots.few { justify-content: center; gap: 32px; }
.shots .ph { display: grid; place-items: center; background: color-mix(in srgb, var(--panel) 55%, transparent); border: 1.5px dashed color-mix(in srgb, var(--text) 18%, transparent); box-shadow: none; color: var(--soft); font-size: 15px; font-weight: 600; }

/* ---------- about + features ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-top: 72px; }
.about .copy { display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.6; }
.about .copy strong { font-weight: 600; }
.feat { display: flex; flex-direction: column; gap: 24px; }
.feat ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feat li { display: flex; gap: 12px; align-items: baseline; font-size: 17px; line-height: 1.5; }
.feat li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent, var(--green)); flex: none; transform: translateY(1px); }
.feat .premium li::before { background: var(--lilac); }

/* ---------- link cards (legal / support) ---------- */
.lcards { margin-top: 72px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.lcard { display: flex; align-items: center; gap: 16px; padding: 26px 28px; transition: background .2s ease; }
.lcard + .lcard { border-left: 1px solid var(--line); }
a.lcard:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.lcard span { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lcard b { font: 700 19px/1.25 var(--display); }
.lcard small { color: var(--soft); font-size: 14px; overflow-wrap: anywhere; }
.lcard i { font-style: normal; font-size: 20px; font-weight: 600; }

/* ---------- legal documents ---------- */
.d-head { padding-top: 40px; padding-bottom: 48px; }
.d-app { display: flex; align-items: center; gap: 12px; font: 700 18px/1 var(--display); }
.d-app img { width: 40px; height: 40px; border-radius: 11px; }
.d-head h1 { margin-top: 18px; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 700; }
.d-date { margin-top: 18px; color: var(--soft); font-size: 15px; font-weight: 500; }
.d-body { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 120px; padding-top: 8px; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; }
.toc a { display: block; padding: 8px 0 8px 14px; border-left: 2px solid var(--line); color: var(--soft); font-size: 15px; font-weight: 500; line-height: 1.4; transition: color .2s ease, border-color .2s ease; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); border-color: var(--text); font-weight: 600; }
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 56px; font-size: 17px; line-height: 1.65; color: color-mix(in srgb, var(--text) 88%, var(--soft)); min-width: 0; }
.doc article > p:first-child { background: color-mix(in srgb, var(--accent, var(--lilac)) 14%, transparent); border-radius: 18px; padding: 20px 24px; color: var(--text); }
.doc h2 { margin: 40px 0 14px; font-size: 26px; line-height: 1.25; letter-spacing: -0.03em; font-weight: 700; color: var(--text); scroll-margin-top: 110px; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 0; list-style: none; }
.doc li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.doc li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent, var(--lilac)); }
.doc a { text-decoration: underline; text-underline-offset: 3px; }
.doc code { font-size: .9em; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--text) 7%, transparent); overflow-wrap: anywhere; }

/* ---------- 404 ---------- */
.nf { min-height: calc(100vh - 100px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; padding-bottom: 80px; }
.nf svg { width: 200px; height: 140px; }
.nf svg path { fill: none; stroke: var(--text); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.nf svg circle { fill: var(--terra); animation: bob 3s ease-in-out infinite alternate; }
.nf .code { color: var(--text); font: 800 clamp(84px, 12vw, 120px)/1 var(--display); letter-spacing: -0.04em; }
.nf h1 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; }
.nf p { color: var(--soft); font-size: 18px; max-width: 520px; }

@media (max-width: 1100px) {
  .p-head { grid-template-columns: 1fr; }
  .info { max-width: 520px; }
  .shots { justify-content: flex-start; }
  .d-body { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 760px) {
  .p-id { gap: 16px; }
  .p-icon { width: 80px; height: 80px; border-radius: 20px; }
  .p-icon.letter { font-size: 38px; }
  .shots { padding: 24px 16px; gap: 14px; border-radius: 24px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; }
  .shots img, .shots .ph { width: 150px; }
  .about { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
  .lcards { grid-auto-flow: row; margin-top: 56px; }
  .lcard + .lcard { border-left: 0; border-top: 1px solid var(--line); }
  .doc { padding: 28px 20px; border-radius: 22px; }
  .doc h2 { font-size: 22px; }
  .info { padding: 6px 20px; }
}

/* Whole app card is the link (the title's link stretches over it); the Google Play link stays on top. */
.card { position: relative; cursor: pointer; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 3px solid var(--terra); outline-offset: 3px; }
.card-links a { position: relative; z-index: 1; }

/* ---------- press kit ---------- */
.press { display: flex; flex-direction: column; gap: 64px; }
.press-block h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; margin-bottom: 20px; }
.press-block > .info { max-width: 640px; margin-top: 20px; }
.press-block .info a { text-decoration: underline; text-underline-offset: 3px; }
.copybox { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px; max-width: 820px; }
.copybox + .copybox { margin-top: 12px; }
.copybox p:last-child { margin-top: 8px; font-size: 17px; line-height: 1.6; }
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.asset { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.asset-art { display: grid; place-items: center; height: 200px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.asset-art.light { background: #F3EEE8; }
.asset-art.dark { background: #2B2621; }
.asset-art img { width: 120px; height: 120px; border-radius: 28px; }
.asset figcaption { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; font-size: 15px; }
.asset figcaption span { color: var(--soft); }
.asset figcaption a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.note { margin-top: 16px; color: var(--soft); font-size: 15px; }
.swatches, .fonts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.swatches li, .fonts li { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.swatches span { height: 84px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; }
.swatches code { color: var(--soft); font-size: 14px; }
.fonts { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.fonts .sample { font-size: 56px; line-height: 1.1; margin-bottom: 6px; }
.fonts .display { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; }
.fonts .body { font-family: "Figtree", sans-serif; }
.fonts .cyr { font-family: "Onest", sans-serif; font-weight: 600; }
.fonts small { color: var(--soft); }

/* Per-page accent and other values that would otherwise be inline styles (the CSP allows only this file). */
.accent-lilac { --accent: var(--lilac); } .accent-green { --accent: var(--green); }
.accent-terra { --accent: var(--terra); } .accent-yellow { --accent: var(--yellow); }
.section.tight { padding-top: 56px; }
.sw-ink { background: #2B2621; } .sw-cream { background: #F3EEE8; } .sw-terra { background: #E09A78; }
.sw-green { background: #7FB8A4; } .sw-yellow { background: #E8C468; } .sw-lilac { background: #9C8FE8; }

/* Contact band: email + Telegram */
.band-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.btn-tg { justify-content: center; border: 1.5px solid rgba(243, 238, 232, .35); color: #F3EEE8; padding: 16px 28px; }
.btn-tg:hover { border-color: #F3EEE8; }
.btn-tg .tg { width: 20px; height: 20px; }
@media (max-width: 760px) { .band-actions { width: 100%; } .btn-tg { font-size: 15px; padding: 14px 20px; } }

/* Theme toggle (light / dark), next to the language switch */
.nav-tools { display: flex; align-items: center; gap: 10px; }
.theme-toggle { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--soft); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .moon { display: none; } }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (max-width: 760px) { .nav-tools { gap: 6px; } .theme-toggle { width: 32px; height: 32px; } }

/* Theme switch: the new theme is revealed by a circle growing from the toggle (animated in site.js). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.theme-toggle svg { transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.theme-toggle:active svg { transform: rotate(-30deg) scale(.9); }
/* While the theme circle grows, freeze the decorative motion so the live snapshot is cheap to repaint. */
.theme-switching .blob, .theme-switching .ghost, .theme-switching .chip,
.theme-switching .flight path, .theme-switching .hero-art::before { animation-play-state: paused; }
