/* ==========================================================================
   KIMEP Mobile — unofficial client
   A quiet, README-style project page: one accent colour, generous whitespace,
   hairline separators instead of boxes.
   ========================================================================== */

:root {
  --bg:            #ffffff;
  --bg-sunk:       #f7f7f6;
  --fg:            #17181a;
  --fg-muted:      #62666d;
  --border:        #e6e6e4;
  --accent:        #1d4e89;
  --accent-hover:  #16406f;
  --accent-fg:     #ffffff;

  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 720px;
  --wrap-wide: 980px;
  --pad: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0f1011;
    --bg-sunk:       #16181a;
    --fg:            #e8e8e6;
    --fg-muted:      #9aa0a6;
    --border:        #26282b;
    --accent:        #3b74b8;
    --accent-hover:  #4a83c9;
    --accent-fg:     #ffffff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.wrap--wide { max-width: var(--wrap-wide); }

/* ── header ────────────────────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--border); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand__mark { border-radius: 5px; }

.header__nav { display: flex; gap: 20px; }
.header__nav a {
  color: var(--fg-muted);
  font-size: 14px;
}
.header__nav a:hover { color: var(--fg); text-decoration: none; }

/* ── hero ──────────────────────────────────────────────────────────────── */
.hero { padding: 84px 0 16px; text-align: center; }

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tagline {
  margin: 0 0 10px;
  font-size: 17px;
  color: var(--fg);
}

.lede {
  margin: 0 auto 28px;
  max-width: 46ch;
  color: var(--fg-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--quiet { border-color: var(--border); color: var(--fg); }
.btn--quiet:hover { border-color: var(--fg-muted); background: var(--bg-sunk); }

.note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--fg-muted);
}

.hero__shot { margin: 56px 0 0; }
.hero__shot img {
  width: 280px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.hero__shot figcaption {
  margin-top: 12px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ── sections ──────────────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section--flush { padding-bottom: 56px; }

.section h2 {
  margin: 0 0 24px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section p { margin: 0 0 16px; color: var(--fg-muted); }
.section p:last-child { margin-bottom: 0; }
.section strong { color: var(--fg); font-weight: 600; }

/* ── features ──────────────────────────────────────────────────────────── */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 44px;
}
.features li { margin: 0; }
.features strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.features span {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}

/* ── screenshots ───────────────────────────────────────────────────────── */
.preview-note { max-width: 72ch; font-size: 14px; }
.preview-label {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 11px;
}
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(200px, 25vw, 240px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-block: 12px 4px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure {
  margin: 0;
  scroll-snap-align: start;
}
.gallery a { display: block; border-radius: 14px; }
.gallery img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.gallery figcaption {
  margin-top: 9px;
  font-size: 12px;
  color: var(--fg-muted);
}
.section .gallery-hint { margin-top: 16px; font-size: 12px; }

/* ── download / releases ───────────────────────────────────────────────── */
.latest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.latest__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

.meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
}

.releases { margin-bottom: 24px; }

.release-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.release-row__tag { color: var(--fg); font-weight: 500; }
.release-row__meta {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}
.release-row a { font-size: 14px; }
.release-row .is-muted { color: var(--fg-muted); }

/* ── footer ────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 32px;
  padding: 40px 0 64px;
  border-top: 1px solid var(--border);
}

.footer__disclaimer {
  margin: 0 0 20px;
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-muted);
}
.footer__disclaimer strong { color: var(--fg); font-weight: 600; }

.footer__links { display: flex; gap: 20px; margin: 0 0 20px; font-size: 14px; }

.footer__fine {
  margin: 0;
  font-size: 12px;
  color: var(--fg-muted);
}

/* ── responsive ────────────────────────────────────────────────────────── */
/* nothing may force horizontal overflow on small screens */
@media (max-width: 560px) {
  .release-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

@media (max-width: 640px) {
  .hero { padding-top: 56px; }
  .section { padding: 48px 0; }
  .features { grid-template-columns: 1fr; gap: 20px; }
  .hero__shot { margin-top: 40px; }
  .header__nav { gap: 14px; }
}
