/* ==========================================================================
   ЗАЖИГАЙ 3 — Design System
   All sizing multiples of 4. Min font 12px. Min gap 12px. Mobile First.
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --zg3-bg:        #F9F5EF;
  --zg3-primary:   #F93C1B;
  --zg3-secondary: #7615FF;
  --zg3-black:     #222222;
  --zg3-white:     #FFFFFF;
  --zg3-gray:      #888888;
  --zg3-gray-light:#C4C4C4;
  --zg3-dark:      #1A1A1A;

  /* Typography scale (mobile first → overridden at breakpoints) */
  --zg3-fs-display: clamp(40px, 7vw, 96px);
  --zg3-fs-h1:      clamp(32px, 5vw, 64px);
  --zg3-fs-h2:      42px;
  --zg3-fs-h3:      clamp(20px, 3vw, 32px);
  --zg3-fs-h4:      clamp(16px, 2vw, 24px);
  --zg3-fs-body:    16px;
  --zg3-fs-small:   14px;
  --zg3-fs-micro:   12px;

  /* Font weights */
  --zg3-fw-regular: 400;
  --zg3-fw-medium:  500;
  --zg3-fw-semibold:600;
  --zg3-fw-bold:    700;

  /* Border radius */
  --zg3-r-xs:   4px;
  --zg3-r-sm:   6px;
  --zg3-r-md:   8px;
  --zg3-r-lg:   12px;
  --zg3-r-full: 999px;

  /* Spacing (multiples of 4) */
  --zg3-sp-4:   4px;
  --zg3-sp-8:   8px;
  --zg3-sp-12:  12px;
  --zg3-sp-16:  16px;
  --zg3-sp-20:  20px;
  --zg3-sp-24:  24px;
  --zg3-sp-32:  32px;
  --zg3-sp-40:  40px;
  --zg3-sp-48:  48px;
  --zg3-sp-56:  56px;
  --zg3-sp-64:  64px;
  --zg3-sp-80:  80px;
  --zg3-sp-96:  96px;
  --zg3-sp-120: 120px;

  /* Layout */
  --zg3-container: 100%;
  --zg3-gutter:    48px;

  /* Durations */
  --zg3-dur-fast:   0.2s;
  --zg3-dur-normal: 0.4s;
  --zg3-dur-slow:   0.7s;

  /* Z-index layers */
  --zg3-z-base:     1;
  --zg3-z-overlay:  10;
  --zg3-z-nav:      100;
  --zg3-z-modal:    1000;

  /* ── Hero trapezoid shape ─────────────────────────────────────────────────
     Меняй эти переменные для управления формой хиро-блока.

     --zg3-hero-taper : насколько «сужать» нижний край с каждой стороны.
                        Дробь от ширины блока: 0.23 = 23% с каждого края.
                        Чем больше — тем у́же трапеция внизу.
     --zg3-hero-br    : радиус скругления нижних угловых точек в пикселях.
                        0 = острые углы, 30 = мягкое скругление.
  ──────────────────────────────────────────────────────────────────────── */
  --zg3-hero-taper: 0.02;
  --zg3-hero-br:    24;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* Prevent horizontal page scrolling caused by full-bleed elements */
html, body { overflow-x: hidden; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--zg3-fs-body);
  font-weight: var(--zg3-fw-regular);
  line-height: 1.6;
  color: var(--zg3-black);
  background-color: var(--zg3-bg);
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0; /* keep noise under the content and nav */
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--zg3-fw-bold);
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.zg3-display { font-size: var(--zg3-fs-display); }
.zg3-h1      { font-size: var(--zg3-fs-h1); }
.zg3-h2      { font-size: var(--zg3-fs-h2); }
.zg3-h3      { font-size: var(--zg3-fs-h3); }
.zg3-h4      { font-size: var(--zg3-fs-h4); }
.zg3-body    { font-size: var(--zg3-fs-body); }
.zg3-small   { font-size: var(--zg3-fs-small); }
.zg3-micro   { font-size: var(--zg3-fs-micro); }

/* Accent color for headings */
.c-primary   { color: var(--zg3-primary); }
.c-secondary { color: var(--zg3-secondary); }
.c-white     { color: var(--zg3-white); }
.c-gray      { color: var(--zg3-gray); }

/* ---------- Layout Utilities ---------- */
.zg3-container {
  width: 100%;
  max-width: var(--zg3-container);
  margin-inline: auto;
  padding-inline: var(--zg3-gutter);
}

.zg3-section {
  padding-block: var(--zg3-sp-64);
  position: relative;
}
@media (min-width: 768px) {
  .zg3-section { padding-block: var(--zg3-sp-96); }
}
@media (min-width: 1200px) {
  .zg3-section { padding-block: var(--zg3-sp-120); }
}

.zg3-full-width {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

/* Section label — Figma badge style: red dot + text */
.zg3-section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: var(--zg3-fw-semibold);
  color: var(--zg3-black);
  margin-bottom: var(--zg3-sp-16);
  letter-spacing: -0.015em;
}
.zg3-section-label::before {
  content: '✦';
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--zg3-primary);
  color: var(--zg3-bg);
  font-size: 11px;
  letter-spacing: 0;
  line-height: 1;
}
/* Dark section labels */
.zg3-section--dark .zg3-section-label {
  color: var(--zg3-white);
}

/* Section header */
.zg3-section-header {
  margin-bottom: var(--zg3-sp-48);
}
.zg3-section-header h2 {
  margin-bottom: var(--zg3-sp-16);
  font-size: 42px;
  font-weight: var(--zg3-fw-semibold);
  text-transform: none;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.zg3-section-header p {
  font-size: var(--zg3-fs-small);
  color: var(--zg3-gray);
  max-width: 640px;
  line-height: 1.6;
}

/* Section header with button on right */
.zg3-section-header--flex {
  display: flex;
  flex-direction: column;
  gap: var(--zg3-sp-16);
  margin-bottom: var(--zg3-sp-48);
}
.zg3-section-header--flex h2 {
  font-size: 42px;
  font-weight: var(--zg3-fw-semibold);
  text-transform: none;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.zg3-section-header--flex p {
  font-size: var(--zg3-fs-small);
  color: var(--zg3-gray);
  line-height: 1.6;
  margin-top: var(--zg3-sp-8);
}
@media (min-width: 768px) {
  .zg3-section-header--flex {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
  .zg3-section-header--flex .zg3-section-header__text {
    flex: 1;
    max-width: 1220px;
  }
}

/* ---------- Skeleton Loading ---------- */
.zg3-skeleton {
  background: linear-gradient(90deg, #e8e7e1 25%, #d8d7d1 50%, #e8e7e1 75%);
  background-size: 200% 100%;
  animation: zg3-shimmer 1.5s infinite;
  border-radius: var(--zg3-r-md);
}
@keyframes zg3-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.zg3-skeleton--text { height: 16px; width: 80%; margin-bottom: 8px; }
.zg3-skeleton--title { height: 32px; width: 60%; margin-bottom: 16px; }
.zg3-skeleton--image { width: 100%; aspect-ratio: 16/9; }

/* ---------- Divider ---------- */
.zg3-divider {
  border: none;
  height: 1px;
  background: rgba(34, 34, 34, 0.08);
  margin: 0;
}

/* ---------- Dark section ---------- */
.zg3-section--dark {
  background-color: var(--zg3-dark);
  color: var(--zg3-white);
}
.zg3-section--dark .zg3-section-header p {
  color: rgba(255,255,255,0.6);
}

/* ---------- Gradient section ---------- */
.zg3-section--gradient {
  background: linear-gradient(180deg, var(--zg3-bg) 0%, var(--zg3-primary) 35%, #C41E07 60%, var(--zg3-dark) 100%);
  color: var(--zg3-white);
}

/* ---------- Wavy ribbon background ---------- */
.zg3-ribbon-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.zg3-ribbon-bg svg {
  position: absolute;
  width: 120%;
  left: -10%;
  opacity: 0.05;
}

/* ---------- Visibility ---------- */
@media (max-width: 767px) {
  .zg3-hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
  .zg3-hide-desktop { display: none !important; }
}

/* ---------- Mobile typography & section layout ---------- */
@media (max-width: 767px) {
  .zg3-section-header h2,
  .zg3-section-header--flex h2,
  .zg3-h2,
  .zg3-whyus-h2,
  .zg3-services-left__h2 {
    font-size: 24px !important;
    letter-spacing: -0.03em;
  }

  .zg3-section-header p,
  .zg3-section-header--flex p,
  .zg3-whyus-header__sub,
  .zg3-contact-text__desc {
    font-size: 14px !important;
    color: var(--zg3-gray);
  }

  .zg3-section-label {
    margin-bottom: var(--zg3-sp-8);
  }

  .zg3-section-header--flex {
    margin-bottom: var(--zg3-sp-24);
  }

  /* Hide the "view more" button in the section header on mobile */
  .zg3-section-header--flex > .zg3-btn {
    display: none !important;
  }

  /* Why-us: put label ABOVE the h2 on mobile */
  .zg3-whyus-header {
    flex-direction: column;
  }
  .zg3-whyus-header .zg3-section-label {
    order: -1;
  }
}

hr { margin: 24px 0;opacity: 0.3;}