@import url("variables.css");
@import url("fonts.css");

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
  max-width: var(--max-width-content);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.text-col {
  max-width: var(--max-width-text);
}
.section {
  padding-block: var(--space-xl);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.section--bg-blue {
  background: var(--color-blue);
  color: #fff;
}
.section--bg-blue .text-muted { color: rgba(255, 255, 255, 0.85); }
.section--bg-cream { background: var(--color-cream); }

/* Наскрізний фірмовий знак VA — один і той самий елемент на кожній секції сайту,
   тон-у-тон з фоном (mix-blend-mode сам затемнює на синьому і підсвічує на кремовому) */
.section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(70vw, 820px);
  aspect-ratio: 712 / 880;
  background-image: url("../assets/logos/velora-mark.png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.17;
  mix-blend-mode: multiply;
  z-index: -1;
  pointer-events: none;
}
/* Хаотичне розміщення по горизонталі — щоб не було "під лінійку" між блоками */
.section:nth-of-type(1)::before  { left: 62%; top: 45%; }
.section:nth-of-type(2)::before  { left: 18%; top: 55%; }
.section:nth-of-type(3)::before  { left: 78%; top: 50%; }
.section:nth-of-type(4)::before  { left: 30%; top: 40%; }
.section:nth-of-type(5)::before  { left: 58%; top: 60%; }
.section:nth-of-type(6)::before  { left: 14%; top: 48%; }
.section:nth-of-type(7)::before  { left: 50%; top: 42%; }
.section:nth-of-type(8)::before  { left: 82%; top: 55%; }
.section:nth-of-type(9)::before  { left: 24%; top: 50%; }
.section:nth-of-type(10)::before { left: 66%; top: 58%; }
.section:nth-of-type(11)::before { left: 38%; top: 45%; }
.section:nth-of-type(12)::before { left: 72%; top: 50%; }

.section-eyebrow {
  font-family: var(--font-accent);
  color: var(--color-blue);
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}
.section--bg-blue .section-eyebrow { color: #fff; }
.cta__slogan {
  font-size: clamp(2.25rem, 4vw, 3rem);
  margin-top: var(--space-xs);
}

h1, h2, .heading {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: var(--space-md); }

.text-muted { color: var(--color-text-muted); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-button);
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--color-blue);
  color: #fff;
}
.btn--primary:hover { background: var(--color-blue-dark); }

.btn--secondary {
  background: transparent;
  border-color: var(--color-gray-blue);
  color: var(--color-gray-blue);
}
.btn--secondary:hover { border-color: var(--color-text); color: var(--color-text); }

.section--bg-blue .btn--secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

/* ==========================================================================
   HEADER (sticky)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 244, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-sm);
}
.site-header__logo { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; flex-shrink: 0; }
.site-header__logo img { height: 46px; width: auto; }
.site-header__tagline {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--color-gray-blue);
}
@media (max-width: 767px) {
  .site-header__logo img { height: 34px; }
  .site-header__tagline { font-size: 0.55rem; }
  /* кнопка дзвінка в header дублює sticky mobile-call-bar внизу — на вузьких екранах прибираємо, щоб не ламати layout */
  .site-header__call .btn { display: none; }
}

/* ==========================================================================
   HERO — фірмовий паттерн, продукт без білої підкладки
   ========================================================================== */
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: var(--space-lg);
  align-items: center;
}
.hero__inner > div {
  min-width: 0;
}
@media (max-width: 767px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__inner > div:first-child { order: 1; }
  .hero__device { order: 2; }
}
.hero__slogan {
  margin: var(--space-md) 0;
}
.hero__slogan-main {
  font-family: var(--font-accent);
  color: #fff;
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  line-height: 1.1;
}
.hero__slogan-kern {
  margin-right: 0.12em;
}
.hero__slogan-translation {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: rgba(255, 255, 255, 0.9);
  margin-top: -0.6rem;
}
.hero__device {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__device img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 767px) {
  .hero__device { aspect-ratio: 5 / 4; }
}
.site-header__call {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.site-header__phone {
  font-weight: 600;
  font-size: 1.05rem;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.faq-item__question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: var(--space-sm) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 1.05rem;
}
.faq-item__icon { transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item.is-open .faq-item__icon { transform: rotate(45deg); }
.faq-item__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.faq-item.is-open .faq-item__answer { grid-template-rows: 1fr; }
.faq-item__answer-inner {
  overflow: hidden;
}
.faq-item.is-open .faq-item__answer-inner {
  padding-bottom: var(--space-sm);
}

/* ==========================================================================
   РЕЗУЛЬТАТИ — ГАЛЕРЕЯ ДО/ПІСЛЯ
   ========================================================================== */
.results-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}
.results-filters__btn {
  background: #fff;
  border: 1px solid var(--color-gray-blue);
  color: var(--color-text);
  border-radius: var(--radius-button);
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.results-filters__btn:hover {
  border-color: var(--color-blue);
}
.results-filters__btn.is-active {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #fff;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.result-card {
  margin: 0;
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--color-gray-blue);
  background: var(--color-cream-dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.result-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: var(--color-cream-dark);
}
.result-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-sm) var(--space-sm) 0.75rem;
  background: linear-gradient(to top, rgba(58, 61, 66, 0.75), rgba(58, 61, 66, 0));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}
.result-card__badge {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-button);
  border: 1px solid var(--color-gray-blue);
}
.result-card.is-hidden {
  display: none;
}

/* ==========================================================================
   MOBILE STICKY CALL BUTTON
   ========================================================================== */
.mobile-call-bar {
  display: none;
}
@media (max-width: 767px) {
  .mobile-call-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-cream);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  }
  .mobile-call-bar .btn { flex: 1; }
  /* компенсуємо висоту бару, щоб не перекривав фінальний CTA/футер */
  body { padding-bottom: 76px; }
}

/* ==========================================================================
   ДВОКОЛОНКОВІ БЛОКИ (Рішення, фінальний CTA) — спільний адаптив
   ========================================================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.two-col > * { min-width: 0; }
.two-col--media-wide { grid-template-columns: 1fr 1.35fr; }

/* Продуктове фото без білої підкладки — біле тло знімка "розчиняється" у фоні секції */
.device-blend {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
}
.device-blend img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.cta__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.cta__inner > * { min-width: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 767px) {
  .section { padding-block: var(--space-lg); }
  .site-header__phone { display: none; } /* на мобільному лишаємо лише іконку дзвінка в хедері */
  .two-col, .cta__inner {
    grid-template-columns: 1fr;
  }
  /* довгі написи на кнопках (напр. "Дізнатись умови партнерської програми")
     не повинні вилазити за екран — дозволяємо перенос замість вильоту вбік */
  .btn {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }
}
