/* ============================================================
   SmarterHome. Design System
   Pure CSS, self-hosted, zero external requests.
   Light-premium default · strategic dark bands · soft dark mode.
   ============================================================ */

/* ---- Self-hosted fonts ----
   System stacks are used now (premium on Apple devices, zero requests).
   To brand with a specific typeface later, drop .woff2 files into
   /assets/fonts/ and declare @font-face here, then update --font-* below. */

/* ============================================================
   1. Tokens
   ============================================================ */
:root {
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Brand */
  --accent: #0f7d6e;
  --accent-deep: #0a5e52;
  --accent-soft: #e6f1ee;
  --accent-contrast: #ffffff;
  --gold: #b8995c;

  /* Light surfaces */
  --bg: #f5f3ee;
  --bg-alt: #ece8df;
  --surface: #ffffff;
  --surface-alt: #faf8f3;
  --text: #2c3038;
  --heading: #16181d;
  --muted: #6a6f7a;
  --line: rgba(22, 24, 29, 0.12);
  --line-strong: rgba(22, 24, 29, 0.2);

  --shadow: 0 1px 2px rgba(22, 24, 29, 0.04), 0 8px 24px rgba(22, 24, 29, 0.06);
  --shadow-lg: 0 4px 14px rgba(22, 24, 29, 0.08), 0 24px 56px rgba(22, 24, 29, 0.12);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --container: 1180px;
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Soft dark mode (toggle). Never pure black */
[data-theme="dark"] {
  --bg: #191c21;
  --bg-alt: #14171b;
  --surface: #22262d;
  --surface-alt: #1d2127;
  --text: #d7dae0;
  --heading: #f4f5f7;
  --muted: #9aa0ab;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #16a892;
  --accent-soft: rgba(22, 168, 146, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.4), 0 24px 56px rgba(0, 0, 0, 0.5);
}

/* Dark band within any theme (hero accents, footers, CTA strips) */
.panel-dark {
  --bg: #16181d;
  --surface: #23272e;
  --surface-alt: #1f242b;
  --text: #cfd3da;
  --heading: #ffffff;
  --muted: #a3a9b4;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --accent: #1fb89f;
  --accent-soft: rgba(31, 184, 159, 0.16);
  background: var(--bg);
  color: var(--text);
}

/* ============================================================
   2. Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
button { font: inherit; cursor: pointer; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ============================================================
   3. Typography
   ============================================================ */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.display { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.12rem; font-family: var(--font-sans); font-weight: 650; letter-spacing: 0; }
p { color: var(--text); }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); line-height: 1.55; }
strong { font-weight: 650; color: var(--heading); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 650;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); display: inline-block; }
.panel-dark .eyebrow { color: var(--accent); }

.text-center { text-align: center; }
.measure { max-width: 62ch; }
.measure-tight { max-width: 48ch; }
.text-center.measure, .text-center.measure-tight { margin-left: auto; margin-right: auto; }

/* ============================================================
   4. Layout
   ============================================================ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.2rem, 4vw, 2.4rem); }
.container-narrow { max-width: 880px; }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--cozy { padding-block: clamp(1.5rem, 3vw, 2.75rem); }
.section--cozy-b { padding-bottom: clamp(1.5rem, 3vw, 2.75rem); }
.section--cozy-t { padding-top: clamp(1.5rem, 3vw, 2.75rem); }
.section--sand { background: var(--bg-alt); }
.section--surface { background: var(--surface); }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head .lead { margin-top: 0.8rem; }

.grid { display: grid; gap: clamp(1.2rem, 2.5vw, 1.8rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--media { grid-template-columns: 1.05fr 0.95fr; }
.split--rev > :first-child { order: 2; }
@media (max-width: 860px) { .split, .split--media { grid-template-columns: 1fr; gap: 2.2rem; } .split--rev > :first-child { order: 0; } }

.stack > * + * { margin-top: 1.1rem; }
.divider { height: 1px; background: var(--line); border: 0; }

/* ============================================================
   5. Header / Nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1.5rem; }
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-links a {
  color: var(--text); font-size: 0.94rem; font-weight: 550;
  padding: 0.5rem 0.8rem; border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--heading); background: color-mix(in srgb, var(--text) 7%, transparent); }
.nav-links a.is-active { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--heading); font-family: var(--font-display); font-weight: 600; }
.brand:hover { color: var(--heading); }
.brand-mark { width: 34px; height: 34px; flex: none; color: var(--accent); }
.brand-text { font-size: 1.3rem; letter-spacing: -0.01em; }
.brand-text b { font-weight: 600; color: var(--accent); }

.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-pill);
  color: var(--text); transition: background 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); border-color: var(--line-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; }

/* Mobile nav */
@media (max-width: 880px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-grid; }
  .mobile-menu {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    background: var(--bg); padding: 1.5rem clamp(1.2rem, 5vw, 2rem) 2.5rem;
    transform: translateX(100%); transition: transform 0.35s var(--ease);
    display: flex; flex-direction: column; gap: 0.4rem; overflow-y: auto;
    border-top: 1px solid var(--line);
  }
  .mobile-menu.is-open { transform: translateX(0); }
  .mobile-menu a {
    color: var(--heading); font-family: var(--font-display); font-size: 1.5rem;
    padding: 0.7rem 0; border-bottom: 1px solid var(--line);
  }
  .mobile-menu a.is-active { color: var(--accent); }
  .mobile-menu .btn { margin-top: 1.4rem; font-size: 1rem; }
}
@media (min-width: 881px) { .mobile-menu { display: none !important; } }
body.menu-open { overflow: hidden; }

/* ============================================================
   6. Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.98rem; line-height: 1;
  padding: 0.85em 1.5em; border-radius: var(--radius-pill); border: 1px solid transparent;
  transition: transform 0.15s var(--ease), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--primary:hover { background: var(--accent-deep); color: #fff; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 42%, transparent); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--heading); }
.btn--ghost:hover { border-color: var(--heading); color: var(--heading); background: color-mix(in srgb, var(--text) 5%, transparent); }
.btn--light { background: #fff; color: #16181d; }
.btn--light:hover { background: #ece8df; color: #16181d; }
.btn--lg { padding: 1.02em 1.9em; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn-row.center { justify-content: center; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600; }
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ============================================================
   7. Cards & media placeholders
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow);
}
.card--pad-lg { padding: clamp(1.8rem, 4vw, 2.6rem); }
.card-hover { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }

/* Elegant image placeholder (used until real photography lands) */
.ph-img {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
    linear-gradient(135deg, var(--surface-alt), var(--bg-alt));
  border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted);
  aspect-ratio: 4 / 3;
}
.ph-img::after {
  content: attr(data-label); position: absolute; bottom: 0.9rem; left: 1rem; right: 1rem;
  font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); text-align: center;
}
.ph-img .ph-mono { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); color: color-mix(in srgb, var(--accent) 70%, var(--heading)); opacity: 0.55; }
.ph-img--wide { aspect-ratio: 16 / 9; }
.ph-img--tall { aspect-ratio: 3 / 4; }
.ph-img--hero { aspect-ratio: auto; height: 100%; min-height: 320px; }

/* ============================================================
   8. Hero
   ============================================================ */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(80% 60% at 78% 18%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 60%),
    radial-gradient(60% 50% at 12% 92%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 55%);
  opacity: 0.9;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 1.2rem; }
.hero .lead { margin-bottom: 1.8rem; max-width: 38ch; }
.hero-media { position: relative; }
.hero-media .ph-img { aspect-ratio: 4/5; box-shadow: var(--shadow-lg); }
.hero-float {
  position: absolute; bottom: -18px; left: -18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem;
}
.hero-float .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 920px) { .hero-float { left: auto; right: 12px; } }

/* Inner-page header */
.page-head { position: relative; overflow: hidden; padding-block: clamp(2.8rem, 7vw, 5rem) clamp(1.8rem, 5vw, 3rem); }
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem); margin-bottom: 1rem; letter-spacing: -0.02em; }
.page-head .lead { max-width: 60ch; }

.trust-row { display: flex; flex-wrap: wrap; gap: 1.4rem 2.2rem; align-items: center; margin-top: 2.4rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.trust-row .stat .n { font-family: var(--font-display); font-size: 1.7rem; color: var(--heading); display: block; line-height: 1; }
.trust-row .stat .l { font-size: 0.82rem; color: var(--muted); }

/* ============================================================
   9. Badges & pills
   ============================================================ */
.badge { display: inline-flex; align-items: center; gap: 0.4em; font-size: 0.74rem; font-weight: 650; letter-spacing: 0.04em; padding: 0.35em 0.7em; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-deep); text-transform: uppercase; }
[data-theme="dark"] .badge { color: var(--accent); }
.badge--gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: color-mix(in srgb, var(--gold) 75%, var(--heading)); }
.badge--neutral { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); }
.pkg-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.pkg-badges-label { font-size: 0.7rem; font-weight: 600; color: var(--muted); margin-right: 0.05rem; }
.pkg-badge {
  display: inline-flex; align-items: center;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1;
  padding: 0.42em 0.78em; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent-deep);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  white-space: nowrap;
}
[data-theme="dark"] .pkg-badge { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }

/* ============================================================
   10. Process steps
   ============================================================ */
.steps { counter-reset: step; }
.step { text-align: center; }
.step .num { font-family: var(--font-display); font-size: 1.1rem; color: var(--accent); display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; margin-bottom: 1.1rem; }
.step h3 { margin-bottom: 0.5rem; }
.num-lg { font-family: var(--font-display); font-size: 1.1rem; color: var(--accent); display: inline-grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; margin-bottom: 1rem; }
.step p { color: var(--muted); font-size: 0.97rem; }

/* Feature tiles */
.feature { text-align: center; }
.feature .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 1.1rem; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--muted); font-size: 0.97rem; }

/* ============================================================
   11. Package cards & pricing
   ============================================================ */
.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 980px) { .pkg-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }
.pkg {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.2rem); box-shadow: var(--shadow); display: flex; flex-direction: column;
  position: relative; height: 100%;
}
.pkg--featured { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.pkg--featured::before { content: "Most popular"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.35em 0.9em; border-radius: var(--radius-pill); }
.pkg-name { font-family: var(--font-display); font-size: 1.7rem; color: var(--heading); }
.pkg-target { font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }
.pkg-price { margin: 1.2rem 0 0.2rem; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.pkg-price .from { font-size: 0.8rem; color: var(--muted); width: 100%; margin-bottom: 0.1rem; }
.pkg-price .php { font-family: var(--font-display); font-size: 2.1rem; color: var(--heading); line-height: 1; }
.pkg-price .usd { font-size: 0.92rem; color: var(--muted); }
.pkg-tagline { color: var(--muted); font-size: 0.96rem; margin: 0.9rem 0 1.3rem; }
.pkg-list { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.6rem; }
.pkg-list li { display: flex; gap: 0.6rem; font-size: 0.93rem; color: var(--text); align-items: flex-start; }
.pkg-list svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 0.15rem; }
.pkg .btn { margin-top: auto; }

/* Bill of materials table */
.bom { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.bom th, .bom td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--line); }
.bom th { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.bom td.num, .bom th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bom tr:last-child td { border-bottom: 0; }
.bom .qty { color: var(--muted); }
.bom-total td { font-weight: 700; color: var(--heading); border-top: 2px solid var(--line-strong); font-size: 1rem; }
.bom-wrap { overflow-x: auto; }

details.bom-toggle { margin-top: 0.4rem; border-top: 1px solid var(--line); }
details.bom-toggle > summary { cursor: pointer; padding: 1rem 0 0.2rem; font-weight: 600; color: var(--accent); list-style: none; display: flex; align-items: center; gap: 0.4rem; }
details.bom-toggle > summary::-webkit-details-marker { display: none; }
details.bom-toggle > summary .chev { transition: transform 0.2s; }
details.bom-toggle[open] > summary .chev { transform: rotate(180deg); }

/* Add-on / fee rows */
.addon-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.4rem clamp(1.2rem, 3vw, 1.8rem); box-shadow: var(--shadow); }
.addon { display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.addon:last-child { border-bottom: 0; }
.addon-name { font-weight: 600; color: var(--heading); }
.addon-price { color: var(--accent); font-weight: 650; white-space: nowrap; }

/* ============================================================
   12. Catalog
   ============================================================ */
.cat-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.chip { font-size: 0.86rem; font-weight: 550; padding: 0.5em 1em; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: all 0.2s; }
.chip:hover { border-color: var(--line-strong); }
.chip.is-active { background: var(--heading); color: var(--bg); border-color: var(--heading); }

.cat-section { margin-bottom: clamp(2.4rem, 5vw, 3.6rem); scroll-margin-top: 100px; }
.cat-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.cat-section-head h3 { font-size: 1.4rem; }
.cat-section-head p { color: var(--muted); font-size: 0.9rem; }

.device-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 1040px) { .device-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .device-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .device-grid { grid-template-columns: 1fr; } }

.device {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.device:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.device .ph-img { aspect-ratio: 5/4; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.device-body { padding: 1.1rem 1.1rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.device-name { font-family: var(--font-sans); font-weight: 650; font-size: 1rem; color: var(--heading); line-height: 1.3; }
.device-desc { font-size: 0.86rem; color: var(--muted); margin-top: 0.5rem; flex: 1; }
.device-foot { margin-top: 1rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; }
.device-price .php { font-weight: 700; color: var(--heading); font-size: 1.1rem; }
.device-price .usd { font-size: 0.78rem; color: var(--muted); display: block; }
.device-price .incl { font-weight: 700; color: var(--accent); font-size: 1rem; }
.device .pkg-badges { margin-top: 0.8rem; }

/* ============================================================
   13. Support tiers
   ============================================================ */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 980px) { .support-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }
.tier-price { display: flex; align-items: baseline; gap: 0.4rem; margin: 0.8rem 0 0.3rem; }
.tier-price .php { font-family: var(--font-display); font-size: 1.9rem; color: var(--heading); }
.tier-price .per { color: var(--muted); font-size: 0.9rem; }
.tier-price .usd { color: var(--muted); font-size: 0.82rem; }

/* ============================================================
   14. FAQ accordion
   ============================================================ */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0; position: relative; font-weight: 600; color: var(--heading); font-size: 1.08rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--accent); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 1.4rem; color: var(--muted); max-width: 70ch; }

/* ============================================================
   15. Forms
   ============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--heading); }
.field label .req { color: var(--accent); }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: 0.98rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 130px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236a6f7a' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.4rem; }
.form-note { font-size: 0.82rem; color: var(--muted); }
.form-status { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); font-size: 0.92rem; display: none; }
.form-status.is-ok { display: block; background: var(--accent-soft); color: var(--accent-deep); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.form-status.is-err { display: block; background: #fdeceb; color: #b3261e; border: 1px solid #f3c0bc; }

/* ============================================================
   16. Footer
   ============================================================ */
.site-footer { padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; } }
@media (max-width: 460px) { .footer-top { grid-template-columns: 1fr; } }
.footer-col h5 { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; font-weight: 650; }
.footer-col a { display: block; color: var(--text); font-size: 0.94rem; padding: 0.3rem 0; }
.footer-col a:hover { color: var(--accent); }
.footer-brand .brand { margin-bottom: 1rem; display: inline-flex; }
.footer-brand p { color: var(--muted); font-size: 0.92rem; max-width: 30ch; }
.social-row { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.social-row a { width: 42px; height: 42px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--text); padding: 0; }
.social-row a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.social-row svg { width: 20px; height: 20px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding-top: 1.8rem; font-size: 0.85rem; color: var(--muted); }

/* ============================================================
   17. CTA strip
   ============================================================ */
.cta-strip { border-radius: var(--radius-lg); padding: clamp(2.4rem, 5vw, 4rem); text-align: center; position: relative; overflow: hidden; }
.cta-strip .hero-bg { opacity: 0.5; }
.cta-strip > * { position: relative; z-index: 1; }
.cta-strip h2 { margin-bottom: 0.8rem; }
.cta-strip p { color: var(--muted); margin-bottom: 1.8rem; max-width: 50ch; margin-inline: auto; }

/* ============================================================
   18. Misc utilities
   ============================================================ */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.8rem; } .mt-2 { margin-top: 1.6rem; } .mt-3 { margin-top: 2.4rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1.6rem; }
.hidden { display: none !important; }
#site-header { display: block; min-height: var(--header-h); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sr-skip { position: fixed; left: 50%; top: 10px; transform: translate(-50%, -160%); z-index: 200; background: var(--accent); color: #fff; padding: 0.6rem 1.1rem; border-radius: var(--radius-pill); font-size: 0.9rem; font-weight: 600; transition: transform 0.2s var(--ease); }
.sr-skip:focus { transform: translate(-50%, 0); color: #fff; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.4rem 0; }
.checklist svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 0.18rem; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.req-table { width: 100%; border-collapse: collapse; }
.req-table th, .req-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.req-table th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.req-table td:first-child { font-weight: 600; color: var(--heading); }

/* ============================================================
   19. HA dashboard mockups (live inline HTML/CSS, dark UI)
   ============================================================ */
.dash-showcase { position: relative; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 1.5rem; }
.device-ipad {
  --d-bg: #0e1316; --d-card: #171f24; --d-card2: #1d272c; --d-text: #eaeef0; --d-muted: #8b969c;
  --d-accent: #1fb89f; --d-line: rgba(255,255,255,0.08); --d-warm: #e0a23c;
  width: 100%; max-width: 620px; aspect-ratio: 4 / 3; background: #05080a; border-radius: 26px;
  padding: 14px; box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,0.04); flex: none;
}
.device-ipad .screen { width: 100%; height: 100%; border-radius: 14px; overflow: hidden; }
.device-iphone {
  --d-bg: #0e1316; --d-card: #171f24; --d-card2: #1d272c; --d-text: #eaeef0; --d-muted: #8b969c;
  --d-accent: #1fb89f; --d-line: rgba(255,255,255,0.08);
  width: 150px; aspect-ratio: 9 / 19; background: #05080a; border-radius: 26px; padding: 7px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,0.05);
  position: absolute; right: -6px; bottom: -8px; flex: none;
}
.device-iphone .screen { width: 100%; height: 100%; border-radius: 20px; overflow: hidden; position: relative; }
.device-iphone .island { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 42px; height: 12px; background: #05080a; border-radius: 99px; z-index: 2; }
@media (max-width: 560px) { .device-iphone { display: none; } }

.dash { background: var(--d-bg); color: var(--d-text); height: 100%; padding: clamp(0.7rem, 2.2vw, 1.1rem); display: flex; flex-direction: column; gap: 0.6rem; font-size: 12px; }
.dash-top { display: flex; align-items: center; justify-content: space-between; }
.dash-brand { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-display); font-size: 0.95rem; color: #fff; }
.dash-brand b { color: var(--d-accent); font-weight: 600; }
.dash-brand .brand-mark { width: 18px; height: 18px; color: var(--d-accent); }
.dash-meta { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--d-muted); font-size: 0.78rem; }
.dash-meta .dot2 { width: 3px; height: 3px; border-radius: 50%; background: var(--d-muted); }
.dash-label { color: var(--d-muted); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 0.2rem; }
.dash-scenes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; }
.dash-scene { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.6rem 0.3rem; border-radius: 11px; background: var(--d-card); border: 1px solid var(--d-line); color: var(--d-text); font-size: 0.72rem; font-weight: 550; cursor: default; }
.dash-scene .ic { width: 18px; height: 18px; color: var(--d-muted); }
.dash-scene.is-active { background: color-mix(in srgb, var(--d-accent) 22%, var(--d-card)); border-color: var(--d-accent); color: #fff; }
.dash-scene.is-active .ic { color: var(--d-accent); }
.dash-rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.dash-room { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 11px; padding: 0.6rem 0.7rem; }
.room-head { display: flex; align-items: center; justify-content: space-between; }
.room-name { font-weight: 600; color: #fff; font-size: 0.8rem; }
.room-meta { color: var(--d-muted); font-size: 0.72rem; margin-top: 0.15rem; }
.dash-toggle { width: 30px; height: 17px; border-radius: 99px; background: #2c373d; position: relative; flex: none; }
.dash-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: 0.2s; }
.dash-toggle.on { background: var(--d-accent); }
.dash-toggle.on::after { left: 15px; }
.dash-bar { height: 4px; border-radius: 99px; background: #2c373d; margin-top: 0.5rem; overflow: hidden; }
.dash-bar > span { display: block; height: 100%; background: var(--d-accent); border-radius: 99px; }
.dash-foot { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.dash-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; color: var(--d-muted); background: var(--d-card); border: 1px solid var(--d-line); padding: 0.28rem 0.5rem; border-radius: 99px; }
.dash-chip.ok { color: var(--d-accent); border-color: color-mix(in srgb, var(--d-accent) 40%, transparent); }
.dash-chip svg { width: 12px; height: 12px; }

/* phone-compact dashboard */
.dash--phone { gap: 0.5rem; padding-top: 1.6rem; font-size: 11px; }
.dash--phone .dash-scenes { grid-template-columns: 1fr 1fr; }
.dash-brand.sm { font-size: 0.85rem; }

/* sim-room dashboard */
.dash--sim { justify-content: flex-start; gap: 0.7rem; }
.sim-start { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.9rem; border-radius: 13px; background: var(--d-accent); color: #03110e; font-weight: 700; font-size: 0.95rem; border: 0; cursor: default; }
.sim-start .sim-dot { width: 9px; height: 9px; border-radius: 50%; background: #03110e; box-shadow: 0 0 0 4px rgba(3,17,14,0.25); }
.sim-controls { display: flex; flex-direction: column; gap: 0.4rem; }
.sim-row { display: flex; align-items: center; justify-content: space-between; background: var(--d-card); border: 1px solid var(--d-line); border-radius: 10px; padding: 0.55rem 0.7rem; font-size: 0.78rem; color: var(--d-text); }
.sim-row > span:first-child { color: var(--d-muted); }

/* ============================================================
   20. Real images (lifestyle cover slots + product shots)
   ============================================================ */
.ph-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-img:has(img)::after { display: none; }
.ph-img:has(img) .ph-mono { display: none; }
/* Product shots sit on a light card, contained (never cropped) */
.device-media { aspect-ratio: 5 / 4; background: #ffffff; border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 14px; }
.device-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
[data-theme="dark"] .device-media { background: #f2f1ec; }

/* ============================================================
   21. Gallery carousel
   ============================================================ */
.gallery { position: relative; margin-top: clamp(1.5rem, 3vw, 2.2rem); }
.gallery-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 0.5rem 0 1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item { flex: 0 0 auto; width: clamp(258px, 34vw, 380px); margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); scroll-snap-align: start; background: var(--surface-alt); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); color: var(--heading); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; place-items: center; cursor: pointer; transition: background 0.2s, transform 0.15s; }
.gallery-nav:hover { background: var(--bg-alt); }
.gallery-nav:active { transform: translateY(-50%) scale(0.93); }
.gallery-nav svg { width: 22px; height: 22px; }
.gallery-nav.prev { left: 6px; }
.gallery-nav.next { right: 6px; }
@media (max-width: 680px) { .gallery-nav { display: none; } }

/* Product-page link on catalog cards */
.device-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.85rem; font-size: 0.82rem; font-weight: 600; color: var(--accent); }
.device-link svg { width: 13px; height: 13px; }
.device-link:hover { color: var(--accent-deep); }
