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

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

.logo { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: -.02em; color: var(--white); }
.logo__mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(150deg, var(--ember-500), var(--ember-600));
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 90, 31, .45);
}
.logo__dot { color: var(--ember-500); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav__link { padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: .95rem; color: var(--text-on-dark-soft); }
.nav__link:hover { color: var(--white); background: rgba(255, 255, 255, .07); }
.nav__link[aria-current="page"] { color: var(--white); background: rgba(255, 90, 31, .16); }

.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: 600; color: var(--white);
}
.header__phone:hover { color: var(--ember-400); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.burger span { width: 24px; height: 2.5px; background: var(--white); 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(900px 520px at 80% -5%, rgba(255, 90, 31, .22), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(255, 176, 46, .1), transparent 55%),
    var(--coal-950);
  color: var(--text-on-dark);
  padding: clamp(52px, 7vw, 104px) 0 clamp(60px, 7vw, 100px);
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(34px, 5vw, 64px); align-items: center; }
.hero__title { margin: 18px 0; color: var(--white); }
.hero__lead { font-size: 1.14rem; color: var(--text-on-dark-soft); max-width: 34ch; }
.hero__lead strong { color: var(--white); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 13px; margin: 30px 0 32px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 30px; padding-top: 24px; border-top: 1px solid var(--line-dark); }
.hero__trust li strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ember-400); }
.hero__trust li span { color: var(--text-on-dark-soft); font-size: .9rem; }

/* Hero visual — реальне фото полум'я в "ілюмінаторі" + плаваючі картки */
.hero__visual { position: relative; min-height: 380px; display: grid; place-items: center; }
.hero__frame {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13, 11, 10, .55));
}
.hero__ring {
  position: absolute; inset: -14px;
  border-radius: 34px;
  background: conic-gradient(from 180deg, var(--ember-600), var(--gold-400), var(--ember-500), var(--ember-600));
  filter: blur(26px); opacity: .45; z-index: -1;
}

.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 11px;
  background: rgba(27, 23, 21, .9);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-md); padding: 12px 16px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  animation: floaty 5s ease-in-out infinite;
}
.float-card small { display: block; color: var(--text-on-dark-soft); font-size: .76rem; }
.float-card strong { font-size: .95rem; color: var(--white); font-family: var(--font-display); }
.float-card__icon {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; background: rgba(255, 90, 31, .15); color: var(--ember-400); font-size: 1.05rem;
}
.float-card--1 { top: 7%; left: -5%; }
.float-card--2 { bottom: 5%; right: -4%; animation-delay: 1.4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Marquee переваг ---------- */
.marquee { background: var(--coal-850); padding: 18px 0; overflow: hidden; border-block: 1px solid var(--line-dark); }
.marquee__track {
  display: flex; gap: 18px; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee__track span {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  color: var(--text-on-dark-soft); white-space: nowrap;
}
.marquee__track span::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ember-500); margin-left: 6px;
}
@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 { width: 100%; min-height: 420px; height: 100%; border-radius: var(--r-xl); object-fit: cover; box-shadow: var(--shadow-md); }
.about__badge {
  position: absolute; left: -18px; bottom: 26px;
  background: linear-gradient(135deg, var(--ember-500), var(--ember-600));
  color: #fff; border-radius: var(--r-md);
  padding: 16px 22px; box-shadow: var(--glow);
}
.about__badge strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; }
.about__badge span { font-size: .82rem; opacity: .92; }
.about__text h2 { margin-bottom: .5rem; }
.about__text > p { color: var(--ink-soft); }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  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; transition: transform .45s ease; }
.gallery__link { display: block; }
.gallery__link:hover img { transform: scale(1.07); }
.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(13, 11, 10, .85));
}

/* ---------- 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(--ink-soft); max-width: 42ch; }

/* ---------- Footer ---------- */
.footer { background: var(--coal-950); color: var(--text-on-dark-soft); padding: clamp(50px, 6vw, 76px) 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: 1.1rem; }
.footer__col a, .footer__col span { display: block; color: var(--text-on-dark-soft); margin-bottom: 9px; font-size: .95rem; }
.footer__col a:hover { color: var(--ember-400); }
.footer__col--brand p { color: var(--text-on-dark-soft); font-size: .95rem; max-width: 34ch; margin-top: 14px; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line-dark);
  font-size: .85rem; color: rgba(239, 231, 223, .5);
}
.footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__legal a { color: rgba(239, 231, 223, .55); }
.footer__legal a:hover { color: var(--ember-400); }

/* ===========================================================
   Адаптив
   =========================================================== */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; min-height: 300px; margin-bottom: 14px; }
  .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(--coal-900);
    padding: 12px 20px 22px;
    border-bottom: 1px solid var(--line-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    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-dark); }
  .nav__link[aria-current="page"] { background: transparent; color: var(--ember-400); }
  .header__phone { display: none; }
  .header__actions .btn { display: none; }
  .burger { display: flex; margin-left: auto; }
  .fab { display: grid; }
  .about__badge { left: 12px; }
}

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

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

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