﻿:root {
  --bg: #f7f8fb;
  --paper: #ffffff;
  --ink: #132033;
  --muted: #5c6778;
  --line: #dfe5ee;
  --blue: #3767b1;
  --green: #66a65b;
  --dark: #111a29;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 110px; }

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 22%, rgba(66, 187, 255, .22), transparent 46%),
    radial-gradient(circle at 82% 72%, rgba(55, 103, 177, .20), transparent 48%),
    linear-gradient(rgba(247, 248, 251, .50), rgba(247, 248, 251, .68)),
    url("tech-background.webp");
  background-size: auto, auto, cover, cover;
  background-position: center, center, center top, center top;
  background-attachment: fixed, fixed, fixed, fixed;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    linear-gradient(rgba(247, 248, 251, .56), rgba(247, 248, 251, .78)),
    url("header-smart-home.webp") center / cover no-repeat;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(55, 103, 177, .16);
  overflow: hidden;
}
main, footer {
  position: relative;
  z-index: 2;
}
.site-header.scrolled {
  box-shadow: 0 10px 30px rgba(20, 40, 74, .10);
  border-bottom-color: rgba(55, 103, 177, .28);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: radial-gradient(circle at center, rgba(82, 188, 255, 1) 0, rgba(82, 188, 255, .72) 12%, rgba(82, 188, 255, .18) 34%, transparent 68%);
  pointer-events: none;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 82px;
}
.brand img { width: 220px; height: auto; display: block; }

nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}
nav a { white-space: nowrap; position: relative; }
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, rgba(66, 187, 255, 1), rgba(55, 103, 177, .2));
  transition: transform .35s ease;
}
.nav a:not(.nav-cta):hover::after,
.nav a.active::after { transform: scaleX(1); }
.nav a.active { color: #1f4f96; font-weight: 700; }

.nav-cta {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 38px;
}
.hero-particles {
  position: absolute;
  inset: -40% -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(66, 187, 255, .38) 0 3px, transparent 4px),
    radial-gradient(circle at 35% 70%, rgba(55, 103, 177, .32) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 25%, rgba(66, 187, 255, .30) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 75%, rgba(55, 103, 177, .28) 0 3px, transparent 4px);
  opacity: .58;
  transform: translate3d(0, var(--hero-shift, 0px), 0);
  pointer-events: none;
}

.wow-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .92;
}
.wow-path {
  fill: none;
  stroke: rgba(83, 206, 255, .78);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 10;
  animation: dashFlow 3.8s linear infinite;
}
.wow-path.soft {
  stroke-width: 2;
  opacity: .75;
  animation-duration: 4.8s;
}
.wow-human,
.wow-house,
.wow-blinds,
.wow-gate {
  stroke: rgba(120, 226, 255, .96);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: rgba(66, 187, 255, .09);
}
.wow-phone {
  fill: rgba(157, 243, 255, .95);
  filter: drop-shadow(0 0 10px rgba(157, 243, 255, .95));
  animation: phoneTap 1.2s ease-in-out infinite;
}
.wow-light {
  fill: rgba(66, 187, 255, .28);
}
.wow-light.l1 { animation: lampOn 2.2s ease-in-out infinite; }
.wow-light.l2 { animation: lampOn 2.2s ease-in-out infinite .45s; }
.wow-blinds { animation: blindsLift 2.8s ease-in-out infinite; transform-origin: center top; transform-box: fill-box; }
.wow-gate { animation: gateOpen 2.8s ease-in-out infinite .25s; transform-origin: center center; transform-box: fill-box; }
.wow-pulse {
  fill: #fff5a4;
  filter: drop-shadow(0 0 12px rgba(255, 237, 123, .95));
}

.hero-grid, .split-grid, .footer-grid {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 2;
}
.hero-copy { position: relative; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 13px;
}
h1 {
  margin: 0 0 18px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  text-wrap: balance;
}
h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
}
h3 { margin-top: 0; font-size: 21px; }
.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 760px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 4px;
  width: 10px;
  height: 70%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(66, 187, 255, .92), rgba(55, 103, 177, .1));
  box-shadow: 0 0 30px rgba(66, 187, 255, .35);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 22px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
}
.primary { background: var(--blue); color: #fff; }
.secondary { border: 1px solid var(--line); background: #fff; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.hero-meta span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
}

.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(19, 32, 51, .08);
}
.pulse-card { position: relative; }
.pulse-dot {
  position: absolute;
  right: 18px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4bdb83;
  box-shadow: 0 0 0 0 rgba(75, 219, 131, .65);
  animation: ping 2.2s infinite;
}
.hero-card p { margin: 8px 0; color: var(--muted); }
.hero-card a { color: var(--blue); font-weight: 700; }

.trust { padding: 18px 0 26px; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.trust-grid div, .card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  transition: transform .28s ease, box-shadow .28s ease;
}
.trust-grid div:hover, .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(19, 32, 51, .10);
}
.trust-grid strong, .trust-grid span { display: block; }
.trust-grid strong {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.5rem;
}
.trust-grid span { color: var(--muted); font-size: 14px; margin-top: 4px; }

.section { padding: 72px 0; }
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s ease, transform .75s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.card p { color: var(--muted); margin-bottom: 0; }
.split { background: rgba(255, 255, 255, .94); }
.feature-list {
  margin: 0;
  padding: 24px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.feature-list li {
  position: relative;
  padding-left: 28px;
  margin: 14px 0;
}
.feature-list li::before {
  content: "->";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.section-dark {
  background: var(--dark);
  color: #fff;
}
.section-dark .eyebrow { color: #b9d0ff; }
.section-dark p { color: rgba(255,255,255,.78); }
.section-dark .feature-list {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}

.about { max-width: 840px; }
.muted { color: var(--muted); }
.clients { padding-top: 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 28px;
}
.contact-panel,
.contact-form {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(19, 32, 51, .06);
}
.contact-panel p { margin: 8px 0; }
.contact-panel a { color: var(--blue); font-weight: 700; }
.map {
  width: 100%;
  min-height: 280px;
  margin-top: 18px;
  border: 0;
  border-radius: 18px;
}
.contact-form {
  display: grid;
  gap: 16px;
}
.contact-form h3 { margin-bottom: 0; }
.contact-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(255,255,255,.94);
}
.contact-form textarea { resize: vertical; }
.contact-form .button {
  border: 0;
  width: fit-content;
  cursor: pointer;
}
.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  grid-template-columns: 1fr auto;
  align-items: center;
}
.footer-grid p { margin: 6px 0 0; color: var(--muted); }
.footer-grid div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 700;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.ambient-3d {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ambient-3d canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  pointer-events: none;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(75, 219, 131, .66); }
  70% { box-shadow: 0 0 0 16px rgba(75, 219, 131, 0); }
  100% { box-shadow: 0 0 0 0 rgba(75, 219, 131, 0); }
}
@keyframes dashFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -120; }
}
@keyframes phoneTap {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-2px) scale(1.06); }
}
@keyframes lampOn {
  0%, 28%, 100% { fill: rgba(66, 187, 255, .22); }
  40%, 76% { fill: rgba(255, 237, 123, .95); filter: drop-shadow(0 0 10px rgba(255, 237, 123, .95)); }
}
@keyframes blindsLift {
  0%, 14%, 100% { transform: translateY(0) scaleY(1); opacity: .88; }
  40%, 58% { transform: translateY(-6px) scaleY(.76); opacity: 1; }
  76% { transform: translateY(-2px) scaleY(.92); opacity: .94; }
}
@keyframes gateOpen {
  0%, 22%, 100% { transform: translateX(0); opacity: .95; }
  40%, 70% { transform: translateX(12px); opacity: .75; }
}

@media (max-width: 900px) {
  section[id] { scroll-margin-top: 150px; }
  .nav {
    min-height: auto;
    padding: 16px 0;
    align-items: flex-start;
    flex-direction: column;
  }
  nav {
    width: 100%;
    overflow-x: visible;
    padding-bottom: 4px;
    white-space: normal;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    align-items: center;
  }
  .nav-cta {
    margin-left: auto;
    flex: 0 0 auto;
  }
  .hero { padding-top: 42px; }
  .wow-network { opacity: .86; }
  .hero-grid, .split-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid, .cards {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 28px, 1180px); }
  .brand img { width: 150px; }
  .site-header {
    background:
      linear-gradient(rgba(247, 248, 251, .28), rgba(247, 248, 251, .56)),
      url("header-smart-home.webp") left center / auto 100% no-repeat;
  }
  .wow-network {
    opacity: .92;
  }
  nav {
    gap: 10px;
    font-size: 12px;
  }
  .nav-cta {
    padding: 7px 12px;
    font-size: 12px;
  }
  .lead { font-size: 18px; }
  .trust-grid, .cards {
    grid-template-columns: 1fr;
  }
  .section { padding: 54px 0; }
  .hero-card, .feature-list, .card, .trust-grid div {
    border-radius: 18px;
  }
  .hero-copy::before { display: none; }
  .footer-grid div:last-child {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse-dot,
  .wow-network,
  .wow-network * {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
