/* ==========================================================================
   NovaClaro Design System — Single Source of Truth (Reference: case6.html)
   Modify colors, radii, typography, or card styles here to update all pages.
   ========================================================================== */

:root {
  /* Surface & Band Backgrounds */
  --bg-mist: #eff3f6;
  --bg-white: #ffffff;
  --bg-surface: #f7fafc;

  /* Slatec Ink & Border Scale */
  --slatec-50: #eff3f6;
  --slatec-100: #dcebef;
  --slatec-200: #bed1da;
  --slatec-300: #9eb9c7;
  --slatec-400: #7f9fb0;
  --slatec-500: #62899d;
  --slatec-600: #4e6f80;
  --slatec-700: #3b525e;
  --slatec-800: #27373f;
  --slatec-900: #141b1f;

  /* Coastal Teal Scale */
  --teal-50: #eef7f9;
  --teal-100: #d6ecf1;
  --teal-200: #b1dce5;
  --teal-300: #81c3d2;
  --teal-400: #59a6b8;
  --teal-500: #3e7d8e;
  --teal-600: #2f5d6a;
  --teal-700: #264b56;
  --teal-800: #1c3841;
  --teal-900: #112228;

  /* Brand Crimson Accent */
  --crimson: #db2424;
  --crimson-soft: #fef2f2;
  --crimson-border: #fecaca;

  /* Semantic Aliases */
  --ink-900: var(--slatec-900);
  --ink-700: var(--slatec-700);
  --ink-600: var(--slatec-600);
  --border-soft: var(--slatec-100);
  --border-card: var(--slatec-200);
  --teal-primary: var(--teal-500);
  --teal-dark: var(--teal-600);

  /* Consistent Geometry & Radii (case6 Reference) */
  --radius-card: 0.5rem;      /* 8px — matches Tailwind rounded-lg */
  --radius-surface: 0.5rem;   /* 8px — matches Tailwind rounded-lg */
  --radius-btn: 0.5rem;       /* 8px — matches Tailwind rounded-lg */
  --radius-pill: 9999px;      /* full pill */

  /* Elevation */
  --shadow-card: 0 4px 18px -4px rgba(20, 27, 31, 0.05);
  --shadow-card-hover: 0 10px 26px -4px rgba(20, 27, 31, 0.085);
}

/* Base Reset & Typography */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Mulish', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  background-color: var(--bg-mist);
  color: var(--ink-900);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Mulish', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-900);
}

.type-h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.type-h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.type-h3 {
  font-size: clamp(1.18rem, 2.1vw, 1.5rem);
  font-weight: 800;
  line-height: 1.3;
}

/* Alternating Page Bands */
.band-mist {
  background-color: var(--bg-mist);
}

.band-white {
  background-color: var(--bg-white);
}

/* Cards & Surfaces */
.coastal-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.coastal-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.coastal-surface {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-surface);
}

/* Semantic Status Panels (Problem / Solution) */
.panel-problem {
  background-color: rgba(254, 242, 242, 0.35);
  border-color: var(--crimson-border);
}

.panel-solution {
  background-color: rgba(238, 247, 249, 0.45);
  border-color: var(--teal-200);
}

/* Reusable Badges & Buttons */
.badge-hero {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-white);
  border: 1px solid var(--slatec-200);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--teal-700);
}

.badge-teal {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background-color: var(--teal-50);
  border: 1px solid var(--teal-200);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--teal-700);
}

.badge-crimson {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background-color: var(--crimson-soft);
  border: 1px solid var(--crimson-border);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--crimson);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-btn);
  background-color: var(--teal-600);
  color: var(--bg-white);
  font-weight: 800;
  transition: background-color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--teal-700);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-btn);
  background-color: var(--bg-white);
  border: 1px solid var(--teal-200);
  color: var(--teal-700);
  font-weight: 800;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--slatec-50);
}

.step-badge {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-btn);
  background-color: var(--teal-50);
  color: var(--teal-700);
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Unified Site Header & Footer (case6 Reference) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(47, 93, 106, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--teal-700);
}

.site-logo {
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--bg-white);
}

.site-footer {
  background-color: var(--bg-white);
  border-top: 1px solid var(--slatec-200);
  padding: 0.875rem 1rem;
}

.site-slogan {
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--teal-700);
}

/* Form Controls & Focus States */
input[type="range"] {
  accent-color: var(--teal-500);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

/* Shared Keyframe Animations */
@keyframes dashFlow {
  to {
    stroke-dashoffset: -32;
  }
}

.animate-route-flow {
  stroke-dasharray: 8 8;
  animation: dashFlow 1.6s linear infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.85);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.65);
    opacity: 0;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

.beacon-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulseRing 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes cardReveal {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: cardReveal 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rfWave {
  0% {
    r: 10px;
    opacity: 0.85;
    stroke-width: 2.5px;
  }
  70% {
    opacity: 0.35;
  }
  100% {
    r: 220px;
    opacity: 0;
    stroke-width: 1px;
  }
}

.animate-rf-wave {
  animation: rfWave 3.2s cubic-bezier(0.1, 0.4, 0.6, 1) infinite;
  will-change: r, opacity;
}

.animation-delay-1 { animation-delay: 1s; }
.animation-delay-2 { animation-delay: 2s; }

@keyframes nodePulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.7); opacity: 0.15; }
}

.beacon-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: nodePulse 2.2s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes alarmGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(219, 36, 36, 0.35); border-color: var(--crimson); }
  50% { box-shadow: 0 0 22px rgba(219, 36, 36, 0.65); border-color: #f87171; }
}

@keyframes harmonicGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(62, 125, 142, 0.25); border-color: var(--teal-500); }
  50% { box-shadow: 0 0 20px rgba(62, 125, 142, 0.5); border-color: var(--teal-400); }
}

.node-jammed {
  animation: alarmGlow 1s ease-in-out infinite;
}

.node-harmonic {
  animation: harmonicGlow 2.4s ease-in-out infinite;
}

@keyframes beaconRing {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.9); opacity: 0.15; }
}

.beacon-ring-slow {
  transform-box: fill-box;
  transform-origin: center;
  animation: beaconRing 1.9s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(219, 36, 36, 0);
    border-color: rgba(219, 36, 36, 0.45);
  }
  50% {
    box-shadow: 0 0 16px rgba(219, 36, 36, 0.18);
    border-color: rgba(219, 36, 36, 0.85);
  }
}

.alert-glow {
  animation: alertPulse 1.8s ease-in-out infinite;
}

@keyframes signalRipple {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

.animate-ripple {
  transform-origin: center;
  animation: signalRipple 2.4s ease-out infinite;
}

.animate-ripple-delay {
  transform-origin: center;
  animation: signalRipple 2.4s ease-out 1.2s infinite;
}

@keyframes barEqualizer {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.eq-bar-1 { transform-origin: bottom; animation: barEqualizer 1.4s ease-in-out infinite; }
.eq-bar-2 { transform-origin: bottom; animation: barEqualizer 1.4s ease-in-out 0.25s infinite; }
.eq-bar-3 { transform-origin: bottom; animation: barEqualizer 1.4s ease-in-out 0.5s infinite; }
.eq-bar-4 { transform-origin: bottom; animation: barEqualizer 1.4s ease-in-out 0.75s infinite; }