/* ============================================================
   TRIBO — Product-line landing (серія), e.g. Carbon Line
   Ported from the reference concept onto the project design tokens
   (Temac, main.css vars, cool-zinc greys). No Tailwind.
   ============================================================ */

.series {
  padding-top: calc(var(--header-h) + var(--space-4));
  padding-bottom: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

/* Translated compound words must not widen grid/flex columns. */
.series-hero > *,
.series-analytics__head > * { min-width: 0; }
.series h1,
.series h2,
.series h3 {
  /* Move whole words to the next line; split only words wider than the column. */
  overflow-wrap: anywhere;
  hyphens: none;
}

/* Shared section header (eyebrow + title) */
.series-secthead { display: flex; flex-direction: column; gap: 0.75rem; }
.series-secthead--center { text-align: center; align-items: center; max-width: 720px; margin-inline: auto; }
.series-eyebrow {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.series-secthead h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.series-rule { width: 48px; height: 1px; background: rgba(255,255,255,.22); margin-top: 0.5rem; }

/* Reusable spotlight card surface (mouse-tracked via .js-spotlight) */
.series-card {
  position: relative;
  overflow: hidden;
  background: rgba(24,24,27,.28);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card-lg);
  transition: border-color var(--t-premium), background var(--t-premium);
}
.series-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,.04),
    transparent 40%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.series-card:hover::before { opacity: 1; }
.series-card:hover { border-color: var(--glass-hover); }
.series-card > * { position: relative; z-index: 2; }

/* ── 1. HERO ─────────────────────────────────────────────── */
.series-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.series-hero__bg {
  position: absolute;
  top: -3.5rem;
  left: -3vw;
  font-size: clamp(7rem, 15vw, 14rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(255,255,255,.05);
  color: transparent;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.series-hero__text { position: relative; z-index: 2; display: flex; flex-direction: column; gap: var(--space-3); }

.series-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: flex-start;
  background: rgba(24,24,27,.6);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}
.series-badge__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  animation: series-pulse 2s ease-in-out infinite;
}
.series-badge__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
@keyframes series-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.series-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #f4f4f5;
}
.series-hero__title span {
  display: block;
  margin-top: 0.5rem;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}
.series-hero__lead {
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(210,214,228,.72);
  max-width: 34rem;
}
.series-cta {
  align-self: flex-start;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3);
  transition: background var(--t-premium), color var(--t-premium);
}

.series-hero__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 500px;
  width: 100%;
  margin-inline: auto;
  border: 1px solid rgba(39,39,42,.6);
  border-radius: var(--radius-card-lg);
  background: rgba(9,9,10,.25);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.series-hero__visual::before {
  content: '';
  position: absolute;
  width: 60%; height: 60%;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  filter: blur(60px);
  transition: background var(--t-premium);
}
.series-hero__visual:hover::before { background: rgba(255,255,255,.1); }
.series-hero__img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform var(--t-premium);
  will-change: transform;
}

/* ── 2. INTERACTIVE INFOGRAPHIC (anatomy) ────────────────── */
.series-anatomy { display: flex; flex-direction: column; gap: var(--space-8); scroll-margin-top: calc(var(--header-h) + var(--space-4)); }
.series-anatomy__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}
.series-anatomy__col { display: flex; flex-direction: column; gap: var(--space-3); }

/* tech card */
.series-tech {
  border-radius: var(--radius-card);
  padding: 1.5rem;
  cursor: pointer;
  outline: none;
}
.series-tech__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.series-tech__num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  padding: 1px 7px;
}
.series-tech__head h3 { font-size: 0.95rem; font-weight: 700; color: #e4e4e7; letter-spacing: -0.01em; }
.series-tech__body { font-size: var(--fs-sm); font-weight: 300; line-height: 1.6; color: var(--text-muted); }
/* active (hover / focus / tap) — highlight border + lift bg */
.series-tech.is-active {
  border-color: rgba(212,212,216,.7);
  background: rgba(39,39,42,.35);
}

/* center stage — no frame/clipping so reveal close-ups can extend past the
   pad; a drafting grid (matching /vyrobnytstvo) fades out toward the edges */
.series-anatomy__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.series-anatomy__stage::before,
.series-drafting-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
  mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 75%);
  pointer-events: none;
  z-index: 0;
}
.series-anatomy__main {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: filter var(--t-premium), opacity var(--t-premium);
}
.series-anatomy__main.is-dimmed { filter: blur(2px); opacity: 0.55; }

/* reveal-on-hover detail close-ups, stacked over the main pad.
   Sized as a share of the stage so they scale down together with the pad
   on narrow layouts (instead of staying a fixed 132px and dwarfing it). */
.series-detail {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 3;
  width: 34%;
  aspect-ratio: 1 / 1;
  height: auto;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.5) rotate(-6deg);
  opacity: 0;
  filter: blur(12px);
  transition: opacity var(--t-premium), transform var(--t-premium), filter var(--t-premium);
}
.series-detail img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.6));
}
.series-detail.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0);
  filter: blur(0);
}
/* anchor positions echo the reference hotspot placement */
.series-detail--adaptation { top: 50%; left: 40%; }
.series-detail--edgecone   { top: 31%; left: 26%; }
.series-detail--carbon     { top: 60%; left: 70%; }
.series-detail--backplate  { top: 30%; left: 75%; }

/* ── 3. LAB ANALYTICS (wear bars) ────────────────────────── */
.series-analytics { display: flex; flex-direction: column; gap: var(--space-8); }
.series-analytics__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1.5rem;
  flex-wrap: wrap;
}
.series-analytics__note {
  font-size: var(--fs-sm);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 24rem;
  text-align: right;
}
.series-analytics__note strong { color: rgba(212,212,216,.9); font-weight: 400; }
.series-analytics__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }

.series-wearcard { padding: 2rem; }
.series-wearcard__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(212,212,216,.85);
  margin-bottom: 2rem;
}
.series-wearlist { display: flex; flex-direction: column; gap: 1.4rem; }
.series-wear__row { display: flex; justify-content: space-between; gap: 0.5rem; font-size: var(--fs-sm); margin-bottom: 0.5rem; }
.series-wear__row .name { color: var(--text-muted); }
.series-wear__row .val { font-family: 'IBM Plex Mono', monospace; color: var(--text-muted); white-space: nowrap; }
.series-wear__track {
  width: 100%;
  height: 8px;
  background: rgba(9,9,10,.9);
  border: 1px solid rgba(24,24,27,.9);
  border-radius: 999px;
  overflow: hidden;
}
.series-wear__fill {
  width: calc(100% * var(--wear-value) / var(--wear-scale));
  height: 100%;
  border-radius: 999px;
  background: #71717a;
}
.series-wear--tribo .name { color: #fff; font-weight: 700; }
.series-wear--tribo .val { color: #fff; }
.series-wear--tribo .series-wear__fill { background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.3); }
.series-wear__axis {
  position: relative;
  margin-top: 1.125rem;
  min-height: 1.5rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font: 0.75rem 'IBM Plex Mono', monospace;
}
.series-wear__axis span {
  position: absolute;
  left: calc(100% * var(--wear-tick) / var(--wear-scale));
  transform: translateX(-50%);
  padding-top: 0.4rem;
  white-space: nowrap;
}
.series-wear__axis span:first-child { left: 0; transform: none; }
.series-wear__axis span:last-child { left: auto; right: 0; transform: none; }

/* ── 4. APPLICATIONS ─────────────────────────────────────── */
.series-apps { display: flex; flex-direction: column; gap: var(--space-6); }
.series-apps__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.series-app { padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.series-app__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(24,24,27,.8);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.series-app h3 { font-size: 1.25rem; font-weight: 700; color: #f4f4f5; margin-bottom: 0.5rem; }
.series-app p { font-size: var(--fs-sm); font-weight: 300; line-height: 1.7; color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .series-hero { grid-template-columns: 1fr; gap: var(--space-6); }
  .series-hero__bg { display: none; }
  .series-anatomy__grid { grid-template-columns: 1fr; }

  /* Sticky visual: the pad stays pinned under the header while the cards scroll
     beneath it, so the reveal is always on-screen even when the user reaches
     card 03/04 far down the list. Full-width solid panel hides cards passing
     behind it. Reveals are auto-triggered on scroll (see template JS). */
  .series-anatomy__stage {
    order: -1;
    max-width: none;
    width: 100%;
    aspect-ratio: auto;
    height: 240px;
    position: sticky;
    top: var(--header-h);
    z-index: 5;
    background: var(--bg);
  }
  .series-anatomy__stage::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -20px;
    height: 20px;
    background: linear-gradient(var(--bg), transparent);
    pointer-events: none;
  }
  .series-anatomy__main { width: auto; max-width: 80%; max-height: 180px; }

  /* Reveal close-ups: center them over the pinned pad (the hotspot spread
     doesn't map meaningfully at this size) with a fixed pad-appropriate size. */
  .series-anatomy__stage .series-detail {
    top: 50%; left: 50%;
    width: 130px;
  }
}
@media (max-width: 768px) {
  .series { gap: var(--space-12); }
  .series-analytics__grid,
  .series-apps__grid { grid-template-columns: 1fr; }
  .series-analytics__head { flex-direction: column; align-items: flex-start; }
  .series-analytics__note { text-align: left; }
  .series-wearcard { padding: 1rem; }
  .series-hero__title span { margin-top: 0.75rem; }
}
@media (max-width: 360px) {
  .series-wear__axis { font-size: 0.6875rem; }
}
