/* ==========================================================================
   Лампочка UA — landing
   Токены з бренд-стайлгайда v1.0 (STYLEGUIDE.png), шрифти — локальні (assets/fonts)
   ========================================================================== */

:root {
  /* Кольори (стайлгайд 02) */
  --bg-dark: #0B1320;
  --bg-deep: #080E18;
  --bg-card: #1B2434;
  --bg-card-hi: #202C3E;
  --accent-yellow: #FFC107;
  --accent-yellow-hi: #FFD34A;
  --accent-blue: #00B4FF;
  --text-primary: #FFFFFF;
  --text-secondary: #A6B0C1;
  --status-success: #00C569;
  --status-error: #FF3B30;

  /* Похідні */
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .13);
  --ink: #0B1320;

  /* Типографіка */
  --font-display: 'Fira Sans Condensed', 'Fira Sans', 'Roboto', system-ui, sans-serif;
  --font-body: 'Fira Sans', 'Roboto', system-ui, -apple-system, sans-serif;

  /* Ритм */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --shadow-card: 0 20px 50px rgba(0, 0, 0, .35);
  --shadow-phone: 0 44px 90px rgba(0, 0, 0, .62);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; letter-spacing: .002em; }
h2 { font-size: clamp(25px, 2.9vw, 36px); line-height: 1.18; }
h3 { font-weight: 700; font-size: 20px; line-height: 1.3; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

.nowrap { white-space: nowrap; }

/* якірні переходи не ховаються під липкою шапкою */
section[id], main[id] { scroll-margin-top: 92px; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent-yellow);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .03em;
  text-align: center;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s, border-color .18s, box-shadow .18s, color .18s;
}

.btn--primary {
  background: var(--accent-yellow);
  color: #12171F;
  box-shadow: 0 12px 30px rgba(255, 193, 7, .18);
}
.btn--primary:hover {
  background: var(--accent-yellow-hi);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(255, 193, 7, .26);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: rgba(255, 255, 255, .03);
  border-color: var(--line-strong);
  color: var(--text-primary);
}
.btn--ghost:hover {
  border-color: rgba(255, 193, 7, .45);
  background: rgba(255, 193, 7, .08);
  transform: translateY(-2px);
}

.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn--lg { min-height: 58px; padding: 17px 34px; font-size: 17px; }

/* ---------- шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 19, 32, .74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  transition: background-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  background: rgba(8, 13, 22, .94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .4);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 78px;
}
.brand img { width: auto; height: 46px; }
.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
  color: var(--text-secondary);
}
.nav a { transition: color .18s; }
.nav a:hover { color: var(--text-primary); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 92px 0 84px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 72%;
  opacity: .9;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 19, 32, .96) 0%, rgba(11, 19, 32, .55) 38%, rgba(11, 19, 32, .78) 72%, var(--bg-dark) 100%);
}
.hero-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.hero-glow--yellow {
  width: 620px; height: 620px;
  top: -22%; left: -12%;
  background: radial-gradient(circle, rgba(255, 193, 7, .16), transparent 62%);
}
.hero-glow--blue {
  width: 760px; height: 760px;
  right: -18%; bottom: -34%;
  background: radial-gradient(circle, rgba(0, 180, 255, .14), transparent 60%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  padding: 7px 15px;
  border: 1px solid rgba(0, 180, 255, .3);
  border-radius: 999px;
  background: rgba(0, 180, 255, .08);
  color: #CFE9F7;
  font-size: 13px;
  letter-spacing: .04em;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 10px var(--accent-blue);
}

.hero h1 .accent { color: var(--accent-yellow); }

.lead {
  max-width: 560px;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}
.hero-notes li { position: relative; padding-left: 16px; }
.hero-notes li::before {
  content: '';
  position: absolute;
  left: 0; top: .62em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .32);
}

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-visual::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 180, 255, .18), transparent 65%);
  filter: blur(6px);
}

.hero-phones {
  width: min(500px, 82vw);
  height: auto;
  filter: drop-shadow(0 34px 64px rgba(0, 0, 0, .5));
}

/* ---------- рамка телефона ---------- */
.phone {
  position: relative;
  width: min(302px, 78vw);
  padding: 9px;
  border-radius: 40px;
  background: linear-gradient(158deg, #35405A 0%, #10161F 46%, #28324A 100%);
  box-shadow: var(--shadow-phone), 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.phone::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 36px;
  border: 1px solid rgba(0, 0, 0, .55);
  pointer-events: none;
}
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: var(--bg-dark);
  line-height: 0;
}
.phone-screen img { width: 100%; }

/* ---------- смуга довіри ---------- */
.trust {
  border-block: 1px solid var(--line);
  background: rgba(27, 36, 52, .42);
}
.trust-inner {
  display: flex;
  justify-content: center;
  padding-block: 24px;
}
.trust-item { display: flex; gap: 12px; align-items: flex-start; max-width: 780px; }
.ico {
  width: 22px; height: 22px;
  flex: none;
  margin-top: 2px;
  fill: none;
  stroke: var(--accent-yellow);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trust-item strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.trust-item span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-secondary); }

/* ---------- секції ---------- */
.section { padding: 98px 0; }

.section-head { max-width: 760px; margin: 0 auto 52px; text-align: center; }
.section-head--left { margin: 0; text-align: left; }

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent-yellow);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow--blue { color: var(--accent-blue); }

.section-head .lead--center { margin: 16px auto 0; }
.lead--center { text-align: center; }

/* ---------- фічі (bento) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--bg-card-hi), var(--bg-card));
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color .25s, transform .25s var(--ease);
}
.card:hover { border-color: rgba(255, 193, 7, .22); transform: translateY(-3px); }

.card-ico {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 193, 7, .24);
  border-radius: 14px;
  background: rgba(255, 193, 7, .1);
}
.card-ico svg {
  width: 23px; height: 23px;
  fill: none;
  stroke: var(--accent-yellow);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-ico--red { border-color: rgba(255, 59, 48, .26); background: rgba(255, 59, 48, .1); }
.card-ico--red svg { stroke: #FF6E66; }

.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 15.5px; line-height: 1.55; }

/* ---------- аналітика ---------- */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-list li { display: flex; gap: 14px; }
.feature-list li + li { margin-top: 22px; }
.feature-ico {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}
.feature-ico svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: var(--accent-blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-list strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 700;
}
.feature-list p { color: var(--text-secondary); font-size: 15px; line-height: 1.55; }

.stat-row {
  display: flex;
  gap: 14px;
  margin: 30px 0 32px;
}
.stat {
  flex: 1;
  padding: 16px 18px;
  border: 1px solid rgba(255, 193, 7, .18);
  border-radius: var(--r-md);
  background: rgba(255, 193, 7, .06);
}
.stat strong {
  display: block;
  color: var(--accent-yellow);
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.1;
  white-space: nowrap;
}
.stat-sub { margin-left: 2px; font-size: 13px; color: rgba(255, 193, 7, .72); white-space: nowrap; }
.stat > span { display: block; margin-top: 5px; color: var(--text-secondary); font-size: 12.5px; line-height: 1.35; }

.analytics-visual { display: flex; justify-content: center; }
.phone--stats { width: min(308px, 74vw); }

/* ---------- кроки ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(27, 36, 52, .55);
  transition: border-color .25s, transform .25s var(--ease);
}
.step:hover { border-color: rgba(0, 180, 255, .26); transform: translateY(-3px); }
.step-num {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent-yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}
.step h3 { margin-bottom: 9px; font-size: 19px; }
.step p { color: var(--text-secondary); font-size: 15px; line-height: 1.55; }

/* ---------- фінальний CTA ---------- */
.cta-final { padding: 20px 0 96px; }
.cta-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 68px 40px 60px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(255, 193, 7, .16), transparent 58%),
    linear-gradient(180deg, #1F2A3B, #16202E);
  text-align: center;
  box-shadow: var(--shadow-card);
}
.cta-card h2 { font-size: clamp(26px, 3.2vw, 40px); }
.cta-card > .cta-content > p { margin: 16px auto 30px; max-width: 620px; color: #DFE7F2; font-size: 16.5px; }
.cta-note { margin-top: 18px; color: rgba(255, 255, 255, .8); font-size: 13px; }

.cta-content { position: relative; z-index: 1; }

/* Vanta halo: рендериться як є, на всю картку (налаштування — у js/app.js).
   Поки скрипт не завантажився, працює градієнт-фолбек картки. */
.cta-halo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.cta-halo canvas { display: block; width: 100% !important; height: 100% !important; }

/* Затемнення між ефектом і текстом: параметри halo лишаються як задані,
   але заголовок і кнопка читаються на будь-якому кадрі анімації. */
.cta-halo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 19, 32, .56) 0%, rgba(11, 19, 32, .68) 50%, rgba(11, 19, 32, .82) 100%);
  pointer-events: none;
}

/* ---------- футер ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  padding: 46px 0 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand img { width: 128px; margin-bottom: 12px; }
.footer-brand p { color: var(--text-secondary); font-size: 14px; }
.footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 14px;
}
.footer-nav a { transition: color .18s; }
.footer-nav a:hover { color: var(--accent-yellow); }

/* ---------- анімація появи ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .hero { padding: 64px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { text-align: left; }
  .hero-visual { margin-top: 8px; }

  .bento { grid-template-columns: 1fr 1fr; }

  .analytics-grid { grid-template-columns: 1fr; gap: 44px; }
  .analytics-visual { order: -1; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header-inner { height: 70px; justify-content: space-between; }
  .brand img { width: auto; height: 40px; }
}

@media (max-width: 720px) {
  .container { padding-inline: 18px; }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 34px; }

  h1 { font-size: clamp(32px, 8.4vw, 42px); }
  .lead { font-size: 16.5px; }

  .hero-actions { gap: 12px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-notes { gap: 14px; font-size: 13px; }

  .trust-inner { padding-block: 20px; }

  .bento { grid-template-columns: 1fr; }
  .card { padding: 26px 22px; }

  .steps-grid { grid-template-columns: 1fr; gap: 14px; }
  .step { padding: 24px 22px; }

  .stat-row { flex-direction: column; gap: 10px; }
  .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .stat strong { font-size: 24px; }
  .stat > span { margin-top: 0; text-align: right; max-width: 52%; }

  .phone { border-radius: 32px; padding: 7px; }
  .phone::after { inset: 4px; border-radius: 29px; }
  .phone-screen { border-radius: 26px; }

  .cta-final { padding-bottom: 68px; }
  .cta-card { padding: 44px 22px 40px; border-radius: 22px; }
  /* halo на мобільному — той самий, на всю картку (розмір задає Vanta) */
  .cta-card .btn--lg { padding: 16px 20px; font-size: 16px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-nav { gap: 16px; }

}

@media (max-width: 420px) {
  .badge { font-size: 12px; letter-spacing: .02em; }
  .hero-notes li::before { top: .55em; }
  .stat > span { max-width: 58%; }
}

/* ---------- доступність ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .step { transition: none; }
  .btn:hover, .card:hover, .step:hover { transform: none; }
}

@media print {
  .site-header, .hero-bg, .hero-glow, .cta-halo { display: none; }
  body { background: #fff; color: #000; }
}
