/* ==========================================================================
   Переменные
   ========================================================================== */

:root {
  --primary: #ffd11c;
  --primary-hover: #ffce09;
  --secondary: #EDF2F7;
  --secondary-hover: #E2E8F0;

  --text: #171923;
  --subtext: #4A5568;
  --placeholder: #718096;
  --success: #2F855A;
  --error: #E53E3E;

  --paper: #FFFFFF;
  --page: #F7FAFC;
  --border: #E2E8F0;

  --radius-xl: 1.5rem;
  --radius-xxl: 2rem;
  --shadow: 0 0 3px 0 rgba(165, 177, 202, .30),
            0 10px 40px 0 rgba(165, 177, 202, .30);

  --header-h: 4.5rem;
}

@media (min-width: 48em) {
  :root {
    --header-h: 5.5rem;
  }
}


/* ==========================================================================
   База
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 600;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.33;
  font-weight: 500;
}

p {
  margin: 0;
  font-weight: 500;
}

b,
strong {
  font-weight: 700;
}


/* ==========================================================================
   Шапка
   ========================================================================== */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  padding-inline: 1.25rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
  max-width: 90rem;
  margin-inline: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.header__inner::-webkit-scrollbar {
  display: none;
}

.header__logo {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .5rem;
  object-fit: cover;
}

@media (min-width: 48em) {
  .header__logo {
    width: 3.5rem;
    height: 3.5rem;
  }
}

.nav {
  display: flex;
  gap: 1rem;
  white-space: nowrap;
}

.nav a {
  padding-bottom: .25rem;
  border-bottom: 2px solid transparent;
  font-size: .875rem;
  line-height: 1.43;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s;
}

.nav a:hover {
  border-bottom-color: var(--primary);
}


/* ==========================================================================
   Раскладка
   ========================================================================== */

main {
  position: relative;
  padding-top: var(--header-h);
  padding-bottom: 6.5rem; /* место под нижнюю панель на мобильных */
}

@media (min-width: 48em) {
  main {
    padding: calc(14.25rem + 2rem) 2rem 0;
  }
}

/* Фоновая картинка под шапкой */
.banner {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 0;
  height: 12rem;
  background: url("https://avatars.mds.yandex.net/get-maps-adv-crm/18883707/2a000001a06274995a095e6ea87ccf6fb524/orig") center / cover no-repeat;
  border-radius: 0 0 var(--radius-xxl) var(--radius-xxl);
}

@media (min-width: 48em) {
  .banner {
    height: 25rem;
  }
}

.container,
.footer {
  position: relative;
  z-index: 1;
}

.container {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  width: 100%;
  margin-inline: auto;
  padding-bottom: 2rem;
}

@media (min-width: 48em) {
  .container {
    max-width: 50rem;
  }
}

section {
  scroll-margin-top: 100px;
}


/* ==========================================================================
   Карточки
   ========================================================================== */

.card {
  padding: 1.5rem;
  background: var(--paper);
  border-radius: var(--radius-xxl);
}

@media (min-width: 36em) {
  .card {
    padding: 2rem;
  }

  .card--lg {
    padding: 2.5rem;
  }
}


/* ==========================================================================
   Первый экран
   ========================================================================== */

.hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 36em) {
  .hero {
    gap: 1.5rem;
  }
}

.hero__top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.hero__logo {
  flex: 0 0 auto;
  width: 6rem;
  height: 6rem;
  border-radius: var(--radius-xl);
  object-fit: cover;
}

.hero__logo--mobile {
  margin: 2rem 1.5rem 0;
}

.hero__logo--desktop {
  display: none;
}

@media (min-width: 48em) {
  .hero__logo--mobile {
    display: none;
  }

  .hero__logo--desktop {
    display: block;
  }
}

.hero__img {
  width: 80%;
  height: auto;
  border-radius: var(--radius-xxl);
  margin: 0 auto;
}


/* ==========================================================================
   Кнопки
   ========================================================================== */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

@media (min-width: 48em) {
  .actions {
    gap: .75rem;
  }
}

.btn {
  display: inline-flex;
  flex: 1 1 100%;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 3.5rem;
  padding: .625rem 1.5rem;
  border: 0;
  border-radius: var(--radius-xl);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.43;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}

.btn svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

@media (min-width: 36em) {
  .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 48em) {
  .btn {
    height: 4rem;
    padding: .75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .btn svg {
    width: 32px;
    height: 32px;
  }
}

.btn--primary {
  background: var(--primary);
  color: var(--text);
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--secondary {
  background: var(--secondary);
  color: var(--subtext);
}

.btn--secondary:hover {
  background: var(--secondary-hover);
}

.btn.btn--sm {
  flex: 0 0 auto;
  height: 3rem;
  padding: .5rem 1.25rem;
  font-size: .875rem;
}

.btn:disabled {
  opacity: .6;
  cursor: default;
}


/* ==========================================================================
   Блоки «картинка + текст»
   ========================================================================== */

.split {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 48em) {
  .split {
    flex-direction: row;
  }

  .split--reverse {
    flex-direction: row-reverse;
  }

  .split__media {
    flex: 0 0 50%;
    width: 50%;
  }
}

/* Картинка растягивается на всю высоту блока */
.image {
  display: block;
  position: relative;
  overflow: hidden;
}

.image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__media img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-xxl);
}

/* Широкое фото целиком над текстом (станция в разрезе) */
.split--stacked {
  flex-direction: column;
}

.split--stacked .split__media {
  width: 100%;
  max-width: none;
  flex: none;
}

.split--stacked .split__media img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

.split__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .75rem;
}


/* ==========================================================================
   Текст
   ========================================================================== */

.prose {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  font-size: 1rem;
  line-height: 1.5;
}

.prose ul {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 0;
  padding-left: 1.5rem;
}

.prose li {
  font-weight: 500;
}

.muted {
  color: var(--subtext);
}

.small {
  font-size: .875rem;
  line-height: 1.43;
}


/* ==========================================================================
   Форма заявки
   ========================================================================== */

.request {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.field__label {
  font-size: .875rem;
  font-weight: 600;
}

.field__input {
  width: 100%;
  padding: .875rem 1rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  outline: none;
  background: var(--secondary);
  color: var(--text);
  font: inherit;
  font-size: .875rem;
  font-weight: 500;
  transition: border-color .2s, background .2s;
}

.field__input::placeholder {
  color: var(--placeholder);
}

.field__input:focus {
  border-color: var(--primary);
  background: var(--paper);
}

.field__input.is-invalid {
  border-color: var(--error);
}

/* Атрибут hidden должен побеждать display: flex у формы */
[hidden] {
  display: none !important;
}

/* Заглушка после успешной отправки */
.request__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 3rem 0;
  text-align: center;
}

.request__success-title {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
}

.request__success-text {
  max-width: 36rem;
  font-size: 1.5rem;
  line-height: 1.33;
  color: var(--subtext);
}

@media (max-width: 35.99em) {
  .request__success {
    padding: 2rem 0;
  }

  .request__success-title {
    font-size: 1.5rem;
  }

  .request__success-text {
    font-size: 1.125rem;
  }
}

.field__error {
  font-size: .75rem;
  line-height: 1.33;
  color: var(--error);
}

.field__error:empty {
  display: none;
}

/* Скрытое поле-ловушка для спам-ботов */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.field__input--area {
  min-height: 6rem;
  resize: vertical;
}

.form__status {
  font-size: .875rem;
}

.form__status:empty {
  display: none;
}

.form__status.ok {
  color: var(--success);
}

.form__status.err {
  color: var(--error);
}


/* ==========================================================================
   Подвал
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 90rem;
  margin-inline: auto;
  padding: 1rem 1.5rem 1.5rem;
  font-size: .875rem;
  font-weight: 500;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0 auto;
}

@media (min-width: 48em) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 1.5rem;
  }
}


/* ==========================================================================
   Нижняя панель (только мобильные)
   ========================================================================== */

.bottom-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 100;
  padding: 1.5rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.bottom-bar .btn {
  width: 100%;
}

@media (min-width: 48em) {
  .bottom-bar {
    display: none;
  }
}
