/* Родослед — landing stub */

:root {
  --bg: #f7fbf8;
  --bg-soft: #eef5f0;
  --bg-visual: #eef5f0;
  --text: #0f1a14;
  --text-hook: #1a2e22;
  --text-muted: #51665a;
  --text-soft: #64756b;
  --rodo: #38404b;
  --sled: #16a34a;
  --sled-dark: #15803d;
  --border: rgba(134, 180, 154, 0.42);
  --border-soft: rgba(134, 180, 154, 0.32);
  --content-max: 720px;
  --page-gutter: clamp(24px, 4vw, 56px);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --header-h: 72px;
  --ink: #1a2e40;
  --ink-text: #f0ebe3;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: none;
}

.stub-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Header */
.stub-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--header-h);
  padding-inline: var(--page-gutter);
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.stub-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.stub-logo__img {
  display: block;
  width: auto;
  height: 40px;
  max-width: none;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 768px) {
  .stub-logo__img {
    height: 48px;
  }
}

/* ── HERO (только этот блок — split) ── */
.stub-hero {
  display: grid;
  grid-template-columns: min(58%, calc(var(--content-max) + clamp(48px, 8vw, 112px))) 1fr;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}

.stub-hero__panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px) var(--page-gutter);
  max-width: calc(var(--content-max) + clamp(48px, 8vw, 112px));
}

.stub-hero__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 20% 44%, rgba(22, 163, 74, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 10% 88%, rgba(22, 163, 74, 0.045) 0%, transparent 38%),
    radial-gradient(rgba(22, 163, 74, 0.055) 0.7px, transparent 0.7px);
  background-size: auto, auto, 22px 22px;
}

.stub-note {
  margin: 0 0 clamp(12px, 1.5vh, 16px);
  max-width: var(--content-max);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.stub-hook {
  margin: 0 0 clamp(12px, 1.5vh, 18px);
  max-width: var(--content-max);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--rodo);
}

.stub-hook__line { display: block; }
.stub-hook strong { color: var(--sled); font-weight: 700; }

.stub-lead {
  margin: 0;
  max-width: var(--content-max);
  padding-top: clamp(12px, 1.5vh, 16px);
  font-size: clamp(0.9375rem, 1.15vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.stub-lead strong {
  color: var(--sled-dark);
  font-weight: 500;
}

.stub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vh, 32px);
}

.stub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.stub-btn__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: block;
}

.stub-btn:active { transform: scale(0.98); }

.stub-btn--fill {
  color: #fff;
  background: var(--sled);
  border: 1px solid var(--sled);
}

.stub-btn--fill:hover {
  background: var(--sled-dark);
  border-color: var(--sled-dark);
}

.stub-btn--outline {
  color: var(--sled-dark);
  background: #fff;
  border: 1px solid rgba(22, 163, 74, 0.45);
}

.stub-btn--outline:hover {
  background: rgba(22, 163, 74, 0.06);
  border-color: var(--sled);
}

/* Hero visual — только внутри .stub-hero */
.stub-hero__visual {
  position: relative;
  overflow: hidden;
  background: var(--bg-visual);
  min-height: 280px;
}

.stub-hero__visual img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: auto;
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.stub-hero__visual-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(247, 251, 248, 0.95) 0%,
    rgba(247, 251, 248, 0.55) 4%,
    rgba(247, 251, 248, 0.15) 9%,
    transparent 13%
  );
}

/* ── Ниши — полноценная секция ── */
.stub-niches {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
}

.stub-niches__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(56px, 8vw, 88px) var(--page-gutter);
}

.stub-niches__head {
  max-width: var(--content-max);
  margin-bottom: clamp(36px, 5vw, 48px);
}

.stub-niches__eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sled-dark);
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.16);
}

.stub-niches__title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--rodo);
}

.stub-niches__lead {
  margin: 0;
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--text-muted);
}

.stub-niches__block + .stub-niches__block {
  margin-top: clamp(36px, 5vw, 48px);
  padding-top: clamp(36px, 5vw, 48px);
  border-top: 1px solid rgba(134, 180, 154, 0.28);
}

.stub-niches__block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: clamp(16px, 2.5vw, 20px);
}

.stub-niches__block-title {
  margin: 0;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rodo);
}

.stub-niches__badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sled-dark);
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.18);
}

.stub-niches__badge--muted {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(134, 180, 154, 0.35);
}

.stub-niche-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1200px) {
  .stub-niche-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stub-niche-grid--other {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stub-niche-grid--other {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stub-niche-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(134, 180, 154, 0.3);
  box-shadow: 0 1px 2px rgba(15, 26, 20, 0.03);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stub-niche-card:hover {
  border-color: rgba(22, 163, 74, 0.35);
  box-shadow: 0 4px 16px rgba(15, 26, 20, 0.05);
}

.stub-niche-card--focus {
  border-left: 3px solid var(--sled);
  padding-left: 14px;
}

.stub-niche-card__name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.stub-niche-card--focus .stub-niche-card__name {
  color: var(--sled-dark);
}

.stub-niche-card__text {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-soft);
}

/* ── Тёмный блок: контакты + подвал (thebaturin) ── */
.stub-dark {
  background: var(--ink);
  color: var(--ink-text);
}

.stub-contact {
  padding: 0;
}

.stub-contact__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(4rem, 10vw, 6rem) clamp(24px, 4vw, 48px);
}

.stub-contact__box {
  max-width: 40rem;
  width: 100%;
  text-align: center;
}

.stub-contact__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink-text);
}

.stub-contact__note {
  margin: 0.25rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--ink-text) 62%, transparent);
}

.stub-contact__email {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink-text);
  border-bottom: 1px solid color-mix(in srgb, var(--ink-text) 30%, transparent);
  padding-bottom: 0.15em;
  transition: color 0.2s, border-color 0.2s;
}

.stub-contact__email:hover {
  color: color-mix(in srgb, var(--sled) 55%, #fff);
  border-color: color-mix(in srgb, var(--sled) 55%, #fff);
}

.stub-contact__channels {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.stub-contact__channels a {
  color: color-mix(in srgb, var(--ink-text) 85%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink-text) 35%, transparent);
  transition: color 0.2s, border-color 0.2s;
}

.stub-contact__channels a:hover {
  color: #fff;
  border-color: #fff;
}

.stub-foot {
  padding: 0;
  background: transparent;
}

.stub-foot__inner {
  padding: clamp(1.75rem, 3vw, 2.25rem) clamp(24px, 4vw, 48px) clamp(2rem, 3.5vw, 2.5rem);
  border-top: 1px solid color-mix(in srgb, var(--ink-text) 10%, transparent);
  text-align: center;
}

.stub-foot__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.stub-foot__nav a {
  color: color-mix(in srgb, var(--ink-text) 68%, transparent);
  transition: color 0.2s;
}

.stub-foot__nav a:hover {
  color: var(--ink-text);
}

.stub-foot__fine {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--ink-text) 38%, transparent);
}

.stub-foot__dot {
  margin-inline: 0.15rem;
  user-select: none;
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .stub-hero {
    grid-template-columns: 1fr;
    grid-template-rows: min(42vh, 360px) auto;
    min-height: 0;
  }

  .stub-hero__visual {
    order: 0;
  }

  .stub-hero__visual img {
    object-position: center center;
  }

  .stub-hero__visual-fade {
    background: linear-gradient(
      180deg,
      transparent 55%,
      rgba(247, 251, 248, 0.4) 75%,
      var(--bg) 100%
    );
  }

  .stub-hero__panel {
    order: 1;
    max-width: none;
    padding-bottom: clamp(32px, 5vw, 48px);
  }

  .stub-niche-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stub-niche-grid--other {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .stub-header {
    padding-inline: 20px;
  }

  .stub-hero__panel {
    padding-inline: 20px;
  }

  .stub-niches__inner {
    padding-inline: 20px;
  }

  .stub-actions {
    flex-direction: column;
  }

  .stub-btn {
    width: 100%;
    white-space: normal;
  }

  .stub-niche-grid,
  .stub-niche-grid--other {
    grid-template-columns: 1fr;
  }
}
