/* =========================================================
   ЭкоРесурс — общие стили сайта
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Rubik:wght@400;500;600&display=swap');

:root {
  --flame-1: #ff5722;
  --flame-2: #e8491d;
  --flame-3: #ff8a3d;
  --flame-dark: #b8341a;

  --dark: #201b19;
  --dark-2: #2c2521;

  --white: #ffffff;
  --gray-50: #faf8f7;
  --gray-100: #f2eeec;
  --gray-200: #e6e0dc;
  --gray-400: #b9b0aa;
  --gray-600: #756b64;

  --text: #221e1b;
  --text-light: #6b615b;

  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Rubik', Arial, sans-serif;

  --radius: 6px;
  --shadow: 0 10px 30px rgba(32, 27, 25, 0.10);
  --shadow-sm: 0 4px 14px rgba(32, 27, 25, 0.08);

  --container: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--dark);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
}

.section {
  padding: 72px 0;
}
.section--gray { background: var(--gray-50); }
.section--dark {
  background: var(--dark);
  color: var(--gray-200);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }

.section-head {
  max-width: 720px;
  margin: 0 0 40px;
}
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--flame-2);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--flame-2);
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 20px; }

p.lead {
  font-size: 18px;
  color: var(--text-light);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(120deg, var(--flame-1), var(--flame-dark));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(232, 73, 29, 0.35);
}
.btn--primary:hover { box-shadow: 0 10px 26px rgba(232, 73, 29, 0.48); }

.btn--outline {
  background: transparent;
  border-color: currentColor;
  color: var(--dark);
}
.btn--outline:hover { background: var(--dark); color: var(--white); border-color: var(--dark); }

.btn--outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
}
.btn--outline-light:hover { background: var(--white); color: var(--dark); border-color: var(--white); }

.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo__mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo__text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--dark);
  line-height: 1.05;
}
.logo__text span { display: block; margin-top: 6px; font-size: 10px; font-weight: 500; letter-spacing: 0.12em; color: var(--flame-2); text-transform: uppercase; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a {
  display: inline-block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--flame-2); background: var(--gray-100); }
.nav a.is-active { color: var(--flame-2); }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header-actions .btn { padding: 12px 22px; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.burger span, .burger::before, .burger::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--dark);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.burger::before { position: absolute; transform: translateY(-6px); }
.burger::after { position: absolute; transform: translateY(6px); }
.burger.is-open span { opacity: 0; }
.burger.is-open::before { transform: rotate(45deg); }
.burger.is-open::after { transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 73px 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    overflow-y: auto;
    border-top: 1px solid var(--gray-200);
  }
  .nav.is-open {
    opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible;
  }
  .nav a { padding: 14px 6px; border-bottom: 1px solid var(--gray-100); font-size: 16px; }
  .header-actions { gap: 8px; }
  .header-actions .btn { padding: 10px 14px; font-size: 12px; }
  .burger { display: inline-flex; }
}

/* ---------- Hero (index) ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: var(--white);
  background: radial-gradient(120% 130% at 15% 15%, #4a2216 0%, var(--dark) 45%, #120e0d 100%);
  overflow: hidden;
}
.hero__flame-glow {
  position: absolute;
  inset: auto -10% -30% auto;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,87,34,0.55) 0%, rgba(255,87,34,0) 65%);
  filter: blur(10px);
  pointer-events: none;
}
.hero__illustration {
  position: absolute;
  right: -4%;
  bottom: -6%;
  width: min(46%, 560px);
  opacity: 0.95;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 90px 0;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--flame-3), var(--flame-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  color: var(--gray-200);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.feature-card {
  padding: 32px 26px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.feature-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); border-color: var(--flame-3); }
.feature-card__icon {
  width: 52px; height: 52px;
  margin-bottom: 18px;
  color: var(--flame-2);
}
.feature-card h3 { margin-bottom: 10px; font-size: 18px; }
.feature-card p { color: var(--text-light); font-size: 15px; }

/* ---------- Cards (catalog / certs / testimonials) ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.card__media {
  aspect-ratio: 4/3;
  background: linear-gradient(150deg, var(--gray-100), var(--gray-50));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.card__media img { width: 100%; height: 100%; object-fit: contain; }
.card__body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__tag {
  align-self: flex-start;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flame-dark);
  background: #fff0e9;
  padding: 4px 10px;
  border-radius: 100px;
}
.card__title { font-size: 18px; margin: 0; }
.card__specs { list-style: none; padding: 0; margin: 4px 0 8px; font-size: 14px; color: var(--text-light); display: grid; gap: 4px; }
.card__specs li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--gray-200); padding-bottom: 4px; }
.card__specs b { color: var(--text); font-weight: 500; }
.card__footer { margin-top: auto; display: flex; gap: 10px; }

/* Catalog category */
.category-block { margin-bottom: 64px; }
.category-block:last-child { margin-bottom: 0; }
.category-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-200);
}
.category-block__head h2 { font-size: 24px; margin: 0; }
.category-block__count { font-size: 14px; color: var(--text-light); }

/* Certification */
.cert-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.cert-card__icon { width: 46px; height: 46px; color: var(--flame-2); flex-shrink: 0; }
.cert-card__body { flex: 1; min-width: 0; }
.cert-card__body h3 { font-size: 16px; margin-bottom: 4px; }
.cert-card__body p { font-size: 14px; color: var(--text-light); margin: 0; }
.cert-card__status {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--gray-100);
  padding: 6px 12px;
  border-radius: 100px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Testimonials */
.testimonial-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.testimonial-card__quote { font-size: 15px; color: var(--text); }
.testimonial-card__quote::before { content: "\201C"; color: var(--flame-2); font-family: Georgia, serif; font-size: 28px; line-height: 0; display: inline-block; margin-right: 4px; vertical-align: -6px; }
.testimonial-card__author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testimonial-card__avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.testimonial-card__name { font-weight: 600; font-size: 14px; }
.testimonial-card__role { font-size: 13px; color: var(--text-light); }

.notice-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  background: #fff5ef;
  border: 1px solid #ffd9c2;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--flame-dark);
  margin-top: 32px;
}
.notice-banner svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }

/* ---------- Delivery / payment badges ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 14px; }
.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--dark);
  background: var(--white);
}
.badge svg { width: 22px; height: 22px; color: var(--flame-2); flex-shrink: 0; }

.info-row {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--gray-200);
}
.info-row:last-child { border-bottom: none; }
.info-row__icon { width: 30px; height: 30px; color: var(--flame-2); flex-shrink: 0; }
.info-row h3 { font-size: 17px; margin-bottom: 6px; }
.info-row p { color: var(--text-light); font-size: 15px; margin: 0; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
  color: var(--text);
  font-size: 15px;
  transition: border-color .15s ease, background .15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--flame-2);
  background: var(--white);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-consent { font-size: 12px; color: var(--text-light); margin-top: -6px; margin-bottom: 18px; }
.form-consent a { color: var(--flame-2); text-decoration: underline; }

.form-success {
  display: none;
  padding: 16px 18px;
  background: #eefaf0;
  border: 1px solid #b9e6bf;
  color: #2b7a37;
  border-radius: var(--radius);
  font-size: 14px;
  margin-top: 16px;
}
.form-success.is-visible { display: block; }

/* ---------- Contact layout ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}
.contact-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
}
.map-frame {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  height: 340px;
  margin-top: 28px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--flame-2), var(--flame-dark));
  color: var(--white);
  padding: 56px 0;
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.85); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 56px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer-grid h4 {
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-grid ul { display: grid; gap: 10px; }
.footer-grid a { font-size: 14px; color: var(--gray-400); transition: color .15s ease; }
.footer-grid a:hover { color: var(--flame-3); }
.footer-brand .logo__text { color: var(--white); }
.footer-brand p { font-size: 14px; margin-top: 14px; max-width: 320px; color: var(--gray-400); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  font-size: 13px;
}

/* ---------- Modal (заявка) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 15, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  padding: 34px;
  position: relative;
  transform: translateY(12px);
  transition: transform .2s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}
.modal h3 { margin-bottom: 6px; }
.modal p.lead { font-size: 14px; margin-bottom: 22px; }

/* ---------- Breadcrumb / page header ---------- */
.page-header {
  background: var(--dark);
  color: var(--white);
  padding: 48px 0;
}
.page-header .eyebrow { color: var(--flame-3); }
.page-header .eyebrow::before { background: var(--flame-3); }
.page-header h1 { color: var(--white); font-size: clamp(28px, 4vw, 42px); margin-bottom: 10px; }
.page-header p { color: var(--gray-200); max-width: 620px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}
.two-col img, .two-col svg { border-radius: var(--radius); }

.text-content p { color: var(--text-light); margin-bottom: 16px; font-size: 16px; }
.text-content p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--flame-2);
  color: var(--white);
  padding: 10px 16px;
  z-index: 2000;
}
.skip-link:focus { left: 12px; top: 12px; }
