:root {
  /* Блокируем системный dark mode на уровне свойств */
  color-scheme: light;

  --bg-page: 
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 35%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.10), transparent 30%),
    #f5f7fb;

  --card-bg: rgba(255, 255, 255, 0.84);
  --card-border: rgba(255, 255, 255, 0.7);
  --panel-bg: #ffffff;

  --text: #0f172a;
  --text-secondary: #64748b;
  --heading: #0b1220;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: rgba(79, 70, 229, 0.1);

  --success: #16a34a;

  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.14);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Дублируем для гарантии */
  color-scheme: light;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.6;
  /* Форсируем светлый фон, чтобы браузер не подставил темный */
  background-color: #f5f7fb !important;
  color-scheme: light;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
    HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(245, 247, 251, 0.72);
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.site-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(14, 165, 233, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.18);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.brand-subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--heading);
}

/* =========================
    BUTTONS
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-primary.is-active {
  color: #ffffff;
}

.btn-primary.is-active {
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover,
.btn-secondary:focus-visible,
.btn-secondary.is-active {
  color: var(--text);
  border-color: rgba(79, 70, 229, 0.28);
}

/* =========================
    SECTIONS
========================= */

.section {
  padding: 24px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--heading);
}

.section-head p {
  margin: 0;
  color: var(--text-secondary);
}

/* =========================
    FOOTER
========================= */

.site-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding: 28px 0 36px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================
    MOBILE MENU
========================= */

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  background: #ffffff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  padding: 0;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--heading);
  margin: 3px 0;
  transition:
    transform var(--transition),
    opacity var(--transition),
    background var(--transition);
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 760px) {
  .site-header-inner,
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header-inner {
    min-height: 76px;
    padding-top: 14px;
    padding-bottom: 14px;
    position: relative;
  }

  .brand {
    max-width: calc(100% - 60px);
  }

  .menu-toggle {
    display: inline-flex;
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 41;
  }

  .header-actions {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 40;

    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: var(--shadow-md);

    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 18px 20px;

    display: none;
  }

  .site-header.menu-open .header-actions {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 8px 0;
  }

  .header-actions .btn {
    width: 100%;
  }
}