:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1b2a41;
  --muted: #59667a;
  --primary: #2459ff;
  --primary-dark: #1944c8;
  --line: #dce2ef;
  --shadow: 0 14px 35px rgba(17, 34, 68, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(220, 226, 239, 0.8);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  font-weight: 500;
  color: var(--muted);
}

.main-nav a:hover {
  color: var(--primary);
}

.phone-link {
  font-weight: 600;
}

.hero {
  position: relative;
  isolation: isolate;
  padding: 86px 0 62px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(rgba(8, 18, 36, 0.8), rgba(8, 18, 36, 0.62)),
    url("../images/smart-home/showroom-photo-1.jpg") center/cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 15% 20%, rgba(95, 145, 255, 0.3), transparent 35%),
    radial-gradient(circle at 80% 75%, rgba(118, 214, 255, 0.22), transparent 36%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 34px;
  align-items: start;
}

.tag {
  margin: 0 0 14px;
  color: #f1f6ff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(36, 89, 255, 0.35);
  border: 1px solid rgba(172, 200, 255, 0.45);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  color: #fff;
}

.lead {
  margin: 0 0 26px;
  color: #d9e6ff;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.hero-benefits li::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.hero-benefits li {
  color: #ecf3ff;
}

.hero-card {
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(220, 226, 239, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.hero-card p {
  margin-top: 0;
  color: var(--muted);
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
}

.metrics {
  margin-top: -12px;
  padding: 28px 0 54px;
}

.metrics-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
}

.metrics-grid article {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border: 1px solid #d7e2f4;
  border-radius: 16px;
  padding: 24px 20px 22px;
  box-shadow: 0 10px 30px rgba(18, 39, 79, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.metrics-grid article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #2c66ff, #5ea8ff);
}

.metrics-grid article:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(18, 39, 79, 0.13);
  border-color: #c4d6f7;
}

.metrics-grid strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: #14356c;
}

.metrics-grid span {
  color: #4a5d7c;
  font-weight: 500;
  line-height: 1.45;
}

.section {
  position: relative;
  overflow: hidden;
  padding: 68px 0;
}

.alt-bg {
  background: #eef2fa;
}

h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.2;
}

.section-intro {
  max-width: 72ch;
  margin-top: 0;
  margin-bottom: 28px;
  color: var(--muted);
}

.cards-grid,
.solutions-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card,
.solution-item,
.project-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}

.media-card {
  padding: 0;
  overflow: hidden;
}

.card-media {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 20px 22px 22px;
}

#solutions::before,
#projects::before,
#lead-form::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
}

#solutions::before {
  background: linear-gradient(120deg, rgba(36, 89, 255, 0.12), rgba(118, 214, 255, 0.08));
}

#projects::before {
  background: linear-gradient(90deg, rgba(70, 122, 255, 0.08), rgba(70, 122, 255, 0));
}

#lead-form::before {
  background: radial-gradient(circle at 85% 20%, rgba(46, 104, 255, 0.18), transparent 32%);
}

#solutions .container,
#projects .container,
#lead-form .container {
  position: relative;
  z-index: 1;
}

.card h3,
.solution-item h3,
.project-grid h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.card p,
.solution-item p,
.project-grid p {
  margin: 0;
  color: var(--muted);
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.steps-list article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.steps-list span {
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}

.steps-list h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1rem;
}

.steps-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.package-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  position: relative;
}

.package-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.price {
  margin: 0 0 14px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.package-card ul {
  margin: 0 0 20px;
  padding-left: 18px;
  color: var(--muted);
}

.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
}

.badge {
  position: absolute;
  top: -11px;
  right: 16px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.lead-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}

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

.lead-form input,
.lead-form textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cfd8ec;
  font: inherit;
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: 2px solid rgba(36, 89, 255, 0.25);
  border-color: var(--primary);
}

.consent {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  background: #0f1e35;
  color: #d7e1f3;
  padding: 48px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 24px;
}

.site-footer h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #fff;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer .logo {
  color: #7fa7ff;
}

@media (max-width: 1024px) {
  .hero-grid,
  .lead-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .main-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 62px;
  }

  .cards-grid,
  .solutions-grid,
  .packages-grid,
  .project-grid,
  .steps-list,
  .metrics-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .card-media {
    height: 170px;
  }

  .metrics {
    margin-top: 0;
    padding-top: 22px;
  }
}