/* ===== Токени айдентики SUSHIPAK ===== */
:root {
  --bg: #000000;
  --surface: #181818;
  --text: #FFFFFF;
  --text-muted: rgba(255, 255, 255, .6);
  --accent: #DA2229;
  --accent-hover: #E02A31;
  --accent-glow: 0 0 24px rgba(218, 34, 41, .45);
  --input-bg: rgba(255, 255, 255, .08);
  --input-border: #686868;
  --radius: 8px;
  --warning: #FFB020;
  --track: rgba(255, 255, 255, .12);

  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* Підставте "Gilroy", якщо будуть файли шрифту */
  --font-heading: "Montserrat", "Arial Black", system-ui, sans-serif;

  --gutter: 16px;
  --max: 640px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.muted { color: var(--text-muted); }

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  border-radius: var(--radius);
  font-weight: 700;
}
.skip-link:focus { top: 8px; }

/* ===== Шапка ===== */
.site-header { padding: 16px 0; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 48px;
}
.logo img { width: 40px; height: 40px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-family: var(--font-heading); font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.logo__tag { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

/* ===== Hero ===== */
.hero {
  padding: 40px 0 56px;
  background: radial-gradient(120% 70% at 50% 0%, rgba(218, 34, 41, .08), transparent 70%);
}
.tag {
  display: inline-block;
  padding: 6px 10px;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero__title {
  margin: 18px 0 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(28px, 8vw, 46px);
  line-height: 1.08;
  letter-spacing: -.005em;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}
.hero__subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: var(--accent-glow); flex: none; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (hover: hover) {
  .btn:hover { background: var(--accent-hover); box-shadow: var(--accent-glow); }
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; box-shadow: var(--accent-glow); }
.btn--block { width: 100%; }
.btn--secondary { background: transparent; box-shadow: inset 0 0 0 1px var(--input-border); }
@media (hover: hover) {
  .btn--secondary:hover { background: var(--input-bg); box-shadow: inset 0 0 0 1px var(--text); }
}
.btn[disabled] { cursor: progress; opacity: .75; box-shadow: none; transform: none; }

.btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Секції ===== */
.section-title {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.about { padding: 8px 0 48px; }
.about__text { display: grid; gap: 14px; font-size: 17px; }
.about__text p:first-child { font-weight: 700; }

.form-section { padding: 16px 0 64px; outline: none; }
.form-intro { margin: -6px 0 16px; }

/* ===== Прогрес ===== */
.progress {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 calc(var(--gutter) * -1) 12px;
  padding: 12px var(--gutter);
  background: var(--bg);
}
.progress__track { flex: 1; height: 4px; background: var(--track); border-radius: 4px; overflow: hidden; }
.progress__fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(218, 34, 41, .6);
  transition: width .3s ease;
}
.progress__label { font-size: 13px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }

/* ===== Картки питань ===== */
#lead-form { display: grid; gap: 12px; }
.card {
  margin: 0;
  min-width: 0;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card:focus-within { border-color: var(--accent); box-shadow: 0 0 18px rgba(218, 34, 41, .22); }
.card.has-error { border-color: var(--warning); box-shadow: none; }
/* legend як звичайний блок усередині картки (інакше браузер садить його на рамку) */
fieldset.card > legend.q { float: left; }
fieldset.card > legend.q + * { clear: both; }

.q {
  display: flex;
  gap: 10px;
  align-items: baseline;
  float: none;
  width: 100%;
  padding: 0;
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}
.q__num {
  flex: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  color: var(--accent);
  min-width: 14px;
}
.hint { margin: -8px 0 12px 24px; font-size: 14px; color: var(--text-muted); }

.input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* ≥16px — iOS не масштабує сторінку при фокусі */
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: rgba(255, 255, 255, .55); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.input--short { max-width: 200px; }
.textarea { min-height: 96px; resize: vertical; overflow: hidden; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.has-error .input { border-color: var(--warning); }
.has-error .input:focus { box-shadow: 0 0 0 1px var(--warning); }

.error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 10px;
  color: var(--warning);
  font-size: 14px;
  font-weight: 600;
}
.error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--warning); color: #000; font-size: 12px; font-weight: 800; }
.error[hidden] { display: none; }

/* ===== Кастомні radio / checkbox ===== */
.choices { display: grid; gap: 4px; }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  margin: 0 -4px;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .12s ease;
}
@media (hover: hover) { .choice:hover { background: rgba(255, 255, 255, .04); } }
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.choice__box {
  flex: none;
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid var(--input-border);
  border-radius: 50%;
  transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.choice--checkbox .choice__box { border-radius: 5px; }
.choice__text { flex: 1; font-size: 16px; }
.choice input:checked + .choice__box {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(218, 34, 41, .5);
}
.choice--radio input:checked + .choice__box::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--text);
}
.choice--checkbox input:checked + .choice__box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--text);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.choice input:focus-visible + .choice__box { outline: 2px solid var(--text); outline-offset: 3px; }
.has-error .choice__box { border-color: var(--warning); }


/* Honeypot */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ===== Відправка ===== */
.submit { margin-top: 8px; }
.form-error {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  color: var(--warning);
  font-weight: 600;
}
.form-error[hidden] { display: none; }

/* ===== Дякуємо ===== */
.thanks { padding: 40px 20px; text-align: center; border-color: var(--accent); box-shadow: var(--accent-glow); }
.thanks .section-title { margin-top: 16px; outline: none; }
.thanks p { font-size: 17px; color: var(--text-muted); max-width: 420px; margin: 0 auto; }
.thanks__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); box-shadow: var(--accent-glow); }

/* ===== Футер ===== */
.site-footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; color: var(--text-muted); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.footer__inner a { color: var(--text-muted); min-height: 32px; display: inline-flex; align-items: center; }


@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .hero { padding: 64px 0 80px; }
  .card { padding: 24px; }
  .section-title { font-size: 26px; }
  .btn:not(.btn--block) { padding: 16px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
