/* ============================================================
   Green Truck — style.css
   Дизайн-токены + reset + базовая типографика + layout-хелперы
   ============================================================ */

:root {
  /* АКЦЕНТ */
  --color-primary:           #01696f;
  --color-primary-hover:     #0c4e54;
  --color-primary-active:    #0f3638;
  --color-primary-bg:        rgba(1, 105, 111, 0.08);
  --color-primary-light:     #4f98a3;

  /* СВЕТЛЫЕ ПОВЕРХНОСТИ */
  --color-bg:                #f7f6f2;
  --color-surface:           #f9f8f5;
  --color-surface-2:         #fbfbf9;
  --color-surface-offset:    #f3f0ec;
  --color-divider:           #dcd9d5;
  --color-border:            rgba(40, 37, 29, 0.12);

  /* ТЁМНЫЕ ПОВЕРХНОСТИ */
  --color-dark-bg:           #171614;
  --color-dark-surface:      #1c1b19;
  --color-dark-surface-2:    #201f1d;
  --color-dark-border:       rgba(255, 255, 255, 0.08);

  /* ТЕКСТ */
  --color-text:              #28251d;
  --color-text-muted:        #7a7974;
  --color-text-faint:        #bab9b4;
  --color-text-inverse:      #f9f8f4;

  /* ТИПОГРАФИКА */
  --font-display: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body:    'Satoshi', 'Inter', sans-serif;

  /* РАЗМЕРЫ ТЕКСТА (fluid) */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);

  /* ОТСТУПЫ */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* СКРУГЛЕНИЯ */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  /* ТЕНИ */
  --shadow-sm: 0 1px 2px rgba(40, 37, 29, 0.06);
  --shadow-md: 0 4px 12px rgba(40, 37, 29, 0.08);
  --shadow-lg: 0 12px 32px rgba(40, 37, 29, 0.12);

  /* АНИМАЦИИ */
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ШИРИНЫ */
  --width-narrow:  640px;
  --width-default: 960px;
  --width-wide:    1200px;

  /* СЛУЖЕБНОЕ */
  --header-height: 72px;
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #1da851;
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  line-height: 1.15;
  font-weight: 600;
  text-wrap: balance;
}

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   ТИПОГРАФИКА — утилиты
   ============================================================ */
.h1, h1 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; }
.h2, h2 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; }
.h3, h3 { font-family: var(--font-body);    font-size: var(--text-lg); font-weight: 600; }

.text-muted   { color: var(--color-text-muted); }
.text-inverse { color: var(--color-text-inverse); }
.text-accent  { color: var(--color-primary); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--width-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.section--tight { padding-block: clamp(var(--space-10), 5vw, var(--space-16)); }
.section--surface { background: var(--color-surface); }
.section--offset  { background: var(--color-surface-offset); }
.section--dark    { background: var(--color-dark-bg); color: var(--color-text-inverse); }

.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 56ch;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}

.section-header--row {
  flex-direction: row;
  align-items: end;
  justify-content: space-between;
  max-width: none;
}

.section-header p { color: var(--color-text-muted); font-size: var(--text-base); }
.section--dark .section-header p { color: rgba(249, 248, 244, 0.6); }

.section-header__link {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================================
   УТИЛИТЫ
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.badge--dark {
  background: rgba(1, 105, 111, 0.2);
  color: var(--color-primary-light);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.no-scroll { overflow: hidden; }

/* ============================================================
   SCROLL-АНИМАЦИИ
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }
.reveal:nth-child(5) { transition-delay: 320ms; }
.reveal:nth-child(6) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
