/* ============================================================
   FONTS
   ============================================================ */
@font-face {
  font-family: 'Golos UI';
  src: url('../fonts/Golos-UI_Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Golos UI';
  src: url('../fonts/Golos-UI_Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Golos UI';
  src: url('../fonts/Golos-UI_Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --color-bg-light:       #EBE8E2;
  --color-bg-dark:        #191716;
  --color-bg-green:       radial-gradient(108% 108% at 50% 0%, #4D6454 0%, #2A362D 100%);
  --color-text-on-light:  #1D1816;
  --color-text-on-dark:   #EBE8E2;
  --color-accent:         #DED9CF;
  --color-border:         #A69B97;
  --color-placeholder:    #ACACAC;
  --color-red:            #A11E22;
  --color-red-hover:      #C4272D;

  /* Spacing */
  --s-4:   4px;
  --s-8:   8px;
  --s-16:  16px;
  --s-24:  24px;
  --s-32:  32px;
  --s-40:  40px;
  --s-48:  48px;
  --s-64:  64px;

  /* Typography */
  --font-base: 'Golos UI', system-ui, sans-serif;
  --transition: 0.2s ease;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { 
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}
body  {
  font-family: var(--font-base);
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

/* ============================================================
   TYPOGRAPHY  — привязана к HTML-семантике
   ============================================================ */
body, p, li, dt, label { font-size: 16px; line-height: 24px; font-weight: 400; }

h1, h2 { font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -0.01em; }
h3      { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }

/* dd: крупные числа в списке выплат */
dd      { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }

/* small: подписи к карточкам */
small   { font-size: 16px; line-height: 20px; font-weight: 400; }

/* button: крупный CTA-текст */
button, .btn { font-size: 16px; line-height: 24px; font-weight: 400; }

/* input — отдельный блок, описан ниже в UI Elements */

a    { color: inherit; text-decoration: none; }
dl   { display: flex; flex-direction: column; }

/* ============================================================
   SECTIONS & THEMES
   ============================================================ */
.section {
  padding: var(--s-32) 0 var(--s-48);
  border-bottom: 1px solid transparent;
}
.section--light {
  background-color: var(--color-bg-light);
  color: var(--color-text-on-light);
  border-bottom-color: var(--color-border);
}
.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}
.section--hero {
  background: var(--color-bg-green);
  color: var(--color-text-on-dark);
  position: relative;
  overflow: hidden;
  height: 600px;
  padding-top: 80px;
}
/* Запас снизу перед scene-overlap: картинка заедет вверх */
.section--pb-large { padding-bottom: 120px; }

/* ============================================================
   SCENE OVERLAP — системный паттерн.

   Механика:
   1. .scene-overlap — зелёный фон фиксированной высоты, overflow: visible.
   2. .scene-overlap__image--base — абсолютно позиционирована по центру
      снизу блока, выступает ВНИЗ за его пределы поверх белой секции.
   3. .scene-overlap__image--overlay — поверх base, для анимации cross-fade.
   4. .section--rounded-overlap — наезжает снизу через margin-top: -24px,
      большой padding-top оставляет место под выступающую фигуру.

   Структура в HTML:
     <div class="scene-overlap">
       <img class="scene-overlap__image scene-overlap__image--base" …>
       <img class="scene-overlap__image scene-overlap__image--overlay" …>
     </div>
     <section class="section--light section--rounded-overlap">…</section>
   ============================================================ */
.scene-overlap {
  position: relative;
  background: var(--color-bg-green);
  height: 280px;          /* высота зелёного блока */
  overflow: visible;      /* картинка может выступать вниз и вверх */
  z-index: 1;
}
.scene-overlap__image {
  display: block;
  position: absolute;
  bottom: -50px;          /* выступает вниз на 50px */
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: 420px;          /* полная высота фигуры (выступает вверх на 90px) */
  object-fit: contain;
  z-index: 3;             /* выше section--rounded-overlap(z=2), чтобы выступать поверх */
}
.scene-overlap__image--overlay {
  opacity: 0;
  z-index: 4;             /* выше base */
  will-change: opacity;
}

/* Скруглённая секция наезжает на .scene-overlap снизу */
.section--rounded-overlap {
  position: relative;
  margin-top: -24px;
  z-index: 2;
  border-radius: 24px 24px 0 0;
  /* Достаточный отступ под выступающую фигуру (50px выступ - 24px наезд + запас) */
  padding-top: 32px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
}

/*
  Z-index лесенка двух пар scene-overlap + section.
  Первая пара:  scene-overlap(1) → section--rounded-overlap(2)
  Вторая пара:  scene-overlap(3) → section--rounded-overlap(4)
*/
.section--rounded-overlap + .scene-overlap                             { z-index: 3; }
.section--rounded-overlap + .scene-overlap + .section--rounded-overlap { z-index: 4; }

/* ============================================================
   UNIVERSAL CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--s-16);
  display: flex;
  flex-direction: column;
  gap: var(--s-48);
}
@media (min-width: 768px) {
  .container { max-width: 600px; }
}

/* ============================================================
   SECTION STRUCTURE
   ============================================================ */
.section__block {
  display: flex;
  flex-direction: column;
  gap: var(--s-24);
}
.section__header {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  text-align: center;
}
.section__header--left { text-align: left; }

.section__content {
  display: flex;
  flex-direction: column;
  gap: var(--s-40);
}
/* В Hero dl с цифрами — меньший gap */
.section--hero .section__content { gap: var(--s-16); }

.section__footer {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  align-items: center;
  width: 100%;
}

/* ============================================================
   LAYOUT COMPONENTS
   ============================================================ */

/* 1. Table Layout — горизонтальные строки с пунктиром */
.layout-table { display: flex; flex-direction: column; }
.layout-table > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0 var(--s-16);
  border-top: 1px dashed var(--color-border);
}
.layout-table dd {
  display: flex;
  align-items: baseline;
  gap: var(--s-8);
}
.layout-table > div:last-child {
  padding-bottom: 0;
}

/* 2. Grid Cards — сетка карточек (Доплаты за технику) */
.layout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px dashed var(--color-border);
  list-style: none;
}
.layout-grid > li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--s-16) var(--s-4) var(--s-24) var(--s-16);
  border: 1px dashed var(--color-border);
  margin: -1px 0 0 -1px;
  gap: var(--s-8);
}
.layout-grid > li.full-span {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
}
.layout-grid img { flex-shrink: 0; }
.bonus-icon { width: 80px; height: 80px; }
.layout-grid div { display: flex; flex-direction: column; gap: var(--s-4); }

/* 3. Row List — крупные строки с иконкой/картинкой слева */
.layout-row-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  list-style: none;
}
.layout-row-list > li,
.layout-row-list > div {
  display: flex;
  gap: var(--s-24);
}
.layout-row-list img { border-radius: 4px; flex-shrink: 0; }
.layout-row-list div { display: flex; flex-direction: column; gap: var(--s-2); }

/* 4. Bordered List — список льгот с картинкой */
.layout-bordered-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  border-top: 1px dashed var(--color-border);
}
.layout-bordered-list > li {
  display: flex;
  gap: var(--s-16);
  padding: var(--s-16) 0;
  border-bottom: 1px dashed var(--color-border);
}
.layout-bordered-list > li:last-child { border-bottom: none; padding-bottom: 0; }
.layout-bordered-list img { flex-shrink: 0; width: 64px; height: 72px; }
.layout-bordered-list div { display: flex; flex-direction: column; gap: var(--s-8); }

/* 5. Requirements Block — требования с чеклистом */
.req-block { display: flex; flex-direction: column; gap: var(--s-8); }
.req-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.req-list li { position: relative; padding-left: 1.5rem; }
.req-list li::before {
  font-family: 'remixicon' !important;
  content: "\eb7b";
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 1.1rem;
}

/* Notice Box — информационный блок с иконкой */
.notice-box {
  display: flex;
  gap: var(--s-16);
  align-items: flex-start;
  padding: var(--s-16);
  padding-bottom: var(--s-24);
  background-color: var(--color-accent);
  border-radius: 4px;
}
.notice-box i { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }

/* ============================================================
   UI ELEMENTS
   ============================================================ */

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  padding: 0 var(--s-32);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--transition), transform 0.1s ease;
  color: var(--color-text-on-dark);
}
.btn--primary {
  background: radial-gradient(150% 150% at 0% 0%, var(--color-red-hover) 0%, var(--color-red) 100%);
}
.btn--primary:hover {
  background: radial-gradient(150% 150% at 0% 0%, var(--color-red) 0%, #7E151A 100%);
}
.btn--primary:active { transform: translateY(1px); }

.btn--secondary {
  background-color: var(--color-accent);
  color: var(--color-text-on-light);
}
.btn--secondary:hover { background-color: #D3CDBE; }

/* Form Input */
.form-input {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--color-border);
  background-color: #FFFFFF;
  color: var(--color-text-on-light);
  border-radius: 4px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  transition: border-color var(--transition);
}
.form-input:focus { outline: none; border-color: var(--color-red); }
::placeholder { color: var(--color-placeholder); opacity: 1; }

/* ============================================================
   SPECIFIC COMPONENTS
   ============================================================ */

/* Header */
.header {
  padding: var(--s-16) 0;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  z-index: 10;
}
.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--s-16);
  border-bottom: 1px dashed var(--color-text-on-dark);
}
.header__logo     { display: flex; align-items: center; }
.header__logo-img { height: 14px; }

/* Hero */
.hero__image {
  width: 340px;
  display: block;
  position: absolute;
  bottom: 0; right: 0;
  z-index: 1;
}
.hero__cta {
  position: absolute;
  bottom: var(--s-32);
  left: var(--s-16); right: var(--s-16);
  z-index: 2;
}

/* Image Divider — устаревший класс удалён, заменён на .scene-overlap__image */

/* Footer */
.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-24);
  text-align: center;
}
.footer__avatar {
  width: 138px;
  height: 171px;
}
.footer__phone { font-size: 32px; line-height: 40px; font-weight: 500; }
.footer__or    { font-size: 16px; }
.footer__form  {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  width: 100%;
}
