/* Badzinger Auto — відкриття автосалону. Спільні стилі банера та сторінки правил. */

:root {
  --ink: #0b0b0c;
  --ink-soft: #3b3b40;
  --muted: #6b6b72;
  --line: #0b0b0c;
  --paper: #ffffff;
  --link: #1e8cd0;
  --error: #d22f2f;
  --radius: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- Hero: фото + логотип + заокруглена біла панель ---------- */

.hero {
  position: relative;
  aspect-ratio: 2.1 / 1;
  max-height: 620px;
  width: 100%;
  overflow: hidden;
  background: #2b2f3a;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 38%;
}

/* легке затемнення знизу, щоб білий логотип читався на будь-якому кадрі */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 45%, rgba(0,0,0,.28) 100%);
}

.hero__logo {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: calc(8% + 44px);
  transform: translateX(-50%);
  width: min(80%, 1100px);
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.25));
}

.panel {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, 820px);
  margin: -44px auto 0;
  padding: 26px clamp(8px, 4vw, 48px) 0;
  background: var(--paper);
  border-radius: 56px 56px 0 0;
  text-align: center;
}

/* ---------- Текст ---------- */

.lead p { margin: 0 0 1.1em; }
.lead strong { font-weight: 700; }

.headliners { white-space: nowrap; }

.facts {
  margin: 0 0 1.1em;
  padding: 0;
  list-style: none;
}
.facts li { margin: 0; }

.notice {
  display: inline-block;
  margin: .2em 0 1.6em;
  padding: .75em 1.25em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.45;
}
.notice strong { display: block; }

.form-intro { margin: 0 0 28px; }
.form-intro h2 {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
}
.form-intro p { margin: 0; font-weight: 700; }

/* ---------- Форма ---------- */

.form {
  width: min(100%, 340px);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.field { display: grid; gap: 6px; }

.field input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 18px; /* ≥16px — iOS не зумить сторінку при фокусі */
  text-align: center;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: var(--ink-soft); opacity: 1; }
.field input:focus { box-shadow: 0 0 0 3px rgba(11,11,12,.14); }
.field input:focus::placeholder { color: #a6a6ad; }
.field input[type="tel"] { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

.field.is-invalid input { border-color: var(--error); }
.field__error {
  display: none;
  font-size: 14px;
  color: var(--error);
}
.field.is-invalid .field__error { display: block; }

.field__hint { font-size: 14px; color: var(--muted); }

.consent {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 6px;
  text-align: left;
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
}
.consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.consent__box {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  transition: background .15s ease;
}
.consent__box svg { width: 16px; height: 16px; opacity: 0; transition: opacity .15s ease; }
.consent input:checked + .consent__box svg { opacity: 1; }
.consent input:focus-visible + .consent__box { box-shadow: 0 0 0 3px rgba(11,11,12,.18); }
.consent.is-invalid .consent__box { border-color: var(--error); }
.consent__error { grid-column: 2; }
.consent.is-invalid .consent__error { display: block; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit {
  height: 58px;
  margin-top: 8px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .1s ease, opacity .15s ease;
}
.submit:hover { opacity: .88; }
.submit:active { transform: scale(.99); }
.submit[disabled] { opacity: .5; cursor: progress; }

.form__status { margin: 0; font-size: 15px; color: var(--error); min-height: 0; }

.success {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 28px 24px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  outline: none;
}
.success h3 { margin: 0 0 8px; font-size: 22px; }
.success p { margin: 0 0 .6em; }
.success p:last-child { margin-bottom: 0; }

/* ---------- Низ ---------- */

.farewell {
  margin: 44px 0 26px;
  font-size: 20px;
  font-weight: 700;
}

.socials {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 8vw, 56px);
  margin: 0;
  padding: 0 0 48px;
  list-style: none;
}
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  transition: transform .15s ease, opacity .15s ease;
}
.socials a:hover { transform: translateY(-2px); opacity: .75; }
.socials svg { width: 38px; height: 38px; }

/* ---------- Сторінка правил ---------- */

.rules-hero { aspect-ratio: 3.4 / 1; max-height: 380px; }
.rules-hero .hero__logo { bottom: calc(10% + 44px); width: min(72%, 900px); }

.rules {
  text-align: left;
  padding-bottom: 56px;
  font-size: 16px;
  line-height: 1.6;
}
.rules__head { text-align: center; margin-bottom: 28px; }
.rules__head h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.25; letter-spacing: .01em; }
.rules__head p { margin: 0; color: var(--muted); }

.rules__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 22px 0 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.btn--solid { background: var(--ink); color: #fff; }
.btn:hover { opacity: .85; }
.btn svg { width: 18px; height: 18px; }

.rules section { padding: 22px 0; border-top: 1px solid #e4e4e8; }
.rules h2 { margin: 0 0 10px; font-size: 19px; }
.rules p { margin: 0 0 8px; }
.rules ul, .rules ol { margin: 4px 0 10px; padding-left: 1.4em; }
.rules li { margin: 2px 0; }
.rules .num { font-weight: 600; margin-right: .25em; }
.rules__org { padding-top: 22px; border-top: 1px solid #e4e4e8; }
.rules__org p { margin: 0; }

/* ---------- Телефони ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { aspect-ratio: 4 / 3.3; }
  .hero__photo { object-position: 38% 50%; }
  .hero__logo { width: 88%; bottom: calc(6% + 34px); }
  .panel { width: calc(100% - 24px); margin-top: -34px; padding-top: 22px; border-radius: 34px 34px 0 0; }
  .headliners { white-space: normal; }
  .farewell { font-size: 18px; }

  .rules-hero { aspect-ratio: 2 / 1; }
  .rules-hero .hero__logo { width: 86%; bottom: calc(8% + 34px); }
  .rules__head h1 { font-size: 21px; }
  .rules { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Діти до 14 років ---------- */

.kids { gap: 10px; justify-items: center; }
.kids__label { font-size: 15px; color: var(--ink-soft); }

.stepper {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stepper input {
  height: 54px;
  border: 0;
  border-left: 1.5px solid var(--line);
  border-right: 1.5px solid var(--line);
  border-radius: 0;
  text-align: center;
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.stepper input:focus { box-shadow: inset 0 0 0 3px rgba(11,11,12,.12); }

.stepper__btn {
  height: 54px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease;
}
.stepper__btn:hover { background: #f1f1f3; }
.stepper__btn:active { background: #e6e6ea; }
.stepper__btn[disabled] { color: #bdbdc4; cursor: default; background: var(--paper); }

.kids.is-invalid .stepper { border-color: var(--error); }
.kids.is-invalid .stepper input { border-color: var(--error); }

.rules .rules__fund {
  margin: 10px 0 12px;
  padding: 14px 16px;
  border-left: 3px solid var(--ink);
  background: #f5f5f7;
  border-radius: 0 10px 10px 0;
  line-height: 1.65;
}
