/* HOME-03E — история: 2 ряда × 4 карточки под линией timeline */
:root {
  --lp-hg-content-width: 1400px;
  --lp-hg-text: var(--color-text-main, #2f2a1f);
  --lp-hg-muted: var(--color-text-muted, #766c5a);
  --lp-hg-eyebrow: var(--color-accent, #c99a42);
  --lp-hg-year: var(--color-accent, #c99a42);
  --lp-hg-line: color-mix(in srgb, var(--color-border, #d8c7a8) 92%, transparent);
  --lp-hg-rail: color-mix(in srgb, var(--color-border, #d8c7a8) 78%, transparent);
  --lp-hg-card-bg: var(--color-bg-card, #fffdf8);
  --lp-hg-card-border: color-mix(in srgb, var(--color-border, #d8c7a8) 72%, transparent);
  --lp-hg-node: var(--color-accent, #c99a42);
  --lp-hg-accent-card: var(--color-footer-bg, #3a2a17);
  --lp-hg-shadow: 0 16px 40px color-mix(in srgb, var(--color-text-main, #2f2a1f) 8%, transparent);
  --lp-hg-radius: 20px;
}

.lp-history-hscroll,
.lp-history-hscroll * {
  box-sizing: border-box;
}

.lp-history-hscroll {
  position: relative;
  padding: 120px 32px;
  background: none;
  background-color: transparent;
  overflow: hidden;
}

.lp-history-hscroll__inner {
  width: 100%;
  max-width: var(--lp-hg-content-width);
  margin: 0 auto;
}

.lp-history-hscroll__intro {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 0 56px;
  text-align: center;
}

.lp-history-hscroll__eyebrow {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  color: var(--lp-hg-eyebrow);
  font: 600 clamp(14px, 1.25vw, 18px) / 1.3 "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  text-transform: none;
}

.lp-history-hscroll__eyebrow::before {
  content: "";
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M42.4 5S19.6 19 31.1 42.9c0 0 24-6 11.3-37.9ZM10.4 28.2s-17.3 23.1 3.7 42.4c0 0 21.7-15.5-3.7-42.4Zm69 25.5S62.7 36 42.5 46.5c4.4-4.8 9.5-9.3 15.1-13.1 4 4.3 17.4 15.1 38.7-4.3 0 0-18.6-9.7-39.9.3C42.5 36.5 22.8 55 10.6 93.9c0 0 1.2 2.4 4.8 0 0 0 2-6.6 6.3-15.7 4 5.6 16.3 17.4 40.9 1.2 0 0-17.4-18.5-38.2-6.5 3.5-6.7 8-14.1 13.7-21.2 3.4 5.1 15.7 18.9 41.3 2Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M42.4 5S19.6 19 31.1 42.9c0 0 24-6 11.3-37.9ZM10.4 28.2s-17.3 23.1 3.7 42.4c0 0 21.7-15.5-3.7-42.4Zm69 25.5S62.7 36 42.5 46.5c4.4-4.8 9.5-9.3 15.1-13.1 4 4.3 17.4 15.1 38.7-4.3 0 0-18.6-9.7-39.9.3C42.5 36.5 22.8 55 10.6 93.9c0 0 1.2 2.4 4.8 0 0 0 2-6.6 6.3-15.7 4 5.6 16.3 17.4 40.9 1.2 0 0-17.4-18.5-38.2-6.5 3.5-6.7 8-14.1 13.7-21.2 3.4 5.1 15.7 18.9 41.3 2Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

h2.lp-history-hscroll__title {
  margin: 0 auto;
  max-width: min(56rem, 96vw);
  padding: 0 12px;
  color: var(--lp-hg-text);
  text-transform: none !important;
  font-family: "Montserrat", "Segoe UI", sans-serif !important;
  font-weight: 600 !important;
  font-style: normal !important;
  font-size: unset !important;
  line-height: normal !important;
  letter-spacing: normal !important;
  text-wrap: wrap;
}

.lp-history-hscroll__title-line {
  display: block;
  font-family: "Montserrat", "Segoe UI", sans-serif !important;
  font-weight: 600 !important;
  font-style: normal !important;
  text-transform: none !important;
  letter-spacing: -0.04em !important;
  font-size: clamp(22px, 4.2vw, 44px) !important;
  line-height: 1.12 !important;
}

@media (min-width: 900px) {
  .lp-history-hscroll__title-line {
    white-space: nowrap;
    font-size: clamp(14px, 1.75vw, 36px) !important;
    line-height: 1.15 !important;
  }
}

@media (min-width: 1200px) {
  .lp-history-hscroll__title-line {
    font-size: clamp(20px, 2.2vw, 40px) !important;
  }
}

.lp-history-hscroll__lead {
  margin: 18px auto 0;
  max-width: 52ch;
  color: var(--lp-hg-muted);
  font: 400 17px/1.65 "Roboto", "Segoe UI", Arial, sans-serif;
  text-wrap: pretty;
}

/* ——— timeline grid ——— */
.lp-history-hscroll__timeline {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
  width: 100%;
}

.lp-history-hscroll__row {
  position: relative;
  width: 100%;
}

.lp-history-hscroll__row-line {
  position: absolute;
  top: 11px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--lp-hg-rail) 6%,
    var(--lp-hg-rail) 94%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.lp-history-hscroll__row-line--accent {
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--lp-hg-year) 42%, var(--lp-hg-rail)) 6%,
    color-mix(in srgb, var(--lp-hg-year) 42%, var(--lp-hg-rail)) 94%,
    transparent 100%
  );
}

.lp-history-hscroll__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 24px);
  width: 100%;
}

.lp-history-hscroll__entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.lp-history-hscroll__entry-axis {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.lp-history-hscroll__entry-node {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lp-hg-node);
  border: 3px solid var(--lp-hg-card-bg, #fff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lp-hg-node) 14%, transparent);
  flex-shrink: 0;
}

.lp-history-hscroll__entry-node--accent {
  width: 14px;
  height: 14px;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--lp-hg-node) 20%, transparent),
    0 0 0 8px color-mix(in srgb, var(--lp-hg-year) 10%, transparent);
}

.lp-history-hscroll__entry-stem {
  display: block;
  width: 2px;
  height: 20px;
  background: color-mix(in srgb, var(--lp-hg-line) 88%, transparent);
  flex-shrink: 0;
}

.lp-history-hscroll__card {
  width: 100%;
  min-height: 100%;
  padding: clamp(16px, 1.6vw, 22px) clamp(14px, 1.4vw, 20px);
  border-radius: var(--lp-hg-radius);
  background: var(--lp-hg-card-bg);
  border: 1px solid var(--lp-hg-card-border);
  box-shadow: var(--lp-hg-shadow);
}

.lp-history-hscroll__card-year {
  margin: 0 0 6px;
  color: var(--lp-hg-year);
  font: 600 clamp(22px, 2.2vw, 32px) / 1 "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.lp-history-hscroll__card-now {
  margin: 0 0 8px;
  color: color-mix(in srgb, var(--lp-hg-year) 85%, #fff);
  font: 600 11px/1 "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lp-history-hscroll__card-title {
  margin: 0 0 10px;
  color: var(--lp-hg-text);
  font: 600 clamp(15px, 1.2vw, 18px) / 1.25 "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

.lp-history-hscroll__card-text {
  margin: 0;
  color: var(--lp-hg-muted);
  font: 400 clamp(13px, 1vw, 15px) / 1.65 "Roboto", "Segoe UI", Arial, sans-serif;
  text-wrap: pretty;
}

.lp-history-hscroll__card-foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--lp-hg-year) 35%, transparent);
  color: color-mix(in srgb, var(--lp-hg-year) 80%, #fff);
  font: 500 12px/1.5 "Roboto", "Segoe UI", Arial, sans-serif;
}

.lp-history-hscroll__card--accent {
  background: var(--lp-hg-accent-card);
  border-color: color-mix(in srgb, var(--lp-hg-accent-card) 88%, #000);
  box-shadow: 0 20px 48px color-mix(in srgb, var(--lp-hg-accent-card) 28%, transparent);
}

.lp-history-hscroll__card--accent .lp-history-hscroll__card-title {
  color: #fff;
}

.lp-history-hscroll__card--accent .lp-history-hscroll__card-text {
  color: color-mix(in srgb, #fff 78%, transparent);
}

@media (max-width: 1024px) {
  .lp-history-hscroll__row-line {
    left: 6%;
    right: 6%;
  }

  .lp-history-hscroll__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }

  .lp-history-hscroll__row-line {
    display: none;
  }

  .lp-history-hscroll__entry-axis {
    display: none;
  }
}

@media (max-width: 640px) {
  .lp-history-hscroll {
    padding: 72px 20px 48px;
  }

  .lp-history-hscroll__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .lp-history-hscroll__entry-axis {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-history-hscroll__timeline {
    scroll-behavior: auto;
  }
}
