/* ============================================================
   Чехорда — страница авторизации
   Палитра и геометрия — по спецификации макета.
   ============================================================ */

:root {
  --brand: #BA703F;            /* фирменный оранжевый */
  --brand-dark: #9c5b2d;       /* hover кнопок */
  --brand-light: #c8834f;      /* hover ссылок/акцентов */

  --bg-page: #ffffff;

  --text-dark: #202020;        /* активное меню, текст формы */
  --text-soft: #303030;        /* вторичный тёмный */
  --label: #4a4a4a;            /* серые лейблы формы */
  --muted: #808080;            /* неактивное меню, неактивная вкладка */
  --input-bg: #d9d9d9;         /* фон полей */
  --input-ph: #8a8a8a;         /* placeholder */
  --slogan: #101010;           /* слоган */

  --radius: 14px;
  --control-h: 54px;           /* высота полей и кнопок */
  --container: 1160px;
}

/* ============================================================
   Локальные шрифты
   ============================================================ */

@font-face {
  font-family: "Cheharda";
  src: url("../fonts/Cheharda.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- reset ---------- */

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

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

body {
  font-family: "Montserrat", "Arial", sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;

  /* футер прижат к низу окна при коротком контенте */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.auth-section {
  flex: 1 0 auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
  border-radius: 0; /* никаких скруглений */
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   1. Шапка
   ============================================================ */

.site-header {
  background: var(--bg-page);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
  padding: 24px 32px;
  max-width: var(--container);
  margin: 0 auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-nav--left {
  justify-content: flex-start;
}

.header-nav--right {
  justify-content: flex-end;
}

.header-link {
  font-size: 16px;
  font-weight: 300; /* Montserrat Light */
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.header-link:hover {
  color: var(--brand);
}

.header-link--active {
  color: var(--text-dark);
  font-weight: 500; /* Montserrat Medium — пользователь на этой странице */
  font-size: 16px;  /* тот же размер, что у остальных пунктов */
}

.header-logo {
  justify-self: center;
  font-family: "Cheharda", "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1;
  color: var(--brand);
  white-space: nowrap;
}

/* ============================================================
   2. Оранжевая бегущая строка
   ============================================================ */

.marquee {
  background: var(--brand);
  color: #ffffff;
  overflow: hidden;
  height: 40px;
  display: flex;
  align-items: center;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
  will-change: transform;
}

.marquee__group {
  display: flex;
  align-items: center;
  flex: none;
}

.marquee__item {
  font-size: 14px;
  font-weight: 400; /* Montserrat Regular */
  text-transform: uppercase;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.marquee__hl {
  font-weight: 500; /* Montserrat Medium — акцент на «10%» */
  white-space: nowrap;
}

.marquee__sep {
  margin: 0 30px;
  color: rgba(255, 255, 255, 0.9);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }
}

/* ============================================================
   3. Основная секция
   ============================================================ */

.auth-section {
  background: var(--bg-page);
  padding: 80px 0 96px;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 8fr); /* ~9:8 как в макете */
  column-gap: 80px;
  align-items: center;
}

/* --- левая колонка --- */

.auth-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-image {
  width: 100%;
}

.auth-slogan {
  margin-top: 22px;
  max-width: 88%;
  color: var(--slogan);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: center; /* слоган по центру относительно коллажа */
}

/* --- правая колонка: карточка --- */

.auth-card {
  min-width: 0;
  background: var(--bg-page);
}

.auth-tabs {
  display: flex;
  gap: 36px;
  border-bottom: 1px solid #e6e1dc;
  margin-bottom: 36px;
}

.auth-tab {
  position: relative;
  padding: 4px 0 18px;
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  background: none;
}

.auth-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.auth-tab:hover {
  color: var(--text-dark);
}

.auth-tab.is-active {
  color: var(--text-dark);
  font-weight: 600;
}

.auth-tab.is-active::after {
  transform: scaleX(1);
}

.auth-form {
  width: 100%;
}

.field {
  margin-bottom: 22px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--label);
}

.field-caption {
  margin-bottom: 26px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-input {
  width: 100%;
  height: var(--control-h);
  padding: 0 20px;
  background: var(--input-bg);
  border: 2px solid transparent;
  font-size: 15px;
  color: var(--text-soft);
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.field-input::placeholder {
  color: var(--input-ph);
  opacity: 1;
}

.field-input:hover {
  background: #d2d2d2;
}

.field-input:focus {
  background: #ffffff;
  border-color: var(--brand);
}

.field-password {
  position: relative;
}

.field-password .field-input {
  padding-right: 56px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a7a7a;
  transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
  color: var(--brand);
}

.password-toggle.is-visible {
  color: var(--brand);
}

/* --- строка «чекбокс + забыли пароль» --- */

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 4px 0 0;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--text-dark);
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.checkbox-box {
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--brand);
  background: transparent;
  position: relative;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.checkbox-input:checked + .checkbox-box {
  background: var(--brand);
}

.checkbox-input:checked + .checkbox-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-input:focus-visible + .checkbox-box {
  box-shadow: 0 0 0 3px rgba(186, 112, 63, 0.35);
}

.forgot-link {
  font-size: 14px;
  color: var(--input-ph);
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--brand);
}

/* --- кнопка входа --- */

.btn-primary {
  width: 100%;
  height: var(--control-h);
  margin-top: 28px;
  background: var(--brand);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.1s ease;
}

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

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:focus-visible {
  outline: 3px solid rgba(186, 112, 63, 0.4);
  outline-offset: 2px;
}

/* ============================================================
   4. Футер
   ============================================================ */

.site-footer {
  background: var(--brand);
  color: #ffffff;
  padding: 40px 0;
}

.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px 48px;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.footer-col--brand {
  justify-self: start;
}

.footer-logo {
  font-family: "Cheharda", "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  color: #ffffff;
}

.footer-col--contacts {
  justify-self: center;
  align-items: flex-start;
}

.footer-col--contacts a {
  transition: opacity 0.2s ease;
}

.footer-col--contacts a:hover {
  opacity: 0.8;
}

.footer-col--docs {
  justify-self: end;
  align-items: flex-start;
}

.footer-col--docs a {
  transition: opacity 0.2s ease;
}

.footer-col--docs a:hover {
  opacity: 0.8;
}

/* ============================================================
   Адаптивность
   ============================================================ */

/* --- планшет ~700–1024 --- */
@media (max-width: 1024px) {
  .header-inner {
    column-gap: 16px;
    padding: 20px 24px;
  }

  .header-nav {
    gap: 20px;
  }

  .auth-section {
    padding: 64px 0 80px;
  }

  .auth-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 48px;
  }

  .auth-slogan {
    font-size: 19px;
  }

  .auth-tabs {
    gap: 28px;
    margin-bottom: 30px;
  }

  .site-footer {
    padding: 34px 0;
  }

  .footer-cols {
    gap: 24px 32px;
  }
}

/* --- мобильный < 700 --- */
@media (max-width: 700px) {
  .container,
  .header-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 14px;
    column-gap: 26px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .header-nav {
    gap: 22px;
  }

  .header-logo {
    order: -1;
    flex: 0 0 100%;
    text-align: center;
    font-size: 32px;
  }

  .header-nav--left,
  .header-nav--right {
    justify-content: center;
    flex: 0 0 auto;
  }

  .header-link {
    font-size: 14px;
  }

  .marquee {
    height: 38px;
  }

  .marquee__item {
    font-size: 12px;
    letter-spacing: 0.14em;
  }

  .marquee__sep {
    margin: 0 20px;
  }

  .auth-section {
    padding: 52px 0 64px;
  }

  .auth-grid {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    row-gap: 56px;
  }

  /* форма первой, фото ниже — компактно */
  .auth-card {
    order: -1;
  }

  .auth-tab {
    font-size: 15px;
    padding: 4px 0 14px;
  }

  .auth-form {
    max-width: 480px;
    margin: 0 auto;
  }

  .auth-options {
    font-size: 13px;
  }

  .checkbox {
    font-size: 13px;
  }

  .field-input {
    height: 52px;
    font-size: 16px; /* чтобы iOS не зуммил */
  }

  .btn-primary {
    height: 52px;
    font-size: 13px;
    margin-top: 24px;
  }

  .field-label {
    font-size: 12px;
  }

  .auth-image {
    width: 100%;
  }

  .auth-slogan {
    margin-top: 20px;
    font-size: 18px;
  }

  .site-footer {
    padding: 30px 0 38px;
  }

  .footer-cols {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    gap: 36px;
  }

  .footer-col {
    justify-self: center;
    align-items: center;
  }

  .footer-col--brand,
  .footer-col--contacts,
  .footer-col--docs {
    justify-self: center;
    align-items: center;
  }
}
