/* ==========================================================================
   Bhavan Web — High-End Design System & Global Stylesheet
   Crafted to Apple, Google, Meta, and Netflix UI/UX Standards
   Ultra-Responsive: 4K, 2K, FHD, Desktop, Tablet, Mobile, iPhone 5 (320px)
   ========================================================================== */

:root {
  /* Premium Dark Canvas & Atmospheric Lighting */
  --bg-dark: #060911;
  --bg-base: #090e1a;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #162238;
  --bg-surface-glass: rgba(15, 23, 42, 0.72);
  --bg-surface-card: rgba(22, 34, 56, 0.6);

  /* Inner Reflections & Delicate Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(201, 121, 85, 0.6);
  --border-focus: #c97955;

  /* Typography Scale */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Brand Accents */
  --copper: #c97955;
  --copper-light: #e08e69;
  --copper-gradient: linear-gradient(135deg, #e08e69 0%, #c97955 50%, #9e5333 100%);
  --copper-glow: rgba(201, 121, 85, 0.28);
  --copper-glow-strong: rgba(201, 121, 85, 0.45);

  --cyan: #38bdf8;
  --cyan-light: #7dd3fc;
  --cyan-gradient: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 60%, #0284c7 100%);
  --cyan-glow: rgba(56, 189, 248, 0.22);

  --emerald: #22c55e;
  --emerald-glow: rgba(34, 197, 94, 0.22);
  --amber: #f59e0b;
  --rose: #f43f5e;

  /* Layout Spacings & Rhythm (8px Grid) */
  --max-width: 1220px;
  --container-padding: 28px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Spring Animations (Apple iOS Curve) */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s var(--ease-spring);
  --transition-smooth: all 0.35s var(--ease-spring);
  --transition-bounce: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  letter-spacing: -0.01em;
}

/* Ambient Radial Background Glows */
body::before {
  content: "";
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(201, 121, 85, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: max(var(--container-padding), env(safe-area-inset-left));
  padding-right: max(var(--container-padding), env(safe-area-inset-right));
  position: relative;
  z-index: 1;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.section-title {
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.section-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 740px;
  margin-bottom: 3rem;
  line-height: 1.65;
  font-weight: 400;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Gradient Typography */
.copper-text {
  background: var(--copper-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.cyan-text {
  background: var(--cyan-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.emerald-text { color: var(--emerald); }

/* Badges & Micro-Labels */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: clamp(0.78rem, 1.1vw, 0.85rem);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(201, 121, 85, 0.12);
  color: var(--copper-light);
  border: 1px solid rgba(201, 121, 85, 0.32);
  margin-bottom: 1.35rem;
  letter-spacing: 0.025em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 100%;
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.1);
  color: var(--cyan-light);
  border-color: rgba(56, 189, 248, 0.3);
}

.badge-emerald {
  background: rgba(34, 197, 94, 0.1);
  color: var(--emerald);
  border-color: rgba(34, 197, 94, 0.3);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 0 0 var(--emerald-glow);
  animation: pulse 2.2s infinite var(--ease-spring);
  flex-shrink: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Premium Buttons & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  white-space: normal;
  text-align: center;
  min-height: 46px; /* Tap target compliance */
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--copper-gradient);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 20px var(--copper-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 26px var(--copper-glow-strong);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(22, 34, 56, 0.7);
  color: var(--text-main);
  border-color: var(--border-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn-secondary:hover {
  background: rgba(30, 45, 74, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-cyan {
  background: var(--cyan-gradient);
  color: #04121f;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 20px var(--cyan-glow);
}

.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 26px rgba(56, 189, 248, 0.45);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.88rem;
  min-height: 40px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 9, 17, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  transition: var(--transition-fast);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo-img {
  height: clamp(32px, 4vw, 38px);
  width: auto;
  max-width: 190px;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: clamp(16px, 2.2vw, 32px);
}

.nav-link {
  font-size: clamp(0.88rem, 1.05vw, 0.95rem);
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 0;
  position: relative;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--copper);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--copper);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(22, 34, 56, 0.7);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  background: var(--copper-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--copper-glow);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: rgba(22, 34, 56, 0.6);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-card);
  padding: 24px 28px 32px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.mobile-nav-link {
  font-size: 1.1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 48px;
  font-weight: 500;
}

.mobile-nav-link.active, .mobile-nav-link:hover {
  color: var(--copper-light);
}

/* ==========================================================================
   Hero Sections
   ========================================================================== */
.hero-section {
  padding: clamp(64px, 10vw, 110px) 0 clamp(48px, 8vw, 80px);
  position: relative;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(201, 121, 85, 0.15), transparent 70%),
              radial-gradient(900px 450px at 85% 15%, rgba(56, 189, 248, 0.08), transparent 60%),
              var(--bg-dark);
}

.hero-content {
  max-width: 900px;
}

.hero-title {
  font-size: clamp(2.35rem, 5.8vw, 4.3rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: clamp(1.08rem, 2.1vw, 1.35rem);
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2.75rem;
  max-width: 760px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.trust-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  font-weight: 500;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.trust-item svg {
  color: var(--emerald);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.4));
}

/* ==========================================================================
   Section Blocks & Cards
   ========================================================================== */
section.site-section {
  padding: clamp(64px, 9vw, 108px) 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  width: 100%;
}

.section-header {
  margin-bottom: clamp(40px, 6vw, 60px);
}

/* Card Grid System */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3.5vw, 44px);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.8vw, 32px);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.2vw, 24px);
}

/* Feature & Product Cards (Frosted Glass Depth) */
.feature-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: clamp(26px, 4vw, 36px);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.3);
}

.feature-card:hover {
  border-color: var(--copper);
  transform: translateY(-5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 20px 48px -10px rgba(0, 0, 0, 0.5), 0 0 28px var(--copper-glow);
}

.card-icon-wrap {
  width: clamp(48px, 5vw, 56px);
  height: clamp(48px, 5vw, 56px);
  border-radius: var(--radius-sm);
  background: rgba(201, 121, 85, 0.12);
  color: var(--copper-light);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(201, 121, 85, 0.3);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card-icon-wrap.cyan {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.card-icon-wrap.emerald {
  background: rgba(34, 197, 94, 0.12);
  color: var(--emerald);
  border-color: rgba(34, 197, 94, 0.3);
}

.card-icon-wrap svg {
  width: clamp(24px, 3vw, 28px);
  height: clamp(24px, 3vw, 28px);
}

.card-title {
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  margin-bottom: 12px;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

.card-text {
  color: var(--text-muted);
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  line-height: 1.68;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--copper-light);
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: auto;
}

.card-link:hover {
  color: #ffffff;
  gap: 12px;
}

/* ==========================================================================
   Interactive Loop / Architecture Visualizer
   ========================================================================== */
.loop-visualizer {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4.5vw, 48px);
  margin: clamp(28px, 4.5vw, 48px) 0;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 20px 48px rgba(0, 0, 0, 0.4);
}

.loop-visualizer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--copper), var(--cyan), transparent);
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
  position: relative;
}

.loop-node {
  background: rgba(22, 34, 56, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(20px, 2.8vw, 28px) clamp(16px, 2.2vw, 24px);
  text-align: center;
  position: relative;
  transition: var(--transition-smooth);
}

.loop-node:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--cyan-glow);
}

.loop-node .node-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.loop-node h4 {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  margin-bottom: 8px;
}

.loop-node p {
  font-size: clamp(0.85rem, 1.05vw, 0.92rem);
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Comparison Table (Local-First vs Cloud)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.35);
  margin: 28px 0;
}

table.comparison-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  text-align: left;
  font-size: clamp(0.88rem, 1.1vw, 0.98rem);
}

table.comparison-table th, table.comparison-table td {
  padding: clamp(16px, 2.2vw, 22px) clamp(18px, 2.5vw, 28px);
  border-bottom: 1px solid var(--border-subtle);
}

table.comparison-table th {
  background: rgba(22, 34, 56, 0.85);
  font-weight: 700;
  color: var(--text-main);
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  white-space: nowrap;
}

table.comparison-table th.bhavan-col, table.comparison-table td.bhavan-col {
  background: rgba(201, 121, 85, 0.08);
  border-left: 1px solid rgba(201, 121, 85, 0.28);
  border-right: 1px solid rgba(201, 121, 85, 0.28);
  color: #ffffff;
  font-weight: 600;
}

table.comparison-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

table.comparison-table tr:last-child td {
  border-bottom: none;
}

.check-icon {
  color: var(--emerald);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cross-icon {
  color: var(--rose);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Interactive Cost Estimator Calculator
   ========================================================================== */
.calculator-box {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4.5vw, 48px);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(28px, 4.5vw, 48px);
  align-items: start;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 24px 60px rgba(0, 0, 0, 0.45);
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.8vw, 28px);
}

.calc-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.calc-label {
  font-weight: 600;
  color: var(--text-main);
  font-size: clamp(0.9rem, 1.15vw, 1rem);
}

.calc-val {
  font-weight: 700;
  color: var(--copper-light);
  background: rgba(201, 121, 85, 0.14);
  border: 1px solid rgba(201, 121, 85, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  white-space: nowrap;
}

/* Custom Styled Range Sliders */
input[type="range"] {
  width: 100%;
  accent-color: var(--copper);
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}

input[type="range"]:hover {
  background: rgba(255, 255, 255, 0.16);
}

.calc-summary-panel {
  background: rgba(22, 34, 56, 0.85);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: clamp(26px, 3.8vw, 36px);
  position: sticky;
  top: 96px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 16px 40px rgba(0, 0, 0, 0.35);
}

.price-display {
  font-size: clamp(2.3rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: var(--copper-light);
  line-height: 1.05;
  margin: 12px 0 8px;
  letter-spacing: -0.04em;
}

.price-subtext {
  color: var(--text-muted);
  font-size: clamp(0.82rem, 1.05vw, 0.9rem);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 18px;
}

.calc-breakdown-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
  font-size: clamp(0.85rem, 1.05vw, 0.94rem);
}

.calc-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.calc-breakdown-item span.highlight {
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4.5vw, 44px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 20px 48px rgba(0, 0, 0, 0.4);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

input.form-input, select.form-input, textarea.form-input {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  background: rgba(6, 9, 17, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: inherit;
  font-size: 16px; /* Enforces 16px to prevent iOS auto zoom */
  transition: var(--transition-fast);
  min-height: 48px;
}

input.form-input:focus, select.form-input:focus, textarea.form-input:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 4px var(--copper-glow);
  background: rgba(10, 15, 26, 0.95);
}

/* ==========================================================================
   Accordion / FAQ
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.faq-item.active {
  border-color: var(--copper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px var(--copper-glow);
}

.faq-header {
  padding: clamp(18px, 2.8vw, 24px) clamp(20px, 3.2vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: 16px;
  min-height: 48px;
}

.faq-question {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.faq-toggle-icon {
  width: 22px;
  height: 22px;
  color: var(--copper-light);
  transition: transform 0.3s var(--ease-spring);
  flex-shrink: 0;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(180deg);
}

.faq-body {
  display: none;
  padding: 0 clamp(20px, 3.2vw, 28px) clamp(20px, 3.2vw, 26px);
  color: var(--text-muted);
  font-size: clamp(0.92rem, 1.15vw, 1rem);
  line-height: 1.75;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 18px;
}

.faq-item.active .faq-body {
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer.site-footer {
  background: #04060c;
  border-top: 1px solid var(--border-subtle);
  padding: clamp(56px, 7vw, 76px) 0 36px;
  margin-top: auto;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: clamp(32px, 4.5vw, 56px);
  margin-bottom: 56px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 16px;
  max-width: 340px;
  line-height: 1.65;
}

.footer-col h4 {
  font-size: 0.94rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 18px;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer-link:hover {
  color: var(--copper-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.88rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   MULTI-TIER RESPONSIVE ARCHITECTURE
   4K, 2K, FHD, Desktop, Tablet, Mobile, iPhone 5 (320px)
   ========================================================================== */

/* 1. Ultra-Wide & 4K Displays (>= 2400px) */
@media (min-width: 2400px) {
  :root {
    --max-width: 1780px;
    --container-padding: 48px;
  }
  html {
    font-size: 19px;
  }
  .grid-4 { gap: 32px; }
  .grid-3 { gap: 36px; }
  .grid-2 { gap: 48px; }
  .feature-card { padding: 42px; }
}

/* 2. 2K QHD Displays (1920px to 2399px) */
@media (min-width: 1920px) and (max-width: 2399px) {
  :root {
    --max-width: 1460px;
    --container-padding: 38px;
  }
  html {
    font-size: 17px;
  }
  .grid-4 { gap: 28px; }
  .grid-3 { gap: 32px; }
}

/* 3. Small Desktops & Laptops (1024px to 1199px) */
@media (max-width: 1199px) {
  .nav-menu { gap: 20px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; }
}

/* 4. Tablets Landscape & Medium Screens (769px to 1023px) */
@media (max-width: 1023px) {
  .nav-menu, .nav-actions .btn { display: none; }
  .mobile-toggle { display: inline-flex; }
  
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .calculator-box { grid-template-columns: 1fr; }
  .calc-summary-panel { position: static; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .loop-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 5. Tablets Portrait & Large Mobile (541px to 768px) */
@media (max-width: 768px) {
  :root {
    --container-padding: 22px;
  }
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .loop-grid { grid-template-columns: 1fr; }

  div[style*="order: 2;"] { order: 0 !important; }
  div[style*="order: 1;"] { order: 0 !important; }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta-group .btn {
    width: 100%;
  }

  .trust-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* 6. Standard Mobile Devices (376px to 540px) */
@media (max-width: 540px) {
  :root {
    --container-padding: 18px;
  }
  .nav-wrap { height: 68px; }
  .brand-logo-img { height: 32px; }

  .hero-section {
    padding: 44px 0 36px;
  }

  .calc-label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .price-display {
    font-size: 2.35rem;
  }
}

/* 7. Ultra-Compact Mobile & iPhone 5 / SE 1st Gen (320px to 375px) */
@media (max-width: 375px) {
  :root {
    --container-padding: 12px;
  }

  html {
    font-size: 14.5px;
  }

  .brand-logo-img {
    height: 28px;
    max-width: 140px;
  }

  .mobile-toggle {
    padding: 6px;
    min-height: 40px;
    min-width: 40px;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.18;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    gap: 6px;
  }

  .feature-card {
    padding: 20px 14px;
  }

  .calculator-box {
    padding: 20px 14px;
  }

  .calc-summary-panel {
    padding: 20px 14px;
  }

  .price-display {
    font-size: 1.95rem;
    word-break: break-all;
  }

  .btn {
    padding: 11px 16px;
    font-size: 0.88rem;
    width: 100%;
  }

  .faq-header {
    padding: 16px 14px;
    gap: 10px;
  }

  .faq-body {
    padding: 0 14px 18px;
  }

  .faq-question {
    font-size: 0.94rem;
  }

  .form-card {
    padding: 22px 14px;
  }

  table.comparison-table th, table.comparison-table td {
    padding: 12px 14px;
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   ADVANCED INTERACTIVE ENHANCEMENTS & TOOLS
   ========================================================================== */

/* 1. Delay Simulator ("Feel the 12ms Difference") */
.delay-sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.delay-sim-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-medium);
}

.delay-sim-card.active {
  border-color: var(--copper);
  box-shadow: 0 0 32px rgba(226, 125, 96, 0.15);
}

.sim-bulb-fixture {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: #1e293b;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  transition: all 0.15s ease-out;
  position: relative;
}

.sim-bulb-fixture.on {
  background: radial-gradient(circle, #fef08a 0%, #eab308 60%, rgba(234, 179, 8, 0.2) 100%);
  border-color: #fde047;
  box-shadow: 0 0 45px rgba(253, 224, 71, 0.6);
  transform: scale(1.05);
}

.sim-bulb-fixture.loading {
  animation: bulbPulse 0.8s infinite alternate;
}

@keyframes bulbPulse {
  from { opacity: 0.4; }
  to { opacity: 0.9; }
}

.sim-latency-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 9999px;
  margin-bottom: 20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.sim-toggle-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* 2. Interactive Water Tank Simulator */
.sim-tank-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 32px;
}

@media (max-width: 768px) {
  .sim-tank-box {
    grid-template-columns: 1fr;
  }
}

.sim-tank-visual {
  width: 180px;
  height: 260px;
  border: 3px solid #334155;
  border-radius: 24px 24px 16px 16px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #0f172a;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.sim-sensor-beam {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background: repeating-linear-gradient(to bottom, #38bdf8 0, #38bdf8 6px, transparent 6px, transparent 12px);
  z-index: 5;
  transition: height 0.2s linear;
}

.sim-water-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.8) 0%, rgba(14, 116, 144, 0.95) 100%);
  transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 3px solid #7dd3fc;
}

.sim-water-fill::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.35);
  filter: blur(1px);
}

/* 3. Power Cut & Inverter Recovery Simulator */
.power-sim-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin-top: 32px;
  transition: background 0.3s ease;
  position: relative;
}

.power-sim-box.blackout {
  background: #05070a;
  border-color: #3b0764;
}

.power-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.room-lights-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.room-light-node {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.room-light-node.lit {
  border-color: var(--copper-light);
  background: rgba(226, 125, 96, 0.12);
}

/* 4. Switchboard Compatibility Checker */
.compat-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  margin-top: 32px;
}

.compat-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}

.compat-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.compat-chip:hover {
  border-color: var(--copper);
  color: var(--text-primary);
}

.compat-chip.active {
  background: rgba(226, 125, 96, 0.15);
  border-color: var(--copper);
  color: var(--copper-light);
  box-shadow: 0 0 16px rgba(226, 125, 96, 0.2);
}

.compat-result-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 640px) {
  .compat-result-card {
    flex-direction: column;
    text-align: center;
  }
}

/* 5. 5-Year Total Cost of Ownership (TCO) Calculator */
.tco-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  margin-top: 36px;
}

.tco-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
}

@media (max-width: 768px) {
  .tco-comparison-grid {
    grid-template-columns: 1fr;
  }
}

.tco-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

.tco-column.winner {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.04);
}

.tco-total-figure {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 900;
  margin: 12px 0 16px;
}

.tco-bar-fill {
  height: 14px;
  border-radius: 7px;
  margin-top: 10px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 6. Case Studies / Real Home Stories */
.story-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.story-card:hover {
  transform: translateY(-4px);
  border-color: var(--copper);
}

.story-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.story-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--copper), var(--copper-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 1.1rem;
}

/* 7. Print Estimate Template */
@media print {
  body {
    background: #ffffff !important;
    color: #111827 !important;
  }

  .site-header, .site-footer, .nav-actions, .mobile-toggle, .btn, .calculator-controls, .hero-section {
    display: none !important;
  }

  .printable-quote-area {
    display: block !important;
    padding: 30px !important;
    background: #ffffff !important;
    color: #111827 !important;
    border: none !important;
  }

  .printable-quote-area * {
    color: #111827 !important;
  }
}

