/* ========================================================
   NORCAL HVAC - Official Stylesheet
   Zero-Risk Policy • Premium 3D & Live Interactive Design
   Primary Theme: Flame Red (#FE342F / #DC2626) & Deep Navy Blue (#1E2E68)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Exact Official Logo Colors (Sampled from Authentic Brand Emblem) */
  --flame-red-600: #fe342f; /* Official Flame & Brand Red */
  --flame-red-500: #ff4d48;
  --flame-red-700: #dc2626;
  --flame-red-800: #b91c1c;
  --flame-glow: rgba(254, 52, 47, 0.25);
  
  --snow-blue-950: #060a1c;
  --snow-blue-900: #0c1433; /* Deepest Midnight Base */
  --snow-blue-800: #111c44;
  --snow-blue-700: #18265c;
  --snow-blue-600: #1e2e68; /* Official Deep Navy / Midnight Blue */
  --snow-blue-500: #283c80;
  --snow-blue-400: #3d549e;
  --snow-glow: rgba(30, 46, 104, 0.25);

  /* Neutrals & Clean Crisp Styling */
  --slate-950: #090d16;
  --slate-900: #0f172a;
  --slate-850: #131d36;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Elevations & Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.08);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 15px; /* Clean, compact baseline */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--slate-50);
  color: #334155; /* Soft slate-700 neutral */
  line-height: 1.68;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  font-weight: 400;
}

/* Light, Spacious Body Paragraphs */
p {
  line-height: 1.72;
  font-weight: 400;
  color: #64748b; /* Lighter, clean slate-500 */
}

/* Breathable Utility Typography */
.text-xs { font-size: 0.75rem; line-height: 1.35rem; }
.text-sm { font-size: 0.825rem; line-height: 1.55rem; }
.text-base { font-size: 0.925rem; line-height: 1.7rem; }
.text-lg { font-size: 1.05rem; line-height: 1.8rem; }
.text-xl { font-size: 1.25rem; line-height: 1.95rem; }
.text-2xl { font-size: 1.65rem; line-height: 2.3rem; }
.text-3xl { font-size: 2.15rem; line-height: 2.8rem; }
.text-4xl { font-size: 2.75rem; line-height: 3.4rem; }

/* Custom Badge Pill */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 9999px;
  border-width: 1px;
}

/* Live Pulse Indicator */
.pulse-indicator {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #1e2e68;
}

.pulse-indicator::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(30, 46, 104, 0.4);
  animation: pulse-ring 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Flame & Snowflake Micro Animations */
@keyframes flame-flicker {
  0%, 100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 12px rgba(254, 52, 47, 0.4)); }
  50% { transform: scale(1.03) translateY(-1px); filter: drop-shadow(0 0 18px rgba(254, 52, 47, 0.7)); }
}

@keyframes snow-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-flame {
  animation: flame-flicker 2.5s ease-in-out infinite;
}

.animate-snowflake {
  animation: snow-spin 20s linear infinite;
}

/* Glassmorphism Card Style */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.05);
}

.glass-panel-dark {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(51, 65, 85, 0.6);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

/* Interactive Thermostat Dial Styling */
.thermostat-dial-wrapper {
  position: relative;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 45%, #f1f5f9 100%);
  border: 8px solid #ffffff;
  box-shadow: 
    0 15px 35px -5px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(203, 213, 225, 0.5),
    inset 0 4px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
}

.thermostat-ring-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

/* Gradient Borders */
.border-gradient-brand {
  position: relative;
}
.border-gradient-brand::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--flame-red-600), var(--snow-blue-600));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Button Micro-interactions */
.btn-brand-primary {
  background: linear-gradient(135deg, var(--flame-red-600) 0%, #dc2626 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  padding: 0.65rem 1.35rem;
  border-radius: 0.5rem;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 14px rgba(254, 52, 47, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-brand-primary:hover {
  background: linear-gradient(135deg, var(--flame-red-500) 0%, var(--flame-red-600) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 52, 47, 0.45);
}
.btn-brand-primary:active {
  transform: translateY(0);
}

.btn-brand-secondary {
  background: linear-gradient(135deg, var(--snow-blue-600) 0%, var(--snow-blue-800) 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  padding: 0.65rem 1.35rem;
  border-radius: 0.5rem;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 14px rgba(30, 46, 104, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-brand-secondary:hover {
  background: linear-gradient(135deg, var(--snow-blue-500) 0%, var(--snow-blue-700) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 46, 104, 0.45);
}
.btn-brand-secondary:active {
  transform: translateY(0);
}

.btn-brand-outline {
  background: transparent;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1.35rem;
  border-radius: 0.5rem;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-brand-outline:hover {
  background: var(--white);
  color: var(--slate-900);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-brand-outline-light {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1.35rem;
  border-radius: 0.5rem;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-brand-outline-light:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 1.5rem;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Floating Quick Call Bar */
.sticky-mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0.75rem));
  z-index: 99;
  display: none;
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Touch & Interaction Optimizations */
button, a, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .sticky-mobile-cta {
    display: flex;
    gap: 0.75rem;
  }
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  /* Prevent iOS Safari auto-zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 380px) {
  .thermostat-dial-wrapper {
    transform: scale(0.88);
    transform-origin: center center;
    margin: -10px 0;
  }
}
