/* =============================================================
   Автошкола «Хозяин Сибири» — v2 (Figma-precise)
   Desktop 1170px · dark theme · accent #C8DF30
   Fonts: SONGER SemiExpanded (headings), Helvetica (body)
   Source: Figma REST API, node 2:1691
   ============================================================= */

/* --- Font faces --- */
@font-face {
  font-family: 'SONGER SemiExpanded';
  src: url('fonts/SONGERSemiExpanded.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SONGER SemiExpanded';
  src: url('fonts/SONGERSemiExpanded-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* --- Reset & base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: Helvetica, Arial, sans-serif;
  background: var(--bg-dark);
  color: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }

/* --- Variables --- */
:root {
  --lime: #c8df30;
  --bg-dark: #1a1a1a;
  --bg-hero: #222;
  --text-dark: #2c2c2c;
  --text-gray: #383838;
  --border: #c9c9c9;
  --heading: 'SONGER SemiExpanded', Impact, sans-serif;
  --body: Helvetica, Arial, sans-serif;
  --max-w: 1170px;
  --gutter: clamp(1rem, 3vw, 2rem);
}
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* =============================================================
   HEADER — Figma: 1170×42, transparent over hero dark bg
   ============================================================= */
.header {
  background: var(--bg-dark);
}
.header__inner {
  display: flex;
  align-items: center;
  height: 42px;
}

/* Figma: Logotype 145×27, logo itself 145×22.7 */
.logo { flex-shrink: 0; }
.logo__img { height: 22.7px; width: auto; }

/* Figma: nav frame 323×10 @center, lay=HORIZONTAL gap=18 */
.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}
.nav__link {
  font-family: var(--body);
  font-size: 11.94px;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  text-transform: uppercase;
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link:hover { color: var(--lime); }
.nav__arrow { flex-shrink: 0; }

/* Header CTA: зелёная по умолчанию, белая при hover */
.header__cta {
  white-space: nowrap;
  font-family: var(--body);
  font-size: 11.94px;
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
  padding: 5px 14px;
  background: var(--lime);
  color: var(--text-dark);
  border: 1px solid #2c2c2c;
  border-radius: 3px;
  flex-shrink: 0;
  margin-left: auto;
  transition: .25s;
}
.header__cta:hover {
  background: #fff;
  border-color: #2c2c2c;
  color: var(--text-dark);
}

/* =============================================================
   HERO — Figma: 1183×641, bg #222
   Grid: text left, form right. Car overlapping.
   ============================================================= */
.hero {
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 385px;
  column-gap: 2rem;
  row-gap: 0;
  overflow: hidden;
  align-items: start;
  padding-top: 0;
  padding-bottom: 2rem;
  min-height: 641px;
}

/* Phone row — spans full grid width
   Figma: divider1 y=42, phone y=53, divider2 y=81 → total 39px */
.hero__phone-row {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.hero__phone-row > .hero__divider-wide {
  margin: 0;
}

/* Figma: divider vectors stroke=#c9c9c9 */
.hero__divider-wide {
  width: 100%;
  height: 1px;
  background: #c9c9c9;
  margin: 4px 0;
}

/* --- Left text column --- */
.hero__content {
  position: relative;
  z-index: 5;
  max-width: 640px;
  padding-left: 76px;
}
/* Divider inside hero__content: Figma vector 364px, gap to shape=18px (244-226) */
.hero__content > .hero__divider-wide {
  width: 364px;
  margin: 0 0 50px;
}
/* Figma: 79×15, Helvetica/17.47/400, case=UPPER, fill=#fff, centered */
.hero__phone {
  font-family: var(--body);
  font-size: 17.47px;
  font-weight: 400;
  line-height: 10.9px;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  padding: 11px 0 13px;
}

/* Figma: 501×153, SONGER/47.77/800, ls=-1.43, lh=51, case=UPPER */
.hero__title {
  font-family: var(--heading);
  font-size: 47.77px;
  font-weight: 800;
  line-height: 51px;
  letter-spacing: -1.43px;
  text-transform: uppercase;
  margin: 0 0 10px;
}

/* Figma: 419×102, SONGER/41/400, ls=-1.23, lh=51, case=UPPER */
.hero__offer {
  font-family: var(--heading);
  font-size: 41px;
  font-weight: 400;
  line-height: 51px;
  letter-spacing: -1.23px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.hero__mark-wrap {
  position: relative;
  display: inline-block;
}
.hero__mark {
  all: unset;
  background: none;
  color: var(--text-dark);
  font-family: var(--heading);
  font-weight: 400;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 2px 14px 5px;
  display: inline-block;
  position: relative;
  z-index: 3;
}
.hero__shape {
  position: absolute;
  bottom: -2px;
  left: 48%;
  transform: translateX(-50%);
  width: 189px;
  max-width: none;
  height: auto;
  z-index: 2;
  pointer-events: none;
}
/* Figma: 246×39, Helvetica/11.14/400, lh=13, case=UPPER */
.hero__conditions {
  font-family: var(--body);
  font-size: 11.14px;
  font-weight: 400;
  line-height: 13px;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* Hero CTA: зелёная по умолчанию, белая при hover */
.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: center;
  padding: 5px 0;
  min-width: 145px;
  background: #fff;
  border: 1px solid var(--lime);
  border-radius: 3px;
  color: var(--text-dark);
  transition: .25s;
}
.hero__btn:hover {
  background: var(--lime);
  border-color: var(--lime);
}

/* Figma: USP line frame 20×80, vector stroke=#c8df30/2.0
   Text frame 362×78, Helvetica/11.14/400, lh=13, case=UPPER */
.hero__usp {
  display: flex;
  gap: 10px;
  margin-top: 36px;
  max-width: 362px;
}
.hero__usp-bar {
  display: block;
  width: 2px;
  background: var(--lime);
  flex-shrink: 0;
  align-self: stretch;
}
.hero__usp-texts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero__usp-texts p {
  font-family: var(--body);
  font-size: 11.14px;
  font-weight: 400;
  line-height: 13px;
  color: #fff;
  text-transform: uppercase;
}

/* --- Car --- Figma: 665×554 in 1183px hero = 56.2% of content area */
.hero__car {
  position: absolute;
  top: 61px;
  right: var(--gutter);
  width: 53%;
  z-index: 3;
  pointer-events: none;
}
.hero__car img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Cones --- */
.hero__cones {
  position: absolute;
  bottom: 31px;
  left: 46%;
  width: clamp(12rem, 28vw, 327px);
  z-index: 6;
  pointer-events: none;
  padding: 10px;
}

/* =============================================================
   FORM CARD — Figma: 385×277, bg #383838, r=3.47
   ============================================================= */
/* Figma: 385×277, bg=rgba(56,56,56,0.47), backdrop-blur=10.79, r=3.47, stroke=#c7e6ff */
.form-card {
  position: relative;
  z-index: 20;
  border-radius: 3.47px;
  overflow: hidden;
  width: 385px;
  margin-right: 20px;
  justify-self: end;
  border: 1px solid #c6e6ff;
  background: rgba(56, 56, 56, 0.47);
  backdrop-filter: blur(10.79px);
  -webkit-backdrop-filter: blur(10.79px);
}
.form-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.form-card__blobs {
  position: absolute;
  top: 0;
  right: 0;
  width: 196px;
  height: auto;
  z-index: 1;
  pointer-events: none;
}
.form-card__body {
  position: relative;
  z-index: 2;
  padding: 16px 15px 12px;
}
.form-card__title {
  font-family: var(--body);
  font-size: 22.55px;
  font-weight: 400;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 10px;
}

/* Inputs — Figma: 163×19.64, bg #fff, Helvetica 9.24px */
/* Figma: Ячейки frame 163×106, lay=VERTICAL */
.form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.form__input {
  font-family: var(--body);
  font-size: 9.24px;
  padding: 6.9px 9.2px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 4.62px;
  outline: none;
  height: 19.6px;
  width: 163px;
  transition: box-shadow .2s;
}
.form__input::placeholder { color: #9e9e9e; }
.form__input:focus { box-shadow: 0 0 0 2px var(--lime); }

/* Figma: Кнопка frame 355×40, pad=10, inner text Helvetica/9.24 */
.form__submit {
  font-family: var(--body);
  font-size: 9.24px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px;
  background: var(--text-dark);
  color: #fff;
  border: none;
  border-radius: 3.47px;
  transition: .25s;
  margin-top: 4px;
  width: 100%;
}
.form__submit:hover {
  background: var(--lime);
  color: var(--text-dark);
}
.form-card__consent {
  font-family: 'Inter', var(--body);
  font-size: 8.34px;
  color: rgba(255, 255, 255, .7);
  text-align: center;
  line-height: 1.4;
  margin-top: 8px;
  width: 100%;
}
.form-card__consent a {
  color: rgba(255, 255, 255, .85);
  text-decoration: underline;
}

/* =============================================================
   ADVANTAGES — Figma: 1183×749, dark bg, white text
   ============================================================= */
.advantages {
  background: var(--bg-dark);
  color: #fff;
  padding: 0;
}

.adv__divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

.adv__title {
  font-family: var(--body);
  font-size: 36px;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  margin: 20px 0 70px;
}

/* Photo strip — Figma: 3×200×190, gap 8px, one source image */
.adv-photos {
  display: grid;
  grid-template-columns: repeat(3, 200px);
  gap: 8px;
  justify-content: center;
  margin-bottom: 26px;
}
.adv-photo {
  position: relative;
  width: 200px;
  height: 190px;
  overflow: hidden;
  background-image: url('adv-photo-source.jpg');
  background-repeat: no-repeat;
  background-size: 616px auto; /* one image spans all 3 frames + gaps */
  background-position-y: center;
  filter: grayscale(1);
  transition: filter 0.4s ease;
  cursor: pointer;
}
.adv-photo:hover {
  filter: grayscale(0);
}
/* Each frame shows its 1/3 of the continuous image, offset by frame+gap */
.adv-photo--1 { background-position-x: 0; }
.adv-photo--2 { background-position-x: -208px; } /* 200 + 8 gap */
.adv-photo--3 { background-position-x: -416px; } /* 200+8+200+8 */
.adv-photo__caption {
  position: absolute;
  bottom: 8px;
  left: 5px;
  font-family: var(--body);
  font-size: 13.07px;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
/* Brand logo on right photo — Figma: 168×28, offset 17,24 from frame */
.adv-photo__brand-logo {
  position: absolute;
  top: 24px;
  left: 17px;
  width: 168px;
  height: auto;
  z-index: 2;
}

/* Accordion — Figma: 521px wide, lime active state */
.adv-accordion {
  max-width: 541px;
  margin: 0 auto;
}
.adv-item {
  border-bottom: 1px solid var(--border);
}
.adv-item:first-child {
  border-top: 1px solid var(--border);
}
.adv-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 10px;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.adv-item__header span {
  font-family: var(--body);
  font-size: 14.7px;
  font-weight: 400;
  color: #fff;
  text-transform: uppercase;
}
.adv-item__icon {
  flex-shrink: 0;
  color: var(--border);
  transition: color 0.3s ease;
}
/* Active state — lime bar, dark text/icon */
.adv-item--active .adv-item__header {
  background: var(--lime);
}
.adv-item--active .adv-item__header span {
  color: var(--text-gray);
}
.adv-item--active .adv-item__icon {
  color: var(--text-dark);
}
/* Body — hidden by default, visible when active */
.adv-item__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 10px;
}
.adv-item--active .adv-item__body {
  max-height: 200px;
  padding: 8px 10px 14px;
}
.adv-item__body p {
  font-family: var(--body);
  font-size: 14.7px;
  color: #fff;
  line-height: 1.5;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    min-height: 36rem;
  }
  .hero__car {
    width: 50%;
    right: var(--gutter);
  }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .header__cta { margin-left: auto; }
  .hero__content { padding-left: 24px; }
  .hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 1.5rem;
  }
  .hero__phone-row { grid-column: 1; }
  .form-card { width: 100%; margin-top: 1rem; }
  .form__input { width: 100%; }
  .hero__car {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin: 1rem 0;
  }
  .hero__cones { display: none; }
  .adv-photos { grid-template-columns: repeat(2, 1fr); }
  .adv-photo { width: 100%; }
}

@media (max-width: 480px) {
  .header__inner { height: 36px; }
  .hero__title { font-size: 32px; }
  .hero__offer { font-size: 28px; }
  .form-card__body { padding: 12px; }
  .adv-photos { grid-template-columns: 1fr; }
}
