/* Leo Bear Studios: shared styles for every page. */
:root {
  --bg: #111315;
  --panel: #191c1f;
  --line: #2a2e33;
  --fg: #ecebe6;
  --muted: #9b9a94;
  --amber: #f2a81d;
  --amber-ink: #1a1306;
  --sand: #cfa37c;
  --sand-deep: #a87a52;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(17,19,21,.86); backdrop-filter: blur(10px);
       -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none;
         font: 700 20px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.brand img { width: 38px; height: 38px; flex: none; margin: -6px 0 -4px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font: 500 14px var(--body); }
.nav a:hover, .nav a[aria-current] { color: var(--fg); }

/* Type */
.kicker { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: .95; margin: 0; }
h1 { font-size: clamp(52px, 9vw, 112px); }
h2 { font-size: clamp(36px, 5.5vw, 60px); margin-bottom: 18px; }
h3 { font-size: 26px; margin-bottom: 8px; letter-spacing: .03em; }
.lead { font-size: clamp(17px, 2vw, 20px); color: #cfcdc6; max-width: 560px; margin: 22px 0 30px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }

/* Buttons: the game's slanted amber slab */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; text-decoration: none;
       font: 700 18px/1 var(--display); letter-spacing: .1em; text-transform: uppercase;
       clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-main { background: var(--amber); color: var(--amber-ink); }
.btn-ghost { background: #24282c; color: var(--fg); }

/* Sections */
section { padding: 96px 0; }
.rule { border-top: 1px solid var(--line); }
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--amber); padding: 26px; }
.card p:last-child { margin-bottom: 0; }

/* Phone frame around portrait screenshots */
.phone { border-radius: 34px; padding: 9px; background: #050607; box-shadow: 0 0 0 1px #33373c, 0 30px 70px rgba(0,0,0,.55);
         overflow: hidden; }
.phone img { border-radius: 26px; width: 100%; height: auto; }

/* Sand stage the aircraft stand on (they are dark: they need a light ground) */
.stage { background: radial-gradient(120% 90% at 50% 35%, #ddb58f 0%, var(--sand) 45%, var(--sand-deep) 100%); color: #1d1710; }
.stage .muted { color: #5b4632; }
.stage .kicker { color: #6b3d0c; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.foot a { color: var(--muted); }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 680px) {
  .nav > a { display: none; }
}
@media (max-width: 400px) {
  .brand { font-size: 17px; gap: 8px; }
  .nav { gap: 12px; }
  .nav a { font-size: 13px; }
}
@media (max-width: 820px) {
  section { padding: 68px 0; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
  .nav .hide-sm { display: none; }
}

/* Language switch: a recessed track with the current language as a raised amber key */
.lang { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 3px 3px 3px 8px; border-radius: 7px;
        background: linear-gradient(180deg, #0a0b0c, #15181b); border: 1px solid #30363c;
        box-shadow: inset 0 2px 5px rgba(0,0,0,.7), inset 0 -1px 0 rgba(255,255,255,.04), 0 1px 0 rgba(255,255,255,.05); }
.lang .globe { width: 15px; height: 15px; margin-right: 4px; fill: none; stroke: var(--muted); stroke-width: 1.2; }
.nav .lang a { display: inline-block; min-width: 34px; text-align: center; padding: 7px 9px 6px; border-radius: 5px;
               font: 700 12px/1 var(--mono); letter-spacing: .1em; color: var(--muted); text-decoration: none;
               transition: color .15s, background .15s, box-shadow .15s, transform .1s; }
.nav .lang a:hover { color: var(--fg); background: rgba(255,255,255,.06); }
.nav .lang a:active { transform: translateY(1px); }
.nav .lang a[aria-current] { color: #1a1306; text-shadow: 0 1px 0 rgba(255,255,255,.35);
               background: linear-gradient(180deg, #ffd06a 0%, #f5b02a 45%, #dc900f 100%);
               box-shadow: 0 2px 7px rgba(242,168,29,.35), 0 1px 2px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(120,70,0,.35); }
.nav .lang a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Russian pages: the display and form faces have no Cyrillic, so Oswald and IBM Plex Mono stand in */
html:lang(ru) h1, html:lang(ru) h2, html:lang(ru) h3, html:lang(ru) .btn, html:lang(ru) .brand,
html:lang(ru) .stats b, html:lang(ru) .scenarios b { font-family: "Oswald", "Arial Narrow", sans-serif; }
html:lang(ru) h1 { letter-spacing: 0; }
html:lang(ru) .form, html:lang(ru) .stamp, html:lang(ru) .ladder span, html:lang(ru) .list li b,
html:lang(ru) .cap, html:lang(ru) .kicker, html:lang(ru) .tag { font-family: "IBM Plex Mono", "JetBrains Mono", monospace; }
html:lang(ru) h1, html:lang(ru) h2 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
html:lang(ru) .doc h1 { font-size: clamp(30px, 8.4vw, 64px); }

/* The Russian pages' note at the very top */
.ribbon { background: #0b0c0d; border-bottom: 1px solid var(--line); }
.ribbon { padding-top: env(safe-area-inset-top, 0px); }
.ribbon .wrap { text-align: right; padding-top: 10px; padding-bottom: 10px; font: 500 12px/1.4 "IBM Plex Mono", var(--mono); letter-spacing: .06em; color: var(--amber); }

/* Depth and personality: grain, hangar hazard stripes, things easing in */
body::before { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hazard { height: 10px; background: url(/img/hazard.png) repeat-x 0 50% / auto 10px; opacity: .9;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(0,0,0,.6); }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.phone, .shot, .wide { transition: translate .2s linear; }
.hero .wrap > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero .wrap > *:nth-child(2) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* The dedication, in the footer of every page */
.ded { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.ded img { width: 18px; height: 18px; }
.foot .wrap > span:first-child { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  .hero .wrap > * { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* The smallest phones: a slimmer switch and brand so both fit */
@media (max-width: 380px) {
  .brand { font-size: 15px; letter-spacing: .06em; }
  .brand img { width: 32px; height: 32px; }
  .lang { margin-left: 0; padding-left: 3px; }
  .lang .globe { display: none; }
  .nav .lang a { min-width: 30px; padding: 7px 7px 6px; }
}
