/* ===========================================================
   layout.css — header, hero, marquee, about, gallery, footer + адаптив
   =========================================================== */

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.26rem; letter-spacing: -0.02em; }
.logo__mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--steel-800), var(--aqua-500));
  color: #fff;
}
.logo__text b { color: var(--aqua-600); font-weight: 800; }
.logo--light { color: var(--white); }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav__link { padding: 9px 15px; border-radius: var(--r-sm); font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--slate); }
.nav__link:hover { color: var(--steel-800); background: var(--ice-050); }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; color: var(--steel-800);
}
.header__phone:hover { color: var(--aqua-600); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.burger span { width: 24px; height: 2.5px; background: var(--steel-800); border-radius: 2px; transition: .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1000px 480px at 88% -10%, rgba(25,198,201,.16), transparent 60%),
    linear-gradient(180deg, var(--ice-050), var(--white));
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 92px);
  overflow: hidden;
}
/* технічна сітка фоном */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(16,35,56,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,35,56,.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(700px 400px at 75% 30%, #000, transparent 75%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.06fr .94fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__title { margin: 16px 0; }
.hero__lead { font-size: 1.12rem; color: var(--slate); max-width: 38ch; }
.hero__lead strong { color: var(--steel-800); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 30px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 0; padding-top: 22px; border-top: 1px solid var(--line); }
.hero__trust li { padding-right: 26px; margin-right: 26px; border-right: 1px solid var(--line); }
.hero__trust li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero__trust li strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; color: var(--steel-800); }
.hero__trust li span { color: var(--slate); font-size: .88rem; }

/* Hero visual — фото у кадрі з кутовою рамкою */
.hero__visual { position: relative; min-height: 380px; display: grid; place-items: center; }
.hero__frame {
  position: relative;
  width: min(460px, 100%);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--ice-200);
}
.hero__frame img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
/* кутові інженерні "куточки" */
.hero__frame::before, .hero__frame::after {
  content: ""; position: absolute; width: 38px; height: 38px; z-index: 2;
  border: 2.5px solid var(--aqua-500);
}
.hero__frame::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.hero__frame::after { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 11px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 16px;
  box-shadow: var(--shadow-md);
  animation: floaty 5s ease-in-out infinite;
  z-index: 3;
}
.float-card small { display: block; color: var(--slate); font-size: .76rem; }
.float-card strong { font-size: .95rem; font-family: var(--font-display); }
.float-card__icon {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--r-sm); background: var(--ice-100); color: var(--aqua-600);
}
.float-card--1 { top: 8%; left: -5%; }
.float-card--2 { bottom: 6%; right: -4%; animation-delay: 1.4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Marquee брендів ---------- */
.brands { background: var(--steel-950); padding: 20px 0; overflow: hidden; }
.brands__track {
  display: flex; gap: 56px; width: max-content;
  animation: marquee 28s linear infinite;
}
.brands__track span {
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  color: rgba(231,240,246,.5); white-space: nowrap;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.about__media { position: relative; }
.about__img { min-height: 440px; height: 100%; border-radius: var(--r-xl); }
.about__media::after {
  content: ""; position: absolute; left: -14px; bottom: -14px; width: 90px; height: 90px;
  border-left: 3px solid var(--aqua-500); border-bottom: 3px solid var(--aqua-500);
  border-bottom-left-radius: var(--r-xl);
}
.about__text h2 { margin-bottom: .5rem; }
.about__text > p { color: var(--slate); }

/* ---------- Gallery / роботи ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  gap: 16px;
  grid-auto-flow: dense;
}
.gallery__item { position: relative; min-height: 0; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); }
.gallery__item--lg { grid-column: span 2; grid-row: span 2; }
.gallery__item:not(.gallery__item--lg) { grid-column: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.gallery__link { display: block; }
.gallery__link:hover img { transform: scale(1.06); }
.gallery__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 16px 14px; color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: .96rem;
  background: linear-gradient(transparent, rgba(12,26,43,.86));
}

/* ---------- Contacts layout ---------- */
.contacts__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 60px); align-items: start; }
.contacts__info h2 { margin-bottom: .6rem; }
.contacts__info > p { color: var(--slate); max-width: 44ch; }

/* ---------- Footer ---------- */
.footer { background: var(--steel-950); color: rgba(231,240,246,.72); padding: clamp(48px, 6vw, 74px) 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 32px; }
.footer__col h4 { color: var(--white); font-size: 1rem; margin-bottom: 1rem; }
.footer__col a, .footer__col span { display: block; color: rgba(231,240,246,.66); margin-bottom: 9px; font-size: .95rem; }
.footer__col a:hover { color: var(--aqua-400); }
.footer__col--brand p { color: rgba(231,240,246,.56); font-size: .95rem; max-width: 36ch; margin-top: 12px; }
.footer__col--brand .logo { color: var(--white); }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 42px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem; color: rgba(231,240,246,.52);
}

/* ===========================================================
   Адаптив
   =========================================================== */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; min-height: 300px; margin-bottom: 12px; }
  .hero__lead { max-width: none; }
  .contacts__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .about__grid { grid-template-columns: 1fr; }
  .about__img { min-height: 300px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery__item, .gallery__item--lg { grid-column: span 1; grid-row: span 1; }
  .gallery__item--lg { grid-column: span 2; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--white);
    padding: 12px 20px 22px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    transition: transform .3s ease;
    margin-left: 0;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__link { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .header__phone { display: none; }
  .header__actions .btn { display: none; }
  .burger { display: flex; margin-left: auto; }
  .fab { display: grid; }
}

@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery__item--lg { grid-column: span 1; grid-row: span 1; }
  .float-card--1 { left: 0; }
  .float-card--2 { right: 0; }
  .hero__trust li { border-right: 0; padding-right: 16px; margin-right: 0; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .footer__grid { grid-template-columns: 1fr; }
  .pricelist__row { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
