/* ============================================
   EcoEnergy — лендинг умного энергосберегающего
   устройства. Подход: mobile-first.
   ============================================ */

:root {
  --color-green: #4CAF50;
  --color-green-dark: #3E9142;
  --color-white: #FFFFFF;
  --color-gray: #9E9E9E;
  --color-text: #263238;
  --color-bg-green: #F1F8F2;
  --color-bg-gray: #F5F7F6;
  --color-border: #E0E5E2;

  --radius-card: 16px;
  --radius-btn: 10px;
  --shadow-soft: 0 4px 16px rgba(38, 50, 56, 0.08);
  --shadow-hover: 0 8px 24px rgba(38, 50, 56, 0.12);
  --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Базовые стили ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

a { color: var(--color-green-dark); }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Видимый фокус для клавиатурной навигации */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-green);
  outline-offset: 2px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block;
  min-height: 44px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--color-green);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--color-green-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--color-green);
}

/* Мобильная навигация: горизонтальная прокрутка без JavaScript */
.site-nav {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.site-nav a {
  display: inline-block;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--color-text);
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius-btn);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background: var(--color-bg-green);
  color: var(--color-green-dark);
}

.site-nav .nav-cta {
  background: var(--color-green);
  color: var(--color-white);
  font-weight: 600;
}

.site-nav .nav-cta:hover {
  background: var(--color-green-dark);
  color: var(--color-white);
}

/* ---------- Первый экран ---------- */

.hero {
  background: var(--color-bg-green);
  padding: 48px 0 56px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text);
  max-width: 560px;
  margin-bottom: 1.5em;
}

.hero-points {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.hero-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-green);
  font-weight: 700;
}

/* Декоративная иллюстрация: дом + лист + импульс */
.hero-art {
  position: relative;
  width: 280px;
  height: 260px;
  margin: 0 auto;
  flex-shrink: 0;
}

.art-circle {
  position: absolute;
  border-radius: 50%;
}

.art-circle-1 {
  width: 240px;
  height: 240px;
  left: 20px;
  top: 10px;
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.art-circle-2 {
  width: 60px;
  height: 60px;
  right: 0;
  top: 0;
  border: 3px solid var(--color-green);
  opacity: 0.35;
}

.art-house {
  position: absolute;
  left: 70px;
  top: 60px;
  width: 140px;
}

.art-roof {
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 70px solid transparent;
  border-right: 70px solid transparent;
  border-bottom: 52px solid var(--color-green);
  border-radius: 4px;
}

.art-walls {
  position: relative;
  width: 110px;
  height: 84px;
  margin: 0 auto;
  background: var(--color-bg-gray);
  border: 2px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.art-window {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 26px;
  height: 26px;
  background: var(--color-bg-green);
  border: 2px solid var(--color-green);
  border-radius: 4px;
}

.art-door {
  position: absolute;
  right: 16px;
  bottom: 0;
  width: 26px;
  height: 44px;
  background: var(--color-green);
  border-radius: 6px 6px 0 0;
  opacity: 0.85;
}

/* Лист: круг с двумя острыми углами */
.art-leaf {
  position: absolute;
  left: 20px;
  top: 30px;
  width: 44px;
  height: 44px;
  background: var(--color-green);
  border-radius: 0 70% 0 70%;
  transform: rotate(-15deg);
  opacity: 0.9;
}

/* Импульс: три штриха-«молнии» */
.art-pulse {
  position: absolute;
  left: 40px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.art-pulse span {
  display: block;
  width: 8px;
  background: var(--color-green);
  border-radius: 4px;
  opacity: 0.7;
}

.art-pulse span:nth-child(1) { height: 18px; }
.art-pulse span:nth-child(2) { height: 32px; opacity: 0.9; }
.art-pulse span:nth-child(3) { height: 24px; }

/* ---------- Секции ---------- */

.section {
  padding: 56px 0;
  background: var(--color-white);
}

.section-alt {
  background: var(--color-bg-green);
}

.section h2 {
  max-width: 720px;
}

.section-lead {
  max-width: 680px;
  color: var(--color-text);
  margin-bottom: 2em;
}

/* ---------- Карточки ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card p {
  margin-bottom: 0;
  color: var(--color-text);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  background: var(--color-bg-green);
  color: var(--color-green-dark);
  font-size: 1.4rem;
  border-radius: 12px;
}

.card-audience {
  background: var(--color-bg-gray);
  box-shadow: none;
}

/* ---------- Шаги решения ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--color-bg-green);
  border-radius: var(--radius-card);
  padding: 24px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  background: var(--color-green);
  color: var(--color-white);
  font-weight: 700;
  border-radius: 50%;
}

/* ---------- Сценарий использования ---------- */

.scenario {
  max-width: 720px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.scenario p:last-child {
  margin-bottom: 0;
}

/* ---------- Отзывы ---------- */

.review-card {
  text-align: center;
}

.review-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--color-bg-gray);
  border: 2px dashed var(--color-gray);
  border-radius: 50%;
}

.review-card p {
  color: var(--color-gray);
}

/* ---------- Форма заявки ---------- */

.section-request {
  background: var(--color-bg-green);
}

.request-form {
  max-width: 560px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.required-mark {
  color: var(--color-green-dark);
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  transition: border-color 0.2s ease;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-green);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--color-gray);
}

.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.form-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--color-green);
}

.form-consent label {
  font-size: 0.92rem;
}

.btn-submit {
  width: 100%;
}

.form-hint {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--color-gray);
}

.form-note {
  max-width: 560px;
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--color-white);
  border-left: 4px solid var(--color-green);
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  font-size: 0.92rem;
}

/* ---------- Страница политики (privacy.html) ---------- */

.legal .container {
  max-width: 760px;
}

.legal h1 {
  font-size: 1.7rem;
}

.legal h2 {
  font-size: 1.2rem;
  margin-top: 1.8em;
}

.legal ul {
  margin: 0 0 1em;
  padding-left: 24px;
}

.legal li {
  margin-bottom: 6px;
}

.legal-updated {
  color: var(--color-gray);
  font-size: 0.92rem;
}

.legal-note {
  margin: 32px 0 24px;
  padding: 14px 18px;
  background: var(--color-bg-green);
  border-left: 4px solid var(--color-green);
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  font-size: 0.92rem;
}

/* ---------- Подвал ---------- */

.site-footer {
  background: var(--color-text);
  color: var(--color-white);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.1rem;
}

.site-footer p {
  margin: 0;
  color: var(--color-border);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--color-bg-green);
  font-size: 0.92rem;
}

/* ---------- Планшеты (от 768px) ---------- */

@media (min-width: 768px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }

  .container {
    padding: 0 24px;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .hero {
    padding: 72px 0 80px;
  }

  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Ноутбуки и шире (от 1024px) ---------- */

@media (min-width: 1024px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-art {
    width: 320px;
    height: 300px;
  }

  .art-circle-1 {
    width: 280px;
    height: 280px;
  }

  .art-house {
    left: 90px;
    top: 80px;
  }

  .cards-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Широкие экраны (от 1440px) ---------- */

@media (min-width: 1440px) {
  .cards-5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .section {
    padding: 72px 0;
  }
}

/* ---------- Доступность: уменьшение движения ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
