/* ==========================================================================
   Heritage Signal OS - Premium Futuristic Signal Intelligence Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700;800&family=Sora:wght@400;600;700;800&display=swap');

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Surface colors (Dark-First) */
  --bg-deep: #030712;
  --bg-main: #060D1A;
  --bg-card: #0A1426;
  --bg-card-hover: #0E1D36;
  --bg-card-elevated: #11223F;
  --bg-glass: rgba(10, 20, 38, 0.72);
  --bg-glass-strong: rgba(6, 13, 26, 0.88);

  /* Accent Colors */
  --gold: #D4AF37;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-subtle: rgba(212, 175, 55, 0.12);
  
  --cyan: #00F5D4;
  --cyan-glow: rgba(0, 245, 212, 0.35);
  --cyan-subtle: rgba(0, 245, 212, 0.12);

  --blue: #38BDF8;
  --blue-glow: rgba(56, 189, 248, 0.35);
  --blue-subtle: rgba(56, 189, 248, 0.12);

  --indigo: #6366F1;
  --emerald: #10B981;
  --rose: #F43F5E;

  /* Typography Colors */
  --text-white: #FFFFFF;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-dim: #475569;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(56, 189, 248, 0.16);
  --border-card-hover: rgba(0, 245, 212, 0.38);
  --border-gold: rgba(212, 175, 55, 0.3);

  /* Fonts */
  --font-heading: 'Space Grotesk', 'Sora', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;

  /* Layout */
  --nav-h: 74px;
  --max-w: 1220px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease);
  --transition-normal: 0.35s var(--ease);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-deep);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Canvas Signal Network Background */
#signalCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* Ambient Radial Mesh Layer */
.ambient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(212, 175, 55, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.7) 0%, rgba(6, 13, 26, 0.9) 100%);
}

/* Technical Blueprint Grid Pattern */
.blueprint-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Content Wrapper */
.app-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* Typography Utilities */
h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono);
}

.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }
.text-blue { color: var(--blue); }
.text-muted { color: var(--text-secondary); }

/* Section Badges / Telemetry Labels */
.label-tag, .label-tag-w {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.25);
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 18px;
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.12);
}

.label-tag::before, .label-tag-w::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 2s infinite ease-in-out;
}

.section-h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}

.h2-white { color: var(--text-white); }
.h2-dark { color: var(--text-white); }

.divider {
  width: 56px;
  height: 3px;
  border-radius: 3px;
  margin-bottom: 20px;
}
.div-teal, .div-white {
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  box-shadow: 0 0 10px var(--cyan-glow);
}

.para-w, .para-d {
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  background: rgba(4, 8, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 48px);
  justify-content: space-between;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(0, 245, 212, 0.12));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
  transition: var(--transition-fast);
}

.nav-logo:hover .nav-logo-icon {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 245, 212, 0.4);
  transform: scale(1.04);
}

.nav-logo-icon i {
  color: var(--gold);
  font-size: 19px;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.nav-logo-sub {
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-top: 3px;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links li button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition-fast);
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  position: relative;
  white-space: nowrap;
}

.nav-links li button:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links li button.active {
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.2);
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.15);
}

.nav-links li button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 8px var(--cyan);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-demo-nav {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.95), rgba(184, 148, 31, 0.95));
  color: #040812;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-demo-nav:hover {
  background: linear-gradient(135deg, #FFE066, #D4AF37);
  box-shadow: 0 0 26px rgba(212, 175, 55, 0.6);
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  flex-shrink: 0;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: 0.3s var(--ease);
  display: block;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-nav {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  background: rgba(4, 8, 18, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 999;
  padding: 24px;
  display: none;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border-card);
  overflow-y: auto;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.25s ease;
}

.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav button {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav button.active {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0, 245, 212, 0.08);
}

.mobile-nav .mob-cta {
  background: linear-gradient(135deg, var(--gold), #B8941F);
  color: #040812;
  font-weight: 700;
  justify-content: center;
  margin-top: 10px;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn-p {
  background: linear-gradient(135deg, var(--gold), #B8941F);
  color: #040812;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
  text-decoration: none;
}

.btn-p:hover {
  background: linear-gradient(135deg, #FFE066, #D4AF37);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
  transform: translateY(-2px);
}

.btn-s {
  background: rgba(10, 20, 38, 0.8);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  backdrop-filter: blur(10px);
  text-decoration: none;
}

.btn-s:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.08);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.25);
  transform: translateY(-2px);
}

/* ==========================================================================
   PAGE SECTIONS & SPACING
   ========================================================================== */
.page {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

.page.active {
  display: block;
}

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

section {
  position: relative;
  padding: clamp(64px, 8vw, 104px) 0;
}

.sec-dark, .sec-light, .sec-alt {
  border-bottom: 1px solid var(--border-subtle);
}

.sec-dark {
  background: rgba(4, 8, 18, 0.75);
}

.sec-light {
  background: rgba(8, 16, 32, 0.85);
}

.sec-alt {
  background: rgba(6, 12, 24, 0.9);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 88px));
  padding-bottom: clamp(60px, 8vw, 100px);
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 50% 10%, rgba(56, 189, 248, 0.12), transparent 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.28);
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 20px;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.hero-bdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulse-dot 1.8s infinite ease-in-out;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-white);
  margin-bottom: 18px;
}

.hero h1 .teal {
  background: linear-gradient(135deg, var(--cyan) 0%, #38BDF8 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-rule {
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  border-radius: 2px;
  margin-bottom: 22px;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.hero-body {
  font-size: clamp(16px, 1.8vw, 18px);
  color: #CBD5E1;
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 34px;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* ==========================================================================
   DASHBOARD HUD CARD (HERO)
   ========================================================================== */
.dash-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(56, 189, 248, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--gold), transparent);
}

.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.dash-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
  margin-top: 3px;
}

.live-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.2);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 1.5s infinite;
}

.score-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: var(--transition-fast);
}

.score-row:hover {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.25);
  transform: translateX(3px);
}

.s-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.si-c {
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.si-g {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.si-e {
  background: rgba(0, 245, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 245, 212, 0.3);
}

.score-lbl {
  font-size: 13px;
  color: #CBD5E1;
  font-weight: 500;
}

.score-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-white);
  text-align: right;
}

.score-big {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(10, 20, 38, 0.8));
  border: 1px solid rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sb-num {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}

.sb-info {
  text-align: right;
}

.sb-info .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sb-info .sub {
  font-size: 12px;
  color: var(--cyan);
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* ==========================================================================
   EVIDENCE-BASED TARGETS (STATS GRID)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  backdrop-filter: blur(12px);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 20px var(--cyan-subtle);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  color: var(--gold);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.stat-lbl {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   PLATFORM MODULE CARDS (CORE CAPABILITIES)
   ========================================================================== */
.plat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 36px;
}

.plat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  backdrop-filter: blur(16px);
  position: relative;
}

.plat-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 245, 212, 0.15);
  transform: translateY(-4px);
}

.plat-img {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background: #02050B;
}

.plat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
  filter: brightness(0.85) contrast(1.1);
}

.plat-card:hover .plat-img img {
  transform: scale(1.06);
  filter: brightness(0.95) contrast(1.15);
}

.plat-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 20, 38, 0.95) 100%);
}

.pi-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-white);
  background: rgba(4, 8, 18, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 1px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.plat-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.el-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.plat-inner h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 12px;
  line-height: 1.25;
}

.plat-inner p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.more-txt {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), opacity 0.3s ease, margin 0.3s ease;
  font-size: 13.5px;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--cyan);
  padding: 0 14px;
  line-height: 1.65;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.plat-card.open .more-txt {
  max-height: 220px;
  opacity: 1;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.expand-btn {
  margin-top: auto;
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 0;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
}

.expand-btn:hover {
  color: #A7F3D0;
  text-decoration: underline;
}

/* ==========================================================================
   WHY HERITAGE SIGNAL OS (WHY GRID)
   ========================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.why-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  backdrop-filter: blur(14px);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.why-card:hover {
  border-color: var(--blue);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 20px var(--blue-subtle);
  transform: translateY(-3px);
}

.why-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(0, 245, 212, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--cyan);
  margin-bottom: 20px;
}

.why-card h4 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 12px;
}

.why-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   PROCESS / HOW IT WORKS (ROADMAP STEPS)
   ========================================================================== */
.process-step {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(32px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.process-step:last-child {
  border-bottom: none;
}

.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.step-h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 16px;
}

.step-p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.step-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.step-img img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.step-img:hover img {
  transform: scale(1.04);
}

/* ==========================================================================
   MARKET CHARTS & COMPETITOR TABLE
   ========================================================================== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
  margin-top: 36px;
}

.chart-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 26px;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.chart-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.chart-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 20px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 260px;
}

/* Competitor Comparison Table */
.comp-wrap {
  margin-top: 36px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: var(--bg-glass);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 760px;
}

.comp-table th, .comp-table td {
  padding: 16px 20px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.comp-table th {
  background: rgba(4, 8, 18, 0.95);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
}

.comp-table th.hi {
  background: rgba(0, 245, 212, 0.1);
  color: var(--cyan);
  border-bottom: 2px solid var(--cyan);
}

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

.comp-table td.hi {
  background: rgba(0, 245, 212, 0.04);
  font-weight: 600;
}

.comp-table td.yes {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 16px;
}

.comp-table td.no {
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ==========================================================================
   PRICING SECTION
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.price-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 34px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(16px);
  transition: var(--transition-normal);
}

.price-card:hover {
  transform: translateY(-5px);
  border-color: var(--blue);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(14, 30, 58, 0.85) 0%, rgba(6, 13, 26, 0.95) 100%);
  border: 1px solid var(--gold);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.feat-lbl {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), #B8941F);
  color: #040812;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 9999px;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.5);
}

.price-tier {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.price-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 12px;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.price-amount span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.price-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.price-feat {
  list-style: none;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-feat li {
  font-size: 13.5px;
  color: #CBD5E1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.price-feat li::before {
  content: '✓';
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 700;
}

.price-card button {
  margin-top: auto;
}

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

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

.faq-item.open {
  border-color: var(--cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 245, 212, 0.12);
}

.faq-q {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 16px;
}

.faq-q h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.4;
}

.faq-icon {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--cyan);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 245, 212, 0.08);
  border-radius: 50%;
  flex-shrink: 0;
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 24px;
  opacity: 0;
  font-size: 14.5px;
  color: #CBD5E1;
  line-height: 1.7;
  transition: max-height 0.35s var(--ease), opacity 0.25s ease, padding 0.35s ease;
}

.faq-item.open .faq-body {
  max-height: 240px;
  opacity: 1;
  padding-bottom: 22px;
}

/* ==========================================================================
   CONTACT SECTION & FORMS
   ========================================================================== */
.contact-hero {
  padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 70px));
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  margin-top: 40px;
  align-items: flex-start;
}

.contact-form {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 38px);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #CBD5E1;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(4, 8, 18, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-white);
  transition: var(--transition-fast);
  outline: none;
}

.form-group select {
  cursor: pointer;
  background-color: #040812;
}

.form-group select option {
  background-color: #0A1426;
  color: var(--text-white);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.25);
  background: rgba(6, 13, 26, 0.9);
}

.contact-info {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 38px);
  backdrop-filter: blur(18px);
}

.contact-info h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 12px;
}

.contact-info .sub {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.c-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.c-detail:last-child {
  border-bottom: none;
}

.c-detail .ic {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.25);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.c-detail strong {
  display: block;
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.c-detail span {
  font-size: 14.5px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   INTERACTIVE REASONING LOOP VISUALIZER (PLATFORM PAGE)
   ========================================================================== */
.loop-visualizer {
  margin-top: 40px;
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 44px);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.loop-stages-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.loop-node {
  background: rgba(4, 8, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.loop-node:hover {
  border-color: var(--blue);
  background: rgba(56, 189, 248, 0.08);
}

.loop-node.active {
  border-color: var(--cyan);
  background: rgba(0, 245, 212, 0.1);
  box-shadow: 0 0 18px rgba(0, 245, 212, 0.2);
}

.ln-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ln-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.25;
}

.stage-detail-panel {
  display: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.stage-detail-panel.active {
  display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: #02050D;
  border-top: 1px solid var(--border-subtle);
  padding: clamp(60px, 8vw, 90px) 0 32px;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(30px, 4vw, 56px);
  padding-bottom: 50px;
  border-bottom: 1px solid var(--border-subtle);
}

.f-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 18px;
  max-width: 360px;
}

.f-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.f-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.f-col a {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.f-col a:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 28px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-bar span {
  color: var(--text-white);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--cyan);
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-wrap {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .process-step {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .process-step .step-img {
    order: 2 !important;
  }
  .process-step > div:not(.step-img) {
    order: 1 !important;
  }
}

@media (max-width: 820px) {
  .nav-links, .nav-right .btn-demo-nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .tw {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 540px) {
  .plat-grid, .why-grid, .pricing-grid, .charts-grid {
    grid-template-columns: 1fr;
  }
  .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-btns button {
    justify-content: center;
  }
}

/* Reduced Motion Mode Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #signalCanvas {
    display: none;
  }
}
