/* ===========================================================
   layout.css — header, hero, marquee, about, gallery, footer
   + повний адаптив (mobile-first безпечний)
   =========================================================== */

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

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--deep-900); letter-spacing: -.02em; }
.logo__mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 13px;
  background: linear-gradient(135deg, var(--azure-500), var(--mint-500));
  color: #fff;
  box-shadow: 0 6px 16px rgba(46,159,222,.35);
}
.logo__dot { color: var(--mint-500); }
.logo--light, .logo--light .logo__text { color: var(--white); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav__link { padding: 9px 15px; border-radius: 11px; font-weight: 600; font-size: .95rem; color: var(--slate); transition: color .2s, background .2s; }
.nav__link:hover { color: var(--deep-900); background: var(--ice-100); }
.nav__link[aria-current="page"] { color: var(--azure-600); background: var(--ice-100); }

.header__actions { display: flex; align-items: center; gap: 14px; }
.header__phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; color: var(--deep-900);
}
.header__phone:hover { color: var(--azure-500); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 9px; }
.burger span { width: 24px; height: 2.5px; background: var(--deep-900); 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 520px at 88% -8%, rgba(76,184,239,.22), transparent 60%),
    radial-gradient(760px 420px at 2% 108%, rgba(31,199,182,.16), transparent 58%),
    var(--ice-50);
  padding: clamp(46px, 7vw, 92px) 0 clamp(56px, 7vw, 88px);
  overflow: hidden;
}
/* ледь помітні "сніжинки"/частинки інею */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(circle, rgba(46,159,222,.18) 1.5px, transparent 2px),
    radial-gradient(circle, rgba(31,199,182,.16) 1.5px, transparent 2px);
  background-size: 120px 120px, 170px 170px;
  background-position: 0 0, 60px 80px;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 60px); align-items: center; }
.hero__title { margin: 18px 0; }
.hero__lead { font-size: 1.14rem; color: var(--slate); max-width: 34ch; }
.hero__lead strong { color: var(--deep-900); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 30px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero__trust li strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--deep-900); }
.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__photo-wrap {
  position: relative;
  width: min(460px, 100%);
  border-radius: var(--r-xl);
  padding: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(194,230,239,.5));
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(4px);
}
.hero__photo {
  width: 100%; border-radius: 28px; display: block;
  object-fit: cover; aspect-ratio: 4/5;
}
.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--ice-200);
  border-radius: var(--r-md); padding: 12px 16px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  animation: floaty 5.5s ease-in-out infinite;
}
.float-card small { display: block; color: var(--slate); font-size: .78rem; }
.float-card strong { font-size: .95rem; color: var(--deep-900); font-family: var(--font-display); }
.float-card__icon {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 11px; background: linear-gradient(135deg, var(--ice-100), var(--frost)); color: var(--azure-600);
}
.float-card--1 { top: 4%; left: -5%; }
.float-card--2 { bottom: 6%; right: -4%; animation-delay: 1.6s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Brands marquee ---------- */
.brands {
  background: linear-gradient(135deg, var(--deep-900), var(--deep-800));
  padding: 24px 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.05rem;
  color: rgba(231,242,251,.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, 58px); align-items: center; }
.about__media { position: relative; }
.about__img { width: 100%; min-height: 420px; height: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.about__chip {
  position: absolute; left: -18px; bottom: -18px;
  background: var(--white); border: 1px solid var(--ice-200);
  border-radius: var(--r-md); padding: 16px 20px;
  box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 13px;
}
.about__chip strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--azure-600); }
.about__chip span { color: var(--slate); font-size: .85rem; }
.about__chip .float-card__icon { width: 42px; height: 42px; }
.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; overflow: hidden; border-radius: var(--r-lg); grid-column: span 2; }
.gallery__item--lg { grid-column: span 2; grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.gallery__link { display: block; }
.gallery__link:hover img { transform: scale(1.07); }
.gallery__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 32px 18px 15px; color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  background: linear-gradient(transparent, rgba(11, 39, 64, .85));
}

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

/* ---------- Footer ---------- */
.footer { background: linear-gradient(160deg, var(--deep-900), #081d31); color: rgba(231,242,251,.74); padding: clamp(48px, 6vw, 74px) 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: 1.1rem; }
.footer__col a, .footer__col span { display: block; color: rgba(231,242,251,.7); margin-bottom: 9px; font-size: .95rem; }
.footer__col a:hover { color: var(--mint-300); }
.footer__col--brand p { color: rgba(231,242,251,.6); font-size: .95rem; max-width: 36ch; margin-top: 14px; }
.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,242,251,.55);
}
.footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__legal a { color: rgba(231,242,251,.6); }
.footer__legal a:hover { color: var(--mint-300); }

/* ===========================================================
   Адаптив
   =========================================================== */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; min-height: 0; margin-bottom: 8px; }
  .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; }
}

@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(-135%);
    transition: transform .3s ease;
    margin-left: 0;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__link { padding: 15px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav__link[aria-current="page"] { background: transparent; color: var(--azure-500); }
  .header__phone { display: none; }
  .header__actions .btn { display: none; }
  .burger { display: flex; margin-left: auto; }
  .fab { display: grid; }
  .float-card--1 { left: 0; }
  .float-card--2 { right: 0; }
  .about__chip { left: 0; }
}

@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; }
}

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

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