/* ============================================================
   OSMC.PRO — presentation site
   Dark theme: "night city" — deep green-black, grass-emerald
   accent, warm lamp glow. Blocky corners (no rounding), pixel
   grid texture. Fonts: Unbounded (display) + Manrope (body).
   ============================================================ */

:root {
  --bg:        #07100c;
  --bg-2:      #0b1712;
  --panel:     #10201a;
  --panel-2:   #142a21;
  --line:      rgba(96, 235, 156, .16);
  --line-soft: rgba(96, 235, 156, .09);
  --text:      #e9f4ec;
  --muted:     #9ab3a6;
  --accent:    #4fd97b;        /* grass emerald   */
  --accent-2:  #2aa857;
  --lamp:      #ffc861;        /* street-lamp glow */
  --shadow:    0 18px 50px rgba(0, 0, 0, .55);
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-head: "Unbounded", "Manrope", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(42, 168, 87, .14), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 200, 97, .05), transparent 55%),
    var(--bg);
}

/* faint pixel-grid texture over the whole page */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(96,235,156,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,235,156,.03) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
}

main, .nav, .footer, .lightbox { position: relative; z-index: 1; }

.wrap { width: min(1160px, 92vw); margin: 0 auto; }
.section { padding: 96px 0 40px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

.muted { color: var(--muted); }

/* ---------- kickers / titles ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.glow-line .arr { color: var(--lamp); }
.section-title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -.01em; }
.section-sub { color: var(--muted); max-width: 60ch; font-size: 18px; }
.section-sub.wide { max-width: none; }
.section-sub .line { display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 800; font-size: 16px;
  padding: 14px 26px; border: 1px solid transparent;
  text-decoration: none !important; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 18px 36px; font-size: 18px; }
.btn-primary {
  background: linear-gradient(180deg, #5be487, var(--accent-2));
  color: #04170c;
  box-shadow: 0 0 0 1px rgba(91,228,135,.5), 0 10px 34px rgba(42,168,87,.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(91,228,135,.7), 0 14px 42px rgba(42,168,87,.6); }
.btn-ghost {
  color: var(--text); border-color: var(--line);
  background: rgba(16, 32, 26, .6); backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.dl-ico { font-size: 15px; }
.ver { font-family: var(--font-mono); font-weight: 700; font-size: .85em; opacity: .8; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 16, 12, .78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; gap: 26px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 800; font-size: 19px;
  color: var(--text); text-decoration: none !important;
}
.links { display: flex; gap: 22px; margin-left: auto; }
.links a {
  color: var(--muted); font-weight: 600; font-size: 15px;
  text-decoration: none !important; padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.links a:hover { color: var(--text); border-bottom-color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch { display: inline-flex; border: 1px solid var(--line); }
.lang-switch button {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  background: transparent; color: var(--muted); border: 0; padding: 8px 11px; cursor: pointer;
  transition: background .15s, color .15s;
}
.lang-switch button.active { background: var(--accent); color: #04170c; }

.burger { display: none; background: none; border: 1px solid var(--line); padding: 9px 8px; cursor: pointer; }
.burger span { display: block; width: 18px; height: 2px; background: var(--text); margin: 4px 0; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; }
html.capture .hero { min-height: 760px; } /* fixed hero for full-page screenshots (?noanim) */
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 28%;
  transform: scale(1.02);
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,16,12,.55) 0%, rgba(7,16,12,.15) 35%, rgba(7,16,12,.86) 78%, var(--bg) 100%),
    linear-gradient(90deg, rgba(7,16,12,.75), rgba(7,16,12,.15) 65%);
}
.hero-content { position: relative; padding: 140px 0 90px; }
.hero h1 {
  font-size: clamp(34px, 6vw, 72px); font-weight: 800; letter-spacing: -.015em;
  max-width: 16ch; margin: 0 0 22px;
  text-shadow: 0 4px 30px rgba(0,0,0,.7);
}
.hero h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 34px rgba(79,217,123,.45); }
.hero .lead { max-width: 62ch; font-size: clamp(17px, 1.6vw, 21px); color: #cfe2d6; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero-note { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: .04em; }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft);
  margin-top: -46px; position: relative;
}
.stat {
  background: var(--bg-2); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat b { font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--text); }
.stat b i { font-style: normal; color: var(--accent); }
.stat span { color: var(--muted); font-size: 14.5px; }

/* ---------- feature cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px;
}
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line);
  box-shadow: var(--shadow), 0 0 0 1px var(--line), 0 0 44px rgba(42,168,87,.14);
}
.card-img { aspect-ratio: 2 / 1; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 22px 22px 26px; position: relative; }
.card-body h3 { font-size: 19px; font-weight: 700; margin: 0 0 10px; }
.card-body p { color: var(--muted); font-size: 15.5px; margin: 0; }
.chip-ico {
  position: absolute; top: -22px; right: 18px;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line); font-size: 21px;
  box-shadow: 0 8px 22px rgba(0,0,0,.5);
}

/* ---------- how it works ---------- */
.how { background: linear-gradient(180deg, transparent, rgba(16,32,26,.5) 25%, rgba(16,32,26,.5) 75%, transparent); }
.how-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 54px; align-items: start; margin-top: 36px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; }
.steps b {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
  color: var(--accent); background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 0 24px rgba(42,168,87,.18);
}
.steps h3 { font-size: 18px; font-weight: 700; margin: 8px 0 4px; }
.steps p { color: var(--muted); font-size: 15.5px; margin: 0; }

.window-shots { margin: 0; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 90px; }
.shot-frame {
  border: 1px solid var(--line); background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.shot-frame:hover { transform: translateY(-4px); box-shadow: var(--shadow), 0 0 0 1px var(--line), 0 0 50px rgba(42,168,87,.16); }
.shot-frame img { width: 100%; }

/* ---------- gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px;
}
.gallery figure { margin: 0; }
.gallery a {
  display: block; position: relative; overflow: hidden;
  border: 1px solid var(--line-soft);
  transition: border-color .2s, box-shadow .2s;
}
.gallery a::after {
  content: "⛶";
  position: absolute; right: 10px; bottom: 8px;
  color: var(--text); font-size: 16px; opacity: 0;
  text-shadow: 0 1px 6px #000; transition: opacity .2s;
}
.gallery a:hover { border-color: var(--accent); box-shadow: 0 0 34px rgba(42,168,87,.25); }
.gallery a:hover::after { opacity: .9; }
.gallery img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.06); }
.gallery figcaption { color: var(--muted); font-size: 14px; padding: 10px 2px 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 8, 5, .93); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 4vh 4vw;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 82vh; border: 1px solid var(--line); box-shadow: var(--shadow); }
.lightbox figcaption { text-align: center; color: var(--muted); margin-top: 14px; font-size: 15px; }
.lb-close, .lb-nav {
  position: fixed; z-index: 101;
  background: rgba(16,32,26,.8); color: var(--text);
  border: 1px solid var(--line); width: 46px; height: 46px;
  font-size: 22px; cursor: pointer; transition: background .15s, border-color .15s;
}
.lb-close:hover, .lb-nav:hover { border-color: var(--accent); background: rgba(20,42,33,.9); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ---------- CLI ---------- */
.cli-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; margin-top: 40px; align-items: stretch; }
.terminal {
  background: #0a1310; border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 0 0 22px;
  display: flex; flex-direction: column;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.term-bar span { width: 11px; height: 11px; background: #26413a; }
.term-bar span:first-child { background: var(--accent); }
.term-bar span:nth-child(2) { background: var(--lamp); }
.term-bar em {
  margin-left: auto; font-family: var(--font-mono); font-style: normal;
  font-size: 12px; color: var(--muted); letter-spacing: .1em;
}
.terminal pre { margin: 0; padding: 26px 22px 6px; overflow-x: auto; }
.terminal code { font-family: var(--font-mono); font-size: 15.5px; color: #b9f5cc; white-space: pre; }
.flagset { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 22px 0; }
.flag {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--lamp);
  border: 1px solid rgba(255,200,97,.28); background: rgba(255,200,97,.06);
  padding: 4px 10px;
}
.term-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin: 16px 22px 0; }

.tune {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-soft); padding: 28px;
}
.tune h3 { font-size: 18px; margin-bottom: 8px; }
.tune > p { color: var(--muted); font-size: 15.5px; }
.tune-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tune-list li { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--accent-2); padding-left: 14px; }
.tune-list code { font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
.tune-list span { color: var(--muted); font-size: 14.5px; }

/* ---------- license ---------- */
.lic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.lic-card {
  background: var(--panel); border: 1px solid var(--line-soft); padding: 26px;
  display: flex; flex-direction: column; gap: 8px;
}
.lic-ico {
  font-family: var(--font-mono); font-size: 15px; letter-spacing: .12em; color: var(--lamp);
  border: 1px solid rgba(255,200,97,.3); background: rgba(255,200,97,.06);
  align-self: flex-start; padding: 4px 12px; margin-bottom: 8px;
}
.lic-card p { color: var(--muted); font-size: 15px; flex: 1; }
.lic-card a { font-family: var(--font-mono); font-size: 13.5px; }

/* ---------- final CTA ---------- */
.cta {
  margin-top: 90px; padding: 110px 0;
  background:
    radial-gradient(800px 320px at 50% 100%, rgba(42,168,87,.2), transparent 70%),
    linear-gradient(180deg, transparent, rgba(16,32,26,.6));
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.cta h2 { font-size: clamp(28px, 4.5vw, 52px); font-weight: 800; }
.cta p { color: var(--muted); font-size: 19px; margin-bottom: 30px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 44px 0 26px; background: #060d0a; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer .brand { font-size: 17px; }
.footer .muted { font-size: 14.5px; margin-top: 6px; max-width: none; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--muted); font-size: 15px; font-weight: 600; }
.footer-links a:hover { color: var(--accent); }
.footer-fine { margin-top: 30px; font-size: 13px; opacity: .8; }

/* ---------- reveal animation (only with JS, so content never stays hidden) ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.visible { opacity: 1; transform: none; }

/* grid children must be shrinkable, otherwise a long <pre> line widens the page on phones */
.cards > *, .stats > *, .how-grid > *, .cli-grid > *, .lic-grid > *, .gallery > * { min-width: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cards, .gallery, .lic-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .how-grid, .cli-grid { grid-template-columns: 1fr; }
  .window-shots { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(7,16,12,.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease; margin-left: 0;
  }
  .links.open { max-height: 320px; }
  .links a { padding: 15px 6vw; border-bottom: 1px solid var(--line-soft); }
  .burger { display: block; }
  .cards, .gallery, .lic-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; margin-top: -20px; }
  .hero-content { padding-top: 110px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
}
