﻿:root {
  --color-brand: #004922;
  --color-text: #2d2d2d;
  --color-muted: #2d2d2d;
  --color-bg: #ffffff;
  --color-bg-alt: #edf5ef;
  --color-btn: #198754;
  --color-btn-hover: #157347;
  --color-btn-active: #146c43;
  --color-accent: #b38651;
  --color-accent-hover: #9a7046;
  --color-border: #c5d4c8;
  --color-hero-overlay: rgba(237, 245, 239, 0.88);
  --font-primary: "Geologica", Arial, sans-serif;
  --header-height: 76px;
  --max-width: 1120px;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0, 73, 34, 0.1);
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent); }

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-brand);
  text-decoration: none;
}

.logo:hover { color: var(--color-accent); }

.logo__icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  object-fit: contain;
}

.logo__text {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--color-brand);
}

.nav { display: flex; align-items: center; gap: 2rem; }

.nav__list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link:focus-visible { color: var(--color-accent); }

.header__contacts {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.header__phone:hover { color: var(--color-accent); }

.header__phone-icon {
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.header__messengers {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.header__msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--color-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.header__msg:hover {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background: #fff;
}

.header__msg-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons — Bootstrap btn-success из заглушки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--color-btn);
  color: #fff;
  border-color: var(--color-btn);
}

.btn--primary:hover {
  background: var(--color-btn-hover);
  border-color: var(--color-btn-hover);
  color: #fff;
}

.btn--primary:active {
  background: var(--color-btn-active);
  border-color: var(--color-btn-active);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--outline:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.btn--outline:active {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn--full { width: 100%; }

/* Hero */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 5rem;
  background: var(--color-bg-alt);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--color-hero-overlay) 55%, rgba(237, 245, 239, 0.6) 100%),
    url("../img/about.svg") center/cover no-repeat;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.hero__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-primary);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-brand);
}

.hero__subtitle {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 34ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__logo {
  width: min(100%, 320px);
  height: auto;
  aspect-ratio: 390 / 403;
  opacity: 0.9;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section--alt { background: var(--color-bg-alt); }

.section__header {
  margin-bottom: 3rem;
  text-align: center;
}

.section__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.section__title {
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-brand);
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about__text p { margin: 0 0 1rem; color: var(--color-muted); }
.about__text p:last-child { margin-bottom: 0; }

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.stat__value {
  display: block;
  font-family: var(--font-primary);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-brand);
}

.stat__label {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.about__image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about__image img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center;
}

/* Products */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card--featured {
  border-color: var(--color-brand);
  grid-column: span 1;
}

.product-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #fff;
  background: var(--color-btn);
  border-radius: 8px;
}

.product-card__image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.product-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__image--moss {
  width: 106%;
  max-width: none;
  margin-left: -3%;
  object-position: 48% center;
}

.product-card__body { padding: 1.5rem; }

.product-card__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-primary);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-brand);
}

.product-card__desc {
  margin: 0 0 1rem;
  font-size: 0.925rem;
  color: var(--color-muted);
}

.product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-card__tag {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

/* Contacts */
.contacts {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.contact-list__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-brand);
}

.contact-list__icon svg { width: 18px; height: 18px; }

.contact-list__label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.15rem;
}

.contact-list a {
  font-weight: 400;
  color: var(--color-text);
}

.contact-list a:hover { color: var(--color-accent); }

.social {
  display: flex;
  gap: 0.75rem;
}

.social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.social__link:hover {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background: var(--color-bg-alt);
}

.social__link svg { width: 22px; height: 22px; }

/* Form */
.form {
  background: #fff;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-brand);
}

.form__hint {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.form__group { margin-bottom: 1rem; }

.form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text);
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-btn);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.2);
}

.form__textarea { min-height: 120px; resize: vertical; }

.form__input--error { border-color: #b04040; }

.form__error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #b04040;
}

.form__group--invalid .form__error { display: block; }

.form__success {
  display: none;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.925rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.form__success.is-visible { display: block; }

.form__group--checkbox { margin-bottom: 1.25rem; }

.form__checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.form__checkbox {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  accent-color: var(--color-btn);
  cursor: pointer;
}

.form__checkbox-label {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-muted);
  cursor: pointer;
}

.form__checkbox-label a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form__checkbox-label a:hover { color: var(--color-accent); }

.form__group--invalid .form__checkbox {
  outline: 2px solid #b04040;
  outline-offset: 2px;
}

.form__group--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form__group--submit-error {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: #8b3030;
  background: #fdf3f3;
  border: 1px solid #e8bcbc;
  border-radius: var(--radius);
}

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.form-modal[hidden] {
  display: none;
}

.form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 20, 0.45);
}

.form-modal__dialog {
  position: relative;
  width: min(100%, 420px);
  padding: 2rem 1.75rem 1.75rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.form-modal__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-primary);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-brand);
}

.form-modal__text {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-muted);
}

.form-modal__btn {
  min-width: 140px;
}

body.form-modal-open {
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Cookie consent banner */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99980;
  padding: 12px 16px 16px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(100% + 16px));
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.cookie-consent--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-consent--hidden {
  opacity: 0;
  transform: translateY(calc(100% + 16px));
  pointer-events: none;
}

.cookie-consent__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-brand);
  border-radius: var(--radius);
  box-shadow: 0 -10px 40px rgba(0, 73, 34, 0.12);
}

.cookie-consent__content { min-width: 0; }

.cookie-consent__title {
  margin: 0 0 6px;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-brand);
}

.cookie-consent__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-muted);
}

.cookie-consent__text a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__text a:hover { color: var(--color-accent); }

.cookie-consent__accept {
  flex-shrink: 0;
  min-width: 148px;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  background: var(--color-btn);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--transition);
}

.cookie-consent__accept:hover { background: var(--color-btn-hover); }

.cookie-consent__accept:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

body.cookie-consent-open {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 767px) {
  .cookie-consent { padding: 10px 12px 12px; }

  .cookie-consent__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 18px 16px;
  }

  .cookie-consent__accept {
    width: 100%;
    min-width: 0;
  }
}

/* Footer */
.footer {
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 0.875rem;
  text-align: center;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, var(--color-hero-overlay) 55%, rgba(237, 245, 239, 0.6) 100%),
    url("../img/footer-bg.svg") center/100% 100% no-repeat;
  pointer-events: none;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer p { margin: 0; }
.footer p + p { margin-top: 0.35rem; }
.footer__legal { font-size: 0.8rem; color: var(--color-muted); }
.footer a { color: var(--color-brand); }
.footer a:hover { color: var(--color-accent); }

/* Responsive */
@media (max-width: 900px) {
  .hero__inner,
  .about,
  .contacts { grid-template-columns: 1fr; }

  .hero__visual { order: -1; }
  .hero__logo { width: 200px; }

  .products { grid-template-columns: 1fr; }

  .about__stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .burger { display: flex; }

  .header__inner {
    gap: 0.5rem;
  }

  .header__contacts {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    min-width: 0;
  }

  .header__phone {
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--color-muted);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
  }

  .header__phone:hover {
    color: var(--color-brand);
    border-color: var(--color-brand);
    background: #fff;
  }

  .header__phone-icon {
    display: block;
  }

  .header__phone-label {
    display: none;
  }

  .header__messengers {
    gap: 0.25rem;
    flex-shrink: 0;
  }

  .header__msg {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .logo__icon {
    width: 48px;
    height: 48px;
  }

  .logo__text {
    font-size: 1.2rem;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0 1.5rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
  }

  .nav__list li { width: 100%; text-align: center; }

  .nav__link {
    display: block;
    padding: 0.85rem 1rem;
  }

  .about__stats { grid-template-columns: 1fr; }

  .section { padding: 3.5rem 0; }
  .hero { padding-bottom: 3.5rem; }
  .hero__visual { display: none; }
}

/* Legal pages */
.legal-page .header__inner {
  justify-content: space-between;
}

.legal-back {
  font-size: 0.9rem;
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
}

.legal-back:hover { color: var(--color-brand); }

.legal {
  padding: calc(var(--header-height) + 2.5rem) 0 4rem;
}

.legal__inner {
  max-width: 720px;
}

.legal__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-primary);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-brand);
}

.legal__meta {
  margin: 0 0 2rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.legal__content h2 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-brand);
}

.legal__content h2:first-child { margin-top: 0; }

.legal__content p,
.legal__content li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-muted);
}

.legal__content p { margin: 0 0 1rem; }

.legal__content ul,
.legal__content ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.legal__content li { margin-bottom: 0.35rem; }

.legal__content a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal__content a:hover { color: var(--color-accent); }

.legal__footer-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-muted);
}

@media (max-width: 768px) {
  .legal-back span { display: none; }
}
