/* =========================================
   1. TOKENS & VARIABLES (from TZ-STYLE §1)
   ========================================= */
:root[data-theme="light"] {
  --surface: #FFFFFF;
  --on-surface: #0F172A;
  --muted: #94A3B8;
  --subtle: #EEF2F7;
  --hairline: #F1F5F9;
  --outline: #E2E8F0;
  --green: #059669;
  --danger: #E11D48;
  --warn: #F59E0B;
  --blue: #0284C7;
  --shadow-card: 0 24px 60px -20px rgba(15, 23, 42, 0.25);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Fallback/Future Dark Mode Hooks */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #0B1220;
    --on-surface: #F8FAFC;
    --muted: #64748B;
    --subtle: #1E293B;
    --hairline: #1E293B;
    --outline: #334155;
    --shadow-card: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
  }
}

/* @font-face Manrope отключён при деплое: файл assets/fonts/Manrope.woff2 не поставлен.
   Положите шрифт локально (self-host, без CDN) и раскомментируйте. Пока — системный fallback.
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
} */

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

body {
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  background-color: var(--surface);
  color: var(--on-surface);
  line-height: 1.5;
  font-feature-settings: 'tnum';
  -webkit-font-smoothing: antialiased;
}

/* Typography Scales */
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 34px); font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
p { font-size: clamp(16px, 2vw, 18px); font-weight: 500; color: var(--on-surface); opacity: 0.85; }

.container {
  max-width: 1168px; /* 1120 + 24*2 padding */
  margin: 0 auto;
  padding: 0 24px;
}
.text-center { text-align: center; }
.justify-center { justify-content: center; }

/* =========================================
   2. HEADER & NAV
   ========================================= */
.header.sticky {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}
.brand-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--on-surface);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Lang Switch */
.lang-switch {
  display: flex;
  background: var(--subtle);
  border-radius: 999px;
  padding: 4px;
}
.lang-pill {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-pill.active {
  background: var(--green);
  color: #FFF;
  box-shadow: var(--shadow-soft);
}
@media (prefers-reduced-motion: no-preference) {
  .lang-pill:hover:not(.active) { color: var(--on-surface); }
}

/* Theme Toggle (Disabled) */
.theme-toggle {
  background: none;
  border: none;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
  padding: 8px;
}
.icon {
  width: 20px;
  height: 20px;
}

/* =========================================
   3. SECTIONS & COMPONENTS
   ========================================= */
section {
  padding: 80px 0;
}

/* Badges */
.store-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.badge-soon {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--subtle);
  color: var(--on-surface);
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  opacity: 0.6;
  cursor: default;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-top: 60px;
}
.hero-content { flex: 1; }
.hero h1 { margin-bottom: 20px; }
.hero-image { flex: 1; display: flex; justify-content: center; }

/* Values Grid */
.values h2 { margin-bottom: 48px; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.value-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}
.value-card h3 { margin-bottom: 12px; }
.quiet-value { border-style: dashed; background: transparent; box-shadow: none; }

/* Zigzag Feature Layout */
.zigzag {
  display: flex;
  align-items: center;
  gap: 60px;
}
.zigzag.reverse { flex-direction: row-reverse; }
.feature-text { flex: 1; }
.feature-text h2 { margin-bottom: 16px; }
.feature-text p { margin-bottom: 24px; }
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-list li {
  position: relative;
  padding-left: 24px;
  font-weight: 600;
  color: var(--on-surface);
}
.feature-list li::before {
  content: '•';
  color: var(--green);
  position: absolute;
  left: 0;
  font-size: 18px;
  line-height: 1;
}
.feature-images { flex: 1; display: flex; justify-content: center; position: relative; }

/* Screenshots & Frames */
.device-frame {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--outline);
  line-height: 0;
}
.device-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top; /* Crop empty bottoms if any */
}

/* Multi-images offset */
.multi-images { gap: 20px; align-items: center; }
.frame-calc { transform: translateY(-20px); }
.frame-accounts { transform: translateY(20px); }

/* Reports Gallery */
.reports-gallery {
  display: flex;
  gap: 20px;
  margin-top: 60px;
  overflow-x: auto;
  padding-bottom: 24px;
  scroll-snap-type: x mandatory;
}
.reports-gallery .device-frame {
  flex: 0 0 calc(25% - 15px);
  min-width: 240px;
  scroll-snap-align: start;
}

/* Final Block */
.final-section { padding-top: 40px; padding-bottom: 100px; }
.text-block { max-width: 600px; margin: 0 auto 60px; }
.text-block h2 { margin-bottom: 16px; }
.cta-block {
  background: var(--subtle);
  padding: 48px;
  border-radius: 24px;
  max-width: 800px;
  margin: 0 auto;
}
.cta-block h3 { margin-bottom: 12px; }

/* Footer */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 12px;
  font-weight: 600;
}
.footer-links a:hover { color: var(--on-surface); }

/* Privacy Policy Layout */
.text-document {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
}
.text-document h2, .text-document h3 { margin-top: 40px; margin-bottom: 16px; }
.text-document p, .text-document ul { margin-bottom: 20px; font-size: 17px; line-height: 1.6; }
.text-document ul { padding-left: 24px; }
.text-document hr { border: none; border-top: 1px solid var(--hairline); margin: 40px 0; }

/* =========================================
   4. RESPONSIVE (Mobile)
   ========================================= */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; }
  .store-badges { justify-content: center; }
  .zigzag, .zigzag.reverse { flex-direction: column; gap: 40px; }
  .reports-gallery { padding-left: 24px; padding-right: 24px; margin-left: -24px; margin-right: -24px; }
  .multi-images { flex-direction: column; }
  .frame-calc, .frame-accounts { transform: none; width: 100%; max-width: 320px; }
  .footer-inner { flex-direction: column; text-align: center; }
}