/* Сторінка «Комплектуючі». Шапка, курсор і плавний скрол — копія з головної сторінки. */
@view-transition { navigation: auto; }

:root {
  --bg: #000;
  --surface: rgba(14, 16, 22, 0.62);
  --surface-solid: #0c0e13;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2f2f2;
  --muted: #9aa0ab;
  --yellow: #ffd500;
  --yellow-glow: rgba(255, 213, 0, 0.28);
  --blue: #1f5fae;
  --amber: #c8783a;
  --gold-line: linear-gradient(90deg, #8a6d45, #e6c48e, #8a6d45);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Montserrat", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #000;
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;   /* clip не ламає position: sticky в Safari на iPhone */
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
::selection { background: var(--yellow); color: #000; }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }

/* ---------- Зерно поверх сторінки ---------- */
.bg { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; will-change: transform; }   /* окремий шар: прокрутка не перемальовує сторінку */
.bg__grain {
  position: absolute; inset: 0; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Загальні елементи ---------- */
.eyebrow {
  margin: 0 0 14px; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--gold-line); }
.line { display: block; width: min(440px, 80%); height: 2px; background: var(--gold-line); margin: 28px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  background: var(--yellow); color: #000; border: 1px solid var(--yellow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s, color 0.35s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px var(--yellow-glow); }
.btn--ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,0.25); }
.btn--ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn--small { padding: 10px 20px; font-size: 0.85rem; }

/* Базова картка з жовтою обводкою при наведенні */
.card {
  position: relative;
  background: rgba(14, 16, 22, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.5s var(--ease), background 0.4s;
}
.card::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  border: 1px solid var(--yellow); opacity: 0;
  box-shadow: 0 0 0 1px var(--yellow), inset 0 0 24px rgba(255, 213, 0, 0.08);
  transition: opacity 0.4s var(--ease);
}
.card:hover, .card:focus-visible {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow: 0 20px 50px -10px var(--yellow-glow), 0 0 0 1px rgba(255, 213, 0, 0.15);
  background: rgba(18, 20, 26, 0.78);
}
.card:hover::after, .card:focus-visible::after { opacity: 1; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled { background: rgba(3, 4, 6, 0.92); border-color: var(--line); }
.header__inner { display: flex; align-items: center; gap: 32px; height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 50px; height: auto; transition: transform 0.5s var(--ease); }
.header .brand__logo { width: 46px; }
.brand:hover .brand__logo { transform: rotate(-8deg) scale(1.08); }
.brand__name { font-size: 0.72rem; letter-spacing: 0.16em; line-height: 1.3; font-weight: 500; }
.header .brand__name { font-size: 0.7rem; letter-spacing: 0.22em; font-weight: 400; color: #cfd2d8; white-space: nowrap; }
.header .brand__name b { font-weight: 700; color: #fff; }
.header__call { display: none; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { white-space: nowrap; }
/* вузький ПК / планшет у ландшафті: пунктів більше — стискаємо відступи, «Зв'язатися» дублює «Контакти» */
@media (min-width: 881px) and (max-width: 1100px) {
  .header__cta { display: none; }
  .header__inner { gap: 24px; }
  .nav__links { gap: 22px; }
}
.nav__extra { display: none; }
.nav a { position: relative; font-size: 0.9rem; color: #d7d7d7; padding: 6px 0; transition: color 0.3s; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--yellow);
  transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease);
}
.nav a:hover { color: var(--yellow); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.burger { display: none; }


/* ---------- Анімація появи ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.card.reveal { transition: opacity 0.9s var(--ease), transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.5s var(--ease), background 0.4s; }
.card.reveal:not(.is-visible) { transition-duration: 0.9s; }
.card.reveal.is-visible:hover { transform: translateY(-8px); }


@media (max-width: 880px) {
  .header__cta { display: none; }
  .header { padding-top: env(safe-area-inset-top); background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0)); }
  .header.is-scrolled { background: rgba(3, 4, 6, 0.96); }
  html.menu-open .header { background: transparent; border-color: transparent; }
  .header__inner { height: 64px; gap: 10px; }
  .header .brand { gap: 10px; }
  .header .brand__logo { width: 38px; }
  .header .brand__name { font-size: 0.62rem; letter-spacing: 0.18em; }
  .header__call {
    display: grid; place-items: center; margin-left: auto; width: 42px; height: 42px; border-radius: 50%;
    background: var(--yellow); color: #000; transition: transform 0.3s var(--ease);
  }
  .header__call svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
  .header__call:active { transform: scale(0.92); }
  .burger {
    position: relative; display: block; width: 44px; height: 44px; margin-right: -8px;
    background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .burger span {
    position: absolute; right: 10px; height: 2px; border-radius: 2px; background: #fff;
    transition: transform 0.35s var(--ease), width 0.35s var(--ease), top 0.35s var(--ease);
  }
  .burger span:first-child { top: 17px; width: 22px; }
  .burger span:last-child { top: 25px; width: 14px; background: var(--yellow); }
  .burger[aria-expanded="true"] span { top: 21px; width: 22px; }
  .burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); background: #fff; }

  /* ---- Повноекранне меню, що виїжджає справа ---- */
  .nav {
    position: fixed; inset: 0; z-index: -1; margin: 0;
    height: 100vh; height: 100dvh; overflow-y: auto;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    padding: calc(104px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom));
    visibility: hidden; pointer-events: none;
    transition: visibility 0s linear 0.95s;
  }
  /* два шари «шторки»: жовта хвиля, за нею — темна панель */
  .nav::before, .nav::after {
    content: ""; position: fixed; inset: 0; z-index: -1;
    transform: translateX(101%);
    transition: transform 0.75s cubic-bezier(0.77, 0, 0.18, 1);
  }
  .nav::before { background: var(--yellow); transition-delay: 0.14s; }
  .nav::after {
    background:
      radial-gradient(ellipse 70% 40% at 100% 0%, rgba(200, 120, 58, 0.2), transparent 70%),
      radial-gradient(ellipse 80% 50% at 0% 100%, rgba(31, 95, 174, 0.3), transparent 70%),
      #040507;
    transition-delay: 0s;
  }
  .nav.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
  .nav.is-open::before { transform: none; transition-delay: 0s; }
  .nav.is-open::after { transform: none; transition-delay: 0.12s; }

  .nav__links { flex-direction: column; gap: 0; counter-reset: n; }
  .nav__links a {
    counter-increment: n;
    display: flex; align-items: baseline; gap: 16px; padding: 14px 0;
    font-size: clamp(1.9rem, 8.5vw, 2.6rem); font-weight: 300; text-transform: uppercase; letter-spacing: 0.01em; color: #fff;
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateX(70px);
    transition: opacity 0.25s, transform 0.3s var(--ease), color 0.3s;
  }
  .nav__links a::before { content: "0" counter(n); font-family: var(--mono); font-size: 0.78rem; font-weight: 400; color: var(--yellow); }
  .nav__links a::after { display: none; }
  .nav__links a:active { color: var(--yellow); }
  .nav__extra {
    display: grid; gap: 10px;
    opacity: 0; transform: translateX(70px);
    transition: opacity 0.25s, transform 0.3s var(--ease);
  }
  .nav__extra a { font-family: var(--mono); font-size: 1rem; color: #d7d9de; padding: 0; }
  .nav__extra a::after { display: none; }
  .nav__extra p { margin: 14px 0 0; font-size: 0.8rem; letter-spacing: 0.08em; color: var(--muted); }
  .nav.is-open .nav__links a, .nav.is-open .nav__extra {
    opacity: 1; transform: none;
    transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), color 0.3s;
    transition-delay: calc(0.42s + var(--i) * 0.06s);
  }
  html.menu-open { overflow: hidden; }
}

/* =========================================================
   Кастомний курсор (лише ПК з мишею)
   ========================================================= */
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor.modal-open, html.has-cursor.modal-open * { cursor: auto !important; }
.cursor { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; }
.cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--yellow); box-shadow: 0 0 10px rgba(255, 213, 0, 0.8); transition: opacity 0.15s; }
.cursor__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: opacity 0.15s;
}
.cursor.is-hidden .cursor__ring, .cursor.is-hidden .cursor__dot { opacity: 0; }
.magnetic { transition: transform 0.45s var(--ease); }

/* =========================================================
   Стилізований скролбар
   ========================================================= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #030406; }
::-webkit-scrollbar-thumb { background: linear-gradient(#2b2e36, #1b1d23); border: 2px solid #030406; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--yellow); }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: rgba(255, 213, 0, 0.55) #030406; }
}

/* =========================================================
   Плавний скрол (Lenis)
   ========================================================= */
html.lenis, html.lenis body { height: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }


/* =========================================================
   Розділи комплектуючих
   ========================================================= */
.parts {
  min-height: 100vh; min-height: 100svh; padding: 140px 0 110px;
  background:
    radial-gradient(ellipse 45% 40% at 85% 10%, rgba(200, 120, 58, 0.16), transparent 70%),
    radial-gradient(ellipse 55% 45% at 75% 25%, rgba(31, 95, 174, 0.3), transparent 70%),
    radial-gradient(ellipse 45% 40% at 10% 85%, rgba(31, 95, 174, 0.22), transparent 70%),
    #000;
}
.parts__head { margin-bottom: 52px; max-width: 720px; }
.parts__title { font-weight: 200; font-size: clamp(2.4rem, 5.4vw, 4.6rem); text-transform: uppercase; letter-spacing: -0.01em; }
.parts__sub { margin: 16px 0 0; color: var(--muted); }

/* Картки розділів: строга сітка без скруглень (як у Brave1), темні плитки в стилі сайту, кольорові фото */
.parts__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.parts__grid > li { display: flex; }
.category {
  position: relative; width: 100%; aspect-ratio: 340 / 274;
  display: flex; flex-direction: column; padding: 20px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(31, 95, 174, 0.32), transparent 70%),
    #0f1319;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f2f2f2; overflow: hidden;
  transition: border-color 0.32s var(--ease), box-shadow 0.45s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.category__media { position: relative; flex: 1; min-height: 0; display: block; }
.category__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  padding: 2% 8%; object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55));
  transition: transform 0.45s var(--ease);
}
.category__body { display: block; margin-top: 14px; font-size: 1.02rem; line-height: 1.25; }
.category__name {
  font-size: inherit; font-weight: 500; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.01em;
  padding-bottom: 3px;
  background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0 1.5px no-repeat;   /* підкреслення, що «виростає» зліва */
  -webkit-box-decoration-break: clone; box-decoration-break: clone;                       /* і під кожним рядком довгої назви */
  transition: background-size 0.32s var(--ease);
}
.category:hover { border-color: rgba(255, 213, 0, 0.55); box-shadow: 0 18px 40px -18px var(--yellow-glow); }
.category:hover .category__media img { transform: scale(1.06); }
.category:hover .category__name { background-size: 100% 1.5px; }
.category:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.nav__links a[aria-current="page"] { color: var(--yellow); }

/* =========================================================
   Футер (копія з головної сторінки)
   ========================================================= */
.footer {
  position: relative; z-index: 10; isolation: isolate;
  padding: 84px 0 calc(32px + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 45% 70% at 12% 0%, rgba(31, 95, 174, 0.22), transparent 70%),
    radial-gradient(ellipse 30% 50% at 92% 100%, rgba(200, 120, 58, 0.14), transparent 70%),
    #040507;
  border-radius: 36px 36px 0 0;
}
.footer::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 0, 0.55), transparent);
}
.footer__grid { display: grid; grid-template-columns: 1fr auto auto; gap: 48px 72px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
/* ПК: лого і опис — в один рядок; колонки «Навігація» і «Контакти» притиснуті праворуч */
.footer__about { display: flex; align-items: center; gap: 32px; }
.footer__about .brand { flex: none; }
@media (min-width: 1081px) {
  /* опис — по центру вільного місця між лого та колонками; усе вирівняно по одній осі */
  .footer__about { align-self: center; }   /* колонки «Навігація» й «Контакти» лишаються вирівняними по верху */
  .footer .footer__about p { margin-inline: auto; text-align: center; transform: translateX(20px); }   /* компенсація різниці відступів: 72px між колонками − 32px між лого й текстом */
}
.footer__logo { width: 200px; transition: transform 0.5s var(--ease); }
.footer__logo:hover { transform: rotate(-4deg) scale(1.04); }
.footer__about p { margin: 0; max-width: 370px; color: #a9adb6; font-size: 1.05rem; line-height: 1.6; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { margin: 0 0 8px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--yellow); }
.footer__col a { width: fit-content; max-width: 100%; overflow-wrap: anywhere; color: #cfd2d8; font-size: 0.92rem; transition: color 0.3s, transform 0.35s var(--ease); }
.footer__col a:hover { color: var(--yellow); transform: translateX(4px); }
.footer__bottom { display: flex; align-items: center; gap: 16px; padding-top: 28px; }
.footer__bottom p { margin: 0; font-size: 0.9rem; }
.footer__bottom small { margin-left: auto; color: var(--muted); }
.footer__trident { width: 22px; height: auto; opacity: 0.9; }
@media (max-width: 1080px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .footer { border-radius: 26px 26px 0 0; padding-top: 64px; }
}
@media (max-width: 620px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer__about { grid-column: 1 / -1; display: block; }
  .footer__about .brand { justify-content: center; margin-bottom: 26px; }
  .footer__logo { width: 190px; margin-inline: auto; }
  .footer__about p { max-width: 420px; color: #b9bdc5; font-size: 1rem; line-height: 1.65; }
  .footer__bottom { flex-direction: column; text-align: center; gap: 10px; }
  .footer__bottom small { margin-left: 0; }
  .footer__col a[href^="mailto:"] { font-size: 0.82rem; }
}

/* =========================================================
   Сенсорні екрани, планшет, телефон
   ========================================================= */
@media (hover: none) {
  /* на телефоні «залиплий» hover після дотику не підсвічує картку */
  .card:hover { transform: none; box-shadow: none; border-color: var(--line); background: rgba(14, 16, 22, 0.88); }
  .card:hover::after { opacity: 0; }
  .category:hover { border-color: rgba(255, 255, 255, 0.08); box-shadow: none; }
  .category:hover .category__media img { transform: none; }
  .category:hover .category__name { background-size: 0 1.5px; }
  /* жовта обводка — тільки поки палець на картці */
  .card.reveal.is-visible:hover { transform: none; }
  .card.is-pressed, .card.reveal.is-visible.is-pressed { transform: scale(0.98); }
  .card.is-pressed { border-color: transparent; box-shadow: 0 14px 36px -12px var(--yellow-glow); }
  .card.is-pressed::after { opacity: 1; }
  .category.is-pressed { transform: scale(0.98); transition: transform 0.2s var(--ease); }
  .category.is-pressed { border-color: rgba(255, 213, 0, 0.6); }
  .category.is-pressed .category__media img { transform: scale(1.05); }
  .category.is-pressed .category__name { background-size: 100% 1.5px; }
  .btn:active { transform: scale(0.97); }
}
@media (max-width: 1080px) {
  .category { padding: 16px; }
  .category__body { font-size: 0.88rem; }
}
@media (max-width: 767px) {
  .parts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .card { background: rgba(14, 16, 22, 0.88); }
  .header.is-scrolled { background: rgba(0, 0, 0, 0.92); }
  .parts { padding: 104px 0 72px; }
  .parts__head { margin-bottom: 32px; }
  .parts__title { font-size: clamp(1.7rem, 9vw, 2.6rem); }
}
@media (max-width: 767px) {
  /* рівні колонки: довга назва не розпирає картку */
  .parts__grid { gap: 6px; }
  .category { padding: 12px; aspect-ratio: 1 / 1; }
  .category__body { margin-top: 10px; }
  .category__body { font-size: clamp(0.7rem, 3.1vw, 0.85rem); }
  .category__name { hyphens: auto; overflow-wrap: break-word; }
}

@supports (padding: env(safe-area-inset-left)) {
  .container { width: min(1240px, 100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
