/**
 * Zitia Industrial Intelligence - Main Stylesheet
 * Design System: "The Kinetic Architect"
 *
 * Color Philosophy: Deep Slate + Electric Cyan = Luminescent Precision
 * Typography: Space Grotesk (Editorial) + JetBrains Mono (Technical) + Inter (Interface)
 */

/* ==========================================================================
   Base Styles & CSS Variables
   ========================================================================== */

:root {
  /* Surface Colors - Tonal Carving System */
  --surface-dim: #0b1326;
  --surface: #0b1326;
  --surface-bright: #31394d;
  --surface-container-lowest: #060e20;
  --surface-container-low: #131b2e;
  --surface-container: #171f33;
  --surface-container-high: #222a3d;
  --surface-container-highest: #2d3449;
  --surface-variant: #2d3449;
  --surface-tint: #2fd9f4;

  /* Primary Colors - Electric Cyan */
  --primary: #8aebff;
  --primary-container: #22d3ee;
  --on-primary: #00363e;
  --on-primary-container: #005763;
  --primary-fixed: #a2eeff;
  --primary-fixed-dim: #2fd9f4;
  --inverse-primary: #006877;

  /* Secondary Colors - Efficiency Green */
  --secondary: #4edea3;
  --secondary-container: #00a572;
  --on-secondary: #003824;
  --on-secondary-container: #00311f;
  --secondary-fixed: #6ffbbe;
  --secondary-fixed-dim: #4edea3;

  /* Tertiary Colors - Warning Amber */
  --tertiary: #ffd6a7;
  --tertiary-container: #ffb147;
  --on-tertiary: #472a00;
  --on-tertiary-container: #704500;
  --tertiary-fixed: #ffddb8;
  --tertiary-fixed-dim: #ffb95f;

  /* Error Colors */
  --error: #ffb4ab;
  --error-container: #93000a;
  --on-error: #690005;
  --on-error-container: #ffdad6;

  /* Text & Outline Colors */
  --on-surface: #dae2fd;
  --on-surface-variant: #bbc9cd;
  --on-background: #dae2fd;
  --outline: #859397;
  --outline-variant: #3c494c;
  --inverse-surface: #dae2fd;
  --inverse-on-surface: #283044;

  /* Fixed Variants */
  --on-primary-fixed: #001f25;
  --on-primary-fixed-variant: #004e5a;
  --on-secondary-fixed: #002113;
  --on-secondary-fixed-variant: #005236;
  --on-tertiary-fixed: #2a1700;
  --on-tertiary-fixed-variant: #653e00;

  /* Background */
  --background: #0b1326;

  /* Border Radius */
  --radius-default: 0.125rem;
  --radius-lg: 0.25rem;
  --radius-xl: 0.5rem;
  --radius-full: 0.75rem;

  /* Font Families */
  --font-headline: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-label: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Shadows */
  --shadow-glass: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow-primary: 0 0 20px rgba(34, 211, 238, 0.2);

  /* Animation Durations */
  --anim-duration-fast: 600ms;
  --anim-duration-normal: 1000ms;
  --anim-duration-slow: 1400ms;
}

/* ==========================================================================
   Animation Keyframes
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.4);
  }
}

/* Animation Classes */
.animate-fade-in {
  opacity: 0;
  animation: fadeIn var(--anim-duration-normal) ease-out forwards;
}

.animate-slide-up {
  opacity: 0;
  animation: slideUp var(--anim-duration-normal) ease-out forwards;
}

.animate-slide-left {
  opacity: 0;
  animation: slideInLeft var(--anim-duration-normal) ease-out forwards;
}

.animate-scale-in {
  opacity: 0;
  animation: scaleIn var(--anim-duration-fast) ease-out forwards;
}

/* Animation Delays */
.delay-100 { animation-delay: 150ms; }
.delay-200 { animation-delay: 300ms; }
.delay-300 { animation-delay: 500ms; }
.delay-400 { animation-delay: 700ms; }
.delay-500 { animation-delay: 900ms; }
.delay-600 { animation-delay: 1100ms; }
.delay-700 { animation-delay: 1300ms; }
.delay-800 { animation-delay: 1500ms; }

/* Initially hidden for animation */
.animate-on-load {
  opacity: 0;
}

/* Scroll animation trigger */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 1800ms ease-out, transform 1800ms ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Background handled by WebGL shader */
body {
  background: var(--background);
}

/* Global shader layer */
#bg-shader {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#bg-shader canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Fixed overlay for text readability */
.fixed-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1 !important;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(15, 20, 25, 0.55) 0%,
    rgba(15, 20, 25, 0.35) 100%
  );
}

/* Optional technical grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(47, 217, 244, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 217, 244, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.45;
}

/* Card Hover Animation */
.card, .room-card {
  transition: transform var(--transition-slow), background var(--transition-normal), box-shadow var(--transition-slow);
}

.card:hover, .room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Nav Link Hover Effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-normal), left var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Images always visible */
img {
  opacity: 1;
}

/* ==========================================================================
   Base Reset & Typography
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scroll-padding-top: 5rem;
}

html.dark {
  color-scheme: dark;
}

body {
  background-color: transparent;
  color: var(--on-surface);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
  position: relative;
}

::selection {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Glass Panel - Glassmorphism */
.glass-panel {
  background: rgba(45, 52, 73, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Grid Background Pattern */
.grid-bg {
  background: transparent;
}

/* Kinetic Gradient - Primary CTAs */
.kinetic-gradient {
  background: linear-gradient(135deg, var(--primary-container) 0%, var(--primary) 100%);
}

/* Material Symbols Configuration */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px;
  line-height: 1;
  vertical-align: middle;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Main content with fade animation */
main {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
  position: relative;
  z-index: 2;
}

/* Navigation Bar */
.nav-bar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 50;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-glass);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--primary);
  font-family: var(--font-headline);
  text-transform: uppercase;
  text-decoration: none;
}

.nav-links {
  display: none;
  gap: 2rem;
  font-family: var(--font-headline);
  letter-spacing: -0.025em;
  font-size: 0.875rem;
  text-transform: uppercase;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  color: rgb(203, 213, 225);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.nav-link:hover {
  color: rgb(103, 232, 249);
}

.nav-link.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.25rem;
}

/* Language Switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.lang-switch-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--outline);
  transition: color var(--transition-normal);
}

.lang-switch-label.active {
  color: var(--primary);
  font-weight: 600;
}

.lang-switch-track {
  width: 2.5rem;
  height: 1.25rem;
  background: var(--surface-container);
  border-radius: 1rem;
  position: relative;
  border: 1px solid var(--outline-variant);
  transition: background var(--transition-normal);
}

.lang-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: calc(1.25rem - 6px);
  background: var(--primary);
  border-radius: 50%;
  transition: transform var(--transition-normal);
}

.lang-switch[data-locale="es"] .lang-switch-thumb {
  transform: translateX(1.25rem);
}

.lang-switch:hover .lang-switch-track {
  border-color: var(--primary);
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-container) 0%, var(--primary) 100%);
  color: var(--on-primary-container);
  box-shadow: var(--shadow-glow-primary);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
}

.btn-secondary {
  background: var(--surface-container-high);
  color: var(--on-surface);
}

.btn-secondary:hover {
  background: var(--surface-variant);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--outline-variant);
  color: var(--on-surface);
}

.btn-outline:hover {
  background: var(--surface-container-high);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 0.875rem;
}

.btn-xl {
  padding: 1rem 2.5rem;
  font-size: 0.9375rem;
}

/* ==========================================================================
   Section Styles
   ========================================================================== */

.section {
  padding: 4rem 2rem;
  position: relative;
  z-index: 2;
}

.section-dark {
  background: transparent;
}

.section-dim {
  background: transparent;
  border-top: 1px solid rgba(60, 73, 76, 0.1);
  border-bottom: 1px solid rgba(60, 73, 76, 0.1);
}

.section-title {
  font-family: var(--font-headline);
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--on-surface-variant);
  font-size: 1rem;
}

@media (min-width: 768px) {
  .section {
    padding: 8rem 2rem;
  }

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

/* ==========================================================================
   Card Components
   ========================================================================== */

.card {
  background: rgba(11, 19, 38, 0.7);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid rgba(60, 73, 76, 0.1);
  transition: background var(--transition-normal);
}

.card:hover {
  background: rgba(11, 19, 38, 0.85);
}

.card-glass {
  background: rgba(45, 52, 73, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(133, 147, 151, 0.2);
  box-shadow: var(--shadow-glass);
}

.card-highlight {
  border: 1px dashed rgba(255, 177, 71, 0.3);
}

/* Room Status Cards */
.room-card {
  background: rgba(11, 19, 38, 0.7);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid rgba(60, 73, 76, 0.1);
  transition: background var(--transition-normal);
}

.room-card:hover {
  background: rgba(11, 19, 38, 0.85);
}

.room-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.room-card-title {
  font-family: var(--font-headline);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--on-surface);
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.room-card-id {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--outline);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-warning {
  background: rgba(255, 214, 167, 0.1);
  color: var(--tertiary);
}

.status-error {
  background: rgba(255, 180, 171, 0.1);
  color: var(--error);
}

.status-success {
  background: rgba(78, 222, 163, 0.1);
  color: var(--secondary);
}

/* ==========================================================================
   Data Display Components
   ========================================================================== */

.data-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 0.25rem;
}

.data-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.data-value-sm {
  font-size: 0.875rem;
}

.data-value-tertiary {
  color: var(--tertiary);
}

.data-value-surface {
  color: var(--on-surface);
}

/* Progress Bars */
.progress-bar {
  height: 6px;
  width: 100%;
  background: var(--surface-variant);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width var(--transition-slow);
}

.progress-bar-fill-secondary {
  background: var(--secondary);
}

.progress-bar-fill-tertiary {
  background: var(--tertiary);
}

/* Data Table */
.data-table {
  width: 100%;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-collapse: collapse;
}

.data-table thead {
  background: rgba(11, 19, 38, 0.85);
  border-bottom: 1px solid rgba(60, 73, 76, 0.3);
}

.data-table th {
  padding: 1rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--outline);
  font-weight: 400;
}

.data-table tbody tr {
  border-bottom: 1px solid rgba(60, 73, 76, 0.1);
  background: rgba(11, 19, 38, 0.5);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(138, 235, 255, 0.05);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  z-index: 2;
  padding-top: 6rem;
  padding-bottom: 8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .hero-content {
    grid-column: span 6;
  }

  .hero-visual {
    grid-column: span 6;
  }
}

.hero-title {
  font-family: var(--font-headline);
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 5rem;
  }
}

.hero-title-highlight {
  color: var(--primary);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--on-surface-variant);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-image-container {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-glass);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: lighten;
  opacity: 0.8;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--surface-dim), transparent, transparent);
}

/* Floating HUD Elements */
.hud-element {
  position: absolute;
  background: rgba(45, 52, 73, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem;
  border-radius: var(--radius-default);
  box-shadow: var(--shadow-glass);
  border: 1px solid rgba(133, 147, 151, 0.2);
}

.hud-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hud-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hud-status-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hud-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

.hud-label {
  font-size: 0.625rem;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  width: 100%;
  padding: 3rem;
  border-top: 1px solid rgba(30, 41, 59, 0.3);
  position: relative;
  z-index: 2;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0 2rem;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: rgb(241, 245, 249);
  font-family: var(--font-headline);
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-link {
  color: rgb(100, 116, 139);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.footer-link:hover {
  color: rgb(103, 232, 249);
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: rgb(100, 116, 139);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Staggered animations */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: block;
  }
}

.hide-desktop {
  display: block;
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none;
  }
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

#demoModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

#demoModal.visible {
  display: flex !important;
}

#demoModal > div {
  animation: scaleIn 0.3s ease;
}

#confirmationModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2100;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

#confirmationModal.visible {
  display: flex !important;
}

#confirmationModal > div {
  animation: scaleIn 0.3s ease;
}

#closeDemoModal:hover,
#closeConfirmationModal:hover {
  background: var(--surface-container);
}

#demoForm input:focus,
#demoForm select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

#demoForm input::placeholder {
  color: var(--on-surface-variant);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .nav-bar,
  .btn,
  .hud-element,
  #bg-shader,
  .fixed-overlay {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    padding: 2rem 0;
  }
}

/* ==========================================================================
   Operational Assessment Styles
   ========================================================================== */

#assessment-form-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

@media (max-width: 960px) {
  #assessment-form-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

#assessmentForm select:focus,
#assessmentForm input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

#assessmentForm select option {
  background: var(--surface-variant);
  color: var(--on-surface);
}

#assessmentForm button[type="submit"]:hover {
  filter: brightness(1.15);
}

#assessmentForm button[type="submit"]:active {
  transform: scale(0.98);
}

/* Risk gauge dynamic colors */
.risk-level-low { color: #4edea3 !important; }
.risk-level-medium { color: #ffd6a7 !important; }
.risk-level-high { color: #ffb4ab !important; }
.risk-level-critical { color: #ffb4ab !important; }

#impactTable tbody tr {
  border-bottom: 1px solid rgba(103, 118, 144, 0.12);
  transition: background 0.15s;
}
#impactTable tbody tr:hover {
  background: rgba(103, 118, 144, 0.04);
}
#impactTable tbody td {
  padding: 0.75rem 0;
}

/* Benchmark items */
.benchmark-item {
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  color: var(--on-surface-variant);
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
}

/* Recommendation cards */
.recommendation-item {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.recommendation-item.priority-high {
  background: rgba(220, 38, 38, 0.08);
  border-left: 3px solid #dc2626;
}
.recommendation-item.priority-medium {
  background: rgba(217, 119, 6, 0.08);
  border-left: 3px solid #d97706;
}
.recommendation-item.priority-low {
  background: rgba(78, 222, 163, 0.08);
  border-left: 3px solid #4edea3;
}

/* Risk factor tags */
.risk-factor-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  background: rgba(103, 118, 144, 0.1);
  color: var(--on-surface-variant);
}
.risk-factor-tag.increases::before {
  content: '▲';
  color: #ffb4ab;
  font-size: 0.65rem;
}
.risk-factor-tag.positive::before {
  content: '▼';
  color: #4edea3;
  font-size: 0.65rem;
}

/* CTA buttons */
#btnDownloadPdf:hover {
  filter: brightness(1.15);
}
#btnRequestDemo:hover {
  background: rgba(103, 118, 144, 0.12);
}

/* Lead form inputs */
#leadCaptureForm input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(78, 222, 163, 0.1);
}

/* Assessment loading state */
.assessment-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Smooth reveal for results */
#assessment-results,
#assessment-benchmark,
#assessment-recommendations,
#assessment-cta,
#assessment-disclaimer {
  opacity: 0;
  transform: translateY(20px);
  animation: assessmentReveal 0.6s ease-out forwards;
}

@keyframes assessmentReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  #assessmentForm {
    padding: 1.25rem !important;
  }
  #assessment-results > div,
  #assessment-benchmark,
  #assessment-recommendations,
  #assessment-cta {
    padding: 1.25rem !important;
  }
  #riskGauge {
    width: 100px !important;
    height: 100px !important;
  }
}
