/* ============================================================================
   REVOFI NEXUS — SHARED BRAND SYSTEM
   Based on RevoFi Branding 2026 Guidelines
   ============================================================================ */

/* ----------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   ---------------------------------------------------------------------------- */
:root {
  /* Primary Colors */
  --revo-yellow: #FFED00;
  --revo-yellow-dark: #E6D500;
  --revo-black: #1C1C1C;
  --revo-dark: #121212;
  --revo-gray: #2A2A2A;

  /* Ecosystem Accent Colors */
  --revo-purple: #A855F7;    /* revofi.com - Devices */
  --revo-blue: #60A5FA;      /* revofi.app - Mobile */
  --revo-green: #4ADE80;     /* revos.io - Token / RVS */
  --revo-cyan: #22D3EE;      /* revofi.cloud - Cloud */
  --revo-orange: #FB923C;    /* Hardware / Orchestration */
  --revo-pink: #F472B6;      /* Token / Financial */

  /* UI Colors */
  --text-primary: #FFFFFF;
  --text-muted: #9CA3AF;
  --text-subtle: #6B7280;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 237, 0, 0.3);
  --surface-elevated: rgba(255, 255, 255, 0.03);

  /* Glow Colors */
  --glow-yellow: rgba(255, 237, 0, 0.15);
  --glow-purple: rgba(168, 85, 247, 0.12);
  --glow-blue: rgba(96, 165, 250, 0.12);
  --glow-cyan: rgba(34, 211, 238, 0.12);
  --glow-green: rgba(74, 222, 128, 0.12);

  /* Spacing */
  --section-padding: clamp(4rem, 8vw, 8rem);
  --container-max: 1280px;
  --container-narrow: 960px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Z-index layers */
  --z-nav: 1000;
  --z-overlay: 900;
  --z-dropdown: 800;
  --z-sticky: 100;
}

/* ----------------------------------------------------------------------------
   RESET & BASE
   ---------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--revo-black);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: var(--revo-yellow);
  color: var(--revo-black);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

/* ----------------------------------------------------------------------------
   TYPOGRAPHY
   ---------------------------------------------------------------------------- */

/* Hero H1 — Used for main page heroes */
.text-hero {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Section H2 — Used for section titles */
.text-section {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
}

/* Card H3 — Feature/card titles */
.text-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Body text */
.text-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-muted);
}

.text-body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Captions */
.text-caption {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Badges / Tags */
.text-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Section eyebrow labels */
.text-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--revo-yellow);
}

/* Stat numbers */
.text-stat {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Yellow accent span */
.text-yellow { color: var(--revo-yellow); }
.text-purple { color: var(--revo-purple); }
.text-blue   { color: var(--revo-blue); }
.text-green  { color: var(--revo-green); }
.text-cyan   { color: var(--revo-cyan); }
.text-orange { color: var(--revo-orange); }
.text-pink   { color: var(--revo-pink); }
.text-muted  { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }

/* ----------------------------------------------------------------------------
   EFFECTS
   ---------------------------------------------------------------------------- */

/* Text glow for hero headlines */
.text-glow {
  text-shadow: 0 0 30px rgba(255, 237, 0, 0.4);
}

/* Hero gradient background */
.hero-gradient {
  background: radial-gradient(
    ellipse at 50% 30%,
    rgba(255, 237, 0, 0.08) 0%,
    rgba(28, 28, 28, 0) 70%
  );
}

/* Feature card glow on hover */
.feature-glow {
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.feature-glow:hover {
  box-shadow: 0 0 40px rgba(255, 237, 0, 0.08);
}

/* Gradient border effect */
.gradient-border {
  background: linear-gradient(
    135deg,
    rgba(255, 237, 0, 0.15) 0%,
    rgba(255, 237, 0, 0) 50%,
    rgba(255, 237, 0, 0.08) 100%
  );
}

/* Code block background */
.code-block {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
  overflow-x: auto;
}

/* Ambient light blobs — positioned absolute within a relative container */
.ambient-blob {
  position: absolute;
  border-radius: 100%;
  pointer-events: none;
  z-index: 0;
}

.ambient-blob--yellow {
  background: rgba(255, 237, 0, 0.06);
  filter: blur(120px);
}

.ambient-blob--cyan {
  background: rgba(34, 211, 238, 0.05);
  filter: blur(100px);
}

.ambient-blob--purple {
  background: rgba(168, 85, 247, 0.04);
  filter: blur(120px);
}

/* Glass / frosted surface */
.glass {
  background: rgba(42, 42, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Divider line */
.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-subtle) 20%,
    rgba(255, 237, 0, 0.1) 50%,
    var(--border-subtle) 80%,
    transparent 100%
  );
  margin: 0 auto;
  max-width: var(--container-max);
}

/* ----------------------------------------------------------------------------
   LAYOUT
   ---------------------------------------------------------------------------- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: 1;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.section--dark {
  background-color: var(--revo-dark);
}

.section--gray {
  background-color: var(--revo-gray);
}

/* Eyebrow + title pattern used across all sections */
.section-header {
  margin-bottom: 3rem;
}

.section-header .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-header .eyebrow-line {
  width: 2rem;
  height: 2px;
  background: var(--revo-yellow);
}

.section-header .eyebrow-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--revo-yellow);
}

.section-header .section-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-header .section-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 48rem;
  line-height: 1.7;
}

/* Section number badge */
.section-number {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--revo-yellow);
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(255, 237, 0, 0.3);
  border-radius: 4px;
  line-height: 1;
}

/* Section meta — wraps label + title */
.section-meta {
  flex: 1;
}

/* Section label — category text */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--revo-yellow);
}

/* Section intro — paragraph wrapper */
.section-intro {
  margin-bottom: 3rem;
}

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ----------------------------------------------------------------------------
   COMPONENTS — BUTTONS
   ---------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--revo-yellow);
  outline-offset: 2px;
}

/* Primary CTA — Yellow bg, black text */
.btn-primary {
  padding: 0.875rem 2rem;
  background: var(--revo-yellow);
  color: var(--revo-black);
  font-size: 0.9375rem;
  box-shadow: 0 4px 24px rgba(255, 237, 0, 0.2);
}

.btn-primary:hover {
  background: #FFF033;
  transform: translateY(-1px);
  box-shadow: 0 6px 32px rgba(255, 237, 0, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary — Glass/outline */
.btn-secondary {
  padding: 0.875rem 2rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 0.9375rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Small nav CTA */
.btn-nav {
  padding: 0.5rem 1.25rem;
  background: var(--revo-yellow);
  color: var(--revo-black);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 0.5rem;
  letter-spacing: 0.02em;
}

.btn-nav:hover {
  background: #FFF033;
}

/* ----------------------------------------------------------------------------
   COMPONENTS — CARDS
   ---------------------------------------------------------------------------- */

.card {
  padding: 2rem;
  border-radius: 1rem;
  background: var(--revo-gray);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-hover);
}

.card--feature {
  padding: 2rem;
  border-radius: 1rem;
  background: var(--revo-gray);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.card--feature:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 40px rgba(255, 237, 0, 0.06);
  transform: translateY(-2px);
}

.card--feature .card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  transition: transform var(--transition-base);
}

.card--feature:hover .card-icon {
  transform: scale(1.1);
}

.card--feature .card-icon--yellow { background: rgba(255, 237, 0, 0.15); }
.card--feature .card-icon--purple { background: rgba(168, 85, 247, 0.15); }
.card--feature .card-icon--blue   { background: rgba(96, 165, 250, 0.15); }
.card--feature .card-icon--green  { background: rgba(74, 222, 128, 0.15); }
.card--feature .card-icon--cyan   { background: rgba(34, 211, 238, 0.15); }
.card--feature .card-icon--orange { background: rgba(251, 146, 60, 0.15); }

/* Stat card */
.card--stat {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--revo-gray);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.card--stat .stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--revo-yellow);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.card--stat .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Feature card */
.feature-card {
  background: var(--revo-gray);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Card title */
.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

/* Card body */
.card-body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ----------------------------------------------------------------------------
   COMPONENTS — BADGES
   ---------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.badge--yellow {
  background: rgba(255, 237, 0, 0.15);
  color: var(--revo-yellow);
  border: 1px solid rgba(255, 237, 0, 0.2);
}

.badge--patent {
  background: rgba(255, 237, 0, 0.08);
  color: var(--revo-yellow);
  border: 1px solid rgba(255, 237, 0, 0.15);
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
}

.badge--patent .pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--revo-yellow);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.badge--ecosystem {
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  border-radius: 0.375rem;
  font-weight: 600;
}

.badge--purple { background: rgba(168, 85, 247, 0.15); color: var(--revo-purple); }
.badge--blue   { background: rgba(96, 165, 250, 0.15); color: var(--revo-blue); }
.badge--green  { background: rgba(74, 222, 128, 0.15); color: var(--revo-green); }
.badge--cyan   { background: rgba(34, 211, 238, 0.15); color: var(--revo-cyan); }

/* Category tag */
.tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------------------
   COMPONENTS — TABLES
   ---------------------------------------------------------------------------- */

.table-wrapper {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table thead {
  background: rgba(255, 237, 0, 0.05);
}

.table th {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--revo-yellow);
  border-bottom: 1px solid var(--border-subtle);
}

.table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

/* Data table (alternate table style) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table thead {
  background: rgba(255, 237, 0, 0.05);
}

.data-table th {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--revo-yellow);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

/* ----------------------------------------------------------------------------
   ANIMATIONS
   ---------------------------------------------------------------------------- */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-pulse-slow { animation: pulse-slow 3s ease-in-out infinite; }

/* Scroll-triggered animation classes — applied by IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ----------------------------------------------------------------------------
   NAVIGATION (loaded from partial, styled here)
   ---------------------------------------------------------------------------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 1rem 0;
  transition: all var(--transition-base);
}

.site-nav.scrolled {
  background: rgba(28, 28, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.625rem 0;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-brand img {
  height: 36px;
  width: auto;
  transition: filter var(--transition-base);
}

.nav-brand:hover img {
  filter: drop-shadow(0 0 12px rgba(255, 237, 0, 0.5));
}

.nav-brand-text {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 0.375rem;
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-links a:hover {
  color: var(--revo-yellow);
  background: rgba(255, 237, 0, 0.05);
}

.nav-links a.active {
  color: var(--revo-yellow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Ecosystem links in nav */
.nav-ecosystem {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-subtle);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-eco-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-eco-icon {
  width: 1rem;
  height: 1rem;
}

.nav-eco--purple .nav-eco-icon { color: #a855f7; }
.nav-eco--purple:hover { color: #a855f7; }

.nav-eco--blue .nav-eco-icon { color: #60a5fa; }
.nav-eco--blue:hover { color: #60a5fa; }

.nav-eco--yellow .nav-eco-icon { color: var(--revo-yellow); }
.nav-eco--yellow:hover { color: var(--revo-yellow); }

.nav-eco--green .nav-eco-icon { color: #4ade80; }
.nav-eco--green:hover { color: #4ade80; }

/* Mobile hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: calc(var(--z-nav) + 10);
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--revo-dark);
  border-left: 1px solid var(--border-subtle);
  z-index: calc(var(--z-nav) + 5);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  padding: 5rem 1.5rem 2rem;
  overflow-y: auto;
}

.nav-drawer.open {
  transform: translateX(0);
}

.nav-drawer a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast);
}

.nav-drawer a:hover {
  color: var(--revo-yellow);
}

/* Ecosystem links group inside drawer */
.nav-drawer-eco {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border-subtle);
}

.nav-drawer-eco a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.nav-drawer-eco a:hover {
  opacity: 0.7;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-nav) + 2);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Desktop breakpoint — show full nav */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; }
  .nav-ecosystem { display: flex; }
}

@media (min-width: 768px) {
  .nav-inner { padding: 0 2rem; }
}

/* ----------------------------------------------------------------------------
   FOOTER (loaded from partial, styled here)
   ---------------------------------------------------------------------------- */

.site-footer {
  background: var(--revo-dark);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand img {
  height: 32px;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--revo-yellow);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.footer-bottom .patent {
  color: var(--revo-yellow);
  font-weight: 600;
}

@media (min-width: 768px) {
  .footer-inner { padding: 0 2rem; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ----------------------------------------------------------------------------
   UTILITY CLASSES
   ---------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
.mb-8 { margin-bottom: 4rem; }

/* ============================================
   PHASE 11: SHARED COMPONENT LIBRARY
   Extracted from inline styles across pages
   ============================================ */

/* --- Nexus Page Layout --- */
.nexus-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .nexus-container {
        padding: 0 48px;
    }
}

.nexus-section {
    padding: 96px 0;
}

.nexus-section.alt-bg {
    background-color: #121212;
}

/* --- Hero Sections --- */
.nexus-hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.nexus-hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,237,0,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.nexus-hero > * {
    position: relative;
    z-index: 1;
}

.nexus-hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .nexus-hero h1 {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .nexus-hero h1 {
        font-size: 4.5rem;
    }
}

.nexus-hero .hero-subtitle {
    font-size: 1.125rem;
    color: #9CA3AF;
    max-width: 700px;
    line-height: 1.7;
    margin: 0 auto 32px;
}

@media (min-width: 768px) {
    .nexus-hero .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* --- Section Numbering --- */
.section-num {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #FFED00;
    margin-bottom: 16px;
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid rgba(255,237,0,0.3);
    border-radius: 4px;
}

/* --- Section Titles (standalone) --- */
.nexus-section-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .nexus-section-title {
        font-size: 2.25rem;
    }
}

.section-subtitle {
    font-size: 1rem;
    color: #9CA3AF;
    max-width: 700px;
    line-height: 1.7;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .section-subtitle {
        font-size: 1.125rem;
    }
}

/* --- Stat Cards --- */
.stat-card {
    background: #2A2A2A;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(255,237,0,0.3);
    transform: translateY(-2px);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #FFED00;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Content Cards --- */
.nexus-card {
    background: #2A2A2A;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
}

.nexus-card:hover {
    border-color: rgba(255,237,0,0.3);
    box-shadow: 0 0 30px rgba(255,237,0,0.08);
}

.nexus-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.nexus-card p {
    color: #9CA3AF;
    line-height: 1.7;
    font-size: 0.875rem;
}

/* --- Featured Card (yellow border) --- */
.nexus-card.featured {
    border-color: rgba(255,237,0,0.4);
    position: relative;
}

.nexus-card.featured::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFED00;
    color: #1C1C1C;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 16px;
    border-radius: 20px;
}

/* --- Grids --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
}

@media (min-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .card-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 1024px) {
    .card-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Buttons (Phase 11 overrides) --- */
.btn-outline {
    display: inline-block;
    padding: 16px 32px;
    background: transparent;
    color: #FFED00;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid #FFED00;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline:hover {
    background: rgba(255,237,0,0.1);
    transform: translateY(-2px);
}

.btn-outline-white {
    display: inline-block;
    padding: 16px 32px;
    background: transparent;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline-white:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
}

/* --- CTA Section --- */
.nexus-cta {
    padding: 96px 24px;
    text-align: center;
    background: linear-gradient(180deg, #1C1C1C 0%, #121212 50%, #1C1C1C 100%);
    position: relative;
}

.nexus-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,237,0,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.nexus-cta > * {
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    margin-top: 32px;
}

@media (min-width: 640px) {
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* --- Page Navigation (prev/next) --- */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.page-nav a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.page-nav a:hover {
    color: #FFED00;
}

/* --- Patent Badge --- */
.patent-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    background: rgba(255,237,0,0.1);
    border: 1px solid rgba(255,237,0,0.2);
    font-size: 0.7rem;
    font-weight: 700;
    color: #FFED00;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.patent-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFED00;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- Scroll Fade Animation --- */
.fade-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Divider --- */
.nexus-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,237,0,0.3), transparent);
    margin: 0;
    border: none;
}

/* --- Waterfall / Timeline --- */
.waterfall-phase {
    background: #2A2A2A;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 32px;
    position: relative;
}

.waterfall-phase.active {
    border-color: rgba(255,237,0,0.4);
}

/* --- Source Citations --- */
.source-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    font-size: 0.625rem;
    color: #6B7280;
}

/* --- Keyframes (Phase 11) --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scrollbar (Webkit) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1C1C1C;
}

::-webkit-scrollbar-thumb {
    background: #2A2A2A;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3A3A3A;
}

/* ============================================================================
   CONTACT FORM COMPONENT — Phase 12A Part B
   Scoped under .nexus-form to avoid conflicts
   ============================================================================ */
.nexus-form {
    max-width: 32rem;
    margin: 0 auto;
    background: #2A2A2A;
    border: 1px solid #333;
    border-radius: 1rem;
    padding: 2rem;
}

.nexus-form .form-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    text-align: center;
}

.nexus-form .form-subtitle {
    font-size: 0.875rem;
    color: #9CA3AF;
    margin-bottom: 1.5rem;
    text-align: center;
}

.nexus-form .form-group {
    margin-bottom: 1rem;
}

.nexus-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.nexus-form input,
.nexus-form select,
.nexus-form textarea {
    width: 100%;
    background: #1C1C1C;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.nexus-form input:focus,
.nexus-form select:focus,
.nexus-form textarea:focus {
    outline: none;
    border-color: #FFED00;
    box-shadow: 0 0 0 2px rgba(255, 237, 0, 0.1);
}

.nexus-form input::placeholder,
.nexus-form textarea::placeholder {
    color: #4B5563;
}

.nexus-form textarea {
    resize: vertical;
    min-height: 5rem;
}

.nexus-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.nexus-form .checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nexus-form .checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #FFED00;
    cursor: pointer;
}

.nexus-form .checkbox-group label {
    text-transform: none;
    font-weight: 400;
    font-size: 0.8rem;
    color: #D1D5DB;
    margin-bottom: 0;
    cursor: pointer;
}

.nexus-form .form-submit {
    width: 100%;
    padding: 0.875rem 2rem;
    background: #FFED00;
    color: #1C1C1C;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    margin-top: 0.5rem;
}

.nexus-form .form-submit:hover {
    background: #E6D600;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 237, 0, 0.3);
}

.nexus-form .form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nexus-form .form-submit.loading {
    position: relative;
    color: transparent;
}

.nexus-form .form-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #1C1C1C;
    border-top-color: transparent;
    border-radius: 50%;
    animation: nexus-spin 0.6s linear infinite;
}

@keyframes nexus-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.nexus-form .form-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    display: none;
}

.nexus-form .form-status.success {
    display: block;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ADE80;
}

.nexus-form .form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

/* Turnstile widget centering */
.nexus-form .cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}
