/* ============================================================
   Kukurudza IG-Audit — фірмова тема kukurudza.com
   Палітра (за брендом, БЕЗ зеленого): #1a1a1a чорний · #ff6b00
   помаранч · #6736d0 фіолет · #f7f7f7 фон · #e8e8e8 лінії.
   Шрифти: Commissioner (текст+hero) · Ermilov-Bold (заголовки/
   кнопки, UPPERCASE) · Kukurudza (акценти).
   ============================================================ */

@font-face {
  font-family: 'Ermilov';
  src: url('/fonts/ermilov-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Kukurudza';
  src: url('/fonts/Kukurudza-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #1a1a1a;
  --ink-2: #131313;
  --muted: #3f3f3f;
  --muted-2: #b9b9b9;
  --bg: #f7f7f7;
  --white: #ffffff;
  --line: #e8e8e8;
  --orange: #ff6b00;
  --purple: #6736d0;
  --purple-l: #8f66ff;
  --purple-tint: #efe9fb;
  --font-head: 'Ermilov', 'Commissioner', sans-serif;
  --font-brand: 'Kukurudza', 'Commissioner', sans-serif;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(26, 26, 26, 0.07);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Commissioner', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* футер завжди внизу екрана навіть на коротких станах сторінки */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
/* у flex-колонці margin:auto стискає дітей до контенту — повертаємо повну ширину */
.topbar, .hero, .loading, .result { width: 100%; }
h1, h2 { line-height: 1.1; margin: 0 0 .4em; }
.hl { color: var(--orange); }
b { font-weight: 700; }

/* ── topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; max-width: 880px; margin: 0 auto;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700; font-size: 20px; text-transform: uppercase;
  text-decoration: none; color: var(--ink); letter-spacing: .01em;
  margin-bottom: -4px;
}
.topbar__tag { font-family: var(--font-brand); font-size: 15px; color: var(--purple); }

/* ── hero ── */
.hero { max-width: 760px; margin: 0 auto; padding: 40px 20px 46px; text-align: center; }
.hero__title {
  font-weight: 900;
  font-size: clamp(30px, 7vw, 52px);
  letter-spacing: -.02em;
}
.hero__sub { font-size: clamp(16px, 2.4vw, 19px); color: var(--muted); max-width: 580px; margin: 14px auto 30px; }

.finder { max-width: 580px; margin: 0 auto; }
.finder__row {
  display: flex; align-items: center; gap: 8px; background: var(--white);
  border: 2px solid var(--line); border-radius: 100px; padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow); transition: border-color .2s;
}
.finder__row:focus-within { border-color: var(--purple-l); }
.finder__at { color: var(--muted-2); font-weight: 800; font-size: 18px; }
.finder__input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; background: transparent; min-width: 0; color: var(--ink); }
.finder__hint { font-size: 12.5px; color: var(--muted-2); margin: 12px 4px 0; }
.finder__err { color: #c0392b; font-weight: 600; font-size: 14px; margin: 10px 0 0; }
.finder__err a { color: var(--purple); font-weight: 700; text-decoration: underline; }
.egg {
  background: var(--purple-tint); color: var(--purple);
  font-family: var(--font-brand); font-size: 18px; line-height: 1.45;
  border-radius: 16px; padding: 16px 20px; margin: 14px 0 0;
  animation: fadein .45s ease;
}

/* ── кнопки: pill як на kukurudza.com (Ermilov, uppercase) ── */
.btn {
  border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  border-radius: 100px; padding: 15px 28px 12px; font-size: 16px; letter-spacing: .02em;
  color: var(--bg); transition: transform .12s, filter .25s, background .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--go { background: var(--orange); }
.btn--go:hover { filter: brightness(1.08); }
.btn--tg {
  background: var(--orange); display: inline-block; text-decoration: none; text-align: center;
  padding: 19px 34px 15px; font-size: 18px;
}
.btn--tg:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .55; cursor: default; }

/* ── loading / progress ── */
.loading { text-align: center; padding: 50px 20px 56px; max-width: 540px; margin: 0 auto; }
.progress {
  height: 14px; border-radius: 100px; background: var(--line);
  overflow: hidden; box-shadow: inset 0 1px 3px rgba(26, 26, 26, .08);
}
.progress__fill {
  height: 100%; width: 0%; border-radius: 100px;
  background: var(--purple);
  transition: width .5s cubic-bezier(.25, .6, .35, 1);
  position: relative;
}
.progress__fill::after {
  content: ''; position: absolute; inset: 0; border-radius: 100px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: shine 1.6s linear infinite;
}
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress__meta {
  display: flex; justify-content: space-between; margin: 10px 4px 22px;
  font-size: 13.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums;
}
.progress__meta #progPct { font-family: var(--font-head); color: var(--purple); font-size: 15px; }
.loading__msg { font-family: var(--font-brand); color: var(--ink); font-size: 19px; min-height: 1.6em; }

/* ── result ── */
.result { max-width: 720px; margin: 0 auto; padding: 10px 20px 20px; }
.result__head {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px;
}
.result__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--purple-l); }
.result__handle { font-weight: 800; font-size: 18px; }
.result__followers { color: var(--muted); font-size: 14px; }
.result__scope { color: var(--muted-2); font-size: 12px; margin-top: 2px; }
.score {
  margin-left: auto; text-align: center; background: var(--purple); color: var(--bg);
  border-radius: 16px; padding: 10px 16px 6px;
  font-family: var(--font-head); font-weight: 700; font-size: 27px; line-height: 1;
}
.score small { font-size: 13px; opacity: .8; }

/* вердикт: фіолетовий фірмовий блок */
.verdict {
  background: var(--purple); color: var(--bg);
  border-radius: var(--radius);
  padding: 22px 24px; font-size: 18.5px; font-weight: 600; line-height: 1.5;
  margin-bottom: 16px; box-shadow: var(--shadow);
}

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card h2 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: 17px; letter-spacing: .03em; margin-bottom: .6em;
}
.card__body { color: var(--muted); white-space: pre-wrap; }
.card__body p { margin: 0 0 .7em; }
.card__body b { color: var(--ink); }
/* «👉 Швидка дія» — плашка-порада в кінці блоку */
.card__body .quick {
  background: var(--purple-tint); color: var(--ink);
  border-radius: 12px; padding: 10px 14px; margin: .4em 0 0;
  font-weight: 600; font-size: 14.5px;
}
.card--roast { border: 2px solid var(--orange); }

/* content mix — фіолет/помаранч, без зеленого */
.mixbar { display: flex; height: 16px; border-radius: 100px; overflow: hidden; margin: 6px 0 12px; background: var(--line); }
.mixbar > span { display: block; }
.mixlegend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.mixlegend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* roast */
.roast { margin: 6px 0 0; padding-left: 0; list-style: none; counter-reset: r; }
.roast li { counter-increment: r; position: relative; padding: 13px 0 13px 46px; border-top: 1px solid var(--line); }
.roast li:first-child { border-top: 0; }
.roast li::before {
  content: counter(r); position: absolute; left: 0; top: 13px; width: 31px; height: 31px;
  background: var(--orange); color: var(--bg); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; padding-top: 2px;
}
.roast b { display: block; margin-bottom: 2px; color: var(--ink); }
.roast span { color: var(--muted); font-size: 14.5px; }

/* місток до CTA — помітна плашка */
.disclaimer {
  background: var(--purple-tint); color: var(--ink);
  font-size: 15.5px; font-weight: 600; line-height: 1.5;
  text-align: center; border-radius: 16px;
  padding: 16px 20px; margin: 20px 0 0;
}

/* ── скелетони прогресивного підвантаження ── */
.skel-line {
  height: 12px; border-radius: 6px; margin: 11px 0;
  background: linear-gradient(90deg, #ececec 25%, #e0e0e0 37%, #ececec 63%);
  background-size: 400% 100%;
  animation: skel 1.4s ease infinite;
}
.skel-line--w80 { width: 80%; }
.skel-line--w60 { width: 60%; }
.verdict .skel-line {
  background: linear-gradient(90deg, rgba(247,247,247,.14) 25%, rgba(247,247,247,.3) 37%, rgba(247,247,247,.14) 63%);
  background-size: 400% 100%;
}
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.card__body > *, .verdict > span, .roast, .mixbar, .mixlegend { animation: fadein .45s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── cta / quiz: чорна секція, фіолетові акценти ── */
.cta { background: var(--ink); color: var(--bg); padding: 48px 20px 52px; margin-top: 28px; }
.cta__inner { max-width: 620px; margin: 0 auto; }
.cta__title {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(22px, 4.6vw, 30px); text-align: center; letter-spacing: .01em;
}
.cta__title .hl { color: var(--orange); }
.cta__sub { text-align: center; color: var(--muted-2); margin: 10px auto 28px; max-width: 500px; }
.quiz { display: grid; gap: 16px; }
.q { border: 0; margin: 0; padding: 0; }
.q legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.q__text {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--muted);
  background: var(--ink-2); color: var(--bg); font: inherit; outline: 0;
}
.q__text::placeholder { color: #8a8a8a; }
.q__text:focus { border-color: var(--purple-l); }
.q__opts { display: grid; gap: 8px; }
.q__opts label {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px;
  background: var(--ink-2); border: 2px solid var(--muted); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.q__opts label:has(input:checked) { border-color: var(--purple-l); background: #241a38; }
.q__opts input { accent-color: var(--purple-l); width: 18px; height: 18px; }
.quiz .btn--tg { margin-top: 10px; }
.quiz__err { color: #ff9d84; font-weight: 600; }

/* ── feedback-режим (/feedback): рецензія блоків ── */
.fb {
  background: #f3effc; border: 1px dashed #cbb8f0; border-radius: 14px;
  padding: 12px 14px; margin: -6px 0 14px;
}
.fb--overall { margin-top: 6px; }
.fb--overall b { display: block; margin-bottom: 8px; font-size: 14px; }
.fb__chips { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.fb__label { font-size: 12.5px; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: .04em; margin: 2px 0 6px; }
.fb__chip {
  border: 2px solid var(--line); background: var(--white); border-radius: 100px;
  padding: 6px 14px 5px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.fb__chip--0.on { background: var(--purple); border-color: var(--purple); color: #fff; }
.fb__chip--1.on { background: #ffb200; border-color: #ffb200; color: #1a1a1a; }
.fb__chip--2.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.fb__text {
  width: 100%; border: 1px solid #d9cbf2; border-radius: 10px; padding: 9px 12px;
  font: inherit; font-size: 14px; resize: vertical; background: var(--white); color: var(--ink);
}
.fb__text:focus { outline: 0; border-color: var(--purple-l); }
#fbBar {
  background: var(--purple); border-radius: var(--radius);
  padding: 20px 22px; margin: 10px 0 26px;
  box-shadow: 0 12px 32px rgba(103, 54, 208, .35);
}
#fbBarTitle {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  color: #fff; font-size: 16px; letter-spacing: .02em; margin-bottom: 12px;
}
#fbBarRow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#fbBar input {
  flex: 1 1 180px; min-width: 160px; padding: 13px 16px; border-radius: 100px;
  border: 2px solid transparent; background: #fff; color: var(--ink);
  font: inherit; font-size: 15px; outline: 0;
}
#fbBar input:focus { border-color: var(--orange); }
#fbBar input.fb__name-err { border-color: var(--orange); background: #fff1e8; }
#fbCount { color: rgba(255,255,255,.85); font-size: 13.5px; font-weight: 600; min-width: 74px; text-align: center; }
#fbBar .btn { padding: 14px 26px 11px; font-size: 15px; }
body.fb-mode .cta, body.fb-mode .disclaimer { display: none; }

/* ── thanks ── */
.thanks { text-align: center; padding: 60px 20px; }
.thanks__inner { max-width: 460px; margin: 0 auto; }
.thanks__emoji { font-size: 52px; }
.thanks h2 { font-family: var(--font-head); text-transform: uppercase; font-size: 24px; }
.thanks p { color: var(--muted); margin-bottom: 22px; }

/* ── footer: фірмова чорна плита, притиснута до низу ── */
.footer {
  margin-top: auto; width: 100%;
  background: var(--ink); color: rgba(247, 247, 247, .55);
  text-align: center; font-size: 12px;
  /* єдиний ритм: рівні відступи між усіма елементами і по краях */
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
}
.footer p { margin: 0; }
.footer a { color: rgba(247, 247, 247, .55); font-weight: 400; text-decoration: underline; }
.footer__soclead {
  margin: 0; color: var(--bg);
  font-family: var(--font-brand); font-size: 14px;
}
.footer__soc { display: flex; justify-content: center; gap: 10px; margin: 0; }
.footer__soc a {
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg);
  display: grid; place-items: center;
  transition: transform .15s, background .15s;
}
.footer__soc a:hover { transform: scale(1.1); background: #fff; }
.footer__soc img { width: 16px; height: 16px; object-fit: contain; }
.footer__again { margin: 0; }

@media (min-width: 640px) {
  .finder__input { font-size: 17px; }
}
