@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── THEME INIT (no flash) ─────────────────────────────── */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

:root {
  --bg:          #f0ede8;
  --bg2:         #e8e4de;
  --bg3:         #dedad3;
  --surface:     #ffffff;
  --surface2:    #f7f5f2;
  --border:      rgba(60,52,40,0.12);
  --border2:     rgba(60,52,40,0.22);
  --text:        #1a1612;
  --text2:       #5a5248;
  --text3:       #9a9088;
  --accent:      #1e5c3a;
  --accent2:     #2d7a52;
  --accent3:     #e8f5ee;
  --accent-warm: #c45c1a;
  --accent-warm2:#f0e8dc;
  --blue:        #1a4a8a;
  --blue2:       rgba(26,74,138,0.08);
  --shadow:      0 2px 20px rgba(30,25,18,0.08), 0 1px 4px rgba(30,25,18,0.05);
  --shadow-lg:   0 8px 40px rgba(30,25,18,0.12), 0 2px 8px rgba(30,25,18,0.06);
  --radius:      12px;
  --radius-lg:   20px;
  --transition:  0.25s cubic-bezier(0.4,0,0.2,1);
}
[data-theme="dark"] {
  --bg:          #0e100e;
  --bg2:         #131610;
  --bg3:         #191d15;
  --surface:     #1c2118;
  --surface2:    #222a1e;
  --border:      rgba(150,200,120,0.1);
  --border2:     rgba(150,200,120,0.2);
  --text:        #e8ede0;
  --text2:       #9ab890;
  --text3:       #607850;
  --accent:      #5dc88a;
  --accent2:     #7de0a8;
  --accent3:     rgba(93,200,138,0.1);
  --accent-warm: #e8924a;
  --accent-warm2:rgba(232,146,74,0.12);
  --blue:        #6090e0;
  --blue2:       rgba(96,144,224,0.1);
  --shadow:      0 2px 20px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.4);
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Onest', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* ── NAV ────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 64px;
  background: rgba(240,237,232,0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] nav { background: rgba(14,16,14,0.9); }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; color: var(--text);
  text-decoration: none; letter-spacing: -0.02em; flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.logo-icon img { width: 36px; height: 36px; object-fit: contain; display: block; }

.nav-right { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: 13px; font-weight: 500; color: var(--text2);
  text-decoration: none; cursor: pointer;
  background: none; border: none; font-family: inherit;
  padding: 6px 12px; border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover  { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--accent); background: var(--accent3); }

.theme-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: var(--surface); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text2);
  margin-left: 6px; flex-shrink: 0;
}
.theme-btn:hover { background: var(--bg3); color: var(--text); }
.theme-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  padding: 7rem 2.5rem 3.5rem;
  max-width: 1140px; margin: 0 auto;
}
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 50px;
  background: var(--accent3); border: 1px solid rgba(30,92,58,0.15);
  margin-bottom: 1.5rem;
  animation: fadeUp .5s ease both;
}
[data-theme="dark"] .page-eyebrow { border-color: rgba(93,200,138,0.18); }
.page-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800; line-height: 1.06;
  letter-spacing: -0.04em; margin-bottom: 1.25rem; color: var(--text);
  animation: fadeUp .5s .08s ease both;
}
.page-desc {
  font-size: 1.1rem; color: var(--text2);
  max-width: 580px; line-height: 1.75; font-weight: 400;
  animation: fadeUp .5s .16s ease both;
}
.page-divider {
  border: none; border-top: 1px solid var(--border);
  margin: 0 2.5rem;
}

/* ── SECTIONS ───────────────────────────────────────────── */
.section { padding: 4.5rem 2.5rem; }
.section-inner { max-width: 1140px; margin: 0 auto; }
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500; color: var(--accent);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.75rem; color: var(--text);
  line-height: 1.1;
}
.section-desc {
  font-size: 1rem; color: var(--text2);
  max-width: 560px; margin-bottom: 2.5rem; line-height: 1.7;
}

/* ── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 2.5rem 2.5rem 1.75rem;
}
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-top {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1.5rem;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem;
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-link {
  font-size: 13px; color: var(--text2); text-decoration: none;
  cursor: pointer; background: none; border: none; font-family: inherit;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--text); }
.footer-copy    { font-size: 12px; color: var(--text3); }
.footer-version { font-size: 12px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }

/* ── MODALS ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,12,10,0.55); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); max-width: 680px; width: 100%;
  max-height: 82vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.modal-header h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg3); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: all var(--transition);
}
.modal-close:hover { background: var(--border2); color: var(--text); }
.modal-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.modal-body { padding: 1.5rem 1.75rem 1.75rem; overflow-y: auto; font-size: 14px; color: var(--text2); line-height: 1.75; }
.modal-body h3 { font-size: 14px; font-weight: 700; color: var(--text); margin: 1.25rem 0 0.4rem; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p  { margin-bottom: 0.65rem; }
.modal-body ul { padding-left: 1.25rem; margin-bottom: 0.65rem; }
.modal-body ul li { margin-bottom: 0.3rem; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in   { animation: fadeUp 0.55s ease both; }
.delay-1   { animation-delay: 0.08s; }
.delay-2   { animation-delay: 0.16s; }
.delay-3   { animation-delay: 0.24s; }
.delay-4   { animation-delay: 0.32s; }

/* scroll-reveal: hidden by default, .visible reveals */
.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 640px) {
  nav { padding: 0 1.25rem; }
  .nav-link.hide-sm { display: none; }
  .page-header, .section { padding-left: 1.25rem; padding-right: 1.25rem; }
  .page-header { padding-top: 5.5rem; }
  .page-divider { margin: 0 1.25rem; }
  footer { padding-left: 1.25rem; padding-right: 1.25rem; }
}








/* FOOTER */
footer {
    background: var(--bg2); border-top: 1px solid var(--border);
    padding: 3rem 2.5rem 2rem;
}
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; margin-bottom: 2rem; }
.footer-logo-area .nav-logo { margin-bottom: 0.75rem; }
.footer-tagline { font-size: 13px; color: var(--text3); max-width: 260px; line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.footer-link {
    font-size: 13px; color: var(--text2); text-decoration: none;
    cursor: pointer; background: none; border: none; font-family: inherit;
    transition: color var(--transition);
}
.footer-link:hover { color: var(--text); }
.footer-bottom {
    padding-top: 1.5rem; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: 12px; color: var(--text3); }
.footer-android {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text3); font-family: 'JetBrains Mono', monospace;
}
.footer-android .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* MODAL */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(10,12,10,0.6); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; padding: 1.5rem;
    opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
    background: var(--surface); border: 1px solid var(--border2);
    border-radius: var(--radius-lg); max-width: 680px; width: 100%;
    max-height: 80vh; display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-header {
    padding: 1.75rem 2rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.modal-header h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.modal-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg3); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text2); transition: all var(--transition);
}
.modal-close:hover { background: var(--border2); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.modal-body {
    padding: 1.75rem 2rem 2rem; overflow-y: auto;
    font-size: 14px; color: var(--text2); line-height: 1.75;
}
.modal-body h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 1.5rem 0 0.5rem; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin-bottom: 0.75rem; }
.modal-body ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.modal-body ul li { margin-bottom: 0.35rem; }











/* ═══════════════════════════════════════════════════════════
   MOBILE ADAPTATIONS — полный набор брейкпоинтов
   ═══════════════════════════════════════════════════════════ */

/* Burger menu (shared between all pages) */
.burger {
  display: none;
  width: 36px; height: 36px; border-radius: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--text2); align-items: center; justify-content: center;
  flex-shrink: 0; margin-left: 4px;
  transition: background var(--transition), color var(--transition);
}
.burger:hover { background: var(--bg3); color: var(--text); }
.burger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.mobile-menu {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; z-index: 190;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 1rem 1.25rem 1.5rem;
  flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link {
  font-size: 15px; padding: 10px 14px; border-radius: 10px; width: 100%;
  text-align: left; display: block;
}
.mobile-menu-dl {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 0.5rem;
  padding: 11px 20px; border-radius: 50px;
  background: var(--accent); color: white;
  font-family: inherit; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none;
  transition: background var(--transition);
}
.mobile-menu-dl:hover { background: var(--accent2); }
.mobile-menu-dl svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.5; }

/* ── 768px — планшет ─────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 3rem 1.5rem; }
  .section-desc { margin-bottom: 1.75rem; }

  /* modal bottom sheet on mobile */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box {
    max-width: 100%; width: 100%; max-height: 88vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
  }
  .modal-overlay.open .modal-box { transform: translateY(0); }
}

/* ── 640px — смартфон ────────────────────────── */
@media (max-width: 640px) {
  /* Nav: скрываем ссылки, показываем бургер */
  nav { padding: 0 1.25rem; }
  .nav-link.hide-sm { display: none; }
  .burger { display: flex; }

  /* Headers */
  .page-header { padding: 5.5rem 1.25rem 2.5rem; }
  .page-title  { letter-spacing: -0.03em; }
  .page-desc   { font-size: 1rem; }
  .page-divider { margin: 0 1.25rem; }

  /* Sections */
  .section { padding: 2.75rem 1.25rem; }
  .section-title { line-height: 1.12; }

  /* Footer */
  footer { padding: 2rem 1.25rem 1.5rem; }
  .footer-top { flex-direction: column; gap: 1.25rem; align-items: flex-start; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* Scroll-reveal: упрощаем анимацию на мобиле */
  .scroll-reveal { transform: none; }
  .scroll-reveal.visible { transform: none; }
}

/* ── 400px — маленький смартфон ──────────────── */
@media (max-width: 400px) {
  .page-title { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .section-title { font-size: clamp(1.4rem, 6vw, 1.8rem); }
}

