/* ==========================================================================
   category.css — category index page: the intro block (heading + description +
   video) shown BEFORE the product grid, mirroring the original site's layout.
   Loaded via category.njk's {% block head %}.
   ========================================================================== */

/* --- hero cover banner (top of the category page) ----------------------- */
.cat-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(240px, 30vw, 380px);
  padding: clamp(24px, 3.4vw, 48px);
  margin-bottom: clamp(28px, 3.6vw, 48px);
  border-radius: var(--r-lg);
  background-image: var(--cover);
  background-size: cover;
  background-position: center;
  color: #fff;
}

/* functional scrim so the white copy stays legible over any photo */
.cat-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.12) 0%, rgba(8, 10, 14, 0.58) 100%),
    linear-gradient(90deg, rgba(8, 10, 14, 0.52) 0%, rgba(8, 10, 14, 0) 62%);
}

.cat-hero__content {
  position: relative;
  max-width: 720px;
}

.cat-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.cat-hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 12px 0 0;
  color: #fff;
  text-wrap: balance;
}

.cat-hero__brand {
  color: var(--accent);
}

.cat-hero__sub {
  margin: 14px 0 0;
  max-width: 56ch;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  text-wrap: pretty;
}

@media (max-width: 640px) {
  .cat-hero {
    background-image: var(--cover-m, var(--cover));
    min-height: 230px;
  }
}

.cat-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  margin: clamp(8px, 2vw, 20px) 0 clamp(34px, 4.5vw, 60px);
}

.cat-intro__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.14;
  margin-bottom: 16px;
  text-wrap: balance;
}

.cat-intro__text {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.cat-intro__text p + p {
  margin-top: 12px;
}

/* the video card (media.njk videoCard → .vcard) fills the right column */
.cat-intro__video {
  width: 100%;
}

@media (max-width: 820px) {
  .cat-intro {
    grid-template-columns: 1fr;
  }
}

/* --- collapsible catalogue lead-in (above the grid) --------------------- */
.cat-lead {
  margin: clamp(18px, 2.2vw, 30px) 0 clamp(26px, 3vw, 40px);
  max-width: 82ch;
}

.cat-lead__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.14;
  margin-bottom: 12px;
  text-wrap: balance;
}

.cat-lead__text {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.cat-lead__text p {
  margin: 0;
}

/* --- catalogue grid collapsed to two rows, with an expand control ------- */
.product-grid {
  position: relative;
}

.product-grid.is-collapsed {
  overflow: hidden;
}

/* fade hint that there is more below the fold */
.product-grid.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(64px, 8vw, 116px);
  background: linear-gradient(to bottom, transparent, var(--bg) 94%);
  pointer-events: none;
}

.grid-more {
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 2.4vw, 32px);
}

.grid-more__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}

.grid-more__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.grid-more__chev {
  transition: transform 0.25s var(--ease);
}

.grid-more__btn[aria-expanded="true"] .grid-more__chev {
  transform: rotate(180deg);
}

/* --- «Высота камер» series stat cards ----------------------------------- */
.height-cards {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}

.height-card {
  padding: clamp(18px, 2vw, 24px) clamp(18px, 2vw, 24px) clamp(18px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.height-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

/* proportional column — taller series = taller riser, all on one baseline */
.height-card__chart {
  height: 150px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 16px;
}

.height-card__col {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-bottom: 2px solid var(--accent);
  transition: background 0.3s;
}

.height-card:hover .height-card__col {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.height-card__val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 27px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.height-card__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.height-card__sub {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
}

/* --- mid-page marketing / spec sections --------------------------------- */
.cat-sections {
  margin-top: clamp(40px, 5vw, 68px);
  display: grid;
  gap: clamp(32px, 4vw, 56px);
}

.cat-section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 14px;
  max-width: 32ch;
  text-wrap: balance;
}

.cat-section__lead {
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 80ch;
  text-wrap: pretty;
}

.cat-section__lead + .cat-section__lead {
  margin-top: 10px;
}

/* ---- feature tier 1: compact highlight cards (short blurbs) ------------ */
.feat-highlights {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  align-items: stretch;
  gap: 14px;
}

.feat-hl {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .3s, transform .35s var(--ease), box-shadow .35s;
}

.feat-hl:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

/* the short-feature images are 2:1 banners — a 2:1 frame shows them un-cropped */
.feat-hl__media {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--surface-3);
}

.feat-hl__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.feat-hl:hover .feat-hl__media img {
  transform: scale(1.05);
}

.feat-hl__body {
  padding: 16px 18px 18px;
}

.feat-hl__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin-bottom: 6px;
  text-wrap: balance;
}

.feat-hl__text {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---- feature tier 2: detailed editorial rows (image shown in full) ----- */
.feat-blocks {
  margin-top: clamp(36px, 4.5vw, 64px);
  display: grid;
  gap: clamp(56px, 7vw, 104px);
}

.feat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 84px);
}

.feat-row--flip .feat-row__media {
  order: 2;
}

/* a block with no image spans the full width (no empty column) */
.feat-row--noimg {
  grid-template-columns: 1fr;
}

.feat-row__media {
  margin: 0;
}

/* natural aspect, capped — never cropped; presented as a clean floating photo */
.feat-row__media img {
  display: block;
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 16px 46px -26px rgba(20, 25, 29, .30);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.feat-row:hover .feat-row__media img {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px -28px rgba(20, 25, 29, .40);
}

.feat-row__copy {
  max-width: 32rem;
}

/* slim accent tick — a quiet premium marker in place of the old index number */
.feat-row__rule {
  display: block;
  width: 40px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: clamp(16px, 1.8vw, 22px);
}

.feat-row__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(21px, 2.4vw, 29px);
  line-height: 1.16;
  letter-spacing: -.018em;
  margin-bottom: 14px;
  text-wrap: balance;
}

.feat-row__text {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
  text-wrap: pretty;
}

@media (max-width: 760px) {
  .feat-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .feat-row--flip .feat-row__media {
    order: 0;
  }
}

