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

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

.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.logo__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--petrol-700), var(--mint-500));
  color: #fff;
}
.logo__dot { color: var(--mint-500); }
.logo--light { color: var(--white); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav__link { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--slate); }
.nav__link:hover { color: var(--petrol-800); background: var(--cloud); }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__phone {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 500; color: var(--petrol-800);
}
.header__phone:hover { color: var(--mint-500); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.burger span { width: 24px; height: 2.5px; background: var(--petrol-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(1100px 500px at 85% -10%, rgba(47,217,189,.18), transparent 60%),
    radial-gradient(800px 400px at 5% 110%, rgba(255,157,61,.12), transparent 55%),
    var(--cloud);
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 90px);
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__title { margin: 16px 0; }
.hero__lead { font-size: 1.12rem; color: var(--slate); max-width: 32ch; }
.hero__lead strong { color: var(--petrol-800); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 30px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero__trust li strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--petrol-800); }
.hero__trust li span { color: var(--slate); font-size: .9rem; }

/* Hero visual — стилізований кондиціонер на білій текстурованій стіні */
.hero__visual { position: relative; min-height: 360px; display: grid; place-items: center; }

/* Реальне фото замість ілюстрації (якщо підставите hero.jpg) */
.hero__photo {
  width: 100%; max-width: 480px; border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); object-fit: cover; aspect-ratio: 4/5;
}

/* Біла стіна з ледь помітною штукатурною текстурою */
.hero__wall {
  position: relative;
  width: min(440px, 100%);
  padding: 64px 40px 96px;
  border-radius: var(--r-xl);
  background-color: #f8fbfa;
  background-image:
    radial-gradient(120% 120% at 30% 10%, #ffffff 0%, #eef4f2 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-blend-mode: multiply;
  border: 1px solid #e4efeb;
  box-shadow: inset 0 0 70px rgba(12,47,44,.06), var(--shadow-lg);
}
/* легка плінтусна лінія знизу стіни */
.hero__wall::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  background: linear-gradient(180deg, transparent, rgba(12,47,44,.05));
}
.ac-unit { position: relative; width: 100%; }
.ac-unit__body {
  position: relative;
  height: 130px; border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #eaf5f2);
  border: 1px solid #d6e9e4;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 22px 26px;
}
.ac-unit__led {
  position: absolute; top: 16px; right: 18px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--mint-500); box-shadow: 0 0 10px var(--mint-500);
  animation: pulse 2s infinite;
}
.ac-unit__vent { height: 8px; border-radius: 4px; background: #d9eae6; }
.ac-unit__vent:nth-child(3) { width: 92%; }
.ac-unit__vent:nth-child(4) { width: 80%; }
.ac-unit__display {
  position: absolute; left: 24px; bottom: 16px;
  font-family: var(--font-display); font-weight: 700; color: var(--petrol-700); font-size: 1.1rem;
}
.ac-flow { position: absolute; left: 0; right: 0; top: 100%; height: 120px; display: flex; justify-content: space-around; padding: 10px 40px 0; }
.ac-flow span {
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--mint-400), transparent);
  animation: flow 2.4s ease-in-out infinite;
}
.ac-flow span:nth-child(2) { animation-delay: .5s; }
.ac-flow span:nth-child(3) { animation-delay: 1s; }
@keyframes flow {
  0%, 100% { height: 30px; opacity: .35; }
  50%      { height: 90px; opacity: .9; }
}

.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  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;
}
.float-card small { display: block; color: var(--slate); font-size: .78rem; }
.float-card strong { font-size: .95rem; }
.float-card__icon {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; background: var(--cloud-2); font-size: 1.1rem;
}
.float-card--1 { top: 6%; left: -4%; }
.float-card--2 { bottom: 4%; right: -2%; animation-delay: 1.4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Brands marquee ---------- */
.brands { background: var(--petrol-900); padding: 22px 0; overflow: hidden; }
.brands__track {
  display: flex; gap: 56px; width: max-content;
  animation: marquee 26s linear infinite;
}
.brands__track span {
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem;
  color: rgba(244,250,248,.55); white-space: nowrap;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- About (фото + текст) ---------- */
.about__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.about__img { min-height: 420px; height: 100%; }
.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: 200px;
  gap: 16px;
  grid-auto-flow: dense;
}
.gallery__item { position: relative; min-height: 0; overflow: hidden; border-radius: var(--r-lg); }
.gallery__item--lg { grid-column: span 2; grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item:not(.gallery__item--lg):not(.gallery__item--wide) { 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: 28px 16px 14px; color: #fff;
  font-family: var(--font-display); font-weight: 500; font-size: .98rem;
  background: linear-gradient(transparent, rgba(10, 36, 34, .82));
}

/* ---------- 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: 42ch; }

/* ---------- Footer ---------- */
.footer { background: var(--petrol-900); color: rgba(244,250,248,.75); padding: clamp(48px, 6vw, 72px) 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 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(244,250,248,.7); margin-bottom: 8px; font-size: .95rem; }
.footer__col a:hover { color: var(--mint-400); }
.footer__col--brand p { color: rgba(244,250,248,.6); font-size: .95rem; max-width: 34ch; 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: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem; color: rgba(244,250,248,.55);
}

/* ===========================================================
   Адаптив
   =========================================================== */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; min-height: 260px; 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: 280px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .gallery__item, .gallery__item--lg, .gallery__item--wide { grid-column: span 1; grid-row: span 1; }
  .gallery__item--lg { grid-column: span 2; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed; inset: 70px 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: 200px; }
  .gallery__item--lg { grid-column: span 1; grid-row: span 1; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__trust { gap: 18px; }
  .float-card--1 { left: 0; }
  .float-card--2 { right: 0; }
  .pricelist__row { padding: 14px 16px; }
}

/* Доступність: повага до prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
