/* ============================================================
   Kukurudza · H2 «Мінімальний односекційний лідоген» — main.css
   Один екран: оффер + форма в hero + тонка стрічка спікерів.
   Базові примітиви (btn/field/topbar/footer/chips) — спільні з H1.
   Mobile-first. Перф: transform/opacity only.
   ============================================================ */

/* ---------------- Reset / base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: var(--container); margin-inline: auto; }
.accent-text {
  background: var(--grad-green);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.skip-link {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(-150%);
  top: 8px; z-index: var(--z-modal);
  background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: var(--r-pill);
  transition: transform var(--t) var(--ease);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

/* ---------------- Buttons ---------------- */
.btn {
  --btn-min: 56px; position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: var(--btn-min);
  padding: .9rem 1.8rem;
  font-family: var(--font-head);
  font-weight: 700; font-size: 1rem; line-height: 1;
  border: 2px solid transparent; border-radius: var(--r-pill);
  text-align: center; white-space: nowrap;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background var(--t) var(--ease), color var(--t) var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn--lg { --btn-min: 64px; padding: 1.05rem 2.3rem; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn--cta { background: var(--grad-cta); color: var(--color-on-cta); box-shadow: var(--shadow-cta); overflow: hidden; }
.btn--cta:hover { background: var(--accent-600); transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(255,107,0,.5); }

/* loading spinner */
.btn__spinner { display: none; width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.is-loading .btn__label { visibility: hidden; }
.btn.is-loading .btn__spinner { display: block; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Topbar (мінімальний) ---------------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-nav);
  padding-block: .6rem; background: rgba(255,255,255,.82);
  backdrop-filter: saturate(140%) blur(10px);
  transition: box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.topbar.is-scrolled { box-shadow: 0 6px 24px -16px rgba(19,19,19,.4); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar__logo {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.1rem, 4.6vw, 1.4rem); letter-spacing: .005em;
  color: var(--accent); line-height: 1;
}
.topbar__tg {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: var(--fs-sm); color: var(--green-800);
  padding: .5rem 1rem; border-radius: var(--r-pill);
  border: 1.5px solid var(--border-green);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.topbar__tg:hover { background: var(--surface-3); border-color: var(--green-500); }
.topbar__tg-icon { color: var(--green-700); }

/* ============================================================
   ЄДИНИЙ БЛОК — .lead (hero + форма + стрічка спікерів)
   ============================================================ */
.lead {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 80% at 88% -5%, rgba(117,209,100,.34), transparent 58%),
    linear-gradient(158deg, #06774a 0%, #001f3e 100%);
  padding-block: clamp(2rem, 6vw, 3.5rem) clamp(2.5rem, 7vw, 4rem);
  min-height: calc(100svh - 60px);
  display: flex; flex-direction: column; justify-content: center;
  overflow-x: clip;
}
.lead__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.lead__bg::before, .lead__bg::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5;
}
.lead__bg::before { width: 50vw; height: 50vw; background: #75d164; top: -12%; right: -15%; }
.lead__bg::after { width: 42vw; height: 42vw; background: #ff6b00; bottom: -22%; left: -12%; opacity: .22; }

.lead__inner { display: grid; gap: clamp(1.8rem, 5vw, 3.2rem); align-items: center; }
/* grid-нащадки мусять мати змогу стискатись — інакше min-content форми роздуває колонку */
.lead__copy, .lead__formwrap { min-width: 0; }

/* ---- ліва колонка: оффер — ОДНА група, єдиний вертикальний ритм через gap ---- */
.lead__copy {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(1rem, 2.6vw, 1.35rem);
}
.lead__overline {
  display: inline-flex; align-items: center; gap: .65rem; justify-content: center;
  font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--green-100);
}
.lead__overline::before {
  content: ""; width: 1.9rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--green-500), transparent);
}
.lead__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--fs-display); line-height: var(--lh-display);
  letter-spacing: -0.02em; margin-top: -.5rem;   /* притискаємо до overline (вони — один блок) */
  background: linear-gradient(100deg, #ffffff 0%, #e2ffb9 55%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead__subtitle {
  max-width: 38ch;
  font-size: var(--fs-lead); line-height: 1.45; color: rgba(255,255,255,.84);
}
/* бейджі — один акуратний рядок (consistency) */
.lead__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem 1.2rem; }
.meta-chip { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; color: rgba(255,255,255,.85); }
.meta-chip__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--green-500); flex: none; }
.meta-chip--accent { color: #fff; font-weight: 600; }
.meta-chip--accent .meta-chip__dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(255,107,0,.2); }

/* Hero-робот презентує Meta — ПРОЗОРИЙ фон, прямо на градієнті (без картки). Повний кадр. */
.lead__robot {
  width: 100%; max-width: 480px; margin: 0 auto;
  filter: drop-shadow(0 26px 36px rgba(0, 12, 8, .45));   /* «приземляє» робота */
}
.lead__video {
  display: block; width: 100%; height: auto;   /* 16:9 повністю, object-fit не cover */
  aspect-ratio: 16 / 9; background: transparent;
}

/* ---- права колонка: картка-форма — ЄДИНА головна дія ---- */
.lead__formwrap { position: relative; }
.lead__form {
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-card); padding: clamp(1.4rem, 5vw, 2.2rem);
  box-shadow: 0 34px 80px -28px rgba(0,0,0,.6);
}
.lead__form-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--fs-h3); line-height: var(--lh-head); letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: .4rem;
}
.lead__form-sub {
  font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); margin-bottom: 1.4rem;
}
.field { margin-bottom: 1.1rem; }
.field__label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: .45rem; }
.req { color: var(--accent); }
.field__input {
  width: 100%; min-height: 54px; padding: .85rem 1.1rem;
  font: inherit; color: var(--ink);
  background: var(--surface-2); border: 2px solid transparent; border-radius: var(--r-input);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.field__input::placeholder { color: var(--muted); }
.field__input:focus { outline: none; background: #fff; border-color: var(--green-500); }
.field--error .field__input { border-color: #cf2e2e; background: #fff5f5; }
.field__error { margin-top: .4rem; color: #cf2e2e; font-size: var(--fs-sm); }
.lead__note { margin-top: 1rem; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.lead__result { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: var(--r-md); font-weight: 600; }
.lead__result.is-success { background: var(--green-100); color: var(--green-800); }
.lead__result.is-error { background: #fdecec; color: #cf2e2e; }

/* підпорядкована альтернатива зв'язку — тихі текст-лінки, не другий CTA */
.lead__alt {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem;
  margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--border);
  font-size: var(--fs-sm); color: var(--muted);
}
.lead__alt-link {
  font-weight: 700; color: var(--green-800);
  transition: color var(--t) var(--ease);
}
.lead__alt-link:hover { color: var(--green-700); text-decoration: underline; }
.lead__alt-sep { color: var(--border); }

/* тригер терміновості над CTA (в картці-формі) */
.lead__urgency {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin: 0 0 .85rem; font-size: var(--fs-sm); font-weight: 600; color: var(--accent-600);
}
.lead__urgency-dot {
  width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); flex: none;
  box-shadow: 0 0 0 0 rgba(255,107,0,.5); animation: pulseDot 1.8s ease-out infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(255,107,0,.5); }
  70% { box-shadow: 0 0 0 9px rgba(255,107,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,0,0); }
}

/* proof-бар: цифри кейсів (соц-доказ) на градієнті */
.proofbar__lead {
  margin-top: clamp(2.4rem, 6vw, 3.6rem);
  padding-top: clamp(1.8rem, 4vw, 2.4rem);
  border-top: 1px solid rgba(255,255,255,.14);
  text-align: center; font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; font-size: .72rem;
  color: rgba(255,255,255,.62); margin-bottom: 1.3rem;
}
.proofbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; }
.proofbar__item { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.proofbar__num {
  font-family: var(--font-display); font-weight: 400; line-height: 1;
  font-size: clamp(1.9rem, 7vw, 3rem);
  background: linear-gradient(100deg, #ffffff 0%, #e2ffb9 60%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.proofbar__label { font-size: var(--fs-xs); line-height: 1.3; color: rgba(255,255,255,.72); }

/* ---- тонка стрічка спікерів (proof: авторитет) ---- */
.strip {
  margin-top: clamp(1.8rem, 4.5vw, 2.6rem);
}
.strip__heading {
  text-align: center; font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  color: rgba(255,255,255,.6); margin-bottom: 1.2rem;
}
.strip__list {
  display: flex; gap: .9rem; overflow-x: auto; padding-bottom: .4rem;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.strip__list::-webkit-scrollbar { display: none; }
.strip__person {
  flex: 0 0 auto; scroll-snap-align: start;
  display: flex; align-items: center; gap: .65rem;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-pill); padding: .5rem .95rem .5rem .5rem;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.strip__person:hover { background: rgba(255,255,255,.13); transform: translateY(-2px); }
.strip__avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--surface-3); }
.strip__avatar img { width: 100%; height: 100%; object-fit: cover; }
.strip__info { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.strip__name { font-weight: 700; font-size: var(--fs-sm); }
.strip__role { font-size: var(--fs-xs); color: rgba(255,255,255,.66); }

/* ---- desktop: дві колонки, ліворуч текст ---- */
@media (min-width: 880px) {
  .lead__inner { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); align-items: center; }
  .lead__formwrap { order: 2; }
  .lead__copy { text-align: left; align-items: flex-start; }
  .lead__overline { justify-content: flex-start; }
  .lead__meta { justify-content: flex-start; gap: .6rem 1.4rem; }
  .lead__robot { margin-inline: 0; }
  /* .lead__alt лишається по центру всередині картки-форми — це не CTA */
  .strip__list { justify-content: center; flex-wrap: wrap; overflow: visible; }
}

/* ---------------- Footer ---------------- */
.footer { background: var(--ink); color: rgba(255,255,255,.8); padding-block: 2.2rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.footer__logo {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.7rem, 7vw, 2.5rem); color: var(--accent); line-height: 1;
}
.footer__socials { display: flex; gap: 1.2rem; }
.footer__socials a, .footer__phone { font-size: var(--fs-sm); transition: color var(--t) var(--ease); }
.footer__socials a:hover, .footer__phone:hover { color: var(--green-500); }

/* ---------------- Reveal / motion ---------------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ============================================================
   ANIMATIONS (GPU-friendly: transform/opacity)
   ============================================================ */
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes heroTitle { from { transform: translateY(20px); } to { transform: none; } }
@keyframes shimmer { to { background-position: 220% center; } }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(10%, 8%) scale(1.18); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-8%, -6%) scale(1.12); } }
@keyframes heroPulse { 0%, 100% { opacity: .5; } 50% { opacity: .9; } }
@keyframes shine { 0%, 55% { transform: translateX(-180%) skewX(-18deg); } 90%, 100% { transform: translateX(360%) skewX(-18deg); } }
@keyframes ctaPulse { 0%, 100% { box-shadow: var(--shadow-cta); } 50% { box-shadow: 0 16px 44px -6px rgba(255,107,0,.72); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.99); } to { opacity: 1; transform: none; } }

/* живий фон */
.lead__bg { animation: heroPulse 10s ease-in-out infinite; }
.lead__bg::before { animation: drift1 24s ease-in-out infinite; }
.lead__bg::after { animation: drift2 28s ease-in-out infinite; }

/* вхід оффера */
.lead__overline { animation: riseIn .6s var(--ease) both .05s; }
.lead__title { background-size: 220% auto; animation: heroTitle .7s var(--ease) both, shimmer 8s linear infinite .9s; }
.lead__subtitle { animation: riseIn .6s var(--ease) both .2s; }
.lead__meta { animation: riseIn .6s var(--ease) both .3s; }
.lead__form { animation: cardIn .7s var(--ease) both .28s; }

/* CTA — shine sweep + glow pulse */
.btn--cta::before {
  content: ""; position: absolute; top: -20%; left: 0; width: 38%; height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-180%) skewX(-18deg); pointer-events: none;
  animation: shine 5.5s ease-in-out infinite;
}
.btn--cta .btn__label { position: relative; z-index: 1; }
.btn--cta.btn--lg { animation: ctaPulse 3.2s ease-in-out infinite; }
.btn--cta.btn--lg:hover { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .lead__bg, .lead__bg::before, .lead__bg::after,
  .lead__overline, .lead__title, .lead__subtitle, .lead__meta, .lead__form,
  .lead__urgency-dot,
  .btn--cta::before, .btn--cta.btn--lg { animation: none !important; }
  .btn, .lead__alt-link, .strip__person { transition: none; }
  .btn__spinner { animation-duration: 1.2s; }
}
