/* COMMON STYLES - Shared across all pages */

/* Header height: 64px on all pages (desktop and mobile); gap between header and body */
:root {
  --bg: #050505;
  --grid-line: #1a1a1a;
  --text-main: #e5e5e5;
  --text-dim: #a3a3a3;
  --brand: #ff4400;
  --header-height: 64px;
  --header-body-gap: 2rem;
}

/* Body Styles */
body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  margin: 0;
  overflow-x: hidden;
  width: 100%;
}

html {
  overflow-x: hidden;
}

/* Gap between main content and footer – no overlap */
#footer-placeholder {
  margin-top: 1rem;
}

/* Font Utilities */
.font-mono {
  font-family: "Space Mono", monospace !important;
}

/* Ensure font-mono is always applied in header/footer context */
nav .font-mono,
#navbar .font-mono,
footer .font-mono {
  font-family: "Space Mono", monospace !important;
}

/* Footer logo should use Inter font, not Space Mono – exclude nav-link "Home" */
footer a[href="index.html"]:first-of-type:not(.nav-link),
footer a[href*="index.html"]:first-of-type:not(.nav-link) {
  font-family: "Inter", sans-serif !important;
}

footer a[href="index.html"]:first-of-type:not(.nav-link) span:first-child,
footer a[href*="index.html"]:first-of-type:not(.nav-link) span:first-child {
  font-family: "Inter", sans-serif !important;
}

/* Navigation Link Styles - Consistent across header/footer */
/* Note: Font sizes are controlled by Tailwind classes in header.html and footer.html */
/* Header uses: text-sm font-medium (14px, font-weight: 500) */
/* Footer uses: text-xs font-medium (12px, font-weight: 500) */

/* Header Navigation - Ensure Space Mono font is always applied */
nav .nav-link,
#navbar .nav-link,
nav a.nav-link,
#navbar a.nav-link {
  font-family: "Space Mono", monospace !important;
  /* font-size removed - let Tailwind classes control it */
  color: #ccc;
  text-transform: capitalize;
  transition: color 0.2s;
}

nav .nav-link:hover,
#navbar .nav-link:hover,
nav a.nav-link:hover,
#navbar a.nav-link:hover {
  color: white;
}

/* Footer Navigation - Ensure Space Mono font is always applied */
footer .nav-link,
footer a.nav-link {
  font-family: "Space Mono", monospace !important;
  /* font-size removed - let Tailwind classes control it */
  color: #ccc;
  text-transform: capitalize;
  transition: color 0.2s;
}

footer .nav-link:hover,
footer a.nav-link:hover {
  color: white;
}

/* General nav-link for backwards compatibility */
.nav-link {
  font-family: "Space Mono", monospace !important;
  /* font-size removed - let Tailwind classes control it */
  color: #ccc;
  text-transform: capitalize;
  transition: color 0.2s;
}

.nav-link:hover {
  color: white;
}

/* Work Case File Shared Styles */
.btn-partner {
  background-color: white;
  color: black;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  padding: 10px 16px;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-partner:hover {
  background-color: var(--accent, var(--brand));
  color: white;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.btn-back:hover {
  color: white;
}

.return-archive {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #7a7a7a;
  position: relative;
  padding-bottom: 14px;
  transition: color 0.2s ease;
}

.return-archive:hover {
  color: white;
}

.return-archive::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: clamp(160px, 35vw, 280px);
  height: 1px;
  background: #242424;
}

.return-archive::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 14px;
  height: 2px;
  background: var(--accent, var(--brand));
}

.return-archive__icon {
  font-size: 14px;
  line-height: 1;
  margin-top: -1px;
}

.return-archive__text {
  display: inline-block;
}

.work-case {
  position: relative;
}

.work-archive-link {
  position: absolute;
  top: 6rem;
  left: 0;
  z-index: 10;
}

@media (min-width: 768px) {
  .work-archive-link {
    top: 8rem;
  }
}

.work-archive-link.return-archive::after,
.work-archive-link.return-archive::before {
  display: none;
}

.hud-sidebar--fixed {
  position: fixed;
}

.hud-sidebar--stopped {
  position: absolute;
}

/* Translucent footer background - shows engineering grid through it */
.bg-grain-footer {
  background-color: rgba(5, 5, 5, 0.75);
  /* No background-image - engineering grid shows through from fixed background */
}

.footer-header {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: block;
}

.footer-link {
  display: block;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: #999;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-link:hover {
  color: white;
}

.hollow-text {
  -webkit-text-stroke: 1px white;
  color: transparent;
}

/* Work Case Page Styling (Glass Intelligence Protocol baseline) */
.work-case-page .engineering-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -2;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: 0.5;
}

.work-case-page .film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.work-case-page .scanline {
  display: none;
  width: 100%;
  height: 100px;
  z-index: 50;
  background: linear-gradient(0deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(var(--accent-rgb, 255, 68, 0), 0.05) 50%,
      rgba(0, 0, 0, 0) 100%);
  opacity: 0.1;
  position: fixed;
  bottom: 100%;
  pointer-events: none;
  animation: scanline 10s linear infinite;
}

@media (min-width: 1024px) {
  .work-case-page .scanline {
    display: block;
  }
}

.work-case-page .hud-sidebar {
  padding: 24px;
  margin-bottom: 0;
}

.work-case-page .report-section {
  border-left: 1px solid #222;
  padding-left: 2rem;
  padding-bottom: 4rem;
  position: relative;
}

.work-case-page .report-section::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 0%;
  background: var(--accent, var(--brand));
  transition: height 0.5s ease;
}

.work-case-page .report-section.active::before {
  height: 100%;
}

/* Work Case File HUD */
.hud-sidebar {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(5px);
  padding: 24px;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .hud-sidebar {
    position: sticky;
    top: 120px;
    padding: 24px;
    margin-bottom: 0;
  }
}

.hud-sidebar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--accent, var(--brand));
  border-left: 2px solid var(--accent, var(--brand));
}

.hud-sidebar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--accent, var(--brand));
  border-right: 2px solid var(--accent, var(--brand));
}

.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
}

.hud-label {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.hud-value {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: var(--accent, var(--brand));
  font-weight: bold;
  text-transform: uppercase;
  text-align: right;
}

.status-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  transition: all 0.3s;
}

.status-led.active {
  background: var(--accent, var(--brand));
  box-shadow: 0 0 8px var(--accent, var(--brand));
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

/* Work Case File Report Sections */
.report-section {
  border-left: 1px solid #222;
  padding-left: 1.5rem;
  padding-bottom: 3rem;
  position: relative;
}

@media (min-width: 768px) {
  .report-section {
    padding-left: 2rem;
    padding-bottom: 4rem;
  }
}

.report-section::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 0%;
  background: var(--accent, var(--brand));
  transition: height 0.5s ease;
}

.report-section.active::before {
  height: 100%;
}

.report-header {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  color: var(--accent, var(--brand));
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: block;
}

/* Work Case File Visualizer */
#nexus-canvas {
  width: 100%;
  height: 400px;
  background: #080808;
  border: 1px solid #222;
  margin-bottom: 2rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff5722;
}

/* Grain Texture Overlay */
.bg-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* Film Grain Overlay - Same as index.html and about.html */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAG1BMVEUaGhouLy4mJSYhISEgICAeHR0dHBwcGxsbGxsLMm7uAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACeElEQVQ4jWNgQAScQkCSCYhBAiIYJCSlpaRlpCRlpaWlZWWlpKSkpCQlJSUlpaSkZWRlpKSkpCQlpaSkZKSkpaVlZWRkpCRlZGRkZCQlpaSkpKSkZGRkpCRlpaSlpaWkpGRlZKSkpKSkpKUkJaVkZKSkpCQlpcSgpaWkpKRkpKSkpCSlpaSkpKSkZKSkpKRkZGRkpKQkJSkpKSkpKSkpKSkpKSkZKSkZGRkZGRkZKSkZGRkpKSlpGRkZGRkpKSlpKSkpKRkZGRkpGRkpGRkpKSkpKSlpGRkpGRlpKSkpKSkZKSkZGRkZKSkpKSkpKSlpGRkZGRkpGSkZGRkZGRkZKSkpKSkpKSkZGRkpKSkpGSlpKSkpKSkZGRkpGRkZKSkpKSkpKSkpGSkpKSlpGRkpGRkZGRkZGRkZGRkpKSkZGRkZGRkpGSkZGRkpKSkpKSlpKSkpGRkZKSkpKSlpGRkZGRkpKSkZGRkZGRkpKSkpKRkZKRkZGRkpGRkZKRkpKSkpGSkpKSlpKSkpKSkpGRkpKSkZGRkZGRkpGRkZKSkpGRkpGRkpKSkZKSkpKSkpGSkpKSkpKSkpKSkZKSkpKSlpGSlpKSkpGSkZGRkpKSkpKSkpKSlpKSkpKSkZGRkpKRkZGRkZGRkZGRkpGRkpKSkpGRkZGRkZGRkpGRkZKSkpKSkpKSkZGRkZGRkZGRkpGRkZKSkpGRkpKSkpKSkZGRkZGRkZKRkpKSkpKSkZGRkZGRkpGRkZGRkZGRkZGRkZGRkZKRkpGRkpGRkZGRkZGRkZKRkpGRkpGRkZGRkZGRkZKRkpGRkpGRkZGRkZGRkZKRkpGRkpGRkZGRkZGRkZKRkpGRkpGRkZGRkZGRkZKRkpGRkpGRkZGRkZGRkZKRkpGRkpGRkZGRkZGRkZKRkpGRkpGRkZGRkZGRkZGRkZGRkpGRkZGRkpGRkZKSkZGRkZGRkZGRkZGRkA1Vp2qQ9Hq34AAAAASUVORK5CYII=");
  opacity: 0.08;
  z-index: 9998;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Scanline Animation - Same as index.html and about.html */
.scanline {
  display: block;
  width: 100%;
  height: 100px;
  z-index: 9999;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(255, 68, 0, 0.05) 50%, rgba(0, 0, 0, 0) 100%);
  opacity: 0.1;
  position: fixed;
  bottom: 100%;
  pointer-events: none;
  animation: scanline 10s linear infinite;
}

@keyframes scanline {
  0% {
    bottom: 100%;
  }

  100% {
    bottom: -100px;
  }
}

/* Engineering Grid Overlay - Fixed grid pattern with radial gradient mask */
/* Style from Home-Reimagined-Vogue.html - centralized for all pages */
/* Grid must be above canvas (-2 fixed, -1 absolute) but below content (z-10+) */
.engineering-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: 0.6;
  /* GPU acceleration - minimal for better performance */
  transform: translateZ(0);
}

/* Footer Logos (used in some industry pages) */
.logo-img {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
}

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

/* --- INTERACTIVE PAGE LAYOUTS --- */
/* Shared across Industries and Expertise pages */

/* Fixed Background Container - For pages where canvas is at body level */
/* Background must be transparent to allow engineering grid to show through */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  /* Transparent background - grid (z-index: -1) shows through */
  background: transparent;
}

/* Content Wrapper to sit above canvas */
.content-wrapper {
  position: relative;
  z-index: 10;
}

/* Section base for scroll-based layouts */
.section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  pointer-events: none;
  padding: 1.5rem;
  transition: all 0.5s ease;
}

/* Interactive Text Card */
.text-card {
  pointer-events: auto;
  width: 100%;
  max-width: 550px;
  background: transparent;
  backdrop-filter: none;
  padding: 2rem;
  border-left: 2px solid #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  transition: border-color 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
  opacity: 0.3;
  transform: translateY(20px);
}

.section.active .text-card {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Variant */
.hero-card {
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  padding: 0 !important;
  max-width: 900px !important;
  opacity: 1 !important;
  transform: none !important;
  position: relative;
  z-index: 1;
}

/* Typography Effects */
.text-hollow {
  -webkit-text-stroke: 1.5px #ffffff;
  color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}

/* Side Navigation Dots */
.side-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot:hover {
  transform: scale(1.5);
  background: rgba(255, 255, 255, 0.5);
}

.nav-dot.active {
  background: #ff5722;
  transform: scale(1.2);
  box-shadow: 0 0 10px #ff5722;
}

/* Scanner Line Animation */
.scanner-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ff5722;
  box-shadow: 0 0 15px #ff5722, 0 0 30px #ff5722;
  opacity: 0;
  z-index: 0;
  top: 50%;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.scanning .scanner-line {
  animation: scanMove 4s ease-in-out infinite;
}

@keyframes scanMove {
  0% {
    top: 35%;
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  85% {
    opacity: 1;
  }

  100% {
    top: 65%;
    opacity: 0;
  }
}

/* Link Item with Arrow */
.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: #ccc;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  cursor: pointer;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.link-item:hover {
  color: white;
  padding-left: 5px;
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.link-item i {
  width: 14px;
  height: 14px;
  opacity: 1;
  transition: color 0.5s ease;
}

/* CTA Section Variant */
.cta-card {
  background: transparent !important;
  backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
  max-width: 700px !important;
  margin: 0 auto !important;
  padding: 3rem 1.5rem !important;
}

/* --- RESPONSIVE LAYOUTS --- */

/* Mobile Layouts */
@media (max-width: 1023px) {
  .section {
    justify-content: flex-end;
    padding-bottom: 8rem;
    /* Extra padding for bottom HUD */
  }

  #sec-0 {
    justify-content: center;
    padding-bottom: 4rem;
  }

  .side-nav {
    display: none;
  }

  .text-card {
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-left-width: 2px;
    border-left-style: solid;
    margin: 0 auto;
    padding: 2rem 1.5rem;
  }

  .hero-card {
    background: transparent !important;
    border: none !important;
  }

  #sec-8 {
    justify-content: center;
    padding-bottom: 6rem;
  }
}

/* Laptop / Tablet Layouts */
@media (min-width: 1024px) and (max-width: 1439px) {
  .section {
    justify-content: center;
    align-items: flex-start;
    padding-left: 5%;
  }

  #sec-0 {
    align-items: center;
    padding-left: 0;
    justify-content: center;
  }

  .hero-card {
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 2rem !important;
    border-left: 2px solid rgba(255, 255, 255, 0.2) !important;
    max-width: 650px !important;
  }

  .cta-card {
    background: rgba(10, 10, 10, 0.6) !important;
    backdrop-filter: blur(12px) !important;
  }

  .text-card {
    margin: 0;
    max-width: 480px;
    background: transparent;
    backdrop-filter: none;
  }

  #sec-8 {
    align-items: center;
    padding-left: 0;
  }
}

/* Widescreen Layouts */
@media (min-width: 1440px) {
  .section {
    justify-content: center;
    padding-left: 10%;
  }

  .text-card {
    background: transparent;
    backdrop-filter: none;
    border-top: none;
    padding-left: 3rem;
  }

  #sec-8 {
    align-items: center;
    padding-left: 0;
  }
}

/* --- BRAND COLORS --- */
.text-brand {
  color: #ff5722;
}

.bg-brand {
  background-color: #ff5722;
}

.border-brand {
  border-color: #ff5722;
}

/* --- INDUSTRY THEME COLORS --- */
.text-finance {
  color: #2563eb;
}

.bg-finance {
  background-color: #2563eb;
}

.border-finance {
  border-color: #2563eb;
}

.selection-finance::selection {
  background-color: #2563eb;
  color: white;
}

.text-health {
  color: #0d9488;
}

.bg-health {
  background-color: #0d9488;
}

.border-health {
  border-color: #0d9488;
}

.selection-health::selection {
  background-color: #0d9488;
  color: white;
}

.text-safety {
  color: #eab308;
}

.bg-safety {
  background-color: #eab308;
}

.border-safety {
  border-color: #eab308;
}

.selection-safety::selection {
  background-color: #eab308;
  color: black;
}

.text-lime {
  color: #65a30d;
}

.bg-lime {
  background-color: #65a30d;
}

.border-lime {
  border-color: #65a30d;
}

.selection-lime::selection {
  background-color: #65a30d;
  color: black;
}

.text-cyan {
  color: #06b6d4;
}

.bg-cyan {
  background-color: #06b6d4;
}

.border-cyan {
  border-color: #06b6d4;
}

.selection-cyan::selection {
  background-color: #06b6d4;
  color: black;
}

.text-crimson {
  color: #e11d48;
}

.bg-crimson {
  background-color: #e11d48;
}

.border-crimson {
  border-color: #e11d48;
}

.selection-crimson::selection {
  background-color: #e11d48;
  color: white;
}

.text-violet {
  color: #7c3aed;
}

.bg-violet {
  background-color: #7c3aed;
}

.border-violet {
  border-color: #7c3aed;
}

.selection-violet::selection {
  background-color: #7c3aed;
  color: white;
}

/* --- CAPABILITY LISTS (Shared across Industry Detail Pages) --- */
.capability-item {
  transition: background-color 0.4s ease,
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
  border-radius: 4px;
}

.capability-item.active-card {
  background-color: #171717;
  transform: scale(1.02) translateX(10px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8);
  z-index: 10;
  position: relative;
  border-color: transparent;
}

.cap-icon,
.cap-list {
  transition: color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.capability-item.active-card .cap-icon {
  opacity: 1;
}

.capability-item.active-card .cap-list {
  border-color: inherit;
}

/* --- AUDIT LOG ANIMATION (Industry Detail Pages) --- */
.audit-log-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  color: #4b5563;
  min-height: 110px;
}

.log-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  border-right: 2px solid transparent;
}

@keyframes typeLine {
  from {
    width: 0;
  }

  to {
    width: 100%;
    border-right-color: transparent;
  }
}

.status-ok {
  font-weight: bold;
}

.status-proc {
  color: #ff5722;
  font-weight: bold;
}

/* --- FADE UP ANIMATION --- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- AUDIT TERMINAL (Sequential Cursor Animation) --- */
/* Default terminal color - can be overridden per page using --terminal-color */
:root {
  --terminal-color: var(--brand, #ff4400);
}

.audit-terminal {
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid #333;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  padding: 20px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  position: relative;
  min-height: 120px;
  width: 100%;
  /* CRITICAL FIX: Prevent breakage on small screens */
  overflow-x: auto;
}

/* FIX 3: Tablet/iPad Specific Sizing */
@media (max-width: 1200px) {
  .audit-terminal {
    padding: 12px 10px;
    /* Reduced padding */
  }
}

.audit-terminal .log-line {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  width: 0;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid transparent;
}

/* FIX 3: Font Adjustment for Tablets to prevent cutoff */
@media (max-width: 1200px) {
  .audit-terminal .log-line {
    font-size: 9px;
    letter-spacing: -0.5px;
  }
}

/* Terminal Animation Keyframes */
@keyframes typeLine {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes cursorPulse {

  0%,
  100% {
    border-color: transparent;
  }

  50% {
    border-color: var(--terminal-color, var(--brand, #ff4400));
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* FIX 2: Updated Animation Sequence for traveling cursor */
/* Line 1: Type & Blink 2 times, then stop blinking */
.terminal-active .log-line:nth-child(1) {
  animation:
    typeLine 1s steps(30, end) forwards 0.2s,
    cursorPulse 0.5s step-end 2 0.2s;
  width: 0;
}

/* Line 2: Wait, Type & Blink 2 times, then stop blinking */
.terminal-active .log-line:nth-child(2) {
  animation:
    typeLine 0.8s steps(30, end) forwards 1.2s,
    cursorPulse 0.5s step-end 2 1.2s;
  width: 0;
}

/* Line 3: Wait, Type & Blink 2 times, then stop blinking */
.terminal-active .log-line:nth-child(3) {
  animation:
    typeLine 0.8s steps(30, end) forwards 2.0s,
    cursorPulse 0.5s step-end 2 2.0s;
  width: 0;
}

/* Line 4: Wait, Type, then Blink Infinite */
.terminal-active .log-line:nth-child(4) {
  animation:
    typeLine 0.8s steps(30, end) forwards 2.8s,
    cursorPulse 1s step-end infinite 2.8s;
  width: 0;
}

.log-success {
  color: var(--terminal-color, var(--brand, #ff4400));
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
}

.log-process {
  color: var(--brand, #ff4400);
  opacity: 0;
  transition: opacity 0.2s;
}

.terminal-active .log-line:nth-child(2) .log-success {
  transition-delay: 2.0s;
  opacity: 1;
}

.terminal-active .log-line:nth-child(3) .log-success {
  transition-delay: 2.8s;
  opacity: 1;
}

.terminal-active .log-line:nth-child(4) .log-process {
  transition-delay: 3.6s;
  opacity: 1;
}

/* --- TERMINAL BUTTON --- */
.btn-terminal {
  font-family: "Space Mono", monospace;
  background: var(--brand, #ff4400);
  color: white;
  padding: 16px 32px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: 1px solid var(--brand, #ff4400);
}

.btn-terminal:hover {
  background: white;
  color: black;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* --- OUTLINE BUTTON --- */
.btn-outline {
  font-family: "Space Mono", monospace;
  background: transparent;
  color: white;
  padding: 16px 32px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: 1px solid #333;
}

.btn-outline:hover {
  border-color: white;
  color: black;
  background: white;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* --- PHYSICS RAIL (Scroll Indicator) --- */
#physics-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
  left: 2rem;
  z-index: 10;
}

@media (min-width: 1024px) {
  #physics-rail {
    left: 4rem;
  }
}

#scroll-dot {
  width: 8px;
  height: 8px;
  background: var(--brand, #ff4400);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--brand, #ff4400);
  z-index: 20;
}

/* --- RIPPLE WAVE EFFECT --- */
.ripple-wave {
  position: absolute;
  top: 0;
  left: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--brand, #ff4400);
  transform: scale(0) translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

@media (min-width: 1024px) {
  .ripple-wave {
    left: 4rem;
  }
}

.section-impact .ripple-wave {
  animation: massive-splash 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes massive-splash {
  0% {
    transform: scale(0);
    opacity: 0.6;
    border-width: 3px;
    border-color: var(--brand, #ff4400);
  }

  100% {
    transform: scale(30);
    opacity: 0;
    border-width: 0px;
    border-color: var(--brand, #ff4400);
  }
}

/* --- CANVAS CONTAINER --- */
/* Canvas Container - Absolute positioning variant for headers */
/* For canvas containers inside relative positioned parents like headers */
/* Must be transparent - grid is on fixed layer behind header */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  /* Background must be transparent - grid shows through from fixed layer */
  background: transparent;
}

/* --- FOOTER STYLES --- */
/* Ensure all footer text uses Space Mono font */
footer {
  font-family: "Space Mono", monospace !important;
}

/* Apply Space Mono to footer text elements */
footer p,
footer h1,
footer h2,
footer h3,
footer h4,
footer h5,
footer h6,
footer span,
footer a,
footer button,
footer li {
  font-family: "Space Mono", monospace !important;
}

/* Footer navigation links */
footer .nav-link {
  font-family: "Space Mono", monospace !important;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  /* gray-400 */
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
  text-transform: none;
}

footer .nav-link::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--brand, #ff4400);
  transition: width 0.3s ease;
}

footer .nav-link:hover {
  color: white;
}

footer .nav-link:hover::before {
  width: 100%;
}

/* Footer section headers */
footer h4 {
  font-family: "Space Mono", monospace !important;
  font-size: 10px;
  font-weight: 400;
  color: var(--brand, #ff4400);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}

/* Footer description text */
footer p {
  font-family: "Space Mono", monospace !important;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
}

/* Footer logo/brand text – exclude nav-link "Home" so it matches other footer links */
footer a[href*="index.html"]:not(.nav-link) {
  font-family: "Space Mono", monospace !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Footer copyright and legal links */
footer .border-t p,
footer .border-t a,
footer .border-t button {
  font-family: "Space Mono", monospace !important;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Footer bottom bar polish */
footer .footer-bottom {
  position: relative;
  margin-top: 12px;
}

footer .footer-bottom::before {
  content: none;
}

footer .footer-meta {
  color: rgba(215, 215, 215, 0.7);
  letter-spacing: 0.12em;
}

footer .footer-legal {
  align-items: center;
}

footer .footer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(235, 235, 235, 0.75);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

footer .footer-pill:hover {
  color: #ffffff;
  border-color: rgba(255, 68, 0, 0.5);
  background: rgba(255, 68, 0, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(255, 68, 0, 0.18);
}

footer .footer-pill::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 68, 0, 0), rgba(255, 68, 0, 0.6), rgba(255, 68, 0, 0));
  opacity: 0;
  transition: opacity 0.2s;
}

footer .footer-pill:hover::after,
footer .footer-pill:focus-visible::after {
  opacity: 1;
}

footer .footer-pill-action {
  cursor: pointer;
  border: 1px solid rgba(255, 68, 0, 0.35);
  background: rgba(255, 68, 0, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
  footer .footer-bottom {
    padding-left: 12px;
    padding-right: 12px;
  }

  footer .footer-pill {
    padding: 6px 10px;
  }
}

/* Footer badge styles */
.footer-badge {
  background: #0f0f0f;
  border: 1px solid #222;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Mono", monospace !important;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ccc;
}

.footer-badge .status-light {
  width: 6px;
  height: 6px;
  background: var(--brand, #ff4400);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--brand, #ff4400);
  flex-shrink: 0;
}

.footer-header {
  font-family: "Space Mono", monospace !important;
  font-size: 10px;
  color: var(--brand, #ff4400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: block;
}

.footer-link {
  display: block;
  font-family: "Space Mono", monospace !important;
  font-size: 11px;
  color: #999;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-link:hover {
  color: white;
}

/* Footer ecosystem/compliance badges */
footer .flex.items-center.gap-3 span {
  font-family: "Space Mono", monospace !important;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
