/* KlevelScan — Ecosystem shell (navbar, footer, burger panel)
   Source: klevelcp.ru approved shared implementation (SHARED-COMPONENTS.md).
   Only shell classes. Service-specific content styles stay in style.css. */

:root {
  --eco-cream: #FAF9F6;
  --eco-navy: #1B1B1B;
  --eco-terracotta: #C85D44;
  --eco-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --eco-max: 1280px;
}

body {
  background-color: var(--eco-cream);
  color: var(--eco-navy);
  font-family: var(--eco-font);
  -webkit-font-smoothing: antialiased;
}

main {
  padding-top: 76px;
}

.eco-container {
  max-width: var(--eco-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) { .eco-container { padding: 0 6rem; } }

/* ===== Ecosystem Navbar ===== */
.navbar-ecosystem {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 16px 24px;
}
@media (min-width: 768px) { .navbar-ecosystem { padding: 16px 48px; } }
.navbar-ecosystem.navbar-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.navbar-inner {
  max-width: var(--eco-max);
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  width: 100%;
}
@media (min-width: 768px) { .navbar-inner { justify-content: space-between; gap: 32px; } }

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--eco-navy);
}
.navbar-logo img { height: 28px; width: auto; }
.navbar-logo-suffix {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--eco-navy);
}

/* Desktop horizontal nav links (≥1024px) */
.navbar-nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
@media (min-width: 1024px) { .navbar-nav-links { display: flex; } }
.navbar-nav-links a {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--eco-navy);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.navbar-nav-links a:hover { color: var(--eco-terracotta); }

/* Right side actions group */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
@media (min-width: 1024px) { .navbar-actions { margin-left: 0; } }

/* Dark CTA pill — Начать диагностику */
.navbar-cta-pill {
  display: inline-flex;
  align-items: center;
  background: var(--eco-navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}
@media (min-width: 640px) { .navbar-cta-pill { font-size: 0.8125rem; padding: 12px 22px; } }
.navbar-cta-pill:hover {
  background: var(--eco-terracotta);
  color: #fff;
  transform: scale(1.03);
  text-decoration: none;
}

.navbar-balance {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--eco-cream, #f5efe6);
  color: var(--eco-navy);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.navbar-balance:hover { background: var(--eco-navy); color: #fff; }
@media (min-width: 768px) { .navbar-balance { display: inline-flex; } }

.navbar-burger {
  margin-left: auto;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  color: var(--eco-navy);
  transition: all 0.2s;
  flex-shrink: 0;
}
@media (max-width: 767px) { .navbar-burger { margin-left: 12px; } }
@media (min-width: 768px) { .navbar-burger { margin-left: 0; } }
.navbar-burger:hover {
  background: var(--eco-navy);
  color: #fff;
  border-color: var(--eco-navy);
}
.navbar-burger svg { width: 24px; height: 24px; display: block; }

.burger-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 24px;
  margin-top: 8px;
  width: calc(100% - 48px);
  max-width: 480px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  padding: 32px;
}
@media (min-width: 768px) { .burger-panel { right: 48px; } }
.burger-panel.open { display: block; }

.burger-section { margin-bottom: 40px; }
.burger-section:last-child { margin-bottom: 0; }
.burger-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(0, 0, 0, 0.3);
  margin-bottom: 16px;
}

.burger-account {
  background: var(--eco-cream);
  padding: 24px;
  border-radius: 24px;
  margin-bottom: 40px;
}
.burger-account-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.burger-account-user { display: flex; align-items: center; gap: 12px; }
.burger-account-avatar {
  width: 40px; height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--eco-navy);
}
.burger-account-email {
  font-size: 0.875rem;
  font-weight: 700;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--eco-navy);
}
.burger-account-balance-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.15em;
  opacity: 0.4;
  margin-bottom: 4px;
  color: var(--eco-navy);
}
.burger-account-balance-value {
  font-weight: 800;
  color: var(--eco-terracotta);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.burger-account-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.burger-account-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 12px;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--eco-navy);
  text-decoration: none;
  transition: border-color 0.2s;
}
.burger-account-link:hover { border-color: var(--eco-terracotta); }

.burger-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 0;
}
.burger-products a {
  font-weight: 700;
  color: var(--eco-navy);
  text-decoration: none;
  transition: color 0.2s;
}
.burger-products a:hover { color: var(--eco-terracotta); }

.ecosystem-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ecosystem-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--eco-navy);
  text-decoration: none;
  transition: all 0.2s;
}
.ecosystem-pill:hover {
  background: var(--eco-navy);
  color: white;
  border-color: var(--eco-navy);
}
.ecosystem-pill.current {
  background: var(--eco-terracotta);
  color: white;
  border-color: var(--eco-terracotta);
  cursor: default;
}

.burger-auth {
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.burger-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  color: #dc2626;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}
.burger-logout:hover { text-decoration: underline; }
.burger-login-btn {
  display: block;
  width: 100%;
  background: var(--eco-terracotta);
  color: white;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s;
  margin-bottom: 12px;
}
.burger-login-btn:hover { transform: scale(1.02); }
.burger-register-btn {
  display: block;
  width: 100%;
  border: 2px solid var(--eco-navy);
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  font-weight: 700;
  color: var(--eco-navy);
  text-decoration: none;
  transition: all 0.2s;
}
.burger-register-btn:hover {
  background: var(--eco-navy);
  color: white;
}

/* ===== Ecosystem Footer ===== */
.eco-footer {
  background-color: var(--eco-navy);
  color: rgba(255, 255, 255, 0.4);
  padding: 4rem 1.5rem;
}
@media (min-width: 768px) { .eco-footer { padding: 4rem 6rem; } }

.eco-footer .eco-container { padding: 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
}
.footer-logo img {
  height: 24px;
  filter: brightness(0) invert(1);
}
.footer-logo-suffix {
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
}

.footer-description {
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.footer-title {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 1rem; }
.footer-links a {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
}
@media (min-width: 640px) { .ecosystem-grid { grid-template-columns: repeat(3, 1fr); } }
.ecosystem-grid a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.ecosystem-grid a:hover { color: #fff; }
.ecosystem-grid a.current {
  color: #fff;
  cursor: default;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; align-items: center; }
}
.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: #fff; }
.footer-legal {
  text-align: left;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
}
@media (min-width: 768px) { .footer-legal { text-align: right; } }
.footer-legal p { margin: 0 0 4px; }
.footer-legal p:last-child { margin-bottom: 0; }

/* ===== Shared utilities ===== */
.noise-overlay { display: none; }
.reveal-section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-section.active {
  opacity: 1;
  transform: translateY(0);
}
