:root {
  --bg-main: #0b0d12;
  --bg-dark: #07090d;
  --accent: #2563eb;
  --accent-soft: rgba(37,99,235,0.35);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

* {
  transition: color 0.2s ease,
              background-color 0.2s ease,
              box-shadow 0.3s ease,
              transform 0.3s ease;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: auto;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  padding-top: 96px;
  line-height: 1.65;
  font-weight: 400;
  overscroll-behavior-x: none;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  letter-spacing: -0.03em;
}

p {
  max-width: 70ch;
}

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

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(11,13,18,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 100;
  transform: translateZ(0);
  will-change: transform;
}

.header__inner {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo img {
  height: 72px;
  filter:
    drop-shadow(0 0 18px rgba(47,168,224,0.35))
    drop-shadow(0 0 36px rgba(11,60,111,0.25));
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

/* NAV */
.lang-switch {
  display: flex;
  gap: 10px;
  margin-left: 24px;
  font-size: 13px;
}

.lang-switch a {
  opacity: 0.6;
  letter-spacing: 0.06em;
}

.lang-switch a.active {
  opacity: 1;
  font-weight: 600;
  color: #2FA8E0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  will-change: transform, opacity;
}

.nav a {
  position: relative;
}

.nav a.active {
  color: #2FA8E0;
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: #2FA8E0;
}

.nav-cta {
  margin-left: 32px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(47,168,224,0.35);
  color: #2FA8E0;
}

.nav-cta:hover {
  background: rgba(47,168,224,0.12);
}

.burger {
  display: none;
  width: 32px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #FFFFFF;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Анимация крестика */
.burger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* HERO */
.hero,
.hero-bg,
.hero-grid,
.core-visual,
.reliability-visual {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 0;
  background: radial-gradient(circle at top, #0f1320, var(--bg-main));
}

@supports not (height: 100svh) {
  .hero {
    min-height: 100vh;
  }
}

/* КОМНАТЫ */
.hero-plan-simple {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-plan-simple .room {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.10);
}

/* комнаты */
.hero-plan-simple .r1 {
  width: 28%;
  height: 32%;
  left: 12%;
  top: 28%;
}

.hero-plan-simple .r2 {
  width: 30%;
  height: 24%;
  left: 44%;
  top: 22%;
}

.hero-plan-simple .r3 {
  width: 36%;
  height: 30%;
  left: 38%;
  top: 54%;
}

/* ПЕРЕГОРОДКИ (дверные проёмы) */
.hero-plan-simple .room::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 1px;
  background: rgba(255,255,255,0.12);
  top: 50%;
  left: -12px;
}

/* УЗЛЫ АВТОМАТИЗАЦИИ */
.hero-plan-simple .node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(47,168,224,0.7);
  box-shadow: 0 0 12px rgba(47,168,224,0.6);
}

.hero-plan-simple .n1 {
  left: 48%;
  top: 28%;
}

.hero-plan-simple .n2 {
  left: 62%;
  top: 72%;
}

.hero-plan-simple .n3 {
  left: 18%;
  top: 52%;
}

.node {
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%   { opacity: 0.5; }
  50%  { opacity: 1; }
  100% { opacity: 0.5; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px at 30% 30%, rgba(37,99,235,0.25), transparent 70%),
    radial-gradient(800px at 70% 60%, rgba(99,102,241,0.18), transparent 70%);
  will-change: opacity;
  animation: floatBg 20s ease-in-out infinite alternate;
  animation-delay: 0.8s;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 80%);
  will-change: opacity;
}

@keyframes floatBg {
  from { transform: translateY(0); }
  to { transform: translateY(-50px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  min-height: 420px;
}

.hero h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.1;
  margin-bottom: 28px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 42px;
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 16px 38px;
  border-radius: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow:
    0 10px 40px rgba(37,99,235,0.4),
    0 0 0 rgba(37,99,235,0.6);
  transition: all 0.4s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 20px 60px rgba(37,99,235,0.6),
    0 0 40px rgba(37,99,235,0.8);
}

.btn--light {
  background: #ffffff;
  color: #0b0d12;
}

/* SECTIONS */
.section {
  padding: 140px 0;
}

.section--dark {
  background: var(--bg-dark);
}

.section--accent {
  background: radial-gradient(circle at top, #1e293b, #020617);
}

.section h2 {
  font-size: 36px;
  margin-bottom: 32px;
}

.section p {
  max-width: 820px;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.feature {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 36px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 70px rgba(0,0,0,0.7);
}

.feature h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

/* CONTACT */
.contact {
  text-align: center;
}

.contact p {
  margin: 24px auto 40px;
}

/* FOOTER */
.footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: #020617;
}

.footer__inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
}

/* CORE PLATFORM */
.core {
  background: radial-gradient(circle at center, #0b1220, #020617);
}

.core-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.core-text p {
  font-size: 18px;
  margin-bottom: 28px;
}

.core-list {
  list-style: none;
}

.core-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.core-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* VISUAL */
.core-visual {
  position: relative;
  width: 100%;
  height: 420px;
}

.core-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(37,99,235,0.35);
  box-shadow:
    0 0 60px rgba(37,99,235,0.3),
    inset 0 0 40px rgba(37,99,235,0.2);
  animation: rotateRing 40s linear infinite;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.core-center {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 0 40px rgba(37,99,235,0.7);
}

.core-node {
  position: absolute;
  padding: 10px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.node-1 { top: 20px; left: 50%; transform: translateX(-50%); }
.node-2 { right: 0; top: 50%; transform: translateY(-50%); }
.node-3 { bottom: 20px; left: 50%; transform: translateX(-50%); }
.node-4 { left: 0; top: 50%; transform: translateY(-50%); }

/* MANIFEST */
.manifest {
  background: linear-gradient(
    180deg,
    #0E1B2A 0%,
    #14263D 100%
  );
}

.manifest-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: flex-start;
}

.manifest-label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3FAE6A;
  margin-bottom: 16px;
}

.manifest-head h2 {
  font-size: 44px;
  line-height: 1.1;
}

.manifest-content {
  font-size: 17px;
  color: #A9B7C6;
}

.manifest-lead {
  font-size: 20px;
  color: #FFFFFF;
  margin-bottom: 28px;
}

.manifest-content h3 {
  margin: 36px 0 16px;
  font-size: 22px;
  color: #FFFFFF;
}

.manifest-content ul {
  list-style: none;
  margin: 16px 0 24px;
}

.manifest-content li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
}

.manifest-content li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #2FA8E0;
}

.manifest-quote, .home-assistant-info {
  margin: 32px 0;
  padding-left: 24px;
  border-left: 2px solid #3FAE6A;
  color: #FFFFFF;
  font-style: italic;
}

/* RELIABILITY */
.reliability {
  background: radial-gradient(
    circle at top,
    #0B3C6F,
    #020617
  );
}

.reliability-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

.reliability-label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3FAE6A;
  margin-bottom: 16px;
}

.reliability-text h2 {
  font-size: 40px;
  margin-bottom: 28px;
}

.reliability-lead {
  font-size: 20px;
  color: #FFFFFF;
  margin-bottom: 36px;
}

.reliability-list {
  list-style: none;
}

.reliability-list li {
  margin-bottom: 22px;
  color: #A9B7C6;
}

.reliability-list strong {
  color: #FFFFFF;
  font-weight: 600;
}

/* VISUAL */
.reliability-visual {
  position: relative;
  height: 420px;
}

.reliability-core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2FA8E0, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 0 40px rgba(47,168,224,0.7);
  z-index: 2;
}

.reliability-layer {
  position: absolute;
  padding: 10px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  animation: floatLayer 8s ease-in-out infinite alternate;
}

.layer-1 { top: 20px; left: 50%; transform: translateX(-50%); }
.layer-2 { right: 0; top: 50%; transform: translateY(-50%); animation-delay: 1s; }
.layer-3 { bottom: 20px; left: 50%; transform: translateX(-50%); animation-delay: 2s; }
.layer-4 { left: 0; top: 50%; transform: translateY(-50%); animation-delay: 3s; }

@keyframes floatLayer {
  from { transform: translateY(0); }
  to   { transform: translateY(-16px); }
}

/* ARCHITECTURE */
.architecture {
  background:
    linear-gradient(
      180deg,
      #020617 0%,
      #0E1B2A 100%
    );
}

.architecture-head {
  max-width: 700px;
  margin-bottom: 80px;
}

.architecture-label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2FA8E0;
  margin-bottom: 16px;
}

.architecture-head h2 {
  font-size: 42px;
  margin-bottom: 20px;
}

.architecture-head p {
  font-size: 20px;
  color: #A9B7C6;
}

/* STEPS */
.architecture-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
}

.architecture-step {
  position: relative;
  padding: 36px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.architecture-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 70px rgba(0,0,0,0.6);
}

.step-index {
  font-size: 32px;
  font-weight: 700;
  color: #3FAE6A;
  margin-bottom: 16px;
}

.architecture-step h3 {
  margin-bottom: 14px;
  font-size: 20px;
}

.architecture-step p {
  color: #A9B7C6;
  font-size: 16px;
}

/* FINAL CTA */
.final-cta {
  background:
    radial-gradient(circle at left, #0B3C6F, #020617);
}

.final-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: center;
}

.final-label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3FAE6A;
  margin-bottom: 16px;
}

.final-text h2 {
  font-size: 42px;
  margin-bottom: 28px;
}

.final-lead {
  font-size: 20px;
  color: #FFFFFF;
  margin-bottom: 36px;
}

.final-list {
  list-style: none;
}

.final-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
  color: #A9B7C6;
}

.final-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #2FA8E0;
}

/* CONTACT CARD */
.final-contact {
  display: flex;
  justify-content: center;
}

.contact-card {
  width: 100%;
  max-width: 380px;
  padding: 40px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.contact-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #2FA8E0;
  margin-bottom: 20px;
}

.contact-link {
  display: block;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.contact-meta {
  margin: 24px 0 32px;
  color: #A9B7C6;
  font-size: 14px;
}

.contact-meta span {
  display: block;
}

.contact-meta .rab_rk {
	display: none;
}

.contact-link--wa {
  color: #3FAE6A;
}

.contact-link--tg {
  color: #3ea6f0;
}

.contact-link--wa, .contact-link--tg {
  font-weight: 500;
  margin-bottom: 20px;
}

.contact-link--wa:hover {
  text-decoration: underline;
}

/* CTA BUTTON */
.btn--accent {
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, #3FAE6A, #2FA8E0);
  box-shadow:
    0 15px 40px rgba(47,168,224,0.5),
    0 0 0 rgba(47,168,224,0.8);
}

.btn--accent:hover {
  box-shadow:
    0 25px 60px rgba(47,168,224,0.8),
    0 0 40px rgba(47,168,224,0.9);
}

@supports (-webkit-touch-callout: none) {
  .logo img {
    filter: none;
  }

  .hero-bg {
    animation: none;
  }

  .core-ring {
    animation: none;
  }
}

.home-assistant-info {
  font-style: normal;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,0.75);
  backdrop-filter: blur(6px);
}

.modal-window {
  position: relative;
  max-width: 420px;
  margin: 10vh auto;
  padding: 36px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7);
}

.modal-title {
  font-size: 26px;
  margin-bottom: 8px;
}

.modal-subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
}

#contact-form {
  display: grid;
  gap: 16px;
}

#contact-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
}

#contact-form input:focus {
  outline: none;
  border-color: #2FA8E0;
}

.form-status {
  margin-top: 12px;
  font-size: 14px;
}

.form-status.success {
  color: #3FAE6A;
}

.form-status.error {
  color: #f87171;
}

/* Honeypot */
.hp {
  display: none !important;
}

/* MOBILE */
@media (max-width: 900px) {
  .section h2 {
	  font-size: 34px;
  }

  .header__inner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 12px 0;
  }

  .logo {
    justify-content: center;
    margin-bottom: 12px;
  }

  .header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  
  .burger {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: rgba(11,13,18,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    display: flex;
    flex-direction: column;
    gap: 16px;

    padding: 0 24px;

    max-height: 0;
    overflow: hidden;

    opacity: 0;
    pointer-events: none;

    transition:
      max-height 0.35s ease,
      opacity 0.25s ease;
  }

  .nav.open {
    max-height: 520px;
    opacity: 1;
    pointer-events: auto;
    padding: 24px;
  }

  .nav a {
    width: 100%;
    font-size: 16px;
    padding: 10px 0;
	margin-left: auto;
  }

  .nav a.active::after {
    bottom: 0;
  }

  .nav-cta {
    margin-top: 12px;
    align-self: stretch;
    text-align: center;
  }
  
  .logo img {
    height: 64px;
  }
    
  .hero-plan-simple .n3 {
    top: 54%;
  }
  
  .hero-plan-simple .n1 {
    left: 70%;
    top: 38%;
  }

  .hero h1 {
    font-size: 44px;
  }

  .section {
    padding: 80px 0;
  }

  .core-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .core-visual {
    height: 360px;
  }
  
  .architecture-head {
    margin-bottom: 60px;
  }

  .manifest-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .reliability-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .reliability-visual {
    height: 340px;
  }
 
   .final-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
}

/* Entry pages (secondary landing pages) */
body[data-page="entry"] .nav,
body[data-page="entry"] .burger {
  display: none;
}

body[data-page="entry"] .header__inner {
  justify-content: space-between;
}
