/* ============================================================
   ПНЕВМО ТОП — Design System
   style.css — Design tokens, reset, base typography, layout
   ============================================================ */

/* ===================== 1. DESIGN TOKENS ==================== */
:root {
  /* Colors */
  --c-bg:           #F7F7F5;
  --c-surface:      #FFFFFF;
  --c-surface-soft: #F0F0EE;
  --c-surface-dark: #111111;
  --c-dark-2:       #1A1A1A;
  --c-dark-3:       #222222;
  --c-dark-border:  #2D2D2D;
  --c-accent:       #F5C400;
  --c-accent-hover: #D9AE00;
  --c-accent-text:  #111111;
  --c-link:         #1E40AF;
  --c-link-hover:   #1D4ED8;
  --c-text:         #181818;
  --c-text-muted:   #666666;
  --c-text-light:   #999999;
  --c-text-inv:     #F5F5F5;
  --c-text-inv-muted: #BDBDBD;
  --c-border:       #E8E8E8;
  --c-border-soft:  #F0F0EE;
  --c-success:      #1F9D55;
  --c-success-bg:   #EDFBF3;
  --c-error:        #DC2626;
  --c-star:         #F5C400;

  /* Typography */
  --font:           'Inter', 'Manrope', system-ui, -apple-system, sans-serif;
  --font-display:   'Manrope', 'Inter', sans-serif;

  /* Spacing */
  --space-xs:       4px;
  --space-sm:       8px;
  --space-md:       16px;
  --space-lg:       24px;
  --space-xl:       40px;
  --space-2xl:      64px;
  --space-3xl:      96px;
  --section-py:     80px;

  /* Borders */
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      18px;
  --radius-xl:      24px;
  --radius-full:    999px;

  /* Shadows */
  --shadow-sm:      0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:      0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.12);
  --shadow-xl:      0 16px 60px rgba(0,0,0,0.18);

  /* Layout */
  --max-width:      1140px;
  --nav-height:     72px;

  /* Transitions */
  --trans:          0.2s ease;
  --trans-slow:     0.35s ease;
}

/* ===================== 2. RESET ========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

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

ul, ol { list-style: none; }

button, input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; }

table {
  border-collapse: collapse;
  width: 100%;
}

/* ===================== 3. TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  color: var(--c-text);
}

h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 3.5vw, 36px); font-weight: 700; }
h3 { font-size: clamp(18px, 2.5vw, 24px); font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }
h5 { font-size: 16px; font-weight: 600; }
h6 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

p { line-height: 1.7; color: var(--c-text); }
p + p { margin-top: 1em; }

.text-muted  { color: var(--c-text-muted); }
.text-light  { color: var(--c-text-light); }
.text-accent { color: var(--c-accent); }
.text-inv    { color: var(--c-text-inv); }
.text-sm     { font-size: 14px; }
.text-xs     { font-size: 12px; }
.text-lg     { font-size: 18px; }
.text-xl     { font-size: 20px; }
.font-medium { font-weight: 500; }
.font-semi   { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-extra  { font-weight: 800; }

/* Dark surface typography overrides */
.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark h4,
.surface-dark p,
.surface-dark { color: var(--c-text-inv); }

.surface-dark .text-muted { color: var(--c-text-inv-muted); }

/* ===================== 4. LAYOUT ======================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-py) 0;
}

.section-sm {
  padding: 48px 0;
}

.section-dark {
  background: var(--c-surface-dark);
  color: var(--c-text-inv);
}

.section-soft {
  background: var(--c-surface-soft);
}

.section-white {
  background: var(--c-surface);
}

/* Grid system */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-md); }

/* Flex utilities */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm  { gap: var(--space-sm); }
.flex-gap-md  { gap: var(--space-md); }
.flex-wrap    { flex-wrap: wrap; }
.flex-col     { flex-direction: column; }

/* Section headers */
.section-header {
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--c-text-muted);
  max-width: 560px;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered p {
  margin: 0 auto;
}

/* ===================== 5. NAVIGATION ==================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-surface-dark);
  border-bottom: 1px solid var(--c-dark-border);
  height: var(--nav-height);
  display: flex;
}

.nav > .container {
  width: 100%;
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav__logo-mark {
  width: 36px;
  height: 36px;
  background: var(--c-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--c-accent-text);
  letter-spacing: -1px;
}

.nav__logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.nav__logo-text {
  font-weight: 700;
  font-size: 18px;
  color: var(--c-text-inv);
  line-height: 1.1;
}

.nav__logo-sub {
  font-size: 11px;
  color: var(--c-text-inv-muted);
  font-weight: 400;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__link {
  color: var(--c-text-inv-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--trans), background var(--trans);
}

.nav__link:hover {
  color: var(--c-text-inv);
  background: rgba(255,255,255,0.08);
}

.nav__cta {
  background: var(--c-accent);
  color: var(--c-accent-text);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: background var(--trans);
}

.nav__cta:hover {
  background: var(--c-accent-hover);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
}

.nav__burger span {
  display: block;
  height: 2px;
  background: var(--c-text-inv);
  border-radius: 2px;
  transition: all var(--trans);
}

/* Mobile nav overlay */
.nav__mobile {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: var(--c-surface-dark);
  padding: var(--space-xl) var(--space-md);
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 99;
}

.nav__mobile.is-open {
  display: flex;
}

.nav__mobile .nav__link {
  font-size: 16px;
  padding: 10px 16px;
}

/* ===================== 6. HERO ========================== */
.hero {
  background: var(--c-surface-dark);
  color: var(--c-text-inv);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 70% 50%, rgba(245,196,0,0.12), transparent);
  pointer-events: none;
}

.hero__grid {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 640px;
}

.hero__visual {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 340px;
}

.hero--cars .hero__grid--cars {
  align-items: center;
  justify-content: space-between;
  gap: 72px;
}

.hero--cars .hero__inner {
  max-width: 680px;
}

.hero-car {
  width: min(48vw, 580px);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

/* ── Brand car wireframe hero image ─────────────────────────── */
.hero-car-wire {
  position: relative;
  width: min(50vw, 620px);
  flex-shrink: 0;
}

.hero-car-wire__img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: screen;
  opacity: 0;
  animation: carWireImgIn 1.1s cubic-bezier(.2, .8, .2, 1) 0.25s forwards;
}

.hero-car-wire__glow {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(245,196,0,0.35) 0%, transparent 70%);
  filter: blur(10px);
  opacity: 0;
  animation: carWireGlowIn 1.0s ease-out 1.1s forwards,
             carWireGlowPulse 3.5s ease-in-out 2.5s infinite alternate;
}

@keyframes carWireGlowIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes carWireIn {
  from { opacity: 0; transform: translateX(24px) translateX(-50%); }
  to   { opacity: 1; transform: translateX(0) translateX(-50%); }
}
@keyframes carWireImgIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes carWireGlowPulse {
  from { opacity: 0.55; }
  to   { opacity: 0.9; }
}

.hero-car-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* hero-car-svg elements — animated entirely by GSAP */
#heroGlow     { opacity: 0; }
#heroScanLine { opacity: 0; }

/* ── PNG wireframe car with transparent bg ───────────────────── */
.hero-car-wrap {
  position: relative;
  width: 100%;
}

.hero-car-glow-svg {
  display: block;
  width: 100%;
  height: 60px;
  overflow: visible;
  position: absolute;
  bottom: -4px;
  left: 0;
  pointer-events: none;
}

.hero-car-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-car-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-car-scan-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.hero-badge-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 40px rgba(245,196,0,0.15));
}

/* ── Badge stars — sequential pulse + glow ───────────────────── */
.star-s1,
.star-s2,
.star-s3 {
  transform-box: fill-box;
  transform-origin: center;
  animation: starPulse 2.1s ease-in-out infinite;
}
.star-s1 { animation-delay: 0s; }
.star-s2 { animation-delay: 0.55s; }
.star-s3 { animation-delay: 1.1s; }

@keyframes starPulse {
  0%   { transform: scale(1);    filter: drop-shadow(0 0 3px rgba(245,196,0,0.35)); }
  30%  { transform: scale(1.13); filter: drop-shadow(0 0 11px rgba(245,196,0,0.95)); }
  60%  { transform: scale(1);    filter: drop-shadow(0 0 3px rgba(245,196,0,0.35)); }
  100% { transform: scale(1);    filter: drop-shadow(0 0 3px rgba(245,196,0,0.35)); }
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,196,0,0.15);
  color: var(--c-accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.hero__tag::before {
  content: '★';
}

.hero h1 {
  color: var(--c-text-inv);
  margin-bottom: var(--space-md);
}

.hero__tag::before {
  content: none;
}

.hero__sub {
  font-size: 18px;
  color: var(--c-text-inv-muted);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 600px;
}


.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--c-dark-border);
}

.hero__stats > div {
  text-align: center;
}

.hero__stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--c-accent);
  line-height: 1;
}

.hero__stat-label {
  font-size: 13px;
  color: var(--c-text-inv-muted);
  margin-top: 4px;
}

/* ===================== 7. BUTTONS ======================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  transition: all var(--trans);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--c-accent);
  color: var(--c-accent-text);
}

.btn-primary:hover {
  background: var(--c-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245,196,0,0.35);
}

.btn-dark {
  background: var(--c-dark-2);
  color: var(--c-text-inv);
  border-color: var(--c-dark-border);
}

.btn-dark:hover {
  background: var(--c-dark-3);
  border-color: rgba(255,255,255,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--c-text-inv);
  border-color: rgba(255,255,255,0.25);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

.btn-outline-dark {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}

.btn-outline-dark:hover {
  border-color: var(--c-text-muted);
}

.btn-sm {
  font-size: 13px;
  padding: 8px 16px;
}

.btn-lg {
  font-size: 16px;
  padding: 14px 32px;
}

/* ===================== 8. BREADCRUMB ==================== */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--c-text-muted);
  padding: 14px 0;
}

.breadcrumb a {
  color: var(--c-text-muted);
  transition: color var(--trans);
}

.breadcrumb a:hover { color: var(--c-link-hover); }

.breadcrumb__sep {
  color: var(--c-border);
  margin: 0 2px;
}

.breadcrumb__current {
  color: var(--c-text);
  font-weight: 500;
}

/* Dark breadcrumb */
.breadcrumb-inv { color: var(--c-text-inv-muted); }
.breadcrumb-inv a { color: var(--c-text-inv-muted); }
.breadcrumb-inv a:hover { color: var(--c-link-hover); }
.breadcrumb-inv .breadcrumb__sep { color: rgba(255,255,255,0.2); }
.breadcrumb-inv .breadcrumb__current { color: var(--c-text-inv); }

/* Breadcrumbs inside dark hero sections need stronger contrast */
.hero .breadcrumb {
  color: rgba(255, 255, 255, 0.72);
}

.hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.78);
}

.hero .breadcrumb a:hover {
  color: #ffd24a;
}

.hero .breadcrumb .breadcrumb__sep {
  color: rgba(255, 255, 255, 0.38);
}

.hero .breadcrumb .breadcrumb__current {
  color: rgba(255, 255, 255, 0.92);
}

/* ===================== 9. FOOTER ======================== */
.footer {
  background: var(--c-surface-dark);
  color: var(--c-text-inv);
  padding: 60px 0 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--c-dark-border);
  margin-bottom: var(--space-xl);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.footer__logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.footer__logo-mark {
  width: 36px;
  height: 36px;
  background: var(--c-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--c-accent-text);
}

.footer__desc {
  color: var(--c-text-inv-muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 280px;
}

.footer__col h5 {
  color: var(--c-text-inv);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

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

.footer__links a {
  color: var(--c-text-inv-muted);
  font-size: 14px;
  transition: color var(--trans);
}

.footer__links a:hover { color: var(--c-link-hover); }

.link {
  color: var(--c-link);
  transition: color var(--trans);
}

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

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--c-text-inv-muted);
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ===================== 10. UTILITY ====================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.w-full { width: 100%; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ===================== 11. RESPONSIVE =================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --section-py: 56px; }

  .nav__links,
  .nav__cta { display: none; }

  .nav__burger { display: flex; }

  .grid-2,
  .grid-3,
  .grid-5 { grid-template-columns: 1fr; }

  .grid-4 { grid-template-columns: 1fr; }

  .hero { padding: 56px 0 72px; }
  .hero__sub { font-size: 16px; }
  .hero__grid { flex-direction: column; gap: var(--space-xl); }
  .hero__visual { width: 100%; max-width: 640px; align-self: center; }
  .hero--cars .hero__grid--cars {
    align-items: flex-start;
    gap: 32px;
  }
  .hero-car {
    width: 100%;
    min-height: 0;
    padding: 6px 0 2px;
  }
  .hero__stats {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--c-dark-border);
    margin-top: var(--space-lg);
    padding-top: 0;
  }
  .hero__stats > div {
    padding: 16px 12px;
    border-right: 1px solid var(--c-dark-border);
    border-bottom: 1px solid var(--c-dark-border);
  }
  .hero__stats > div:nth-child(2),
  .hero__stats > div:last-child { border-right: none; }
  .hero__stats > div:nth-child(3),
  .hero__stats > div:last-child { border-bottom: none; }

  .section-header h2 { font-size: 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn { width: 100%; justify-content: center; }
  .btn + .btn { margin-top: 0; }
  .hero__actions { flex-direction: column; }
}

/* ===================== TOAST ========================= */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  min-width: 280px;
  max-width: 480px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: center;
}
.toast.toast--success { background: #1a7a4a; }
.toast.toast--error   { background: #b03030; }
.toast.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
