:root {
  --slate: #172330;
  --slate-2: #203142;
  --teal: #0f7c80;
  --teal-dark: #0a5c60;
  --teal-soft: #dff1f0;
  --amber: #ffc15e;
  --paper: #faf7f2;
  --sand: #f1ebe1;
  --ink: #172330;
  --muted: #5b6672;
  --line: #e3ddd2;
  --white: #ffffff;
  --radius: 18px;
  --max: 1140px;
  --font: 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: 78px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.hl { color: var(--amber); }

.eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: .9em; }
.lead { font-size: 1.13rem; color: var(--muted); max-width: 34em; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .85em 1.5em;
  border-radius: 12px;
  background: var(--teal);
  color: var(--white);
  font: inherit; font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--teal);
  cursor: pointer;
  transition: background .15s, transform .15s;
  text-align: center;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); transform: translateY(-1px); }
.btn:focus-visible, .scene:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.btn-outline { background: transparent; color: var(--teal-dark); }
.btn-outline:hover { background: var(--teal-soft); color: var(--teal-dark); border-color: var(--teal); }
.btn-small { padding: .5em 1.05em; font-size: .92rem; border-radius: 10px; white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(250,247,242,.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.wordmark b { color: var(--teal); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: .93rem; color: var(--muted); }
.nav a:not(.btn):hover { color: var(--teal); }

/* Hero */
.hero {
  background:
    radial-gradient(600px 380px at 85% 20%, rgba(255,193,94,.16), transparent 65%),
    var(--slate);
  color: var(--white);
  padding: 72px 0 84px;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 52px; }
.hero .eyebrow { color: var(--amber); }
.hero .lead { color: rgba(255,255,255,.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Smart home demo */
.home { background: var(--slate-2); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 20px; }
.scenes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.scene { font: inherit; font-weight: 700; font-size: .88rem; padding: .5em 1.05em; border-radius: 999px; border: 1.500px solid rgba(255,255,255,.28); background: transparent; color: var(--white); cursor: pointer; transition: background .15s, color .15s; }
.scene:hover { background: rgba(255,255,255,.1); }
.scene.is-active { background: var(--amber); border-color: var(--amber); color: var(--slate); }

.house { width: 100%; height: auto; display: block; }
.roof { fill: #2d4257; }
.wall { fill: #2d4257; }
.room { fill: #131d28; transition: fill .4s; }
.lamp { fill: #55616e; transition: fill .4s, filter .4s; }
.furn { fill: rgba(255,255,255,.14); }
.tv { fill: #0b1118; transition: fill .4s; }
.thermo { fill: var(--teal); stroke: #fff; stroke-width: 2; }
.door { fill: #6b4f3a; }
.lock { fill: #e5484d; transition: fill .4s; }
.cam { fill: #c9d2da; }
.cam-dot { fill: #55616e; transition: fill .4s; }

/* Morning: everything on */
.home[data-scene="morning"] .room { fill: #ffe2a8; }
.home[data-scene="morning"] .lamp { fill: #fff3cf; filter: drop-shadow(0 0 8px #ffc15e); }
.home[data-scene="morning"] .furn { fill: rgba(23,35,48,.22); }
.home[data-scene="morning"] .lock { fill: #3fbf7f; }
/* Movie night: living room dimmed */
.home[data-scene="movie"] .r-living { fill: #4a3a78; }
.home[data-scene="movie"] .l-living { fill: #b9a6ff; filter: drop-shadow(0 0 7px #8f7bff); }
.home[data-scene="movie"] .tv { fill: #9fd8ff; }
/* Away: lights off, camera recording */
.home[data-scene="away"] .cam-dot { fill: #ff4d4f; animation: blink 1.200s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.status { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status li { background: rgba(255,255,255,.06); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.status span { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); font-weight: 700; }
.status strong { font-size: .98rem; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--sand); }
.section-dark { background: var(--slate); color: var(--white); }
.section-dark .eyebrow { color: var(--amber); }
.section-dark .lead { color: rgba(255,255,255,.8); }

/* Categories */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.cat { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; text-decoration: none; transition: border-color .15s, transform .15s; }
.cat:hover { border-color: var(--teal); transform: translateY(-3px); }
.cat strong { font-size: 1.1rem; }
.cat small { color: var(--muted); font-size: .92rem; }
.icon { width: 48px; height: 48px; border-radius: 14px; background: var(--teal-soft); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 25px; height: 25px; fill: none; stroke: var(--teal-dark); stroke-width: 1.800; stroke-linecap: round; stroke-linejoin: round; }

/* Compatibility */
.compat { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.compat-card { background: var(--slate-2); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 34px 28px; }
.chain { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.chain span { flex: none; padding: .55em .9em; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); font-weight: 700; font-size: .92rem; }
.chain i { flex: 1; height: 2px; min-width: 10px; background: repeating-linear-gradient(90deg, var(--amber) 0 6px, transparent 6px 11px); }
.compat-ok { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; font-weight: 700; font-size: 1.1rem; }
.tick { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #3fbf7f; position: relative; }
.tick::after { content: ""; position: absolute; left: 11px; top: 6px; width: 7px; height: 13px; border: solid var(--slate); border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* Ways */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.way { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; }
.way p { color: var(--muted); margin: 0; }
.way-num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--amber); color: var(--slate); font-weight: 800; margin-bottom: 16px; }

/* Bundles */
.bundles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; align-items: stretch; }
.bundle { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; }
.bundle.featured { border: 2px solid var(--teal); box-shadow: 0 20px 44px rgba(15,124,128,.16); }
.bundle .price { margin-bottom: .8em; }
.bundle .price strong { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.02em; }
.bundle ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 9px; }
.bundle li { position: relative; padding-left: 26px; }
.bundle li::before { content: ""; position: absolute; left: 4px; top: .32em; width: 7px; height: 12px; border: solid var(--teal); border-width: 0 2.500px 2.500px 0; transform: rotate(45deg); }
.bundle .btn { margin-top: auto; }
.badge { position: absolute; top: -13px; left: 24px; background: var(--amber); color: var(--slate); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .3em .9em; border-radius: 999px; }
.bundles-note { margin: 24px 0 0; color: var(--muted); text-align: center; }

/* Support */
.support { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.support-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.support-list li { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; }
.support-list strong { font-size: 1.1rem; }
.support-list span { color: var(--muted); }

/* Consult */
.consult { background: var(--slate); color: var(--white); }
.consult .eyebrow { color: var(--amber); }
.consult .lead { color: rgba(255,255,255,.82); }
.consult-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.consult-mail { margin-top: 26px; color: rgba(255,255,255,.7); }
.consult-mail a { color: var(--amber); font-weight: 700; font-size: 1.12rem; text-decoration: none; overflow-wrap: anywhere; }
.consult-mail a:hover { text-decoration: underline; }
.consult-form { background: var(--white); color: var(--ink); border-radius: 20px; padding: 28px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
label, legend { font-size: .88rem; font-weight: 700; padding: 0; }
legend { margin-bottom: 6px; }
input[type="text"], select, textarea { width: 100%; font: inherit; color: var(--ink); padding: .7em .85em; border: 1.500px solid var(--line); border-radius: 10px; background: var(--paper); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15,124,128,.3); border-color: var(--teal); }
textarea { resize: vertical; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: .95rem; padding: .55em .8em; border: 1.500px solid var(--line); border-radius: 10px; cursor: pointer; }
.checks input { width: 17px; height: 17px; accent-color: var(--teal); }
.consult-form .btn { justify-self: start; }
.form-hint { margin: 0; font-size: .85rem; color: var(--muted); }

/* Footer */
.site-footer { background: #0f1822; color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--amber); }

/* Responsive */
@media (max-width: 1040px) {
  .nav a:not(.btn) { display: none; }
}

@media (max-width: 960px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .hero-inner, .compat, .support, .consult-inner { grid-template-columns: 1fr; gap: 36px; }
  .ways, .bundles { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 60px; }
  .section { padding: 64px 0; }
  .home { max-width: 520px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .wordmark { font-size: .95rem; }
  .header-inner { gap: 10px; }
  .header-inner .btn-small { padding: .45em .75em; font-size: .8rem; }
  .home { padding: 14px; }
  .checks { grid-template-columns: 1fr; }
  .consult-form { padding: 22px 18px; }
  .chain span { padding: .45em .6em; font-size: .8rem; }
  .compat-card { padding: 26px 16px; }
}

@media (max-width: 420px) {
  .cats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
