/* ============================================================
   EngineHood — landing
   Figma: landing/desktop · ru (1440) / landing/mobile · ru (390)
   ============================================================ */

:root {
  --canvas:      #151412;
  --surface:     #23221f;
  --primary:     #f5f4f0;
  --secondary:   #a39e95;
  --lime:        #b9e11f;
  --lime-text:   #c8ec3f;
  --sos-bg:      #490305;
  --sos-red:     #fd695e;
  --sos-digit:   #811917;
  --digit-03:    #3d4d0b;
  --digit-04:    #5a710d;
  --dark:        #151412;
  --border:      #3a3833;
  --badge-stroke:#524f49;
  --bezel:       #0b0b0a;
  --invite-body: #3a3830;
  --font: 'Noto Sans', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: none; }
picture { display: block; }
picture > img { width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* скрытый SVG-спрайт иконок магазинов / SOS */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--dark);
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 10px 10px;
  transform: translateY(-120%);
  transition: transform .2s var(--ease);
}
.skip-link:focus {
  transform: none;
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--lime-text);
  outline-offset: 3px;
}
.btn:focus-visible,
.badge:focus-visible,
.lang-menu button:focus-visible,
.lang-opt:focus-visible {
  outline-offset: 2px;
}

.container {
  max-width: 1248px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (min-width: 1297px) {
  .container { padding-left: 0; padding-right: 0; }
}

/* ============ Фоновая фотография под шапкой и hero ============
   Макет: прямоугольник 1536×742 от верхнего края, кроп по верху,
   поверх — заливка #151412 на 16%. */

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--hero-bg-h, 742px);
  --hero-fade: 168px;   /* полоса, на которой фото растворяется в фоне */
  background-image:
    /* 1. градиентная полоса по нижнему краю: фото уходит в канвас без шва */
    linear-gradient(to bottom,
        rgba(21, 20, 18, 0)    calc(100% - var(--hero-fade)),
        rgba(21, 20, 18, .45)  calc(100% - var(--hero-fade) * .55),
        rgba(21, 20, 18, .85)  calc(100% - var(--hero-fade) * .18),
        #151412                100%),
    /* 2. затемнение кадра на 16% — как в макете */
    linear-gradient(rgba(21,20,18,.16), rgba(21,20,18,.16)),
    /* 3. сам кадр */
    url('../assets/hero-bg.jpg');
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center, center, center top;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

body { position: relative; }
main, .site-header { position: relative; z-index: 1; }

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background-color .35s var(--ease), backdrop-filter .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: rgba(255,255,255,.06);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.site-header.scrolled {
  background: rgba(21,20,18,.68);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.site-header.scrolled::after { opacity: 1; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--primary);
  white-space: nowrap;
}
.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}

.nav-links {
  display: flex;
  gap: 34px;
}
.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--secondary);
  transition: color .25s var(--ease);
}
.nav-links a:hover { color: var(--primary); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 9999px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--primary);
}
.btn-ghost:hover { border-color: var(--secondary); }

/* ---- Language dropdown (DS: surface, r12, лаймовый активный пункт) ---- */
.lang-wrap { position: relative; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 120;
}
.lang-wrap.open .lang-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--primary);
  text-align: left;
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.lang-menu button:hover { background: #2c2b27; }
.lang-menu button i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  flex: none;
  margin-left: 16px;
}
.lang-menu button.active { color: var(--lime-text); }
.lang-menu button.active i { background: var(--lime-text); }

/* footer lang switch */
.lang-switch .lang-opt {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  transition: color .2s var(--ease);
}
.lang-switch .lang-opt:hover { color: var(--primary); }
.lang-switch .lang-opt.active { color: var(--lime-text); }
.btn-lime {
  background: var(--lime);
  border: none;
  color: var(--dark);
}
.btn-lime:hover { background: var(--lime-text); transform: translateY(-1px); }
.btn-lime:active { transform: translateY(0); }

/* ============ Sections / layout rhythm ============ */

main { padding-bottom: 48px; }

.hero            { margin-top: 80px; }
/* макет v2: щель между блоком «шапка + hero» и остальной страницей — 160 */
/* Пределы ширины текста — только там, где мокап ABS сбоку; на мобиле
   и в промежуточном диапазоне мокап внизу и текст идёт во всю ширину */
@media (min-width: 901px) {
  .section-rideouts .body-text { max-width: min(555px, calc(62.42% - 80px)); }
  .section-sos .body-text { max-width: min(538px, calc(63.462% - 80px)); }
}
@media (min-width: 1141px) {
  #events .body-text { max-width: 500px; }
  #feed .body-text   { max-width: 252px; }
  #garage .body-text { max-width: 236px; }
  #chat .body-text   { max-width: 226px; }
}

.section-rideouts { margin-top: 160px; }
.section-sos,
.grid,
.manifesto       { margin-top: 80px; }
.footer          { margin-top: 80px; }

section[id] { scroll-margin-top: 96px; }

/* ============ Type helpers ============ */

.h1 {
  font-size: clamp(56px, 6.4vw, 92px);
  font-weight: 900;
  line-height: 1.043;
  letter-spacing: -0.022em;
  color: var(--primary);
}
/* EN/KK-заголовки длиннее — свой типоразмер, чтобы держать 2 строки */
html[lang="en"] .h1,
html[lang="kk"] .h1 {
  font-size: clamp(46px, 5vw, 72px);
  line-height: 1.083;
  letter-spacing: -0.021em;
}
.lime      { color: var(--lime); }
.lime-text { color: var(--lime-text); }
.sos-red   { color: var(--sos-red); }

.h2 {
  font-size: clamp(34px, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.174;
  color: var(--primary);
}
.h3 {
  font-size: clamp(26px, 2.25vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eyebrow-num { display: none; }

.body-text {
  font-size: 17px;
  line-height: 26px;
  color: var(--secondary);
}
.mw-555 { max-width: 555px; }
.mw-538 { max-width: 538px; }
.mw-500 { max-width: 500px; }
.mw-252 { max-width: 252px; }
.mw-236 { max-width: 236px; }
.mw-226 { max-width: 226px; }

/* ============ Hero ============ */

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

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-bottom .badges { margin-top: 0; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: var(--surface);
  border-radius: 16px;
  font-size: 13px;
  line-height: 18px;
  color: var(--secondary);
}

.hero-copy .h1  { margin-top: 24px; }
.hero-copy .sub {
  margin-top: 24px;
  font-size: 19px;
  line-height: 28px;
  color: var(--secondary);
}

.badges {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--dark);
  border: 1px solid var(--badge-stroke);
  border-radius: 14px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.badge:hover { transform: translateY(-2px); border-color: var(--secondary); }
.badge.no-stroke { border: none; border-radius: 12px; }
.badge-icon { flex: none; }
.badge-lines {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.badge-lines small {
  font-size: 10px;
  line-height: 16px;
  color: var(--secondary);
}
.badge-lines b {
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  color: var(--primary);
  white-space: nowrap;
}

.note {
  margin-top: 24px;
  font-size: 13px;
  line-height: 18px;
  color: var(--secondary);
}

.hero-media {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 612 / 494;   /* пропорция карточки из макета */
  background: var(--lime);
  border-radius: 32px;
  overflow: hidden;
}
.mockup-wrap { position: absolute; }
.mockup-wrap > img,
.mockup-wrap > picture {
  display: block;
  width: 100%;
  height: auto;
}
.mockup-wrap > picture > img {
  width: 100%;
  height: auto;
}
.hero-mockup-wrap {
  left: 36.928%;   /* 226 / 612 */
  top: 9.717%;     /* 48 / 494 */
  width: 55.229%;  /* 338 / 612 */
}
.qr-col {
  position: absolute;
  left: 7.843%;    /* 48 / 612 */
  top: 52.429%;    /* 259 / 494 */
  width: 22.059%;  /* 135 / 612 */
}
.qr { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.qr-caption {
  margin-top: 2.6cqw;
  font-size: clamp(10px, 2.124cqw, 13px);  /* 13 / 612 карточки */
  font-weight: 600;
  line-height: 1.385;
  color: var(--dark);
}

/* ============ Cards (01 / 02) ============ */

.card {
  position: relative;
  border-radius: 32px;
  padding: 56px;
  overflow: hidden;
}

.card-head .eyebrow + .h2,
.card-head .eyebrow + .h3 { margin-top: 16px; }
.card-head + .body-text { margin-top: 32px; }

.section-rideouts {
  height: 560px;
  background: var(--surface);
}
.section-sos {
  height: 520px;
  background: var(--sos-bg);
}
.section-sos .h2 { max-width: 538px; }
.section-sos .body-text { color: var(--secondary); }

.feat-list { margin-top: 32px; }
.feat-list li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--primary);
}
.feat-list li + li { margin-top: 4px; }
.feat-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

/* Display digits */
.digit {
  position: absolute;
  left: 3.846%;    /* 48 / 1248 */
  top: 63.214%;    /* 354 / 560 */
  font-size: clamp(120px, 14vw, 200px);
  font-weight: 900;
  line-height: 1.36;
  letter-spacing: -.01em;
  pointer-events: none;
  user-select: none;
}
.digit-lime { color: var(--lime-text); }
.digit-sos  { color: var(--sos-digit); }
.digit-03   { color: var(--digit-03); }
.digit-04   { color: var(--digit-04); }
.digit-dark { color: var(--dark); }

.section-sos .digit { top: 60.385%; }   /* 314 / 520 */

/* Mockups — классы позиционирования на <picture> или <img> */
.mockup { height: auto; }
.mockup.abs { position: absolute; }
picture.mockup.abs > img { width: 100%; height: auto; }

.m-ride-back  { left: 77.484%; top: 21.429%; width: 18.029%; }  /* 967,120,225 из 1248×560 */
.m-ride-front { left: 62.420%; top:  8.571%; width: 18.029%; }  /* 779,48,225 */
.section-rideouts .mockup {
  transition: transform .6s var(--ease);
}
.section-rideouts:hover .m-ride-front { transform: translateY(-8px); }
.section-rideouts:hover .m-ride-back  { transform: translateY(-4px); }

.sos-mockup-wrap {
  left: 63.462%;    /* 792 / 1248 */
  top: 0;
  width: 32.051%;   /* 400 / 1248 */
  /* сдвиг вверх в долях СОБСТВЕННОЙ высоты кадра (224 / 835.6) —
     масштабируется вместе с мокапом на любой ширине; проценты top
     считались бы от высоты карточки и на узких экранах уводили кадр */
  transform: translateY(-26.808%);
}
.m-sos {
  filter: drop-shadow(0 12px 40px rgba(253,105,94,.25));
}

/* ---- SOS beacon: пульс только с .is-active (включает JS в viewport) ---- */
.sos-beacon {
  position: absolute;
  aspect-ratio: 1;
  pointer-events: none;
}
.sos-beacon i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #ec4a42;
  opacity: .2;
  transform: scale(1);
}
.sos-beacon.is-active i {
  animation: sos-ping 2.6s linear infinite;
}
.sos-beacon i:nth-child(1) { opacity: .20; }
.sos-beacon i:nth-child(2) { transform: scale(.769); opacity: .35; }
.sos-beacon.is-active i:nth-child(2) { animation-delay: -.867s; }
.sos-beacon i:nth-child(3) { transform: scale(.577); opacity: .50; }
.sos-beacon.is-active i:nth-child(3) { animation-delay: 0s; }
.sos-beacon.is-active i:nth-child(1) { animation-delay: -1.733s; }
@keyframes sos-ping {
  0%   { transform: scale(.385); opacity: .50; }
  55%  { opacity: .30; }
  100% { transform: scale(1.04); opacity: 0; }
}
/* ядро поверх колец: круг #EC4A42, обводка #23221F, тень, иконка lifebuoy */
.sos-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38.46%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: #ec4a42;
  border: 2px solid #23221f;
  border-radius: 50%;
  box-shadow: 0 3px 7px rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sos-core svg {
  width: 53%;
  height: 53%;
  display: block;
}
/* позиции из Figma: hero — SOS 83.2 @59,130 в мокапе 338×715;
   sos — SOS 148 @126,277.8 в мокапе 400×835.6 */
.beacon-hero {
  left: 17.456%;
  top: 18.182%;
  width: 24.615%;
}
/* скрыт селектором той же силы, что .mockup-wrap > img — иначе display:block побеждает */
.mockup-wrap > .mockup-m { display: none; }

.beacon-sos {
  left: 31.5%;
  top: 33.25%;
  width: 37%;
  opacity: .95;
}
.beacon-sos .sos-core { border-width: 3px; }

/* ============ 03–06 grid ============ */

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

.cell {
  height: 520px;
  background: var(--surface);
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}
.cell-short {
  height: 464px;
  contain-intrinsic-size: auto 464px;
}

.cell .card-head + .body-text { margin-top: 24px; }
.cell .digit { left: 6.536%; top: 60.769%; }   /* 40,316 из 612×520 */
#feed .digit { top: 60.385%; }                 /* 314 / 520 */
.cell-short .digit { top: 55.603%; }           /* 258 / 464 */

.cell-invite { background: var(--lime-text); }
.cell-invite .eyebrow,
.cell-invite .h3 { color: var(--dark); }
.cell-invite .body-text { color: var(--invite-body); }

.m-cell   { width: 32.680%; }               /* 200 / 612 */
.m-events { left: 58.007%; top: 58.462%; }  /* 355,304 из 612×520 */
.m-feed   { left: 58.170%; top: 33.077%; }  /* 356,172 */
.m-garage { left: 58.170%; top: 39.655%; }  /* 356,184 из 612×464 */
.m-chat   { left: 58.170%; top: 13.793%; }  /* 356,64 */

.cell .mockup { transition: transform .6s var(--ease); }
.cell:hover .mockup { transform: translateY(-6px); }

/* Tag pills (03) */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 9px;
  margin-top: 24px;
  max-width: 500px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px 0 12px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.ticon {
  flex: none;
  width: 20px;
  height: 20px;
  background-image: url('../assets/tags.svg');
  background-repeat: no-repeat;
  background-size: 500px 92px;
}
.ticon-1 { background-position: -12px  -9px;  }
.ticon-2 { background-position: -131px -9px;  }
.ticon-3 { background-position: -268px -9px;  }
.ticon-4 { background-position: -381px -9px;  }
.ticon-5 { background-position: -12px  -55px; }

/* ============ Manifesto ============ */

.manifesto {
  background: #000 url('../assets/manifesto-bg.jpg') center / cover no-repeat;
  border-radius: 32px;
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}
.manifesto-title {
  font-size: clamp(38px, 4.2vw, 60px);
  font-weight: 900;
  line-height: 1.133;
  color: var(--primary);
}
.manifesto-sub {
  margin-top: 32px;
  font-size: 19px;
  line-height: 28px;
  color: var(--secondary);
}
.final-cta {
  margin-top: 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--lime);
  border-radius: 32px;
  padding: 56px;
  text-align: left;
}
.cta-left {
  display: flex;
  align-items: center;
  gap: 48px;
}
.qr-dark { width: 96px; height: 96px; flex: none; }
.cta-title {
  font-size: clamp(34px, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.174;
  color: var(--dark);
}
.cta-sub {
  margin-top: 16px;
  font-size: 17px;
  line-height: 24px;
  color: var(--dark);
}
.badges-cta { margin-top: 0; flex: none; }

/* ============ Footer ============ */

.footer { padding: 48px 0 8px; }

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.brand-col .brand { display: block; }
.dev-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: flex-start;
}
.dev-logo { flex: none; }
.dev-caption {
  font-size: 13px;
  line-height: 18px;
  color: var(--secondary);
}
.dev-caption span { color: var(--primary); }

.link-cols {
  display: flex;
  gap: 96px;
}
.link-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.link-head {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--secondary);
}
.link-col a {
  font-size: 14px;
  line-height: 20px;
  color: var(--primary);
  transition: color .25s var(--ease);
}
.link-col a:hover { color: var(--lime-text); }

.footer-divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.copyright {
  font-size: 13px;
  line-height: 18px;
  color: var(--secondary);
}
.socials-lang {
  display: flex;
  align-items: center;
  gap: 24px;
}
.socials { display: flex; gap: 12px; }
.socials a {
  display: block;
  border-radius: 50%;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.socials a:hover { transform: translateY(-2px); opacity: .85; }
.lang-switch {
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
}

/* Desktop: socials sit centered between © and lang (space-between of 3) */
@media (min-width: 901px) {
  .footer-bottom { position: relative; }
  .socials-lang { gap: 0; }
  .socials {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ============ Reveal / entrance animations ============ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* hero stagger on load */
[data-io] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.loaded [data-io] {
  opacity: 1;
  transform: none;
}
.loaded [data-io="1"] { transition-delay: .05s; }
.loaded [data-io="2"] { transition-delay: .14s; }
.loaded [data-io="3"] { transition-delay: .23s; }
.loaded [data-io="4"] { transition-delay: .32s; }
.loaded [data-io="5"] { transition-delay: .41s; }

/* hero phone: gentle float */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.loaded .hero-mockup-wrap { animation: float 7s ease-in-out 1.2s infinite; }

/* ============================================================
   Mobile — landing/mobile · ru (390, 4 cols / 20 / 16)
   ============================================================ */

@media (max-width: 900px) {

  .container { padding-left: 20px; padding-right: 20px; }

  main { padding-bottom: 32px; }

  /* nav */
  .nav { height: 64px; }
  .nav-links { display: none; }
  .brand-mark { width: 32px; height: 32px; }

  /* фон по макету мобильной версии: высота 918, кадр зумится по высоте
     (cover на узком боксе = 1900×918 по центру — ровно как в Figma) */
  .hero-bg { height: var(--hero-bg-h, 918px); --hero-fade: 132px; }

  /* rhythm */
  .hero { margin-top: 48px; }
  .section-rideouts { margin-top: 96px; }
  .section-sos, .grid, .manifesto { margin-top: 48px; }
  .footer { margin-top: 48px; }
  section[id] { scroll-margin-top: 80px; }

  /* hero */
  .hero {
    display: block;
  }
  .h1,
  html[lang="en"] .h1,
  html[lang="kk"] .h1 {
    font-size: 44px;
    line-height: 48px;
    letter-spacing: -1px;
  }
  html[lang="en"] .h1,
  html[lang="kk"] .h1 {
    font-size: 38px;
    line-height: 42px;
  }
  .hero-copy { display: block; }
  .hero-bottom { margin-top: 24px; }
  .hero-copy .sub {
    font-size: 16px;
    line-height: 24px;
  }
  .hero-copy .sub br { display: none; }
  .badges { flex-wrap: wrap; }

  .hero-media {
    margin-top: 32px;
    height: 356px;
  }
  .hero-mockup-wrap {
    left: 50%;
    top: 40px;
    width: 270px;
    transform: translateX(-50%);
  }
  .loaded .hero-mockup-wrap { animation: none; }
  .qr-col { display: none; }

  /* cards */
  .card { padding: 24px; }

  .h2 { font-size: 30px; line-height: 36px; }
  .h3 { font-size: 30px; line-height: 36px; }

  .eyebrow-num {
    display: inline;
    margin-right: 16px;
  }
  .digit { display: none; }

  .card-head .eyebrow + .h2,
  .card-head .eyebrow + .h3 { margin-top: 16px; }
  .card-head + .body-text { margin-top: 20px; }
  .cell .card-head + .body-text { margin-top: 20px; }

  .body-text {
    font-size: 15px;
    line-height: 22px;
  }

  /* Карточки тезисов: высота автоматическая, мокап прибит к НИЗУ карточки.
     Контент любой высоты (узкий экран, EN) отодвигает мокап вниз — наезды
     невозможны. padding-bottom = видимая часть мокапа из макета + гэп 24. */
  .section-rideouts {
    height: auto;
    padding-bottom: 468px;
  }
  .feat-list { margin-top: 20px; }
  .feat-list li {
    font-size: 15px;
    line-height: 22px;
  }
  .feat-list li::before { top: 8px; }

  .m-ride-front { display: none; }
  .m-ride-back {
    left: 50%;
    top: auto;
    bottom: 0;
    width: 270px;
    transform: translate(-50%, calc(100% - 444px));
  }
  .hero-media { aspect-ratio: auto; height: 356px; }
  .section-rideouts:hover .m-ride-back { transform: translate(-50%, calc(100% - 444px)); }

  .section-sos { height: auto; padding-bottom: 474px; }
  /* Мобильный sos — свой кадр из макета (862-фрейм): компактный экран
     со шторкой и кнопками; десктопный кадр скрыт. Аспект обёрток равный
     (400/835.6 = 270/564), transform остаётся верным. */
  .sos-mockup-wrap {
    left: 50%;
    top: auto;
    bottom: 0;
    width: 270px;
    transform: translate(-50%, calc(100% - 450px));
  }
  .sos-mockup-wrap .m-sos { display: none; }
  .sos-mockup-wrap .mockup-m { display: block; }
  /* маркер в мобильном кадре выше: 124.8 из 564 */
  .beacon-sos { top: 22.128%; }

  /* grid */
  .grid { grid-template-columns: 1fr; }
  .cell        { height: auto; padding-bottom: 320px; }
  #feed.cell   { padding-bottom: 454px; }
  #garage.cell { padding-bottom: 406px; }
  #chat.cell   { padding-bottom: 454px; }

  .m-cell {
    width: 270px;
    left: 50%;
    top: auto;
    bottom: 0;
  }
  .m-events { transform: translate(-50%, calc(100% - 296px)); }
  .m-feed   { transform: translate(-50%, calc(100% - 430px)); }
  .m-garage { transform: translate(-50%, calc(100% - 382px)); }
  .m-chat   { transform: translate(-50%, calc(100% - 430px)); }
  .cell .digit, .cell-short .digit { left: auto; }
  .cell:hover .mockup { transform: none; }

  /* tags: compact */
  .tags { margin-top: 20px; gap: 8px; }
  .tag {
    height: 28px;
    padding: 0 12px 0 9px;
    gap: 6px;
    font-size: 11px;
  }
  .ticon {
    width: 15px;
    height: 15px;
    background-size: 375px 69px;
  }
  .ticon-1 { background-position: -9px    -6.75px; }
  .ticon-2 { background-position: -98.25px -6.75px; }
  .ticon-3 { background-position: -201px  -6.75px; }
  .ticon-4 { background-position: -285.75px -6.75px; }
  .ticon-5 { background-position: -9px    -41.25px; }

  /* manifesto */
  .manifesto {
    padding: 20px 24px 24px;
  }
  .manifesto-title {
    font-size: 32px;
    line-height: 38px;
  }
  .manifesto-sub {
    margin-top: 24px;
    font-size: 16px;
    line-height: 24px;
  }
  .final-cta {
    margin-top: 24px;
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 24px;
    text-align: center;
  }
  .cta-left { justify-content: center; }
  .qr-dark { display: none; }
  .cta-title { font-size: 30px; line-height: 36px; }
  .cta-sub { display: none; }
  .badges-cta {
    flex-direction: column;
    gap: 12px;
  }
  .badges-cta .badge { justify-content: center; }

  /* footer */
  .footer { padding: 32px 0 8px; }
  .footer-top {
    flex-direction: column;
    gap: 32px;
  }
  .link-cols {
    flex-direction: column;
    gap: 28px;
  }
  .footer-divider { margin: 32px 0 40px; }
  .footer-bottom {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 16px;
  }
  .socials-lang { justify-content: space-between; }
}

/* ============ Промежуточный диапазон 901–1140: ячейки 03–06 ============
   Десктопная ABS-раскладка ячеек рассчитана на ширину ~520+: при 901–1140
   текст и чипы уходили под телефоны. Здесь сетка остаётся 2×2, но мокап
   встаёт по центру под контентом (мобильная схема), цифры-подложки скрыты. */

@media (min-width: 901px) and (max-width: 1140px) {
  .cell        { height: auto; padding-bottom: 320px; }
  #feed.cell   { padding-bottom: 454px; }
  #garage.cell { padding-bottom: 406px; }
  #chat.cell   { padding-bottom: 454px; }

  .m-cell {
    width: 270px;
    left: 50%;
    top: auto;
    bottom: 0;
  }
  .m-events { transform: translate(-50%, calc(100% - 296px)); }
  .m-feed   { transform: translate(-50%, calc(100% - 430px)); }
  .m-garage { transform: translate(-50%, calc(100% - 382px)); }
  .m-chat   { transform: translate(-50%, calc(100% - 430px)); }
  .cell:hover .mockup { transform: none; }

  .cell .digit { display: none; }
}

/* ============ Планшеты: мобильная раскладка колонкой по центру ============ */

@media (min-width: 560px) and (max-width: 900px) {
  .container { max-width: 560px; }
}

/* ============ Узкие телефоны (< 390) ============ */

@media (max-width: 389px) {
  .brand { font-size: 18px; letter-spacing: .5px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .nav-right { gap: 16px; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, [data-io] { opacity: 1; transform: none; }
  .digit { transform: none !important; }
  .sos-beacon i,
  .sos-beacon.is-active i { animation: none !important; }
}
