/* ==========================================================================
   IdeaSQR Executive Design System - 2026 Edition
   Aesthetic: Executive Crystal & Crimson • Human-Friendly • Modern SaaS
   ========================================================================== */

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

:root {
  --brand-primary: #B10025;
  --brand-ruby: #E11D48;
  --brand-rose: #FB7185;
  --brand-glow: rgba(225, 29, 72, 0.25);
  --bg-deep: #0B0F19;
  --bg-surface: #121829;
  --bg-card: rgba(18, 24, 41, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(244, 63, 94, 0.4);
  --text-main: #F1F5F9;
  --text-muted: #CBD5E1;
  --text-sub: #94A3B8;
  --font-en: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Comprehensive Bidirectional (RTL / LTR) Layout & Typography Engine
   ========================================================================== */

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-padding-top: 5rem;
  background-color: var(--bg-deep);
  color: var(--text-main);
}

/* RTL Strict Enforcement */
html[dir="rtl"],
html.rtl,
body[dir="rtl"],
body.rtl,
[dir="rtl"] {
  direction: rtl !important;
  text-align: right;
  font-family: var(--font-ar) !important;
}

/* LTR Strict Enforcement */
html[dir="ltr"],
html.ltr,
body[dir="ltr"],
body.ltr,
[dir="ltr"] {
  direction: ltr !important;
  text-align: left;
  font-family: var(--font-en) !important;
}

/* Font and line height bindings */
html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] p,
html[dir="rtl"] span,
html[dir="rtl"] a,
html[dir="rtl"] li,
html[dir="rtl"] label,
body.rtl * {
  font-family: var(--font-ar) !important;
}

[dir="rtl"] p, 
[dir="rtl"] li,
body.rtl p,
body.rtl li {
  line-height: 1.8;
}

/* Override utility text alignment in RTL */
[dir="rtl"] .text-left,
body.rtl .text-left {
  text-align: right !important;
}

[dir="rtl"] .text-right,
body.rtl .text-right {
  text-align: left !important;
}

/* Centered content remains strictly centered */
.text-center,
[dir="rtl"] .text-center,
[dir="ltr"] .text-center,
body.rtl .text-center,
body.ltr .text-center {
  text-align: center !important;
}

/* Directional Rotations */
[dir="rtl"] .rtl\:rotate-180,
body.rtl .rtl\:rotate-180 {
  transform: rotate(180deg) !important;
}

[dir="rtl"] .rtl-flip,
body.rtl .rtl-flip {
  transform: scaleX(-1) !important;
}

[dir="ltr"] .rtl\:rotate-180,
body.ltr .rtl\:rotate-180 {
  transform: none !important;
}

[dir="ltr"] .rtl-flip,
body.ltr .rtl-flip {
  transform: none !important;
}

/* BiDi isolation helper for technical tokens */
bdi, .bdi, [dir="ltr"] {
  unicode-bidi: isolate;
}

/* Ambient Radial & Aurora Glows */
.executive-bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #151d34 0%, #0b0f19 55%, #070a12 100%);
}

.geometric-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 25%, black 50%, transparent 88%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 25%, black 50%, transparent 88%);
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}

.aurora-orb-1 {
  width: 750px;
  height: 750px;
  top: -180px;
  left: 50%;
  margin-left: -375px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.24) 0%, rgba(177, 0, 37, 0.12) 45%, transparent 70%);
  animation: aurora-float-1 16s ease-in-out infinite alternate;
}

.aurora-orb-2 {
  width: 600px;
  height: 600px;
  top: 18%;
  right: -80px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.18) 0%, rgba(177, 0, 37, 0.08) 50%, transparent 70%);
  animation: aurora-float-2 20s ease-in-out infinite alternate;
}

.aurora-orb-3 {
  width: 650px;
  height: 650px;
  top: 50%;
  left: -100px;
  background: radial-gradient(circle, rgba(177, 0, 37, 0.16) 0%, rgba(124, 58, 237, 0.08) 50%, transparent 70%);
  animation: aurora-float-3 24s ease-in-out infinite alternate;
}

.aurora-orb-4 {
  width: 500px;
  height: 500px;
  top: 72%;
  right: 10%;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.16) 0%, rgba(177, 0, 37, 0.08) 50%, transparent 70%);
  animation: aurora-float-1 22s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-float-1 {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(50px) scale(1.08) translateX(25px); }
  100% { transform: translateY(-30px) scale(0.96) translateX(-20px); }
}

@keyframes aurora-float-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 35px) scale(1.06); }
  100% { transform: translate(25px, -45px) scale(0.94); }
}

@keyframes aurora-float-3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(45px, -35px) scale(1.1); }
  100% { transform: translate(-25px, 40px) scale(0.92); }
}

/* Interactive Cursor Spotlight Aura */
.cursor-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(650px circle at var(--mouse-x, 50vw) var(--mouse-y, 50vh), rgba(225, 29, 72, 0.08), transparent 50%);
  transition: opacity 0.25s ease;
}

/* Scroll progress */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #B10025, #E11D48, #FF4D6D);
  z-index: 100;
  transition: width 0.1s ease-out;
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 36px -10px var(--brand-glow);
  transform: translateY(-2px);
}

/* Navbar */
.navbar-crystal {
  background: rgba(16, 20, 35, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  transform: translateZ(0);
}

/* Brand Logo Ambient Glow (Dark Theme) */
.brand-logo-glow {
  filter: drop-shadow(0 0 14px rgba(177, 0, 37, 0.42));
  transition: filter 0.3s ease;
}

/* Brand Buttons */
.btn-primary-glow {
  background: linear-gradient(135deg, #B10025 0%, #D90429 100%);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 0.875rem;
  padding: 0.75rem 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(177, 0, 37, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary-glow:hover {
  background: linear-gradient(135deg, #C2002A 0%, #E11D48 100%);
  box-shadow: 0 8px 28px rgba(177, 0, 37, 0.55);
  transform: translateY(-1px);
}

.btn-secondary-crystal {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 0.875rem;
  padding: 0.75rem 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}

.btn-secondary-crystal:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Badge Styles */
.badge-crimson {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(225, 29, 72, 0.12);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.28);
  box-shadow: 0 0 14px rgba(225, 29, 72, 0.12);
}

/* Transformation Flow Tabs */
.flow-tab-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 0.875rem;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.flow-tab-btn.active {
  background: rgba(177, 0, 37, 0.15);
  color: #FFFFFF;
  border-color: rgba(177, 0, 37, 0.4);
  box-shadow: 0 4px 16px rgba(177, 0, 37, 0.2);
}

/* Visual Flow Diagrams */
.flow-step-node {
  background: rgba(22, 30, 52, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.25rem;
  position: relative;
  transition: all 0.3s ease;
}

.flow-step-node:hover {
  border-color: var(--border-hover);
  background: rgba(28, 38, 65, 0.95);
}

/* Client Marquee Carousel */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}

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

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

[dir="rtl"] .marquee-track {
  animation: marquee-scroll-rtl 35s linear infinite;
}

@keyframes marquee-scroll-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.client-logo-card {
  width: 170px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.875rem;
  transition: all 0.3s ease;
}

.client-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.65) brightness(1.2);
  transition: all 0.3s ease;
}

.client-logo-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(177, 0, 37, 0.4);
  transform: translateY(-2px);
}

.client-logo-card:hover img {
  filter: grayscale(0%) opacity(1) brightness(1);
}

/* Non-Intrusive Floating Beacon */
.floating-beacon {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

[dir="rtl"] .floating-beacon {
  right: auto;
  left: 1.75rem;
}

.beacon-orb {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.beacon-whatsapp {
  background: #25D366;
  color: #FFFFFF;
}

.beacon-whatsapp:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
}

.beacon-cta {
  background: linear-gradient(135deg, #B10025, #E11D48);
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(177, 0, 37, 0.4);
  transition: all 0.25s ease;
}

.beacon-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(177, 0, 37, 0.6);
}

/* Back to Top Floating Action Button */
.back-to-top-floating {
  position: fixed;
  bottom: 1.75rem;
  left: 1.75rem;
  z-index: 40;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  background: rgba(24, 33, 54, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
}

[dir="rtl"] .back-to-top-floating {
  left: auto;
  right: 1.75rem;
}

.back-to-top-floating:hover {
  background: rgba(30, 41, 67, 0.95);
  border-color: rgba(177, 0, 37, 0.6);
  box-shadow: 0 12px 30px rgba(177, 0, 37, 0.35);
  transform: translateY(-3px) scale(1.05);
}

.back-to-top-floating:active {
  transform: translateY(0) scale(0.95);
}

@media (max-width: 640px) {
  .back-to-top-floating {
    bottom: 1.25rem;
    left: 1rem;
    width: 2.85rem;
    height: 2.85rem;
  }
  [dir="rtl"] .back-to-top-floating {
    left: auto;
    right: 1rem;
  }
  .back-to-top-floating svg {
    width: 2.85rem;
    height: 2.85rem;
  }
}

/* Input Fields */
.form-input-crystal {
  width: 100%;
  background: rgba(18, 24, 41, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  color: #F1F5F9;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-input-crystal::placeholder {
  color: #64748B;
}

.form-input-crystal:focus {
  outline: none;
  border-color: #E11D48;
  background: rgba(22, 30, 52, 0.95);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.22);
}

.form-input-crystal option {
  background: #121829;
  color: #F1F5F9;
}

/* ==========================================================================
   Hero Interactive Animations & Creative Effects
   ========================================================================== */

/* Hero Canvas Background */
.hero-canvas-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.95;
}

/* Headline Animated Shimmer */
.text-shimmer {
  background: linear-gradient(
    110deg,
    #B10025 0%,
    #E11D48 20%,
    #FFA6B5 40%,
    #E11D48 60%,
    #B10025 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: text-shimmer-run 5s linear infinite;
}

@keyframes text-shimmer-run {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Floating Levitation Telemetry Chips */
.hero-floating-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6rem 1.15rem;
  border-radius: 9999px;
  background: rgba(22, 30, 52, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), 0 0 20px -4px rgba(177, 0, 37, 0.35);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #F1F5F9;
  z-index: 20;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-floating-chip:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: rgba(177, 0, 37, 0.55);
  box-shadow: 0 20px 40px -8px rgba(177, 0, 37, 0.45);
}

/* 5 Distinct Floating Telemetry Chips */
.float-chip-1 {
  top: 10%;
  left: 2.5%;
  animation: float-chip-1 8s ease-in-out infinite;
}

.float-chip-2 {
  top: 26%;
  left: 1.5%;
  animation: float-chip-2 7s ease-in-out infinite;
}

.float-chip-3 {
  top: 45%;
  left: 3%;
  animation: float-chip-3 9s ease-in-out infinite;
}

.float-chip-4 {
  top: 12%;
  right: 2.5%;
  animation: float-chip-4 8.5s ease-in-out infinite;
}

.float-chip-5 {
  top: 32%;
  right: 1.5%;
  animation: float-chip-5 7.5s ease-in-out infinite;
}

[dir="rtl"] .float-chip-1 { left: auto; right: 2.5%; }
[dir="rtl"] .float-chip-2 { left: auto; right: 1.5%; }
[dir="rtl"] .float-chip-3 { left: auto; right: 3%; }
[dir="rtl"] .float-chip-4 { right: auto; left: 2.5%; }
[dir="rtl"] .float-chip-5 { right: auto; left: 1.5%; }

@keyframes float-chip-1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-13px) rotate(1.2deg); }
}

@keyframes float-chip-2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-1.5deg); }
}

@keyframes float-chip-3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-chip-4 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-1.3deg); }
}

@keyframes float-chip-5 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(1.4deg); }
}

@media (max-width: 1080px) {
  .hero-floating-chip {
    display: none;
  }
}

/* Interactive Laser Architecture Connector */
.pipeline-connector-line {
  stroke-dasharray: 6 6;
  animation: stroke-march 1.2s linear infinite;
}

@keyframes stroke-march {
  to {
    stroke-dashoffset: -24;
  }
}

.pulse-beacon-ping {
  animation: beacon-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes beacon-ping {
  0% { transform: scale(1); opacity: 0.8; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* Button Interactive Shine Sheen */
.btn-primary-glow {
  position: relative;
  overflow: hidden;
}

.btn-primary-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: rotate(25deg);
  transition: all 0.75s ease;
  pointer-events: none;
}

.btn-primary-glow:hover::after {
  left: 130%;
}

/* Active Step Node Glow in Flows */
.flow-step-node {
  position: relative;
  overflow: hidden;
}

.flow-step-node::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.flow-step-node:hover::before {
  background: linear-gradient(135deg, rgba(177, 0, 37, 0.6), rgba(225, 29, 72, 0.2) 60%);
}

/* Rich Content Typography for Quill HTML */
.rich-content h1, .rich-content h2, .rich-content h3, .rich-content h4 {
  color: #FFFFFF;
  font-weight: 800;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.rich-content h1 { font-size: 1.875rem; }
.rich-content h2 { font-size: 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 0.5rem; }
.rich-content h3 { font-size: 1.25rem; color: #FF4D6D; }
.rich-content h4 { font-size: 1.1rem; }
.rich-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
}
.rich-content ul, .rich-content ol {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  margin-bottom: 1.25rem;
}
.rich-content ul { list-style-type: disc; }
.rich-content ol { list-style-type: decimal; }
.rich-content li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}
.rich-content strong {
  color: #FFFFFF;
  font-weight: 700;
}
.rich-content a {
  color: #FF4D6D;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.rich-content a:hover {
  color: #FFFFFF;
}
.rich-content blockquote {
  border-left: 3px solid #B10025;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  font-style: italic;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
[dir="rtl"] .rich-content blockquote {
  border-left: none;
  border-right: 3px solid #B10025;
}
.rich-content pre, .rich-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.rich-content code {
  background: rgba(255, 255, 255, 0.08);
  color: #FF4D6D;
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
}
.rich-content pre {
  background: #0A0D18;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.rich-content img {
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 100%;
  height: auto;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Mobile Off-Canvas Side Drawer Engine
   ========================================================================== */
#mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 85vw;
  max-width: 340px;
  z-index: 60;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

[dir="ltr"] #mobile-drawer {
  right: 0;
  left: auto;
  transform: translateX(100%);
}

[dir="rtl"] #mobile-drawer {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

#mobile-drawer.translate-x-0 {
  transform: translateX(0) !important;
}

#mobile-drawer-backdrop {
  z-index: 55;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   Comprehensive Dark Theme Eye-Comfort Engine (Ergonomics & Halation Control)
   ========================================================================== */

/* Dark Mode Canvas & Root Typography Defaults */
html:not(.theme-light),
body:not(.theme-light) {
  background-color: #0B0F19 !important;
  color: #F1F5F9;
}

/* Eye-Comfort Headings: Off-white Slate-100 (Eliminates text glare/halation) */
html:not(.theme-light) h1,
html:not(.theme-light) h2,
html:not(.theme-light) h3,
html:not(.theme-light) h4,
html:not(.theme-light) h5,
html:not(.theme-light) h6 {
  color: #F8FAFC;
  letter-spacing: -0.012em;
}

/* Body & Meta Typography (Effortless Contrast) */
html:not(.theme-light) p {
  color: #94A3B8;
}

html:not(.theme-light) .text-white {
  color: #F1F5F9;
}

html:not(.theme-light) .text-slate-400 {
  color: #94A3B8;
}

html:not(.theme-light) .text-slate-300 {
  color: #CBD5E1;
}

html:not(.theme-light) .text-slate-200 {
  color: #E2E8F0;
}

/* Primary Action Buttons (Retain crisp pure white on brand gradients) */
html:not(.theme-light) .btn-primary-glow,
html:not(.theme-light) .btn-primary-glow *,
html:not(.theme-light) .beacon-cta,
html:not(.theme-light) .beacon-cta *,
html:not(.theme-light) .beacon-whatsapp,
html:not(.theme-light) .beacon-whatsapp *,
html:not(.theme-light) .btn-brand-solid,
html:not(.theme-light) .btn-brand-solid *,
html:not(.theme-light) .solid-badge-crimson,
html:not(.theme-light) .solid-badge-crimson * {
  color: #FFFFFF !important;
}

/* Elevated Surfaces & Cards in Dark Mode */
html:not(.theme-light) .glass-panel,
html:not(.theme-light) .crystal-card,
html:not(.theme-light) .command-center-card {
  background: rgba(18, 24, 41, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.45) !important;
}

html:not(.theme-light) .glass-panel:hover,
html:not(.theme-light) .crystal-card:hover {
  border-color: rgba(244, 63, 94, 0.38) !important;
  box-shadow: 0 16px 40px -10px rgba(177, 0, 37, 0.28) !important;
}

/* Secondary Crystal Button in Dark Mode */
html:not(.theme-light) .btn-secondary-crystal {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #F1F5F9 !important;
}

html:not(.theme-light) .btn-secondary-crystal:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
  color: #FFFFFF !important;
}

/* Desaturated Eye-Comfort Status Accents in Dark Mode */
html:not(.theme-light) .text-emerald-400 {
  color: #34D399 !important;
}

html:not(.theme-light) .text-rose-400,
html:not(.theme-light) .text-red-400 {
  color: #FB7185 !important;
}

html:not(.theme-light) .text-rose-300,
html:not(.theme-light) .text-red-300 {
  color: #FDA4AF !important;
}

html:not(.theme-light) .text-amber-400,
html:not(.theme-light) .text-amber-300 {
  color: #FBBF24 !important;
}

html:not(.theme-light) .text-cyan-400,
html:not(.theme-light) .text-sky-400 {
  color: #38BDF8 !important;
}

/* Status Pill Backgrounds */
html:not(.theme-light) .bg-emerald-950\/40,
html:not(.theme-light) .bg-emerald-950\/60 {
  background-color: rgba(6, 78, 59, 0.35) !important;
  border-color: rgba(52, 211, 153, 0.25) !important;
  color: #34D399 !important;
}

html:not(.theme-light) .bg-rose-950\/40,
html:not(.theme-light) .bg-red-950\/40,
html:not(.theme-light) .bg-red-950\/60,
html:not(.theme-light) .bg-red-950\/20 {
  background-color: rgba(136, 19, 55, 0.35) !important;
  border-color: rgba(251, 113, 133, 0.25) !important;
  color: #FB7185 !important;
}

html:not(.theme-light) .bg-amber-950\/40 {
  background-color: rgba(120, 53, 15, 0.35) !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
  color: #FBBF24 !important;
}

/* Delicate Border Softening (Reduces wireframe noise) */
html:not(.theme-light) .border-white\/10 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html:not(.theme-light) .border-white\/15 {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html:not(.theme-light) .border-white\/20 {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Estimator Wizard in Dark Theme */
html:not(.theme-light) #estimator {
  background-color: #0C101D;
}

html:not(.theme-light) .est-option-card {
  background-color: rgba(18, 24, 41, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html:not(.theme-light) .est-option-card:hover {
  background-color: rgba(225, 29, 72, 0.1) !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
  transform: translateY(-2px);
}

html:not(.theme-light) .est-option-card:has(input:checked) {
  background-color: rgba(225, 29, 72, 0.14) !important;
  border-color: #E11D48 !important;
  box-shadow: 0 0 0 1.5px #E11D48, 0 8px 24px -4px rgba(225, 29, 72, 0.25) !important;
}

html:not(.theme-light) .est-option-card strong {
  color: #F8FAFC !important;
}

html:not(.theme-light) .est-option-card span {
  color: #94A3B8 !important;
}

html:not(.theme-light) #estimator .est-step label:not(.block) {
  background-color: rgba(18, 24, 41, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s ease !important;
}

html:not(.theme-light) #estimator .est-step label:not(.block):hover {
  background-color: rgba(225, 29, 72, 0.1) !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
}

html:not(.theme-light) #estimator .est-step label:not(.block):has(input:checked) {
  background-color: rgba(225, 29, 72, 0.14) !important;
  border-color: #E11D48 !important;
  box-shadow: 0 0 0 1px #E11D48 !important;
}

html:not(.theme-light) #estimator .est-step label:not(.block) strong,
html:not(.theme-light) #estimator .est-step label:not(.block) span.text-white {
  color: #F8FAFC !important;
}

html:not(.theme-light) #est-step-4 .bg-black\/40 {
  background-color: rgba(11, 15, 25, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ROI Section in Dark Theme */
html:not(.theme-light) #roi select#roi-biz-type {
  background-color: rgba(18, 24, 41, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #F1F5F9 !important;
}

html:not(.theme-light) #roi .lg\:col-span-6.bg-black\/60 {
  background-color: rgba(18, 24, 41, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Modals & Popups in Dark Theme */
html:not(.theme-light) #demo-modal > div,
html:not(.theme-light) .modal-content-solid {
  background: #0E1322 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8) !important;
}

/* Mobile Drawer in Dark Theme */
html:not(.theme-light) #mobile-drawer {
  background-color: rgba(11, 15, 25, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   Comprehensive Executive Light Theme & Color Architecture (UI/UX Enhanced)
   ========================================================================== */

/* Light Theme Design System Variables */
html.theme-light {
  --brand-primary: #B10025;
  --brand-ruby: #E11D48;
  --brand-glow: rgba(177, 0, 37, 0.2);
  --bg-deep: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --border-subtle: #E2E8F0;
  --border-hover: rgba(177, 0, 37, 0.45);
  --text-main: #0F172A;
  --text-muted: #334155;
  --text-sub: #475569;
}

/* Global Light Theme Root & Typography */
html.theme-light,
body.theme-light {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
}

/* Eye-Comfortable Slate Typography Defaults */
html.theme-light h1,
html.theme-light h2,
html.theme-light h3,
html.theme-light h4,
html.theme-light h5,
html.theme-light h6 {
  color: #0F172A !important;
}

html.theme-light .text-white {
  color: #0F172A !important;
}

html.theme-light .text-slate-100 {
  color: #0F172A !important;
}

html.theme-light .text-slate-200 {
  color: #1E293B !important;
}

html.theme-light .text-slate-300 {
  color: #334155 !important;
}

html.theme-light .text-slate-400,
html.theme-light .text-slate-500 {
  color: #475569 !important;
}

html.theme-light .hover\:text-white:hover {
  color: #0F172A !important;
}

/* Ambient Canvas & Overlays in Light Theme */
html.theme-light .executive-bg-overlay {
  background: radial-gradient(circle at 50% 0%, #E2E8F0 0%, #F1F5F9 55%, #F8FAFC 100%) !important;
}

html.theme-light .geometric-grid-overlay {
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px) !important;
}

html.theme-light .aurora-orb {
  opacity: 0.1 !important;
  filter: blur(100px) !important;
}

html.theme-light .cursor-spotlight {
  background: radial-gradient(650px circle at var(--mouse-x, 50vw) var(--mouse-y, 50vh), rgba(177, 0, 37, 0.06), transparent 50%) !important;
}

/* Brand Logo in Light Theme (Zero Shadow / Glow Removal) */
html.theme-light .brand-logo-glow,
html.theme-light img[src*="idea-squaree"],
html.theme-light a[href="./"] img,
html.theme-light .navbar-crystal img,
html.theme-light footer img[src*="idea-squaree"],
html.theme-light #mobile-drawer img[src*="idea-squaree"] {
  filter: none !important;
  -webkit-filter: none !important;
  box-shadow: none !important;
  drop-shadow: none !important;
}

/* Navbar in Light Theme */
html.theme-light .navbar-crystal {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04) !important;
}

html.theme-light .navbar-crystal nav a,
html.theme-light .navbar-crystal nav button {
  color: #334155 !important;
}

html.theme-light .navbar-crystal nav a:hover,
html.theme-light .navbar-crystal nav button:hover {
  color: #B10025 !important;
}

html.theme-light .theme-toggle-control {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}

/* Mega-Dropdown in Light Theme */
html.theme-light .theme-dropdown {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: #CBD5E1 !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.16) !important;
}

html.theme-light .dropdown-header-bar {
  border-bottom-color: #F1F5F9 !important;
  color: #475569 !important;
}

html.theme-light .dropdown-item {
  color: #0F172A !important;
}

html.theme-light .dropdown-item:hover {
  background: #F8FAFC !important;
  border-color: rgba(177, 0, 37, 0.2) !important;
}

html.theme-light .dropdown-item .text-white {
  color: #0F172A !important;
}

html.theme-light .dropdown-item:hover .text-white {
  color: #B10025 !important;
}

html.theme-light .dropdown-item .text-slate-400 {
  color: #64748B !important;
}

/* Mobile Side Drawer in Light Theme */
html.theme-light #mobile-drawer {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.12) !important;
}

html.theme-light #mobile-drawer .border-white\/10,
html.theme-light #mobile-drawer .border-white\/5 {
  border-color: #E2E8F0 !important;
}

html.theme-light #mobile-drawer .bg-white\/5 {
  background-color: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  color: #334155 !important;
}

html.theme-light #mobile-drawer .text-white {
  color: #0F172A !important;
}

html.theme-light #mobile-drawer .text-slate-200,
html.theme-light #mobile-drawer .text-slate-300 {
  color: #334155 !important;
}

html.theme-light #mobile-drawer .text-slate-400 {
  color: #64748B !important;
}

html.theme-light #mobile-drawer .bg-black\/20 {
  background-color: #F8FAFC !important;
  border-color: #E2E8F0 !important;
}

/* Background surfaces & cards in Light Theme */
html.theme-light #estimator,
html.theme-light .bg-\[\#0C101D\] {
  background-color: #F8FAFC !important;
  border-color: #E2E8F0 !important;
}

html.theme-light .bg-\[\#101423\],
html.theme-light .bg-\[\#141A2E\],
html.theme-light .bg-\[\#182136\],
html.theme-light .bg-\[\#121829\],
html.theme-light .bg-\[\#121622\],
html.theme-light .bg-\[\#12172A\],
html.theme-light .bg-\[\#131929\],
html.theme-light .bg-\[\#0E1322\],
html.theme-light .bg-\[\#0E121B\],
html.theme-light .bg-\[\#0B0F1C\],
html.theme-light .glass-panel,
html.theme-light .crystal-card,
html.theme-light .command-center-card {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03) !important;
}

/* Section Rhythms & Dark Box Overrides in Light Theme */
html.theme-light .bg-black\/10,
html.theme-light .bg-black\/20,
html.theme-light .bg-black\/30,
html.theme-light .bg-black\/40,
html.theme-light .bg-black\/50,
html.theme-light .bg-black\/70,
html.theme-light .bg-black\/75 {
  background-color: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  color: #0F172A !important;
}

html.theme-light .bg-black\/50 span,
html.theme-light .bg-black\/75 span {
  color: #0F172A !important;
}

html.theme-light .bg-black\/50 .text-slate-400 {
  color: #475569 !important;
}

html.theme-light .bg-black\/50 .text-emerald-400 {
  color: #047857 !important;
}

html.theme-light .bg-black\/50 .text-cyan-400 {
  color: #0284C7 !important;
}

/* Transparent chips and pills in Light Theme */
html.theme-light .bg-white\/5,
html.theme-light .bg-white\/10,
html.theme-light .bg-white\/\[0\.02\],
html.theme-light .bg-white\/\[0\.03\],
html.theme-light .bg-white\/\[0\.04\],
html.theme-light .bg-white\/\[0\.06\] {
  background-color: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
}

html.theme-light .hover\:bg-white\/5:hover,
html.theme-light .hover\:bg-white\/10:hover {
  background-color: rgba(177, 0, 37, 0.06) !important;
}

/* High-Contrast Badges & Status Pills in Light Theme */
html.theme-light .bg-rose-950\/40,
html.theme-light .bg-red-950\/40,
html.theme-light .bg-red-950\/50,
html.theme-light .bg-red-950\/60,
html.theme-light .bg-red-950\/20 {
  background-color: #FFF1F2 !important;
  border-color: #FECDD3 !important;
  color: #BE123C !important;
}

html.theme-light .text-rose-300,
html.theme-light .text-red-300 {
  color: #BE123C !important;
  font-weight: 700 !important;
}

html.theme-light .text-rose-400 {
  color: #BE123C !important;
}

html.theme-light .bg-amber-950\/40 {
  background-color: #FEF3C7 !important;
  border-color: #FDE68A !important;
  color: #B45309 !important;
}

html.theme-light .text-amber-300,
html.theme-light .text-amber-400 {
  color: #B45309 !important;
  font-weight: 700 !important;
}

html.theme-light .bg-emerald-950\/40 {
  background-color: #ECFDF5 !important;
  border-color: #A7F3D0 !important;
  color: #047857 !important;
}

html.theme-light .text-emerald-300,
html.theme-light .text-emerald-400 {
  color: #047857 !important;
  font-weight: 700 !important;
}

html.theme-light .bg-purple-950\/40 {
  background-color: #F5F3FF !important;
  border-color: #DDD6FE !important;
  color: #6D28D9 !important;
}

html.theme-light .text-purple-300,
html.theme-light .text-purple-400 {
  color: #6D28D9 !important;
  font-weight: 700 !important;
}

html.theme-light .bg-sky-950\/40 {
  background-color: #F0F9FF !important;
  border-color: #BAE6FD !important;
  color: #0369A1 !important;
}

html.theme-light .text-sky-300,
html.theme-light .text-sky-400 {
  color: #0369A1 !important;
  font-weight: 700 !important;
}

/* Secondary Action Button in Light Theme (High Contrast & Visible) */
html.theme-light .btn-secondary-crystal {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
  font-weight: 700 !important;
}

html.theme-light .btn-secondary-crystal * {
  color: #0F172A !important;
}

html.theme-light .btn-secondary-crystal:hover {
  background: #F8FAFC !important;
  color: #B10025 !important;
  border-color: #B10025 !important;
  box-shadow: 0 6px 20px rgba(177, 0, 37, 0.15) !important;
}

html.theme-light .btn-secondary-crystal:hover * {
  color: #B10025 !important;
}

/* Primary Action Buttons (MUST retain crisp white text) */
html.theme-light .btn-primary-glow,
html.theme-light .btn-primary-glow *,
html.theme-light .beacon-cta,
html.theme-light .beacon-cta *,
html.theme-light .beacon-whatsapp,
html.theme-light .beacon-whatsapp *,
html.theme-light .btn-brand-solid,
html.theme-light .btn-brand-solid *,
html.theme-light .solid-badge-crimson,
html.theme-light .solid-badge-crimson *,
html.theme-light .bg-\[\#B10025\],
html.theme-light .bg-\[\#B10025\] *,
html.theme-light .bg-red-600,
html.theme-light .bg-red-600 * {
  color: #FFFFFF !important;
}

/* Crimson Pill Badge in Light Theme */
html.theme-light .badge-crimson {
  background-color: #FFF1F2 !important;
  border-color: #FECDD3 !important;
  color: #BE123C !important;
  font-weight: 700 !important;
}

html.theme-light .badge-crimson * {
  color: #BE123C !important;
}

/* Hero Slide Indicators in Light Theme */
html.theme-light .hero-indicator {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

html.theme-light .hero-indicator span {
  color: #475569 !important;
}

html.theme-light .hero-indicator:hover {
  background: #F8FAFC !important;
  border-color: #94A3B8 !important;
}

html.theme-light .hero-indicator:hover span {
  color: #0F172A !important;
}

html.theme-light .hero-indicator.active {
  background: #FFFFFF !important;
  border-color: #94A3B8 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12) !important;
}

html.theme-light .hero-indicator.active span {
  color: #0F172A !important;
  font-weight: 800 !important;
}

html.theme-light .hero-indicator .bg-white\/15 {
  background-color: #E2E8F0 !important;
}

html.theme-light button[onclick="prevHeroSlide()"],
html.theme-light button[onclick="nextHeroSlide()"] {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

html.theme-light button[onclick="prevHeroSlide()"]:hover,
html.theme-light button[onclick="nextHeroSlide()"]:hover {
  background: #F8FAFC !important;
  color: #B10025 !important;
  border-color: #B10025 !important;
}

/* Transformation Flow Switcher Tabs in Light Theme */
html.theme-light .flow-tab-btn {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #334155 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

html.theme-light .flow-tab-btn * {
  color: inherit !important;
}

html.theme-light .flow-tab-btn:hover {
  background: #F8FAFC !important;
  color: #0F172A !important;
  border-color: #94A3B8 !important;
}

html.theme-light .flow-tab-btn.active {
  background: #B10025 !important;
  color: #FFFFFF !important;
  border-color: #B10025 !important;
  box-shadow: 0 4px 16px rgba(177, 0, 37, 0.35) !important;
  font-weight: 800 !important;
}

html.theme-light .flow-tab-btn.active * {
  color: #FFFFFF !important;
}

html.theme-light .flow-step-node {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

html.theme-light .flow-step-node h4 {
  color: #0F172A !important;
}

html.theme-light .flow-step-node p {
  color: #475569 !important;
}

/* Client Directory & Filter Buttons in Light Theme */
html.theme-light .client-logo-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
}

html.theme-light .client-filter-btn {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #334155 !important;
  font-weight: 700 !important;
}

html.theme-light .client-filter-btn:hover {
  background: #F8FAFC !important;
  color: #0F172A !important;
  border-color: #B10025 !important;
}

html.theme-light .client-filter-btn.active {
  background: #B10025 !important;
  color: #FFFFFF !important;
  border-color: #B10025 !important;
}

html.theme-light .client-grid-item {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

html.theme-light .client-grid-item:hover {
  border-color: #B10025 !important;
  box-shadow: 0 8px 20px rgba(177, 0, 37, 0.1) !important;
}

html.theme-light .client-grid-item span.text-slate-200 {
  color: #0F172A !important;
}

html.theme-light .client-grid-item span.text-slate-400 {
  color: #475569 !important;
}

/* ==========================================================================
   Smart Architecture & Timeline Estimator (#estimator) in Light Theme
   ========================================================================== */
html.theme-light #estimator {
  background-color: #F8FAFC !important;
  border-top-color: #E2E8F0 !important;
}

html.theme-light #estimator .badge-crimson {
  background-color: #FFF1F2 !important;
  border-color: #FECDD3 !important;
  color: #BE123C !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(190, 18, 60, 0.08) !important;
}

html.theme-light #estimator h2 {
  color: #0F172A !important;
}

html.theme-light #estimator p {
  color: #475569 !important;
}

html.theme-light #estimator .glass-panel {
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04) !important;
}

html.theme-light #est-step-label {
  color: #475569 !important;
  font-weight: 700 !important;
}

html.theme-light #est-step-pct {
  color: #B10025 !important;
  font-weight: 800 !important;
}

html.theme-light #estimator .bg-white\/5 {
  background-color: #E2E8F0 !important;
  border-color: #CBD5E1 !important;
}

/* Step 1 Options */
html.theme-light .est-option-card {
  background-color: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html.theme-light .est-option-card:hover {
  background-color: #FFF1F2 !important;
  border-color: #B10025 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(177, 0, 37, 0.12) !important;
}

html.theme-light .est-option-card:has(input:checked) {
  background-color: #FFF1F2 !important;
  border-color: #B10025 !important;
  box-shadow: 0 0 0 1.5px #B10025, 0 4px 14px rgba(177, 0, 37, 0.1) !important;
}

html.theme-light .est-option-card strong {
  color: #0F172A !important;
}

html.theme-light .est-option-card:hover strong,
html.theme-light .est-option-card:has(input:checked) strong {
  color: #991B1B !important;
}

html.theme-light .est-option-card span {
  color: #475569 !important;
}

/* Steps 2 & 3 Option Cards and Inputs */
html.theme-light #estimator .est-step h3 {
  color: #0F172A !important;
}

html.theme-light #estimator .est-step label.block {
  color: #334155 !important;
}

html.theme-light #estimator .est-step label:not(.block) {
  background-color: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.2s ease !important;
}

html.theme-light #estimator .est-step label:not(.block):hover {
  background-color: #FFF1F2 !important;
  border-color: #B10025 !important;
}

html.theme-light #estimator .est-step label:not(.block):has(input:checked) {
  background-color: #FFF1F2 !important;
  border-color: #B10025 !important;
  box-shadow: 0 0 0 1.5px #B10025, 0 4px 12px rgba(177, 0, 37, 0.08) !important;
}

html.theme-light #estimator .est-step label:not(.block) strong,
html.theme-light #estimator .est-step label:not(.block) span.text-white {
  color: #0F172A !important;
}

html.theme-light #estimator .est-step label:not(.block):hover strong,
html.theme-light #estimator .est-step label:not(.block):hover span.text-white,
html.theme-light #estimator .est-step label:not(.block):has(input:checked) strong,
html.theme-light #estimator .est-step label:not(.block):has(input:checked) span.text-white {
  color: #991B1B !important;
}

html.theme-light #estimator .est-step label:not(.block) span.text-slate-400 {
  color: #475569 !important;
}

/* Step 4: Sprint Blueprint Card */
html.theme-light #est-step-4 .bg-gradient-to-br {
  background: linear-gradient(135deg, #FFF1F2 0%, #FFFFFF 50%, #ECFDF5 100%) !important;
  border: 1px solid #FECDD3 !important;
  box-shadow: 0 10px 30px -10px rgba(177, 0, 37, 0.08) !important;
}

html.theme-light #est-step-4 .border-b {
  border-bottom-color: #FECDD3 !important;
}

html.theme-light #est-summary-title {
  color: #0F172A !important;
}

html.theme-light #est-step-4 .text-emerald-400,
html.theme-light #est-timeline-val {
  color: #059669 !important;
}

html.theme-light #est-step-4 .bg-black\/40 {
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

html.theme-light #est-step-4 .bg-black\/40 span.text-slate-400 {
  color: #475569 !important;
}

html.theme-light #est-p1-desc {
  color: #0F172A !important;
}

html.theme-light #est-p2-desc {
  color: #059669 !important;
}

html.theme-light #est-p3-desc {
  color: #0284C7 !important;
}

html.theme-light #est-step-4 h4.uppercase {
  color: #334155 !important;
}

/* Estimator Navigation Footer & Buttons */
html.theme-light #estimator .mt-8.pt-6.border-t {
  border-top-color: #E2E8F0 !important;
}

html.theme-light #est-prev-btn {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
}

html.theme-light #est-prev-btn:hover {
  background: #F8FAFC !important;
  color: #B10025 !important;
  border-color: #B10025 !important;
}

html.theme-light #est-next-btn {
  background: #B10025 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(177, 0, 37, 0.35) !important;
}

html.theme-light #est-next-btn * {
  color: #FFFFFF !important;
}

html.theme-light #est-submit-btn {
  background: #059669 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(5, 150, 105, 0.35) !important;
}

html.theme-light #est-submit-btn * {
  color: #FFFFFF !important;
}

/* ==========================================================================
   ROI Calculator (#roi) in Light Theme
   ========================================================================== */
html.theme-light #roi select#roi-biz-type {
  background-color: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}

html.theme-light #roi select#roi-biz-type option {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
}

html.theme-light #roi .lg\:col-span-6.bg-black\/60 {
  background-color: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08) !important;
}

html.theme-light #roi-hours-result {
  color: #0F172A !important;
}

html.theme-light #roi-cost-result,
html.theme-light #roi-penalty-result {
  color: #059669 !important;
}

html.theme-light #roi-volume-slider {
  background-color: #E2E8F0 !important;
}

/* Hero Floating Telemetry Chips in Light Theme */
html.theme-light .hero-floating-chip {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
}

/* Borders in Light Theme */
html.theme-light .border-white\/5,
html.theme-light .border-white\/10,
html.theme-light .border-white\/15,
html.theme-light .border-white\/20,
html.theme-light .border-white\/\[0\.08\],
html.theme-light .border-white\/\[0\.15\] {
  border-color: #E2E8F0 !important;
}

/* Modals & Popups in Light Theme */
html.theme-light #demo-modal > div,
html.theme-light .modal-content-solid {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25) !important;
}

html.theme-light #demo-modal label,
html.theme-light .modal-content-solid label {
  color: #1E293B !important;
  font-weight: 600 !important;
}

/* Input Fields in Light Theme */
html.theme-light .form-input-crystal {
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}

html.theme-light .form-input-crystal:focus {
  background: #FFFFFF !important;
  border-color: #B10025 !important;
  box-shadow: 0 0 0 3px rgba(177, 0, 37, 0.15) !important;
}

html.theme-light .form-input-crystal option {
  background: #FFFFFF !important;
  color: #0F172A !important;
}

/* Footer in Light Theme */
html.theme-light .bg-\[\#0A0D18\] {
  background-color: #F1F5F9 !important;
  border-top-color: #CBD5E1 !important;
}

html.theme-light .bg-\[\#0A0D18\] .text-slate-400 {
  color: #475569 !important;
}

html.theme-light .bg-\[\#0A0D18\] .text-white {
  color: #0F172A !important;
}

html.theme-light .bg-\[\#0A0D18\] .border-white\/10 {
  border-color: #E2E8F0 !important;
}

/* Back to Top in Light Theme */
html.theme-light .back-to-top-floating {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #CBD5E1 !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1) !important;
}

html.theme-light .back-to-top-floating .text-slate-200 {
  color: #0F172A !important;
}

html.theme-light .back-to-top-floating:hover {
  background: #B10025 !important;
  border-color: #B10025 !important;
}

html.theme-light .back-to-top-floating:hover .text-slate-200 {
  color: #FFFFFF !important;
}

/* Rich Content & Articles in Light Theme */
html.theme-light .rich-content pre {
  background: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
  color: #0F172A !important;
}

html.theme-light .rich-content code {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #B10025 !important;
}

html.theme-light .rich-content blockquote {
  background: #F8FAFC !important;
  color: #334155 !important;
  border-color: #B10025 !important;
}

/* ==========================================================================
   High-Performance Rendering & Hardware-Accelerated Smooth Scroll
   ========================================================================== */
.navbar-crystal,
.back-to-top-floating,
.floating-beacon,
.scroll-progress-bar {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Content-Visibility Deferral for Below-The-Fold Sections */
#case-studies,
#faq,
#blog,
#estimator,
#services,
#products {
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}

/* ==========================================================================
   Mobile-Optimized Popup Forms & Bottom-Sheet Design System
   ========================================================================== */

/* Modal Backdrop & State Handling */
#demo-modal,
#product-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.28s ease;
}

#demo-modal.active,
#product-modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Entry Animations (Mobile Bottom-Sheet Slide Up vs Desktop Scale Up) */
@media (max-width: 639.98px) {
  #demo-modal > div:last-child,
  #product-modal > div:last-child,
  .animate-modal-enter {
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }

  #demo-modal.active > div:last-child,
  #product-modal.active > div:last-child {
    transform: translateY(0);
  }

  /* Prevent iOS Safari Viewport Auto-Zoom (Inputs MUST be >= 16px) */
  #demo-modal input,
  #demo-modal select,
  #demo-modal textarea,
  #product-modal input,
  #product-modal select,
  #product-modal textarea,
  .form-input-crystal {
    font-size: 16px !important;
  }

  /* Touch ergonomics */
  #demo-modal .form-input-crystal {
    padding: 0.75rem 0.9rem !important;
  }
}

@media (min-width: 640px) {
  #demo-modal > div:last-child,
  #product-modal > div:last-child,
  .animate-modal-enter {
    transform: scale(0.96) translateY(12px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }

  #demo-modal.active > div:last-child,
  #product-modal.active > div:last-child {
    transform: scale(1) translateY(0);
  }
}

/* Modal Custom Thin Scrollbar */
.modal-custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(177, 0, 37, 0.4) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

.modal-custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.modal-custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(177, 0, 37, 0.35);
  border-radius: 9999px;
}

.modal-custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(177, 0, 37, 0.75);
}

/* Mobile Pull Drag Bar Handle */
.modal-drag-handle {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-drag-handle:active {
  transform: scaleX(1.15);
  background: rgba(255, 255, 255, 0.5) !important;
}

/* Dark Theme Modal Palette */
html:not(.theme-light) #demo-modal .glass-panel,
html:not(.theme-light) #product-modal .glass-panel {
  background: #0E1322 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85) !important;
}

html:not(.theme-light) .modal-feature-item {
  color: #CBD5E1;
}

/* Light Theme Modal Palette */
html.theme-light #demo-modal .glass-panel,
html.theme-light #product-modal .glass-panel {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3) !important;
}

html.theme-light #demo-modal h3,
html.theme-light #product-modal h3 {
  color: #0F172A !important;
}

html.theme-light #demo-modal p,
html.theme-light #product-modal p {
  color: #475569 !important;
}

html.theme-light #demo-modal label {
  color: #1E293B !important;
  font-weight: 600 !important;
}

html.theme-light .modal-drag-handle {
  background: #CBD5E1 !important;
}

html.theme-light #demo-modal button[aria-label="Close"],
html.theme-light #product-modal button[aria-label="Close"] {
  background: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
  color: #475569 !important;
}

html.theme-light #demo-modal button[aria-label="Close"]:hover,
html.theme-light #product-modal button[aria-label="Close"]:hover {
  background: #E2E8F0 !important;
  color: #0F172A !important;
}

html.theme-light .modal-feature-item {
  color: #334155;
}

html.theme-light #demo-modal .border-b,
html.theme-light #demo-modal .border-t,
html.theme-light #product-modal .border-b,
html.theme-light #product-modal .border-t {
  border-color: #E2E8F0 !important;
}

html.theme-light #product-modal .bg-black\/20 {
  background: #F8FAFC !important;
}

/* ==========================================================================
   Clients Directory Page & Card Enhancements
   ========================================================================== */
.client-card {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

.client-card:hover {
  transform: translateY(-4px);
}

html:not(.theme-light) .client-card {
  background: rgba(18, 24, 41, 0.82);
  border-color: rgba(255, 255, 255, 0.1);
}

html:not(.theme-light) .client-card:hover {
  border-color: rgba(225, 29, 72, 0.45);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.7);
}

/* Light Theme Client Card */
html.theme-light .client-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05) !important;
}

html.theme-light .client-card:hover {
  border-color: #B10025 !important;
  box-shadow: 0 16px 35px -8px rgba(177, 0, 37, 0.15) !important;
}

html.theme-light .client-card h3 {
  color: #0F172A !important;
}

html.theme-light .client-card .bg-white\/\[0\.04\] {
  background-color: #F8FAFC !important;
  border-color: #E2E8F0 !important;
}

html.theme-light .client-card .border-t {
  border-color: #E2E8F0 !important;
}

html.theme-light .client-dir-btn {
  background: #F1F5F9 !important;
  color: #334155 !important;
  border-color: #CBD5E1 !important;
}

html.theme-light .client-dir-btn.active {
  background: #B10025 !important;
  color: #FFFFFF !important;
  border-color: #B10025 !important;
  box-shadow: 0 4px 14px rgba(177, 0, 37, 0.25) !important;
}


