/* DPS Platform — публичный сайт документов */

/* === Базовые стили === */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1A1A1A;
  background: #FAF6EE;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

button {
  font-family: inherit;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  background: #1A2942;
  color: #FFFFFF;
  border-color: #1A2942;
}

.btn--primary:hover {
  background: #243355;
  border-color: #243355;
}

.btn--ghost {
  background: transparent;
  color: #1A2942;
  border-color: #1A2942;
}

.btn--ghost:hover {
  background: #1A2942;
  color: #FFFFFF;
}

.btn--large {
  height: 52px;
  padding: 0 28px;
  font-size: 15px;
}

/* === Шапка сайта === */

.site-header {
  background: #FAF6EE;
  border-bottom: 1px solid #EAE0CC;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand-mark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-mark__image {
  height: 128px;
  width: auto;
  display: block;
}

.site-footer .brand-mark__image {
  height: 96px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.site-nav__link {
  font-size: 14px;
  color: #1A2942;
  font-weight: 400;
  transition: color 0.15s ease;
}

.site-nav__link:hover {
  color: #B8962A;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === Языковый переключатель === */

.lang-switcher {
  position: relative;
}

.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 40px;
  font-size: 13px;
  font-weight: 500;
  color: #1A2942;
  background: transparent;
  border: 1px solid #E5DDC5;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.lang-switcher__toggle:hover {
  border-color: #B8962A;
}

.lang-switcher__chevron {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 0.15s ease;
}

.lang-switcher--open .lang-switcher__chevron {
  transform: rotate(180deg);
}

.lang-switcher__menu {
  position: absolute;
  top: -99999px;
  left: -99999px;
  right: auto;
  min-width: 180px;
  background: #FFFFFF;
  border: 1px solid #E5DDC5;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(26, 41, 66, 0.08);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  width: 0;
  height: 0;
  overflow: hidden;
}

.lang-switcher--open .lang-switcher__menu {
  top: calc(100% + 6px);
  left: auto;
  right: 0;
  width: auto;
  height: auto;
  overflow: visible;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.lang-switcher__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #1A2942;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.lang-switcher__item:hover {
  background: #FAF6EE;
}

.lang-switcher__item--active {
  background: #FAF6EE;
  font-weight: 500;
}

.lang-switcher__code {
  font-size: 11px;
  color: #9A8A60;
  letter-spacing: 0.5px;
}

/* === Героеня === */

.hero {
  background: #FAF6EE;
  padding: 80px 0 96px;
  overflow: hidden;
  position: relative;
}

.hero__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}

.hero__left {
  max-width: 560px;
}

.hero__title {
  font-size: clamp(40px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  color: #1A2942;
  margin: 0 0 28px;
  letter-spacing: -1.5px;
}

.hero__subtitle {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  color: #555;
  margin: 0 0 40px;
  max-width: 500px;
}

.hero__cta {
  display: inline-flex;
}

/* === Hero illustration (3D-стопка) === */

.hero__visual {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero__visual-image {
  width: 100%;
  max-width: 920px;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* === Преимущества === */

.features {
  background: #FAF6EE;
  padding: 24px 0 48px;
  border-top: 1px solid #EAE0CC;
}

.features__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.feature {
  display: flex;
  align-items: center;
  gap: 16px;
}

.feature__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.feature__icon-bg {
  position: absolute;
  inset: 0;
  fill: #FFFFFF;
  stroke: #B8962A;
  stroke-width: 1.5;
}

.feature__icon-glyph {
  position: relative;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #B8962A;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature__title {
  font-size: 15px;
  font-weight: 600;
  color: #1A2942;
  margin: 0 0 4px;
}

.feature__desc {
  font-size: 13px;
  color: #666;
  margin: 0;
  line-height: 1.45;
}

/* === Как это работает === */

.how {
  background: #F4EFDF;
  padding: 72px 0;
}

.how__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 40px;
}

.how__header {
  text-align: center;
  margin-bottom: 56px;
}

.how__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #9A8A60;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.how__eyebrow::before,
.how__eyebrow::after {
  content: '';
  width: 32px;
  height: 1px;
  background: #B8962A;
  opacity: 0.6;
}

.how__title {
  font-size: 36px;
  font-weight: 700;
  color: #1A2942;
  margin: 0;
  letter-spacing: -0.5px;
}

.how__steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step__icon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.step__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid #B8962A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #B8962A;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1A2942;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.step__title {
  font-size: 17px;
  font-weight: 600;
  color: #1A2942;
  margin: 0 0 8px;
}

.step__desc {
  font-size: 14px;
  color: #555;
  margin: 0;
  line-height: 1.5;
  max-width: 220px;
}

.step__connector {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-bottom: 64px;
}

.step__connector span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #B8962A;
  opacity: 0.5;
}

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

.site-footer {
  background: #FFFFFF;
  border-top: 1px solid #EAE0CC;
  padding: 48px 0 24px;
}

.site-footer__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr 1.2fr;
  gap: 48px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


.site-footer__brand-note {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  margin: 0;
  max-width: 220px;
}

.site-footer__col-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #9A8A60;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__link {
  font-size: 13px;
  color: #1A2942;
  transition: color 0.15s ease;
}

.site-footer__link--accent {
  color: #B8962A;
}

.site-footer__link:hover {
  color: #B8962A;
  text-decoration: underline;
}

.site-footer__bottom {
  max-width: 1600px;
  margin: 32px auto 0;
  padding: 16px 40px 0;
  border-top: 1px solid #EAE0CC;
  text-align: center;
}

.site-footer__copy {
  font-size: 12px;
  color: #888;
  margin: 0;
}

/* === Страницы документов === */

.doc-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.doc-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #B8962A;
  text-decoration: none;
  margin-bottom: 28px;
  transition: gap 0.15s ease;
}

.doc-page__back:hover {
  gap: 10px;
  text-decoration: underline;
}

.doc-page__notice {
  background: #FFF8E7;
  border: 1px solid #EFD894;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 32px;
  font-size: 14px;
  color: #4A4030;
  line-height: 1.5;
}

.doc-page__notice strong {
  color: #B8962A;
}

.doc-page__notice a {
  color: #B8962A;
  text-decoration: underline;
}

.doc-content {
  font-size: 16px;
  line-height: 1.7;
  color: #1A1A1A;
}

.doc-content h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 28px;
  line-height: 1.2;
  color: #1A2942;
  letter-spacing: -0.5px;
}

.doc-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 56px 0 18px;
  line-height: 1.3;
  color: #1A2942;
  padding-top: 18px;
  border-top: 1px solid #EAE0CC;
}

.doc-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.doc-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: #1A2942;
}

.doc-content p {
  margin: 0 0 18px;
}

.doc-content ul, .doc-content ol {
  margin: 0 0 18px;
  padding-left: 28px;
}

.doc-content li {
  margin-bottom: 8px;
}

.doc-content strong {
  font-weight: 600;
  color: #1A2942;
}

.doc-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  background: #F5F2EA;
  padding: 2px 6px;
  border-radius: 4px;
  color: #B8962A;
}

.doc-content blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  background: #FFF8E7;
  border-left: 3px solid #B8962A;
  border-radius: 0 8px 8px 0;
  color: #4A4030;
  font-size: 15px;
}

.doc-content blockquote p {
  margin: 0 0 8px;
}

.doc-content blockquote p:last-child {
  margin-bottom: 0;
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
}

.doc-content th {
  background: #F5F2EA;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #EAE0CC;
  color: #1A2942;
}

.doc-content td {
  padding: 12px 14px;
  border-bottom: 1px solid #EAE0CC;
  vertical-align: top;
}

.doc-content hr {
  border: none;
  border-top: 1px solid #EAE0CC;
  margin: 48px 0;
}

.doc-content em {
  font-style: italic;
  color: #555;
}

.doc-content a {
  color: #B8962A;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-content a:hover {
  text-decoration: none;
}

.doc-page__archive-link {
  margin-top: 56px;
  font-size: 13px;
  color: #888;
}

.doc-page__archive-link a {
  color: #B8962A;
  text-decoration: none;
}

.doc-page__archive-link a:hover {
  text-decoration: underline;
}

/* === История версий === */

.history-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.history-page__title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #1A2942;
  letter-spacing: -0.5px;
}

.history-page__subtitle {
  font-size: 16px;
  color: #666;
  margin: 0 0 40px;
  line-height: 1.55;
}

.versions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.versions-list__item {
  background: #FFFFFF;
  border: 1px solid #EAE0CC;
  border-radius: 10px;
  padding: 18px 22px;
}

.versions-list__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.versions-list__version {
  font-size: 17px;
  font-weight: 600;
  color: #1A2942;
}

.versions-list__date {
  font-size: 13px;
  color: #888;
}

.versions-list__current {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #B8962A;
  background: #FFF8E7;
  padding: 3px 9px;
  border-radius: 4px;
  margin-left: 8px;
}

.versions-list__changes {
  font-size: 14px;
  color: #555;
  margin: 8px 0 0;
  line-height: 1.55;
}

.versions-list__link {
  display: inline-block;
  font-size: 13px;
  color: #B8962A;
  text-decoration: none;
  margin-top: 12px;
}

.versions-list__link:hover {
  text-decoration: underline;
}

/* === Заглушки разделов === */

.stub-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 96px 32px;
  text-align: center;
}

.stub-page__title {
  font-size: 32px;
  font-weight: 700;
  color: #1A2942;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}

.stub-page__text {
  font-size: 16px;
  color: #555;
  margin: 0 0 32px;
  line-height: 1.6;
}

.stub-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #B8962A;
  text-decoration: none;
}

.stub-page__back:hover {
  text-decoration: underline;
}

/* === Loading state === */

.loading {
  text-align: center;
  padding: 80px 24px;
  color: #888;
  font-size: 14px;
}

/* === Адаптив === */

@media (max-width: 920px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__visual {
    height: 320px;
  }

  .hero__title {
    font-size: 44px;
  }

  .features__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .how__steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .step__connector {
    display: none;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    padding: 14px 20px;
    gap: 12px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    padding: 40px 0 56px;
  }

  .hero__inner {
    padding: 0 20px;
  }

  .hero__title {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .features__inner {
    padding: 24px 20px;
  }

  .how {
    padding: 56px 0;
  }

  .how__inner {
    padding: 0 20px;
  }

  .how__title {
    font-size: 28px;
  }

  .doc-page, .history-page, .stub-page {
    padding: 32px 20px 56px;
  }

  .doc-content h1 {
    font-size: 26px;
  }

  .doc-content h2 {
    font-size: 20px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    padding: 0 20px;
    gap: 24px;
  }

  .site-footer__bottom {
    padding: 16px 20px 0;
  }
}
