/* ---------------------------------------------------------------------------
   Kibermokymai — public site
   The design language is the approved landing-page comp: Inter, a single
   purple accent, generous white space, no cards-with-shadows. The comp was
   authored with inline styles; those are lifted into classes here so the eight
   pages cannot drift apart.
   --------------------------------------------------------------------------- */

:root {
  --brand: #6559f5;
  --brand-hover: #5548e0;
  --brand-tint: #f2f0fe;
  --ink: #1f1f1f;
  --body: #444746;
  --muted: #6b7280;
  --faint: #9aa0a6;
  --line: #e5e7eb;
  --line-soft: #edeef0;
  --surface: #f8f9fa;
  --shell: 1180px;
  --wide: 1040px;
  --mid: 820px;
  --narrow: 620px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  background: #fff;
  color: var(--body);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

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

.skip {
  position: absolute; left: 0; top: -120px; z-index: 100;
  background: #fff; color: var(--ink); padding: 12px 18px; border-radius: 0 0 12px 0;
}
.skip:focus { top: 0; }

/* ------------------------------------------------------------------ header */

.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.hdr-in {
  max-width: var(--shell); margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
  height: 72px; display: flex; align-items: center; gap: 28px;
}
.brand {
  font-size: 17px; font-weight: 600; color: var(--ink);
  letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a {
  font-size: 15px; font-weight: 500; color: var(--body); text-decoration: none; white-space: nowrap;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); }
.hdr-cta { margin-left: auto; }
.nav-toggle { display: none; }

.lang-switch-select {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--body);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 10px; cursor: pointer;
}
.lang-switch-select:hover { color: var(--ink); border-color: var(--faint); }
.nav-panel .lang-switch-select { width: 100%; padding: 10px 12px; margin-bottom: 14px; }

/* The nav collapses into a details/summary disclosure below 940px — no JS. */
@media (max-width: 940px) {
  .hdr-in { gap: 12px; }
  .nav { display: none; }
  .hdr-cta { margin-left: auto; }
  .nav-toggle { display: block; margin-left: auto; }
  /* The closed panel keeps a layout box in current Chromium, so it must be
     taken out of flow at every width where the disclosure exists — otherwise
     its widest link sets the page's scroll width. */
  .nav-panel { position: absolute; }
  .nav-toggle summary {
    list-style: none; cursor: pointer; height: 42px; padding: 0 16px;
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); border-radius: 999px;
    font-size: 15px; font-weight: 500; color: var(--ink);
  }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-panel {
    position: absolute; left: 0; right: 0; top: 72px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px clamp(20px, 4vw, 32px) 20px;
    display: grid; gap: 4px;
  }
  .nav-panel a {
    padding: 12px 4px; font-size: 16px; font-weight: 500;
    color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-soft);
  }
  .nav-panel a:last-child { border-bottom: 0; }
}
@media (min-width: 941px) { .nav-panel { display: none; } }

/* Two right-aligned controls do not fit beside the wordmark on a phone. The
   call to action is repeated in the menu, in the hero and in the footer, so
   the menu is the one that stays. */
@media (max-width: 560px) {
  /* Two selectors, not one: `.btn` sets its own display further down the file
     and would win a specificity tie on source order. */
  .hdr .hdr-cta { display: none; }
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 30px; border-radius: 999px;
  font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #c7cbd1; }
.btn-sm { height: 42px; padding: 0 20px; font-size: 15px; }
.link-arrow { font-size: 16px; font-weight: 500; color: var(--brand); }

/* --------------------------------------------------------------- structure */

.sec { padding: clamp(64px, 9vw, 112px) clamp(20px, 4vw, 32px); }
.sec-tight { padding: clamp(44px, 6vw, 72px) clamp(20px, 4vw, 32px); }
.sec-grey { background: var(--surface); }
.wrap { max-width: var(--wide); margin: 0 auto; }
.wrap-mid { max-width: var(--mid); margin: 0 auto; }
.wrap-narrow { max-width: var(--narrow); margin: 0 auto; }

.head { max-width: 720px; margin: 0 auto clamp(44px, 6vw, 64px); text-align: center; }
.head-left { max-width: 720px; margin: 0 0 clamp(36px, 5vw, 52px); text-align: left; }

.eyebrow {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px;
  border-radius: 999px; background: var(--brand-tint); color: var(--brand);
  font-size: 12px; font-weight: 500; margin-bottom: 16px;
}
.kicker {
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
}

h1, .h1 {
  font-size: clamp(34px, 6vw, 60px); line-height: 1.1; font-weight: 500;
  letter-spacing: -.024em; color: var(--ink); margin-bottom: 24px;
}
h2, .h2 {
  font-size: clamp(27px, 4.2vw, 40px); line-height: 1.2; font-weight: 500;
  letter-spacing: -.018em; color: var(--ink); margin-bottom: 20px;
}
h3, .h3 {
  font-size: clamp(19px, 2.2vw, 21px); line-height: 1.35; font-weight: 500;
  color: var(--ink); margin-bottom: 12px;
}
h4 { font-size: 17px; line-height: 1.4; font-weight: 500; color: var(--ink); margin-bottom: 8px; }

p { font-size: clamp(16px, 1.9vw, 17px); line-height: 1.65; }
.lead { font-size: clamp(17px, 2.1vw, 20px); line-height: 1.6; }
.small { font-size: 15px; line-height: 1.55; }
.micro { font-size: 13px; line-height: 1.5; color: var(--muted); }
.dim { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 24px; }
.mt-l { margin-top: clamp(36px, 5vw, 56px); }

.stack > * + * { margin-top: 16px; }

.grid { display: grid; gap: clamp(32px, 4.5vw, 52px); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

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

/* ------------------------------------------------------------- screenshots */

.shot {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--surface);
}
.shot img { width: 100%; height: auto; display: block; }
.shot-caption {
  margin: 14px 0 0; text-align: center;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.shot-phone {
  max-width: 300px; margin: 0 auto;
  border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: #fff;
}

/* A bracketed placeholder the owner still has to fill. Marked, not disguised:
   a plain grey circle reads as a broken image rather than as a to-do. */
.placeholder-photo {
  width: 132px; height: 132px; border-radius: 999px; flex: 0 0 auto;
  border: 1px dashed var(--line); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--faint); text-align: center;
}

/* A screenshot beside its explanation; alternates side on .flip. */
.feature {
  display: grid; gap: clamp(28px, 4vw, 56px); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.feature + .feature { margin-top: clamp(56px, 8vw, 96px); }
@media (min-width: 900px) {
  .feature.flip > *:first-child { order: 2; }
}

/* ------------------------------------------------------------------- lists */

.ticks { list-style: none; display: grid; gap: 14px; }
.ticks li {
  position: relative; padding-left: 30px;
  font-size: clamp(16px, 1.9vw, 17px); line-height: 1.6;
}
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .58em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
}

.facts { list-style: none; display: grid; gap: 0; }
.facts li {
  display: flex; gap: 20px; flex-wrap: wrap;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(16px, 1.9vw, 17px); line-height: 1.6;
}
.facts li:first-child { border-top: 1px solid var(--line); }
.facts dfn, .facts b {
  flex: 0 0 220px; font-style: normal; font-weight: 500; color: var(--ink);
}
.facts span { flex: 1 1 300px; min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--body); white-space: nowrap;
}

.num { font-size: 15px; font-weight: 500; color: var(--brand); margin-bottom: 12px; }
.stat {
  font-size: clamp(34px, 5vw, 50px); line-height: 1.05; font-weight: 500;
  color: var(--ink); margin-bottom: 12px;
}

/* --------------------------------------------------------------- game card */

.game {
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #fff;
}
/* Screenshots inside a card row share one frame ratio, so a portrait shot
   beside two landscape ones doesn't make the row ragged — but they're
   letterboxed (object-fit: contain), never cropped, so no UI text gets cut
   off at the edges regardless of the source screenshot's own aspect ratio. */
.game > img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--surface);
}
.game-frame {
  width: 100%; aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden;
}
.game-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.game-body { padding: clamp(22px, 3vw, 30px); }
.game-tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px;
  border-radius: 999px; background: var(--brand-tint); color: var(--brand);
  font-size: 12px; font-weight: 500; margin-bottom: 14px;
}

/* ------------------------------------------------------------- game carousel
   A native scroll-snap row: works with zero JS (touch/trackpad scroll,
   nothing to break), with prev/next buttons and dots layered on as an
   optional enhancement by site.js — consistent with this site's two other
   "optional if JS fails" behaviours. */
.game-carousel { position: relative; max-width: var(--wide); margin: 0 auto; }
.game-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -4px; padding: 4px;
}
.game-track::-webkit-scrollbar { display: none; }
.game-track > .game { flex: 0 0 100%; scroll-snap-align: start; }
.game-carousel-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; }
.game-nav {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.game-nav:hover { border-color: var(--brand); color: var(--brand); }
.game-nav:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.game-dots { display: flex; align-items: center; gap: 8px; }
.game-dot {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px; background: var(--line);
  cursor: pointer;
}
.game-dot:hover { background: var(--faint); }
.game-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.game-dot[aria-current="true"] { width: 22px; background: var(--brand); }

/* ------------------------------------------------------------------ footer */

.ftr {
  padding: clamp(40px, 5vw, 56px) clamp(20px, 4vw, 32px);
  background: var(--surface); border-top: 1px solid var(--line);
}
.ftr-in {
  max-width: var(--wide); margin: 0 auto;
  display: flex; gap: clamp(24px, 4vw, 48px); flex-wrap: wrap; justify-content: space-between;
}
.ftr-col { flex: 1 1 200px; display: grid; gap: 8px; align-content: start; }
.ftr a, .ftr p { font-size: 14px; color: var(--body); text-decoration: none; line-height: 1.6; }
.ftr a:hover { color: var(--ink); }
.ftr-note {
  max-width: var(--wide); margin: clamp(24px, 3vw, 32px) auto 0;
  font-size: 13px; color: var(--faint);
}

/* --------------------------------------------------------------- animation */

@keyframes km-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
[data-reveal].km-in { animation: km-rise .7s cubic-bezier(.16, 1, .3, 1) both; }

@keyframes km-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 14px; animation: km-marquee 34s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal].km-in { animation: none !important; }
  .marquee-track { animation: none !important; }
  .game-track { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ prose */

/* Article body. Narrower than the page's 820px shell: ~68 characters is the
   line length long-form Lithuanian reads best at. */
.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.1em; }
.prose p { font-size: clamp(17px, 2vw, 18px); line-height: 1.75; }
.prose h2 {
  font-size: clamp(22px, 3vw, 27px); line-height: 1.3; margin-top: 2em;
}
.prose h3 { font-size: clamp(19px, 2.2vw, 21px); margin-top: 1.8em; }
.prose h2 + p, .prose h3 + p { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { font-size: clamp(17px, 2vw, 18px); line-height: 1.7; margin-top: .4em; }
.prose blockquote {
  margin-left: 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--brand);
}
.prose blockquote p { color: var(--ink); }
.prose img { border-radius: 14px; margin: 1.6em 0; }
.prose code {
  font-size: .9em; padding: 2px 6px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--line-soft);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* ----------------------------------------------------------- audio player */

.listen {
  border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; background: var(--surface);
}
.listen-label {
  font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 12px;
}
.listen audio { width: 100%; display: block; }
