/* Тёмная тема, минимализм, зелёный акцент */
:root {
	--bg: #0f1214;
	--bg-alt: #12161a;
	--text: #e7ecef;
	--muted: #98a1a8;
	--accent: #39d98a;
	--accent-600: #1fb673;
	--card: #151a1f;
	--stroke: #1f262c;
	--shadow: 0 10px 30px rgba(0,0,0,0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
	line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15,18,20,0.9); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--stroke); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand__logo { width: 28px; height: 28px; }
.brand__name { letter-spacing: 0.3px; }

.nav__toggle { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--stroke); background: var(--card); padding: 8px; cursor: pointer; }
.nav__bar { display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 1px; }
.nav__menu { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; }
.nav__menu a { color: var(--text); opacity: 0.9; }
.nav__menu a:hover { color: var(--accent); opacity: 1; }

/* Hero */
.hero { padding-top: 88px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 28px; }
.lead { color: var(--muted); margin: 12px 0 18px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 16px; border-radius: 12px; background: var(--card); color: var(--text); border: 1px solid var(--stroke); transition: transform .12s ease, background .2s ease, border-color .2s ease; box-shadow: var(--shadow); }
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn--primary { background: linear-gradient(180deg, var(--accent), var(--accent-600)); color: #001f12; border-color: transparent; font-weight: 600; }
.btn--primary:hover { filter: brightness(1.05); }
.badges { display: flex; gap: 10px; padding: 0; margin: 14px 0 0; list-style: none; flex-wrap: wrap; }
.badges li { padding: 6px 10px; border: 1px solid var(--stroke); border-radius: 10px; color: var(--muted); background: var(--card); }
.hero__img { border-radius: 16px; border: 1px solid var(--stroke); box-shadow: var(--shadow); background: radial-gradient(1200px 600px at 50% 20%, rgba(57,217,138,0.08), transparent 60%); }
.note { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* Quote */
.quote { margin: 18px auto 0; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--bg-alt); border-radius: 8px; color: var(--muted); max-width: 920px; }
.quote p { margin: 0 0 6px; }
.quote__cite { font-style: normal; color: var(--text); opacity: .8; }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.feature { background: var(--card); border: 1px solid var(--stroke); padding: 16px; border-radius: 14px; box-shadow: var(--shadow); }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

/* Howto */
.steps { margin: 10px 0 0; padding-left: 20px; }
.howto__extra { margin-top: 12px; }
.link { color: var(--accent); background: transparent; border: none; padding: 0; cursor: pointer; }

/* Gallery */
.media-title { margin: 8px 0 8px; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; }
.media-grid--collapsible { max-height: 520px; overflow: hidden; }
.media-grid--expanded { max-height: none; }
.media-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, rgba(18,22,26,0), rgba(18,22,26,.9) 40%, rgba(18,22,26,1)); pointer-events: none; }
.media-grid--expanded .media-fade { display: none; }
.media-actions { display: flex; justify-content: center; margin-top: 12px; }
.media-img { display: block; width: 100%; height: auto; border: 1px solid var(--stroke); border-radius: 12px; box-shadow: var(--shadow); background: #0c0f12; object-fit: contain; max-height: 380px; }

/* Download */
.downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.dl { text-align: center; }
.qr { margin-top: 16px; opacity: 0.85; }
.qr img { width: 160px; height: auto; border: 1px solid var(--stroke); border-radius: 8px; }
.muted { color: var(--muted); font-size: 14px; }

/* Community */
.socials { display: flex; gap: 12px; flex-wrap: wrap; }
.social { padding: 10px 14px; border: 1px solid var(--stroke); border-radius: 12px; background: var(--card); color: var(--text); }
.social:hover { border-color: var(--accent); }

/* Roadmap */
.roadmap { margin: 8px 0 0; padding-left: 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--stroke); background: var(--bg-alt); }
.footer__grid { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.foot-links { display: flex; align-items: center; gap: 12px; }
.foot-text { color: var(--muted); }
.dot { color: var(--accent); }

/* Noscript */
.noscript { margin: 12px; padding: 12px; border: 1px dashed var(--stroke); border-radius: 8px; background: #0b0e10; color: var(--muted); }

/* A11y */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Responsive */
@media (max-width: 960px) {
	.hero__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.nav__toggle { display: inline-block; }
	.nav__menu { position: absolute; right: 20px; top: 66px; background: var(--card); border: 1px solid var(--stroke); border-radius: 12px; padding: 10px; display: none; flex-direction: column; gap: 8px; min-width: 200px; box-shadow: var(--shadow); }
	.nav__menu.is-open { display: flex; }
	.features { grid-template-columns: repeat(2, 1fr); }
	.downloads { grid-template-columns: repeat(2, 1fr); }
	.media-grid { grid-template-columns: repeat(2, 1fr); }
	.media-grid--collapsible { max-height: 440px; }
	.media-img { max-height: 320px; }
}
@media (max-width: 480px) {
	.features { grid-template-columns: 1fr; }
	.downloads { grid-template-columns: 1fr; }
	.media-grid { grid-template-columns: 1fr; }
	.media-grid--collapsible { max-height: 420px; }
	.media-img { max-height: 300px; }
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; display: none; z-index: 100; }
.lightbox.is-open { display: block; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(2px); }
.lightbox__content { position: absolute; inset: 0; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center; padding: 20px; }
.lightbox__figure { grid-column: 2 / 3; grid-row: 2 / 3; margin: 0; max-width: min(96vw, 1200px); max-height: 80vh; display: grid; align-items: center; justify-items: center; gap: 8px; }
.lightbox__img { max-width: 100%; max-height: 72vh; border-radius: 12px; border: 1px solid var(--stroke); background: #0c0f12; box-shadow: var(--shadow); object-fit: contain; }
.lightbox__caption { color: var(--muted); font-size: 14px; text-align: center; }
.lightbox__close { position: absolute; top: 14px; right: 14px; background: var(--card); border: 1px solid var(--stroke); color: var(--text); border-radius: 10px; width: 36px; height: 36px; cursor: pointer; }
.lightbox__nav { background: rgba(21,26,31,.7); border: 1px solid var(--stroke); color: var(--text); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }
.lightbox__nav--prev { grid-column: 1 / 2; grid-row: 2 / 3; justify-self: start; }
.lightbox__nav--next { grid-column: 3 / 4; grid-row: 2 / 3; justify-self: end; }

@media (max-width: 760px) {
	.lightbox__img { max-height: 64vh; }
}
