@font-face {
  font-family: "Gilroy";
  src:
    url("../fonts/Gilroy-Regular.woff2") format("woff2"),
    url("../fonts/Gilroy-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src:
    url("../fonts/Gilroy-Bold.woff2") format("woff2"),
    url("../fonts/Gilroy-Bold.woff") format("woff");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AkzidenzGroteskPro";
  src:
    url("../fonts/AkzidenzGroteskPro-BoldCnIt.woff2") format("woff2"),
    url("../fonts/AkzidenzGroteskPro-BoldCnIt.woff") format("woff");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #08090d;
  --bg-soft: #11131a;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.42);
  --accent: #ff4141;
  --accent-dark: #aa2e3c;
  --line: rgba(255, 255, 255, 0.16);
  --radius: 12px;
  --font: "Gilroy", Arial, Helvetica, sans-serif;
  --display-font: "AkzidenzGroteskPro", "Gilroy", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: #08090d url("../img/header-bg.png") center / cover fixed no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(110deg, rgba(8, 9, 13, 0.98), rgba(8, 9, 13, 0.82) 52%, rgba(8, 9, 13, 0.56)),
    radial-gradient(circle at 80% 18%, rgba(255, 65, 65, 0.24), transparent 26%);
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 20px 0 16px;
  position: relative;
  z-index: 5;
}

.brand,
.header-socials,
.header-contact,
.header-socials a,
.header-contact a,
.messenger {
  display: flex;
  align-items: center;
}

.brand {
  justify-self: center;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.brand__logo {
  width: clamp(158px, 16.5vw, 212px);
  height: auto;
  object-fit: contain;
}

.brand__text {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.header-socials,
.header-contact {
  gap: 10px;
  min-width: 0;
}

.header-socials {
  justify-self: start;
}

.header-contact {
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.social-link {
  width: 40px;
  height: 40px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.phone-link {
  color: var(--text);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.messenger {
  position: relative;
}

body.has-messenger-open {
  overflow: hidden;
}

.messenger__button,
.button {
  border: 0;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.messenger__button {
  min-height: 42px;
  justify-content: center;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 34px rgba(255, 65, 65, 0.22);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.messenger__menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 10, 0.76);
  backdrop-filter: blur(10px);
}

.messenger.is-open .messenger__menu {
  display: flex;
}

.messenger__panel {
  position: relative;
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(28, 30, 38, 0.98), rgba(12, 13, 18, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.54);
}

.messenger__eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.messenger__title {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 0.95;
}

.messenger__text {
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.messenger__list {
  display: grid;
  gap: 6px;
}

.messenger__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 900;
}

.messenger__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.messenger__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.messenger__item:hover,
.messenger__item:focus-visible,
.messenger__close:hover,
.messenger__close:focus-visible {
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.option:hover,
.social-link:hover {
  background: var(--surface);
  color: var(--text);
}

.phone-link:hover {
  color: var(--accent);
}

.social-link:hover {
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.messenger__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(255, 65, 65, 0.3);
}

.social-link:focus-visible,
.phone-link:focus-visible,
.messenger__button:focus-visible,
.messenger__close:focus-visible {
  outline: 2px solid rgba(255, 65, 65, 0.72);
  outline-offset: 4px;
}

.quiz {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(22px, 5vh, 54px) 0 36px;
}

.progress {
  width: min(540px, 100%);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  color: var(--muted);
}

.progress__label {
  white-space: nowrap;
  font-size: 14px;
}

.progress__bar {
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.progress__bar span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffffff);
  transition: width 0.3s ease;
}

.quiz-step {
  display: none;
  align-items: center;
  gap: 36px;
  min-height: min(520px, calc(100vh - 210px));
  animation: stepIn 0.35s ease both;
}

.quiz-step.is-active {
  display: flex;
}

.quiz-step--hero {
  justify-content: space-between;
}

.step-copy {
  width: min(640px, 100%);
}

.step-copy--wide {
  width: 100%;
}

h1,
h2 {
  margin: 0 0 20px;
  font-family: var(--display-font);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  line-height: 0.95;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  text-shadow: 10px 0 0 rgba(255, 255, 255, 0.12);
}

h2 {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 0.98;
}

h3 {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.3;
}

p {
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.55;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 26px;
  color: var(--text);
  font-family: var(--font);
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary,
.button--small {
  background: var(--accent);
  box-shadow: 0 16px 42px rgba(255, 65, 65, 0.28);
}

.button--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.button--small {
  min-height: 44px;
  padding: 0 20px;
  align-self: flex-start;
}

.hero-media,
.side-visual {
  flex: 1;
  min-width: 320px;
  text-align: right;
}

.hero-media img,
.side-visual img {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  filter: drop-shadow(0 34px 60px rgba(0, 0, 0, 0.46));
}

.side-visual img {
  opacity: 0.86;
}

.side-visual--wide img {
  max-height: 480px;
}

.side-visual--tall img {
  max-height: 540px;
}

.question {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.options {
  display: grid;
  gap: 10px;
}

.options--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option {
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--muted);
  text-align: left;
  line-height: 1.25;
}

.option.is-selected {
  border-color: var(--accent);
  background: rgba(255, 65, 65, 0.16);
  color: var(--text);
}

.option:focus-visible,
.button:focus-visible,
.lead-form input:focus-visible,
.agree a:focus-visible {
  outline: 2px solid rgba(255, 65, 65, 0.72);
  outline-offset: 3px;
}

.step-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.direction-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-strong), rgba(255, 255, 255, 0.05));
}

.direction-card.is-hidden {
  display: none;
}

.direction-card__image {
  aspect-ratio: 3 / 2;
  min-height: 0;
  max-width: 100%;
  border-radius: 8px;
  background: #191b22 center / cover no-repeat;
}

.direction-card h3 {
  flex: 1;
  margin-bottom: 0;
  font-size: clamp(17px, 1.35vw, 20px);
}

.direction-card .button--small {
  width: min(180px, 100%);
}

.direction-card__image--trial {
  background-image: url("../img/direction-trial-lesson.png");
}

.direction-card__image--safety {
  background-image: url("../img/direction-defensive-riding.png");
  background-position: right center;
}

.direction-card__image--category {
  background-image: url("../img/direction-category-a.png");
  background-position: center bottom;
}

.branch-content {
  display: grid;
  gap: 18px;
}

.lead-form {
  display: grid;
  gap: 16px;
}

.lead-form label:not(.agree):not(.honeypot) {
  display: grid;
  gap: 8px;
}

.lead-form span {
  color: var(--muted);
}

.lead-form input[type="text"],
.lead-form input[type="tel"] {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
}

.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.4;
}

.agree input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.agree a {
  color: var(--accent);
  border-bottom: 1px solid rgba(255, 65, 65, 0.45);
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.form-message {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.4;
}

.form-message.is-success {
  color: #90ee90;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(180px, 0.6fr) minmax(280px, 0.9fr);
  align-items: start;
  gap: 28px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand,
.footer-contacts,
.footer-address {
  min-width: 0;
}

.footer-brand {
  display: grid;
  gap: 10px;
}

.footer-brand .brand {
  align-items: flex-start;
  justify-self: start;
}

.footer-brand__logo {
  width: clamp(130px, 14vw, 176px);
  height: auto;
  object-fit: contain;
}

.footer-brand__copyright,
.footer-brand__rights {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.footer-brand__copyright {
  color: var(--text);
  font-weight: 700;
}

.footer-brand__rights {
  max-width: 360px;
  color: var(--faint);
}

.footer-contacts,
.footer-address {
  display: grid;
  gap: 8px;
  font-style: normal;
  line-height: 1.45;
}

.footer-contacts a,
.footer-address span:not(.footer-label) {
  color: var(--muted);
}

.footer-contacts a {
  width: fit-content;
  transition: color 0.2s ease;
}

.footer-contacts a:hover,
.footer-contacts a:focus-visible {
  color: var(--accent);
}

.footer-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {

  .quiz-step,
  .quiz-step.is-active {
    align-items: flex-start;
  }

  .quiz-step.is-active {
    flex-direction: column;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0 14px;
  }

  .header-socials {
    display: none;
  }

  .brand {
    justify-self: start;
  }

  .brand__logo {
    width: clamp(136px, 20vw, 176px);
  }

  .header-contact {
    justify-self: end;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .step-copy {
    width: 100%;
  }

  .direction-grid {
    grid-template-columns: 1fr;
  }

  .direction-card {
    display: grid;
    grid-template-columns: minmax(190px, 0.46fr) minmax(0, 1fr);
    align-items: center;
  }

  .direction-card__image {
    height: 100%;
    min-height: 210px;
  }

  .direction-card .button {
    grid-column: 2;
  }

  .hero-media,
  .side-visual {
    min-width: 0;
    width: 100%;
    text-align: center;
  }

  .side-visual {
    display: none;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
  }

  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 10px 0 8px;
    gap: 10px;
  }

  .header-contact {
    min-width: 0;
    width: 100%;
    justify-content: space-between;
  }

  .brand__logo {
    width: clamp(108px, 31vw, 124px);
  }

  .header-contact {
    gap: 8px;
  }

  .phone-link,
  .messenger__button {
    font-size: 12px;
  }

  .phone-link {
    flex: 0 0 auto;
  }

  .messenger__button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .messenger__menu {
    padding: 14px;
  }

  .messenger__panel {
    padding: 30px 18px 18px;
  }

  .messenger__item {
    min-height: 52px;
    font-size: 14px;
  }

  .quiz-step {
    min-height: auto;
  }

  .quiz {
    padding-top: 18px;
  }

  .hero-media img {
    max-height: min(360px, 52vh);
  }

  .progress {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(38px, 11vw, 52px);
    text-shadow: 6px 0 0 rgba(255, 255, 255, 0.1);
  }

  h2 {
    font-size: clamp(30px, 9vw, 40px);
  }

  h3 {
    font-size: 17px;
  }

  .options--grid {
    grid-template-columns: 1fr;
  }

  .question {
    padding: 16px;
  }

  .option {
    min-height: 50px;
  }

  .direction-card {
    display: flex;
    padding: 14px;
  }

  .direction-card__image {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .direction-card .button {
    align-self: stretch;
  }

  .button {
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 24px 0 28px;
  }

  .footer-brand__logo {
    width: 132px;
  }

  .footer-brand__rights {
    max-width: none;
  }
}