/* ================================================================
   PermitSiren — Design System v4.0 "Apex" · Dark & Light Themes
   ================================================================ */

:root {
  /* Core Palette (Dark Mode Default) */
  --bg: #060911;
  --bg-subtle: #0A0F1E;
  --bg-raised: #0F172A;
  --bg-elevated: #162036;

  /* Surfaces & Glass */
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.065);
  --surface-active: rgba(255, 255, 255, 0.09);
  --surface-glass: rgba(10, 15, 30, 0.72);

  /* Lines & Borders */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-focus: rgba(255, 107, 71, 0.6);

  /* Typography Colors */
  --ink: #F1F5F9;
  --ink-heading: #FFFFFF;
  --muted: #94A3B8;
  --faint: #64748B;

  /* Brand Accents */
  --accent: #FF643D;
  --accent-hover: #FF7B57;
  --accent-active: #E8502B;
  --accent-soft: rgba(255, 100, 61, 0.12);
  --accent-glow: rgba(255, 100, 61, 0.25);
  --accent-gradient: linear-gradient(135deg, #FF643D 0%, #FFA133 100%);
  --accent-gradient-hover: linear-gradient(135deg, #FF7B57 0%, #FFB04D 100%);

  /* Status Colors */
  --ok: #10B981;
  --ok-soft: rgba(16, 185, 129, 0.12);
  --warn: #F59E0B;
  --warn-soft: rgba(245, 158, 11, 0.12);
  --err: #EF4444;
  --err-soft: rgba(239, 68, 68, 0.12);
  --blue: #3B82F6;
  --blue-soft: rgba(59, 130, 246, 0.12);

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 32px var(--accent-glow);

  /* Geometry & Typography */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-full: 9999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   Light Theme Precision Tokens
   ================================================================ */
[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-subtle: #F1F5F9;
  --bg-raised: #FFFFFF;
  --bg-elevated: #FFFFFF;

  --surface: rgba(15, 23, 42, 0.035);
  --surface-hover: rgba(15, 23, 42, 0.055);
  --surface-active: rgba(15, 23, 42, 0.08);
  --surface-glass: rgba(255, 255, 255, 0.85);

  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.15);
  --line-focus: rgba(232, 80, 43, 0.6);

  --ink: #1E293B;
  --ink-heading: #0F172A;
  --muted: #475569;
  --faint: #64748B;

  --accent: #E8502B;
  --accent-hover: #D94420;
  --accent-active: #C23917;
  --accent-soft: rgba(232, 80, 43, 0.09);
  --accent-glow: rgba(232, 80, 43, 0.18);
  --accent-gradient: linear-gradient(135deg, #E8502B 0%, #F57C00 100%);
  --accent-gradient-hover: linear-gradient(135deg, #D94420 0%, #E66A00 100%);

  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.1);
  --warn: #D97706;
  --warn-soft: rgba(217, 119, 6, 0.1);
  --err: #DC2626;
  --err-soft: rgba(220, 38, 38, 0.1);
  --blue: #2563EB;
  --blue-soft: rgba(37, 99, 235, 0.1);

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 28px var(--accent-glow);

  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

/* ================================================================
   Reset & Base Styles
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark light;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 100, 61, 0.3);
  color: #FFFFFF;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #CBD5E1;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}
.skip:focus {
  left: 20px;
}

/* ================================================================
   Ambient Lighting & Background Grid
   ================================================================ */
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  background:
    radial-gradient(1200px 600px at 50% -120px, rgba(255, 100, 61, 0.12), transparent 70%),
    radial-gradient(850px 480px at 90% 15%, rgba(59, 130, 246, 0.07), transparent 70%),
    radial-gradient(700px 450px at 10% 40%, rgba(16, 185, 129, 0.05), transparent 72%);
}

[data-theme="light"] .glow {
  background:
    radial-gradient(1100px 560px at 50% -120px, rgba(232, 80, 43, 0.08), transparent 68%),
    radial-gradient(850px 480px at 90% 15%, rgba(59, 130, 246, 0.05), transparent 70%);
}

.dotgrid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 60%);
}

[data-theme="light"] .dotgrid {
  background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

/* ================================================================
   Navigation Bar
   ================================================================ */
.nav {
  position: sticky;
  top: 14px;
  z-index: 100;
  padding: 0 clamp(12px, 3vw, 28px);
}

.nav .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  max-width: 1160px;
  margin-inline: auto;
  min-height: 62px;
  padding: 7px 8px 7px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 55%),
    var(--surface-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

[data-theme="light"] .nav {
  box-shadow: 0 24px 60px -38px rgba(15, 23, 42, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0;
  font-size: 1.12rem;
  color: var(--ink-heading);
  transition: transform 0.2s var(--ease-spring);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(255, 100, 61, 0.35));
}

.nav-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.navlinks {
  display: contents;
}

.nav-primary > a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  padding: 10px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-primary > a:hover,
.nav-primary > a.active {
  color: var(--ink-heading);
  background: var(--surface-hover);
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  transition: all 0.18s ease;
}

.lang-pill:hover {
  color: var(--ink-heading);
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

/* Theme Switcher Button with Spring Icon */
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.theme-btn:hover {
  color: var(--ink-heading);
  border-color: var(--line-strong);
  background: var(--surface-hover);
  transform: rotate(12deg) scale(1.05);
}

.theme-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}

.theme-btn .icon-sun { display: none; }
.theme-btn .icon-moon { display: block; }
[data-theme="light"] .theme-btn .icon-sun { display: block; }
[data-theme="light"] .theme-btn .icon-moon { display: none; }

.menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-heading);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.15s ease;
}

.menu-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
}

.nav .nav-cta {
  height: 37px;
  padding: 0 16px;
  border-radius: var(--radius-full);
}

/* ================================================================
   Buttons & Action Elements
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, opacity 0.15s ease, background 0.2s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.65s var(--ease-smooth);
  pointer-events: none;
}

.btn:hover::after {
  transform: translateX(130%);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--ink-heading);
  color: #060911;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .btn-primary {
  background: #0F172A;
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 16px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.btn-accent {
  background: var(--accent-gradient);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 28px var(--accent-glow);
}

.btn-accent:hover {
  background: var(--accent-gradient-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 36px rgba(255, 100, 61, 0.4);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--ink-heading);
  border-color: var(--ink-heading);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1.04rem;
  border-radius: var(--radius-lg);
}

/* ================================================================
   Hero Section & Interactive Trade Selector
   ================================================================ */
.hero {
  padding: 88px 0 76px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(6, 9, 17, 0) 58%, #060911 100%),
    linear-gradient(100deg, rgba(6, 9, 17, 0.98) 0%, rgba(6, 9, 17, 0.93) 38%, rgba(6, 9, 17, 0.58) 70%, rgba(6, 9, 17, 0.24) 100%),
    url("../assets/hero-roofing.webp") right center / cover no-repeat;
}

[data-theme="light"] .hero::before {
  background:
    linear-gradient(to bottom, rgba(248, 250, 252, 0) 58%, #F8FAFC 100%),
    linear-gradient(100deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.94) 38%, rgba(248, 250, 252, 0.62) 70%, rgba(248, 250, 252, 0.28) 100%),
    url("../assets/hero-roofing.webp") right center / cover no-repeat;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  width: fit-content;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-glow 2.2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

h1 {
  font-size: clamp(2.8rem, 5.8vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink-heading);
  text-wrap: balance;
}

h1 .dim {
  color: var(--faint);
  font-weight: 500;
}

.sub {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.65;
  max-width: 34rem;
  margin: 24px 0 32px;
  text-wrap: pretty;
}

.sub strong {
  color: var(--ink);
  font-weight: 600;
}

/* Signup Card & Interactive Chips */
.signup-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  max-width: 36rem;
}

.signup-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  transition: all 0.2s var(--ease-spring);
}

.tchip svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s var(--ease-spring);
}

.tchip:hover {
  color: var(--ink-heading);
  border-color: var(--line-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.tchip:hover svg {
  transform: scale(1.15);
}

.tchip.on {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(255, 100, 61, 0.45);
  box-shadow: 0 0 16px rgba(255, 100, 61, 0.15);
}

.signup-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signup-bar input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 13px 18px;
  font-size: 0.96rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-heading);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

[data-theme="light"] .signup-bar input[type="email"] {
  background: #FFFFFF;
}

.signup-bar input[type="email"]::placeholder {
  color: var(--faint);
}

.signup-bar input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: rgba(255, 255, 255, 0.08);
}

.fineprint {
  color: var(--faint);
  font-size: 0.84rem;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fineprint svg {
  width: 14px;
  height: 14px;
  stroke: var(--ok);
  fill: none;
  flex-shrink: 0;
}

/* ================================================================
   Live Permit Feed Panel
   ================================================================ */
.feedpanel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .feedpanel {
  background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.feedpanel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05) 40%, rgba(255, 100, 61, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .feed-head {
  background: rgba(15, 23, 42, 0.02);
}

.feed-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-heading);
}

.feed-meta {
  font-size: 0.76rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.feed-tabs::-webkit-scrollbar { display: none; }

.ftab {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all 0.18s ease;
}

.ftab.on {
  color: var(--ink-heading);
  background: var(--surface-hover);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.ftab:not(.on):hover {
  color: var(--ink-heading);
  background: var(--surface);
}

.feed-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 310px;
  max-height: 440px;
  overflow-y: auto;
}

/* Individual Permit Card */
.permit-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.22s var(--ease-spring);
  animation: cardIn 0.45s var(--ease-spring) backwards;
}

.permit-card:nth-child(1) { animation-delay: 0.04s; }
.permit-card:nth-child(2) { animation-delay: 0.10s; }
.permit-card:nth-child(3) { animation-delay: 0.16s; }
.permit-card:nth-child(4) { animation-delay: 0.22s; }

.permit-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.permit-card.spotlight {
  border-color: rgba(255, 100, 61, 0.6);
  background: rgba(255, 100, 61, 0.07);
  box-shadow: 0 0 20px rgba(255, 100, 61, 0.2);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.pc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tag-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
}

.tag.solar { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.tag.hvac { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.tag.electrical { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.tag.plumbing { background: rgba(14, 165, 233, 0.15); color: #38BDF8; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }

.tag-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
}

.a-time {
  font-size: 0.74rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.a-addr {
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0;
  color: var(--ink-heading);
  margin-bottom: 4px;
}

.a-desc {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skeleton {
  height: 72px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 40%, rgba(255, 255, 255, 0.08) 50%, var(--surface) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

[data-theme="light"] .skeleton {
  background: linear-gradient(100deg, rgba(15, 23, 42, 0.04) 40%, rgba(15, 23, 42, 0.09) 50%, rgba(15, 23, 42, 0.04) 60%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* ================================================================
   Trust Marquee
   ================================================================ */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  position: relative;
  background: rgba(255, 255, 255, 0.015);
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.mq-track {
  display: flex;
  gap: 52px;
  width: max-content;
  padding: 19px 0;
  animation: mq-scroll 45s linear infinite;
}

.mq-track:hover {
  animation-play-state: paused;
}

.mq-track span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--faint);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mq-track span b {
  color: var(--muted);
  font-weight: 600;
}

@keyframes mq-scroll {
  to { transform: translateX(-50%); }
}

/* ================================================================
   Stats Band
   ================================================================ */
.statband {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.statband .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding: 40px 24px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat b {
  display: block;
  font-size: 2.35rem;
  font-weight: 600;
  letter-spacing: 0;
  background: linear-gradient(115deg, #FFFFFF 30%, #94A3B8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 4px;
}

[data-theme="light"] .stat b {
  background: linear-gradient(115deg, #0F172A 30%, #475569);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ================================================================
   Section Standard Styles
   ================================================================ */
.section {
  padding: 96px 0;
  scroll-margin-top: 80px;
}

[id] {
  scroll-margin-top: 80px;
}

.kicker2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  letter-spacing: 0;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink-heading);
  text-wrap: balance;
}

.section-header {
  margin-bottom: 48px;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 42rem;
  margin-top: 16px;
  text-wrap: pretty;
}

/* ================================================================
   Bento / How It Works Tiles
   ================================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  list-style: none;
}

.tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 30px;
  overflow: hidden;
  transition: border-color 0.22s ease, transform 0.22s var(--ease-spring), box-shadow 0.22s ease;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 100, 61, 0.12), transparent 65%);
  transition: opacity 0.25s ease;
}

.tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.tile:hover::before {
  opacity: 1;
}

[data-theme="light"] .tile::before {
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 80, 43, 0.08), transparent 65%);
}

.tile h3 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-heading);
  margin: 18px 0 8px;
  position: relative;
}

.tile p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  position: relative;
}

.t-wide { grid-column: span 6; }
.t-half { grid-column: span 3; }
.t-third { grid-column: span 2; }

.tile-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 100, 61, 0.25);
  transition: transform 0.22s var(--ease-spring);
  position: relative;
}

.tile:hover .tile-icon {
  transform: scale(1.1) rotate(-3deg);
}

.tile-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-dev {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  vertical-align: middle;
  margin-left: 6px;
}

/* ================================================================
   Interactive ROI & Opportunity Calculator
   ================================================================ */
.calc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-group label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-heading);
  margin-bottom: 10px;
}

.calc-val-badge {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-active);
  outline: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gradient);
  cursor: pointer;
  box-shadow: 0 2px 10px var(--accent-glow);
  border: 2px solid #FFFFFF;
  transition: transform 0.15s var(--ease-spring);
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-heading);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

[data-theme="light"] .calc-select {
  background: #FFFFFF;
}

.calc-result-box {
  background: linear-gradient(135deg, rgba(255, 100, 61, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 100, 61, 0.35);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.calc-metric-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.calc-big-num {
  font-size: 2.9rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink-heading);
  font-variant-numeric: tabular-nums;
}

.calc-subtext {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.calc-subtext b {
  color: var(--ok);
}

/* ================================================================
   Multi-Channel Alert Sandbox / Simulator
   ================================================================ */
.sandbox-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.starget-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.starget-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.starget-btn:hover {
  color: var(--ink-heading);
  border-color: var(--line-strong);
}

.starget-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(255, 100, 61, 0.5);
  box-shadow: 0 0 16px rgba(255, 100, 61, 0.15);
}

.sandbox-viewport {
  max-width: 520px;
  margin: 0 auto;
}

.sandbox-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.sandbox-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* iOS Push Notification Card */
.ios-frame {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow-lg);
  color: #FFFFFF;
}

[data-theme="light"] .ios-frame {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0F172A;
}

.ios-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.ios-app-info {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--ink-heading);
}

.ios-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--accent-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
}

.ios-title {
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--ink-heading);
}

.ios-body {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Webhook Code Preview */
.code-preview {
  background: #0B0F19;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  color: #E2E8F0;
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
}

.code-preview .k { color: #F472B6; }
.code-preview .s { color: #34D399; }
.code-preview .n { color: #60A5FA; }

/* ================================================================
   Comparison Section
   ================================================================ */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
}

.cmp-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 30px;
}

.cmp-side.win {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05), var(--surface) 60%);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.08);
}

.cmp-vs {
  display: grid;
  place-items: center;
  color: var(--faint);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
}

.cmp-side h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--ink-heading);
}

.cmp-side ul {
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 0.94rem;
  color: var(--muted);
}

.cmp-side ul li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1.5;
}

.cmp-side ul li::before {
  content: "✕";
  color: var(--faint);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.cmp-side.win ul li::before {
  content: "✓";
  color: var(--ok);
  font-size: 0.95rem;
}

/* ================================================================
   Pricing Section
   ================================================================ */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 48px;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.22s var(--ease-spring);
}

.plan:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}

.plan.featured {
  border-color: rgba(255, 100, 61, 0.5);
  background: linear-gradient(180deg, rgba(255, 100, 61, 0.08), rgba(255, 255, 255, 0.02) 60%);
  box-shadow: 0 28px 70px rgba(255, 100, 61, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .plan.featured {
  background: linear-gradient(180deg, rgba(232, 80, 43, 0.06), #FFFFFF 50%);
  box-shadow: 0 24px 60px rgba(232, 80, 43, 0.12);
}

.ribbon {
  display: block;
  margin: -32px -32px 24px;
  padding: 10px 32px;
  background: var(--accent-gradient);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-align: center;
}

.plan-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-heading);
  margin-bottom: 8px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 6px 0;
}

.price {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ink-heading);
}

.price-per {
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 500;
}

.bill-note {
  font-size: 0.85rem;
  color: var(--faint);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.plan-features {
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 28px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.plan-features li svg {
  width: 17px;
  height: 17px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.2;
  flex-shrink: 0;
  margin-top: 2px;
}

.pricing-note {
  font-size: 0.84rem;
  color: var(--faint);
  margin-top: 24px;
  text-align: center;
}

/* ================================================================
   Metro Grid & Filters
   ================================================================ */
.metro-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mfilter {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.18s ease;
}

.mfilter:hover {
  color: var(--ink-heading);
  border-color: var(--line-strong);
}

.mfilter.on {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(255, 100, 61, 0.4);
}

.metro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.mcard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all 0.2s var(--ease-spring);
}

.mcard:hover {
  border-color: rgba(255, 100, 61, 0.45);
  transform: translateY(-2px);
  background: var(--surface-hover);
  box-shadow: var(--shadow-md);
}

.mcard b {
  font-weight: 600;
  color: var(--ink-heading);
  font-size: 1rem;
}

.mc {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.flag {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #B22234 33%, #fff 33%, #fff 66%, #3C3B6E 66%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.flag.nl {
  background: linear-gradient(180deg, #AE1C28 33%, #fff 33%, #fff 66%, #21468B 66%);
}

.flag.be {
  background: linear-gradient(90deg, #000 33%, #FAE042 33%, #FAE042 66%, #ED2939 66%);
}

/* ================================================================
   FAQ Section
   ================================================================ */
.faq-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 8px;
  color: var(--ink);
  transition: color 0.15s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  color: var(--accent);
}

summary::after {
  content: "+";
  color: var(--faint);
  font-size: 1.4rem;
  font-weight: 300;
  transition: transform 0.24s var(--ease-spring);
  flex-shrink: 0;
  line-height: 1;
}

details[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

details[open] summary {
  color: var(--ink-heading);
}

details p {
  color: var(--muted);
  padding: 0 8px 24px;
  font-size: 0.96rem;
  max-width: 46rem;
  text-wrap: pretty;
  line-height: 1.7;
}

/* ================================================================
   Final CTA Banner
   =============================================================== */
.final {
  border-block: 1px solid var(--line);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(900px 400px at 50% 130%, rgba(255, 100, 61, 0.14), transparent 70%);
}

[data-theme="light"] .final {
  background: radial-gradient(900px 400px at 50% 130%, rgba(232, 80, 43, 0.09), transparent 70%);
}

.final::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 400px at 50% 130%, rgba(255, 100, 61, 0.18), transparent 72%),
    linear-gradient(100deg, rgba(6, 9, 17, 0.97) 0%, rgba(6, 9, 17, 0.86) 52%, rgba(6, 9, 17, 0.55) 100%),
    url("../assets/construction-detail.webp") center / cover no-repeat;
}

[data-theme="light"] .final::before {
  background:
    radial-gradient(900px 400px at 50% 130%, rgba(232, 80, 43, 0.13), transparent 72%),
    linear-gradient(100deg, rgba(248, 250, 252, 0.97) 0%, rgba(248, 250, 252, 0.87) 52%, rgba(248, 250, 252, 0.54) 100%),
    url("../assets/construction-detail.webp") center / cover no-repeat;
}

.final .wrap {
  text-align: center;
  padding-block: 92px;
}

.final h2 {
  margin-inline: auto;
  max-width: 24ch;
}

.final .lead {
  margin-inline: auto;
  margin-bottom: 36px;
}

/* ================================================================
   Footer
   ================================================================ */
footer {
  padding: 48px 0;
  color: var(--faint);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  justify-content: space-between;
  align-items: center;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--ink-heading);
}

.homepage-refinement {
  display: none;
}

.glow {
  opacity: 0.82;
}

[data-theme="light"] .glow {
  opacity: 0.68;
}

.dotgrid {
  opacity: 0.9;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 58%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 58%);
}

.noise {
  opacity: 0.03;
}

.hero {
  padding: 100px 0 86px;
}

.hero::before {
  background:
    linear-gradient(to bottom, rgba(6, 9, 17, 0) 50%, #060911 98%),
    linear-gradient(100deg, rgba(6, 9, 17, 0.97) 0%, rgba(6, 9, 17, 0.91) 38%, rgba(6, 9, 17, 0.66) 70%, rgba(6, 9, 17, 0.34) 100%),
    url("../assets/hero-roofing.webp") right center / cover no-repeat;
}

[data-theme="light"] .hero::before {
  background:
    linear-gradient(to bottom, rgba(248, 250, 252, 0) 50%, #F8FAFC 98%),
    linear-gradient(100deg, rgba(248, 250, 252, 0.97) 0%, rgba(248, 250, 252, 0.92) 38%, rgba(248, 250, 252, 0.70) 70%, rgba(248, 250, 252, 0.36) 100%),
    url("../assets/hero-roofing.webp") right center / cover no-repeat;
}

h1 {
  font-size: clamp(2.75rem, 5.4vw, 4.15rem);
  line-height: 1.04;
}

h1 .dim {
  color: var(--muted);
}

.sub {
  margin: 26px 0 34px;
}

.signup-card {
  overflow: hidden;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 52%),
    var(--surface-glass);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.signup-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
}

[data-theme="light"] .signup-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.88));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="light"] .signup-card::before {
  background: linear-gradient(90deg, transparent, rgba(232, 80, 43, 0.38), transparent);
}

.chips {
  gap: 9px;
  margin-bottom: 20px;
}

.tchip {
  padding: 9px 15px;
}

.tchip.on {
  border-color: rgba(255, 100, 61, 0.55);
}

.signup-bar input[type="email"] {
  min-width: 210px;
  padding-block: 14px;
}

.feedpanel {
  background: linear-gradient(180deg, rgba(10, 15, 30, 0.94), rgba(6, 9, 17, 0.97));
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .feedpanel {
  background: #FFFFFF;
  box-shadow: 0 28px 70px -32px rgba(15, 23, 42, 0.35);
}

.feed-head {
  min-height: 54px;
  padding-inline: 20px;
  background: rgba(0, 0, 0, 0.26);
}

[data-theme="light"] .feed-head {
  background: rgba(15, 23, 42, 0.025);
}

.feed-tabs {
  padding: 14px 18px 6px;
}

.ftab.on {
  background: var(--accent-soft);
  border-color: rgba(255, 100, 61, 0.36);
  color: var(--accent);
}

[data-theme="light"] .ftab.on {
  border-color: rgba(232, 80, 43, 0.24);
}

.feed-body {
  gap: 8px;
  padding: 12px 18px 18px;
}

.permit-card {
  padding: 15px 17px;
  background: rgba(255, 255, 255, 0.045);
}

.permit-card:hover {
  transform: translateY(-1px);
}

[data-theme="light"] .permit-card {
  background: #F8FAFC;
}

.marquee,
.statband {
  background: rgba(255, 255, 255, 0.012);
}

[data-theme="light"] .marquee,
[data-theme="light"] .statband {
  background: #FFFFFF;
}

.statband .wrap {
  gap: 20px;
  padding-block: 46px;
}

.stat {
  position: relative;
  padding-left: 20px;
}

.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 4px;
  width: 1px;
  background: var(--line-strong);
}

.stat b {
  font-size: clamp(2rem, 3vw, 2.45rem);
}

.section {
  padding: 104px 0 88px;
}

.kicker2::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
}

.section-header {
  margin-bottom: 44px;
}

.tile {
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
}

.tile:hover {
  transform: translateY(-2px);
}

.tile h3 {
  letter-spacing: 0;
  margin-top: 20px;
}

.tile-icon {
  border-radius: var(--radius-lg);
}

[data-theme="light"] .tile {
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.calc-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)), var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .calc-card {
  background: #FFFFFF;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cmp-side,
.plan {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

[data-theme="light"] .cmp-side,
[data-theme="light"] .plan {
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.price {
  letter-spacing: 0;
}

.plan.featured {
  box-shadow: 0 30px 74px -34px rgba(255, 100, 61, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.faq-list {
  margin-top: 20px;
}

summary {
  padding-block: 24px;
}

details p {
  padding-bottom: 26px;
}

.final .wrap {
  max-width: 760px;
  padding-block: 108px;
}

.final h2 {
  font-size: clamp(2rem, 4vw, 2.85rem);
}

.final .lead {
  max-width: 36rem;
  margin-bottom: 38px;
}

footer {
  padding: 58px 0 44px;
}

footer .wrap {
  align-items: flex-start;
  gap: 24px 40px;
}

footer nav {
  gap: 8px 22px;
}

/* ================================================================
   Permit Inspection Modal / Drawer
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s var(--ease-spring);
  position: relative;
}

.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: var(--ink-heading);
  background: var(--surface-hover);
}

.modal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink-heading);
  margin-bottom: 8px;
}

.modal-scope {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.modal-meta-item {
  background: var(--surface);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.modal-meta-item small {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 2px;
}

.modal-meta-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-heading);
}

/* ================================================================
   Sticky Mobile Action Bar
   ================================================================ */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(6, 9, 17, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s var(--ease-spring), visibility 0.3s ease;
}

[data-theme="light"] .sticky-cta {
  background: rgba(248, 250, 252, 0.94);
}

.sticky-cta.show {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.sticky-cta p {
  font-size: 0.92rem;
  color: var(--muted);
}

.sticky-cta p b {
  color: var(--ink-heading);
}

body.has-visible-sticky-cta {
  padding-bottom: 92px;
}

body.has-visible-sticky-cta .feed-body {
  padding-bottom: 88px;
}

@media (min-width: 991px) {
  .sticky-cta {
    display: none;
  }

  body.has-visible-sticky-cta {
    padding-bottom: 0;
  }

  body.has-visible-sticky-cta .feed-body {
    padding-bottom: 16px;
  }
}

/* ================================================================
   Scroll Reveal Animations
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-spring);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-spring);
}

.reveal.stagger.in > *:nth-child(1) { transition-delay: 0.04s; opacity: 1; transform: translateY(0); }
.reveal.stagger.in > *:nth-child(2) { transition-delay: 0.12s; opacity: 1; transform: translateY(0); }
.reveal.stagger.in > *:nth-child(3) { transition-delay: 0.20s; opacity: 1; transform: translateY(0); }
.reveal.stagger.in > *:nth-child(4) { transition-delay: 0.28s; opacity: 1; transform: translateY(0); }

/* ================================================================
   Responsive Breakpoints
   ================================================================ */
@media (max-width: 1189px) {
  .nav {
    top: 10px;
    padding-inline: 12px;
  }
  .nav .wrap {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 6px 6px 6px 14px;
    border-radius: 24px;
  }
  .menu-btn {
    display: flex;
  }
  .navlinks {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 45%),
      var(--surface-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 28px 70px -32px rgba(0, 0, 0, 0.85);
    padding: 10px;
  }
  [data-theme="light"] .navlinks {
    box-shadow: 0 28px 70px -38px rgba(15, 23, 42, 0.35);
  }
  .navlinks.open {
    display: flex;
    animation: fadeIn 0.25s ease;
  }
  .nav-primary {
    display: block;
  }
  .nav-primary > a {
    display: block;
    padding: 15px 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1rem;
  }
  .nav-primary > a:last-child {
    border-bottom: 0;
  }
  .nav-actions {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .nav .lang-pill,
  .nav .theme-btn,
  .nav .nav-cta {
    width: auto;
    height: 46px;
  }
  .nav .lang-pill,
  .nav .theme-btn {
    width: 46px;
  }
  .nav .nav-cta {
    border-radius: var(--radius-full);
  }
}

@media (max-width: 990px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero {
    padding: 56px 0 48px;
  }
  .calc-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .plans {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }
  .t-wide, .t-half {
    grid-column: span 6;
  }
  .t-third {
    grid-column: span 3;
  }
  .compare {
    grid-template-columns: 1fr;
  }
  .cmp-vs {
    padding: 6px 0;
  }
}

@media (max-width: 640px) {
  .t-third {
    grid-column: span 6;
  }
  .section {
    padding: 64px 0;
  }
  .statband .wrap {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 28px 20px;
  }
  .stat b {
    font-size: 1.9rem;
  }
  .calc-card {
    padding: 24px;
  }
  .calc-big-num {
    font-size: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal, .reveal.stagger > * {
    opacity: 1;
    transform: none;
  }
  .mq-track {
    animation: none;
  }
}
