/* ===========================================================
   RESIDENTIAL NETWORK — Site-wide Design System
   =========================================================== */

:root {
  --rn-blue: #5285BD;
  --rn-blue-light: #7BA8D9;
  --rn-blue-deep: #3A6A9F;
  --rn-blue-soft: #EDF3FA;
  --rn-blue-mist: #DCE8F4;
  --rn-navy: #1E2A36;
  --rn-navy-deep: #131C25;
  --rn-navy-soft: #2C3A48;
  --rn-white: #FFFFFF;
  --rn-paper: #FAFBFC;
  --rn-bg: #F4F6F9;
  --rn-line: #E4E8EE;
  --rn-line-deep: #C9D1DC;
  --rn-text: #0F1721;
  --rn-text-muted: #4A5568;
  --rn-text-light: #788596;
  --status-ok: #10B981;
  --status-watch: #F59E0B;
  --status-fix: #EF4444;
  --font-display: 'Satoshi', 'Inter', -apple-system, sans-serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  --container: 1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* When jumping to an in-page anchor (#section), give content room to clear the sticky header */
section[id], h1[id], h2[id], h3[id] { scroll-margin-top: 88px; }
body {
  font-family: var(--font-sans);
  color: var(--rn-text);
  background: var(--rn-paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* Announce */
.announce {
  background: var(--rn-navy-deep);
  color: rgba(255,255,255,0.85);
  padding: 9px 0;
  font-size: 13px;
  text-align: center;
  letter-spacing: -0.005em;
}
.announce strong { color: var(--rn-blue-light); font-weight: 600; }
.announce a { color: var(--rn-blue-light); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(123,168,217,0.3); text-underline-offset: 3px; }
.announce a:hover { text-decoration-color: var(--rn-blue-light); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 120;
  background: rgba(250, 251, 252, 0.85);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--rn-line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--rn-text);
  letter-spacing: -0.025em;
}
.logo-mark {
  width: 38px; height: 38px;
  background: var(--rn-navy);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-mark img { width: 110%; height: 110%; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; gap: 3px; }
.logo-text small {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rn-text-light);
}
.nav-links {
  display: flex; gap: 30px; align-items: center;
  font-size: 14px; font-weight: 500;
}
.nav-links a { transition: color 0.2s; letter-spacing: -0.01em; }
.nav-links a:hover, .nav-links a.active { color: var(--rn-blue); }
.nav-cta-group { display: flex; align-items: center; gap: 14px; }
.nav-phone {
  font-weight: 600; color: var(--rn-text); font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; letter-spacing: -0.01em;
}
.nav-phone:hover { color: var(--rn-blue); }
.nav-phone svg { color: var(--rn-text-light); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--rn-navy);
  color: white;
  box-shadow: 0 1px 2px rgba(15,23,33,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
}
.btn-primary:hover { background: var(--rn-navy-deep); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,23,33,0.18); }
.btn-blue {
  background: var(--rn-blue); color: white;
  box-shadow: 0 1px 2px rgba(82,133,189,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-blue:hover { background: var(--rn-blue-deep); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(58,106,159,0.32); }
.btn-outline { background: transparent; color: var(--rn-text); border: 1px solid var(--rn-line-deep); }
.btn-outline:hover { background: var(--rn-text); color: white; border-color: var(--rn-text); }
.btn-ghost {
  background: white; color: var(--rn-text);
  border: 1px solid var(--rn-line);
  box-shadow: 0 1px 2px rgba(15,23,33,0.04);
}
.btn-ghost:hover { border-color: var(--rn-text); }
.btn-large { padding: 14px 24px; font-size: 14.5px; }
.btn-arrow { transition: transform 0.2s; display: inline-flex; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--rn-text); position: relative; z-index: 110; transition: color 0.2s; }
.mobile-toggle .icon-close { display: none; }
.mobile-toggle.is-open { color: white; }
.mobile-toggle.is-open .icon-open { display: none; }
.mobile-toggle.is-open .icon-close { display: block; }

/* Mobile navigation drawer — hidden by default on all sizes, controlled by JS toggle */
.mobile-drawer {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 105;
  background: var(--rn-navy);
  transform: translateY(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  max-height: 100vh;
  overflow-y: auto;
}
.mobile-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.mobile-drawer-inner {
  padding: 130px 24px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.mobile-drawer-links {
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-drawer-links a {
  display: block;
  padding: 18px 4px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.15s, padding-left 0.15s;
}
.mobile-drawer-links a:hover,
.mobile-drawer-links a:active,
.mobile-drawer-links a.active {
  color: var(--rn-blue-light);
  padding-left: 8px;
}
.mobile-drawer-ctas {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 28px;
}
.btn-block { width: 100%; justify-content: center; }
.mobile-drawer-ctas .btn-ghost {
  background: rgba(255,255,255,0.06);
  color: white;
  border: 1px solid rgba(255,255,255,0.18);
}
.mobile-drawer-ctas .btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  color: white;
  border-color: rgba(255,255,255,0.28);
}
/* Prevent page scrolling while drawer is open */
body.drawer-open { overflow: hidden; }

/* Page hero (used on subpages) */
.page-hero {
  position: relative; overflow: hidden;
  padding: 80px 0 80px;
  background: var(--rn-paper);
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 33, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 33, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  -webkit-mask: linear-gradient(180deg, black, transparent);
  mask: linear-gradient(180deg, black, transparent);
}
.page-hero::after {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(82, 133, 189, 0.1), transparent 60%);
  pointer-events: none;
}
.page-hero-inner { position: relative; max-width: 720px; }
.page-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--rn-line);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rn-blue-deep);
  margin-bottom: 24px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--rn-text);
  margin-bottom: 20px;
}
.page-hero h1 .highlight { color: var(--rn-blue); }
.page-hero h1 .light { color: var(--rn-text-muted); font-weight: 500; }
.page-hero p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--rn-text-muted);
  letter-spacing: -0.005em;
  margin-bottom: 32px;
}
.page-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* Breadcrumbs */
.crumbs {
  font-size: 13px;
  color: var(--rn-text-light);
  margin-bottom: 24px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.crumbs a { color: var(--rn-text-muted); }
.crumbs a:hover { color: var(--rn-blue); }
.crumbs span { color: var(--rn-line-deep); margin: 0 8px; }

/* Section shared */
.section { padding: 100px 0; position: relative; }
.section-sm { padding: 64px 0; }
.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rn-blue);
  margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px;
}
.section-eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--rn-blue); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--rn-text);
  margin-bottom: 20px;
}
.section-title .highlight { color: var(--rn-blue); }
.section-title .light { color: var(--rn-text-muted); font-weight: 500; }
.section-sub {
  font-size: 17px;
  color: var(--rn-text-muted);
  max-width: 640px;
  line-height: 1.6;
  letter-spacing: -0.005em;
}
.section-head { margin-bottom: 56px; max-width: 720px; }
.section-head-center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head-center .section-eyebrow { justify-content: center; }
.section-head-center .section-eyebrow::before { display: none; }
.section-head-center .section-eyebrow::after { content: ''; width: 24px; height: 1px; background: var(--rn-blue); }
.section-head-center .section-sub { margin-left: auto; margin-right: auto; }

/* Dark section variant */
.section-dark {
  background: var(--rn-navy);
  color: white;
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  -webkit-mask: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent);
  mask: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent);
}
.section-dark .section-title { color: white; }
.section-dark .section-title .highlight { color: var(--rn-blue-light); }
.section-dark .section-eyebrow { color: var(--rn-blue-light); }
.section-dark .section-eyebrow::before, .section-dark .section-eyebrow::after { background: var(--rn-blue-light); }
.section-dark .section-sub { color: rgba(255,255,255,0.7); }

/* Generic content prose */
.prose {
  max-width: 720px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--rn-text);
}
.prose p { margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 48px 0 16px;
  color: var(--rn-text);
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 36px 0 12px;
  color: var(--rn-text);
}
.prose ul, .prose ol { margin: 18px 0 18px 24px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--rn-text); font-weight: 700; }

/* Cards generic */
.card {
  background: white;
  border: 1px solid var(--rn-line);
  border-radius: 14px;
  padding: 30px 28px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(15,23,33,0.12);
  border-color: var(--rn-blue);
}

/* Service grid (homepage + services index) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.service-card {
  position: relative;
  background: white;
  border: 1px solid var(--rn-line);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-2px); border-color: var(--rn-text); box-shadow: 0 14px 28px -12px rgba(15,23,33,0.18); }
.service-card-image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--rn-blue-soft), var(--rn-blue-mist));
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--rn-line);
  overflow: hidden;
}
.service-card-image.has-photo { background: none; }
.service-card-image.has-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Illustrated thumbnail variants — simplified icons for cards without photos */
.service-card-image.illustrated {
  position: relative;
  background:
    radial-gradient(circle at 30% 25%, rgba(82,133,189,0.12), transparent 60%),
    linear-gradient(135deg, var(--rn-blue-soft), var(--rn-blue-mist));
}
.service-card-image.illustrated::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(82,133,189,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82,133,189,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  -webkit-mask: radial-gradient(ellipse 75% 75% at 50% 50%, black, transparent);
  mask: radial-gradient(ellipse 75% 75% at 50% 50%, black, transparent);
}
.service-card-image.illustrated svg {
  position: relative;
  z-index: 1;
  width: 38%;
  height: auto;
  max-width: 110px;
  color: var(--rn-blue-deep);
  opacity: 0.85;
}
/* Dark-themed illustrated cards (Thermal, Drone) */
.service-card-image.illustrated.dark {
  background:
    radial-gradient(circle at 30% 25%, rgba(82,133,189,0.25), transparent 60%),
    linear-gradient(135deg, var(--rn-navy), #2A3845);
}
.service-card-image.illustrated.dark::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
}
.service-card-image.illustrated.dark svg {
  color: var(--rn-blue-light);
  opacity: 0.95;
}
.service-card-image-label {
  /* Hidden — placeholder cards just show the clean gradient without ugly text */
  display: none;
}
.service-card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.service-card-tag {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--rn-blue);
  margin-bottom: 10px;
}
.service-card h4 {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700; line-height: 1.2;
  color: var(--rn-text);
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}
.service-card p {
  color: var(--rn-text-muted);
  font-size: 13.5px; line-height: 1.5;
  flex: 1; margin-bottom: 16px;
  letter-spacing: -0.005em;
}
.service-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--rn-line);
}
.service-card-price {
  font-family: var(--font-display);
  font-weight: 700; font-size: 16px;
  color: var(--rn-text);
  letter-spacing: -0.02em;
}
.service-card-price small {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 500;
  color: var(--rn-text-light);
  margin-left: 3px; letter-spacing: -0.005em;
}
.service-card-arrow { color: var(--rn-blue); transition: transform 0.2s; display: inline-flex; }
.service-card:hover .service-card-arrow { transform: translateX(4px); }
.service-card.included { background: var(--rn-navy); color: white; border-color: var(--rn-navy); }
.service-card.included h4 { color: white; }
.service-card.included p { color: rgba(255,255,255,0.7); }
.service-card.included .service-card-tag { color: var(--rn-blue-light); }
.service-card.included .service-card-price { color: white; }
.service-card.included .service-card-meta { border-color: rgba(255,255,255,0.12); }
.service-card.included .service-card-image {
  background: linear-gradient(135deg, var(--rn-navy-soft), var(--rn-navy-deep));
  border-bottom-color: rgba(255,255,255,0.08);
}
.service-card.included .service-card-image-label {
  background: rgba(123,168,217,0.15); color: var(--rn-blue-light);
  border: 1px solid rgba(123,168,217,0.25);
}
.service-card.included .service-card-arrow { color: var(--rn-blue-light); }

/* Trust bar */
.trust-bar {
  background: white;
  border-top: 1px solid var(--rn-line);
  border-bottom: 1px solid var(--rn-line);
  padding: 26px 0;
}
.trust-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.trust-bar-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rn-text-light);
}
.trust-badges { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.trust-badge {
  display: flex; align-items: center; gap: 10px;
  color: var(--rn-text); font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
}
.trust-badge-icon {
  width: 28px; height: 28px;
  background: var(--rn-blue-soft);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--rn-blue-deep);
  flex-shrink: 0;
}
.trust-badge-icon svg { width: 15px; height: 15px; }

/* Final CTA */
.final-cta {
  padding: 100px 0 120px;
  text-align: center;
  background: var(--rn-paper);
  position: relative; overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 33, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 33, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  -webkit-mask: radial-gradient(ellipse 60% 80% at 50% 50%, black, transparent);
  mask: radial-gradient(ellipse 60% 80% at 50% 50%, black, transparent);
}
.final-cta::after {
  content: '';
  position: absolute;
  bottom: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(82,133,189,0.1), transparent 60%);
  pointer-events: none;
}
.final-cta-content { position: relative; max-width: 720px; margin: 0 auto; }
.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--rn-text);
  margin-bottom: 24px;
}
.final-cta h2 .highlight { color: var(--rn-blue); }
.final-cta p {
  font-size: 19px; color: var(--rn-text-muted);
  margin-bottom: 36px; line-height: 1.55; letter-spacing: -0.005em;
}
.final-cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer {
  background: var(--rn-navy-deep);
  color: rgba(255,255,255,0.65);
  padding: 80px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}
.footer-brand {
  color: white;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  margin-bottom: 16px; letter-spacing: -0.025em;
}
.footer p { font-size: 14px; line-height: 1.6; margin-bottom: 18px; max-width: 320px; letter-spacing: -0.005em; }
.footer-col h4 {
  color: white;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px; color: rgba(255,255,255,0.6);
  transition: color 0.2s; letter-spacing: -0.005em;
}
.footer-col a:hover { color: var(--rn-blue-light); }
.footer-social { display: flex; gap: 10px; margin-top: 24px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--rn-blue); color: white; transform: translateY(-1px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 12.5px; color: rgba(255,255,255,0.4);
  letter-spacing: -0.005em;
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--rn-blue-light); }

/* Responsive */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .nav-links, .nav-phone { display: none; }
  .mobile-toggle { display: block; }
  .section { padding: 64px 0; }
  .page-hero { padding: 56px 0 56px; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
