/* ==========================================================================
   SPLNetwork Schema App — Landing Page Styles
   Themes: Dark (default) & Light
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Dark Theme Variables --- */
body.theme-dark {
  --bg-main: #090d16;
  --bg-alt: #0e1424;
  --card-bg: #131b2e;
  --card-bg-hover: #19243d;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --grid-line: #1e293b;
  --canvas-bg: #090e1a;
  --draft-border: #334155;
  --color-primary: #38bdf8;
  --color-primary-hover: #0284c7;
  --color-primary-text: #041226;
  --badge-bg: rgba(56, 189, 248, 0.12);
  --badge-text: #38bdf8;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.5);
  --icon-sun-display: block;
  --icon-moon-display: none;
}

/* --- Light Theme Variables --- */
body.theme-light {
  --bg-main: #ffffff;
  --bg-alt: #f8fafc;
  --card-bg: #ffffff;
  --card-bg-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --grid-line: #e2e8f0;
  --canvas-bg: #f8fafc;
  --draft-border: #94a3b8;
  --color-primary: #0284c7;
  --color-primary-hover: #0369a1;
  --color-primary-text: #ffffff;
  --badge-bg: rgba(2, 132, 199, 0.08);
  --badge-text: #0284c7;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --icon-sun-display: none;
  --icon-moon-display: block;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  height: 72px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-name strong {
  color: var(--color-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-theme-toggle:hover {
  background: var(--card-bg-hover);
}

.btn-theme-toggle svg {
  width: 18px;
  height: 18px;
}

.icon-sun {
  display: var(--icon-sun-display);
}

.icon-moon {
  display: var(--icon-moon-display);
}

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
}

.burger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  transition: var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-text);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--card-bg);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--card-bg-hover);
  border-color: var(--text-muted);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.btn-disabled {
  background-color: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: transparent;
}

/* --- Hero Section --- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 900px;
  margin: 0 auto 24px;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

/* --- Hero path strip (план → щит → схема) --- */
.hero-path {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 56px;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: var(--transition);
}

.hero-path:hover {
  border-color: var(--color-primary);
  background: var(--card-bg-hover);
}

.hero-path-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.hero-path-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--badge-bg);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-path-arrow {
  color: var(--text-muted);
}

/* --- Preview Chrome --- */
.hero-preview-wrapper {
  max-width: 1040px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
}

.preview-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.chrome-dots {
  display: flex;
  gap: 6px;
}

.chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.chrome-dots span:nth-child(1) { background: #ef4444; }
.chrome-dots span:nth-child(2) { background: #f59e0b; }
.chrome-dots span:nth-child(3) { background: #10b981; }

.chrome-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chrome-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #10b981;
}

.preview-stage {
  padding: 12px;
  background: var(--canvas-bg);
  overflow-x: auto;
}

.schematic-svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 700px;
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-header {
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  overflow-wrap: break-word;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 32px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  background: var(--card-bg-hover);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--badge-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon-wrapper svg {
  width: 26px;
  height: 26px;
}

.feature-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.feature-list li {
  position: relative;
  padding-left: 18px;
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* --- Path Section: три шага со скриншотами стенда --- */
.section-path {
  background-color: var(--bg-alt);
}

.path-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
}

.path-step {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.path-step:nth-child(3) {
  grid-column: 1 / -1;
}

.path-step-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.path-step-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-primary);
  color: var(--color-primary-text);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
}

.path-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.path-step-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.shot-frame {
  margin: 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background: var(--canvas-bg);
}

.shot-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.shot-dots {
  display: flex;
  gap: 5px;
}

.shot-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}

.shot-dots span:nth-child(1) { background: #ef4444; }
.shot-dots span:nth-child(2) { background: #f59e0b; }
.shot-dots span:nth-child(3) { background: #10b981; }

.shot-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.shot-img {
  display: block;
  width: 100%;
  height: auto;
}

.shots-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* --- Новые возможности (D38) --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  background: var(--card-bg-hover);
}

.news-card .shot-frame {
  min-width: 0;
}

.news-card .shot-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

.news-card-text {
  justify-content: center;
}

.news-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.news-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* --- Diff block: отличия от калькуляторов смет --- */
.diff-block {
  margin-top: 72px;
}

.diff-head {
  margin-bottom: 40px;
}

.diff-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.diff-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.diff-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.diff-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  background: var(--card-bg-hover);
}

.diff-icon-wrapper {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--badge-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.diff-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.diff-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.diff-card-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Catalogs Grid --- */
.catalogs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.catalog-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.catalog-header {
  margin-bottom: 16px;
}

.catalog-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--badge-bg);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 8px;
}

.catalog-name {
  font-size: 1.4rem;
  font-weight: 700;
}

.catalog-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.catalog-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #10b981;
  font-family: var(--font-mono);
}

/* --- Pricing Grid --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.15);
  background: linear-gradient(180deg, var(--card-bg) 0%, var(--card-bg-hover) 100%);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-primary-text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-badge.badge-upcoming {
  background: #f59e0b;
  color: #000;
}

.pricing-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.tier-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tier-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 40px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.tier-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.price-val {
  font-size: 1.45rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.price-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.tier-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 32px;
  flex-grow: 1;
}

.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.tier-features .check {
  color: #10b981;
  font-weight: bold;
}

.tier-features .cross {
  color: var(--text-muted);
  opacity: 0.5;
}

.tier-features li.disabled {
  color: var(--text-muted);
  opacity: 0.6;
}

.card-upcoming {
  border-style: dashed;
  opacity: 0.85;
}

/* --- CTA Section --- */
.section-cta {
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alt) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cta-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
}

/* --- Footer --- */
.footer {
  padding: 60px 0 40px;
  background: var(--bg-main);
  border-top: 1px solid var(--border-color);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-left {
  max-width: 380px;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 16px 0 24px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.footer-right {
  display: flex;
  gap: 60px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--color-primary);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1200px) and (min-width: 769px) {
  /* В навбаре стало 7 пунктов — уплотняем, чтобы не было переполнения по X. */
  .nav-menu {
    gap: 16px;
  }
  .nav-link {
    font-size: 0.88rem;
  }
}

@media (max-width: 1000px) and (min-width: 769px) {
  /* Навбар с 7 пунктами не помещается между телефоном и планшетом — уводим в бургер. */
  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-main);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.active {
    display: flex;
  }
  .burger-btn {
    display: flex;
  }
  .btn-nav span {
    display: none;
  }
  .btn-nav {
    padding: 8px 12px;
  }
}

@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.6rem;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .diff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    height: 64px;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--bg-main);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.active {
    display: flex;
  }
  .burger-btn {
    display: flex;
  }
  .btn-nav span {
    display: none;
  }
  .btn-nav {
    padding: 8px 12px;
  }

  .hero {
    padding: 40px 0 30px;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .hero-buttons .btn {
    width: 100%;
  }

  .features-grid,
  .catalogs-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .hero-path {
    border-radius: 14px;
    padding: 12px 16px;
  }

  .path-grid {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .path-step:nth-child(3) {
    grid-column: auto;
  }

  .shots-pair,
  .diff-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    flex-direction: column;
  }
  .footer-right {
    flex-direction: column;
    gap: 30px;
  }
}
