/* ===== Токени айдентики FOODPAK (efoodpak.pl): світла тема, зелений акцент, Inter, радіус 12px ===== */
:root {
  --bg: #F2F5FA;
  --surface: #FFFFFF;
  --text: #1B2430;
  --text-muted: #5B6470;
  --accent: #178758;          /* кнопки, прогрес, вибрані варіанти */
  --accent-hover: #12704A;
  --accent-ring: rgba(23, 135, 88, .18);
  --brand: #1DA96C;           /* зелений з логотипу */
  --brand-dark: #0E5336;
  --brand-soft: #E3F4EC;
  --input-bg: #FFFFFF;
  --input-border: #C9D1DB;
  --line: #E6E9EE;
  --radius: 12px;
  --error: #C62828;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, 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(--brand-dark); text-underline-offset: 3px; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.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); color: #fff; border-radius: var(--radius); font-weight: 600; }
.skip-link:focus { top: 8px; }

/* ===== Шапка ===== */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 0; }
.logo { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; }
.logo__img { height: 30px; width: auto; }

/* ===== Hero ===== */
.hero {
  padding: 36px 0 44px;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(29, 169, 108, .14), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg));
}
.tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.hero__title {
  margin: 16px 0 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(28px, 7.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}
.hero__subtitle { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-size: 18px; font-weight: 500; color: var(--text-muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); 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: #FFFFFF;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
  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: 0 6px 18px rgba(23, 135, 88, .25); } }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn--block { width: 100%; }
.btn[disabled] { cursor: progress; opacity: .75; transform: none; }
.btn__spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; 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 14px; font-family: var(--font-heading); font-weight: 800; font-size: 22px; line-height: 1.25; letter-spacing: -.01em; }
.about { padding: 8px 0 40px; }
.about__text { display: grid; gap: 14px; font-size: 17px; }
.form-section { padding: 8px 0 64px; outline: none; }
.form-intro { margin: -4px 0 14px; }

/* ===== Прогрес ===== */
.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: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress__fill { height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .3s ease; }
.progress__label { font-size: 13px; font-weight: 600; 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 var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.card.has-error { border-color: var(--error); box-shadow: 0 0 0 3px rgba(198, 40, 40, .12); }
fieldset.card > legend.q { float: left; }
fieldset.card > legend.q + * { clear: both; }

.q { display: flex; gap: 10px; align-items: baseline; width: 100%; padding: 0; margin: 0 0 14px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.q__num {
  flex: none; display: inline-grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 13px; font-weight: 700; transform: translateY(-1px);
}
.hint { margin: -8px 0 12px 34px; 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: 10px;
  color: var(--text);
  font: inherit; font-size: 16px; line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: #8A929C; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input--short { max-width: 200px; }
.textarea { min-height: 96px; resize: vertical; overflow: hidden; }
.has-error .input { border-color: var(--error); }

.error { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; color: var(--error); font-size: 14px; font-weight: 500; }
.error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--error); color: #fff; font-size: 12px; font-weight: 800; }
.error[hidden] { display: none; }

/* ===== Radio / checkbox ===== */
.choices { display: grid; gap: 6px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .12s ease, border-color .12s ease;
}
@media (hover: hover) { .choice:hover { background: var(--bg); } }
.choice:has(input:checked) { border-color: var(--accent); background: var(--brand-soft); }
.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%; background: #fff; transition: border-color .12s ease, background-color .12s ease; }
.choice--checkbox .choice__box { border-radius: 6px; }
.choice__text { flex: 1; font-size: 16px; }
.choice input:checked + .choice__box { background: var(--accent); border-color: var(--accent); }
.choice--radio input:checked + .choice__box::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.choice--checkbox input:checked + .choice__box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--accent); outline-offset: 3px; }
.has-error .choice__box { border-color: var(--error); }

.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(--error); border-radius: 10px; background: #FDECEC; color: var(--error); font-weight: 500; }
.form-error[hidden] { display: none; }
.thanks { padding: 40px 20px; text-align: center; border-color: var(--accent); }
.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); color: #fff; }

/* ===== Футер ===== */
.site-footer { padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--text-muted); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }

/* ===== Платформа: прев'ю, список вакансій ===== */
.preview-bar { position: sticky; top: 0; z-index: 20; padding: 8px 16px; background: #FFF4CC; color: #5C4400; font-size: 13px; font-weight: 600; text-align: center; border-bottom: 1px solid #F0D98A; }
.hero--compact { padding: 32px 0 24px; }
.vacancy-list { display: grid; gap: 12px; }
.vacancy-link { display: grid; gap: 4px; text-decoration: none; color: var(--text); padding: 20px; }
.vacancy-link__title { font-weight: 700; font-size: 18px; }
@media (hover: hover) { .vacancy-link:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); } }

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .hero { padding: 56px 0 64px; }
  .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; }
}

/* ===== Назва вакансії: головна частина в один рядок, решта — підзаголовок ===== */
.hero__title { text-wrap: initial; hyphens: manual; }
.hero__title-main { display: block; width: 100%; white-space: nowrap; font-size: clamp(30px, 9.5vw, 52px); line-height: 1.08; }
.hero__title-sub {
  display: block;
  margin-top: 8px;
  font-size: clamp(16px, 4.6vw, 22px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--text-muted, #5B6470);
  text-wrap: balance;
}
