/*
 * Capital Research Community v2 — Institutional Fintech Design System
 * Visual Architecture:
 *   - Cinematic Deep-Navy Hero with 3D Perspective Monitor & Golden/Electric-Blue Ambient Glow
 *   - Crisp, Airy Daylight Content Sections (Default) + Optional Dark Mode Toggle (`html.dark`)
 *   - Typography: Plus Jakarta Sans (Display/Headings) + Inter (Body/UI) + JetBrains Mono (Prices/Data only)
 */

/* ---------- 1. Theme Tokens (Crisp Daylight Default + Obsidian Dark Mode) ---------- */
:root {
  /* Default: Crisp Airy Daylight for content sections below the Dark Hero */
  --bg-primary: #F5F8FC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #EBF2F9;
  --bg-elevated: rgba(255, 255, 255, 0.95);
  --bg-card: #FFFFFF;
  --bg-card-solid: #FFFFFF;
  --bg-card-hover: #FFFFFF;
  --bg-glass: rgba(5, 13, 28, 0.88);
  --bg-terminal: #06101E;
  --text-primary: #0A1628;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(14, 165, 233, 0.38);
  --spotlight-color: rgba(14, 165, 233, 0.06);
  --shadow-card: 0 10px 30px -8px rgba(10, 22, 40, 0.05), 0 2px 6px -1px rgba(10, 22, 40, 0.03);
  --shadow-hover: 0 22px 45px -12px rgba(14, 165, 233, 0.15), 0 6px 18px -4px rgba(10, 22, 40, 0.06);
  --grid-line: rgba(14, 165, 233, 0.06);
}

html.dark {
  /* Optional Full Dark Mode when toggled */
  --bg-primary: #040914;
  --bg-secondary: #071020;
  --bg-tertiary: #0B182E;
  --bg-elevated: rgba(10, 22, 42, 0.90);
  --bg-card: linear-gradient(180deg, rgba(13, 27, 48, 0.82) 0%, rgba(7, 16, 30, 0.92) 100%);
  --bg-card-solid: #091528;
  --bg-card-hover: linear-gradient(180deg, rgba(17, 35, 60, 0.94) 0%, rgba(10, 21, 38, 0.98) 100%);
  --bg-glass: rgba(4, 10, 20, 0.88);
  --bg-terminal: #050C18;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(56, 189, 248, 0.45);
  --spotlight-color: rgba(56, 189, 248, 0.11);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7), inset 0 1px 0 0 rgba(255, 255, 255, 0.07);
  --shadow-hover: 0 28px 56px -12px rgba(14, 165, 233, 0.22), inset 0 1px 0 0 rgba(255, 255, 255, 0.14);
  --grid-line: rgba(56, 189, 248, 0.06);
}

/* ---------- 2. Base & Smooth Humanist/Geometric Typography ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  overflow-x: hidden;
}

body {
  font-family: "Inter", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  width: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display {
  font-family: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.028em;
}

.font-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

/* Semantic Theme Helper Classes */
.theme-bg-primary { background-color: var(--bg-primary); }
.theme-bg-secondary { background-color: var(--bg-secondary); }
.theme-bg-tertiary { background-color: var(--bg-tertiary); }
.theme-text-primary { color: var(--text-primary); }
.theme-text-secondary { color: var(--text-secondary); }
.theme-text-muted { color: var(--text-muted); }
.theme-border { border-color: var(--border-subtle); }

/* Custom Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #0EA5E9 var(--bg-secondary);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0EA5E9, #2563EB);
  border-radius: 999px;
}

::selection {
  background: #0EA5E9;
  color: #FFFFFF;
}

/* Accessible Focus Ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #0EA5E9;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -64px;
  background: #0EA5E9;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- 3. Gradients & Hero Lighting (Dark Default + True Light Mode) ---------- */
.text-gradient-sky {
  background: linear-gradient(95deg, #0284C7 0%, #0EA5E9 50%, #2563EB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html.dark .text-gradient-sky {
  background: linear-gradient(95deg, #38BDF8 0%, #0EA5E9 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-hero {
  background: linear-gradient(95deg, #0284C7 0%, #0EA5E9 48%, #0D9488 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html.dark .text-gradient-hero {
  background: linear-gradient(95deg, #7DD3FC 0%, #38BDF8 45%, #2DD4BF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(95deg, #D97706 0%, #F59E0B 55%, #B45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html.dark .text-gradient-gold {
  background: linear-gradient(95deg, #FDE68A 0%, #F59E0B 55%, #D97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero & Banner Background: Airy Sky-Blue Daylight in Light Mode, Deep Navy in Dark Mode */
.hero-cinematic-bg {
  position: relative;
  background-color: #EEF6FF;
  background-image:
    radial-gradient(ellipse 55% 50% at 78% 22%, rgba(14, 165, 233, 0.18) 0%, rgba(37, 99, 235, 0.06) 45%, transparent 72%),
    radial-gradient(ellipse 35% 40% at 96% 48%, rgba(245, 158, 11, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 15% 20%, rgba(14, 165, 233, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, #E2F0FF 0%, #EFF7FF 60%, #F8FAFC 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: #0B172A;
}

html.dark .hero-cinematic-bg {
  background-color: #030916;
  background-image:
    radial-gradient(ellipse 55% 50% at 78% 22%, rgba(14, 165, 233, 0.30) 0%, rgba(37, 99, 235, 0.12) 45%, transparent 72%),
    radial-gradient(ellipse 35% 40% at 96% 48%, rgba(245, 158, 11, 0.20) 0%, transparent 65%),
    radial-gradient(ellipse 35% 35% at 48% 28%, rgba(245, 158, 11, 0.11) 0%, transparent 62%),
    radial-gradient(ellipse 50% 50% at 15% 20%, rgba(14, 165, 233, 0.14) 0%, transparent 70%),
    linear-gradient(180deg, #030813 0%, #061226 60%, #040B18 100%);
  color: #FFFFFF;
}

/* Subtle perspective grid inside Hero */
.hero-cinematic-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 165, 233, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 60% 35%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 85% 75% at 60% 35%, #000 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
html.dark .hero-cinematic-bg::before {
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.055) 1px, transparent 1px);
}

.hero-cinematic-bg > * {
  position: relative;
  z-index: 1;
}

/* Light Mode color overrides inside .hero-cinematic-bg (excluding the 3D Monitor screen & blue CTA buttons) */
html:not(.dark) .hero-cinematic-bg h1,
html:not(.dark) .hero-cinematic-bg h2:not(#terminal-instrument),
html:not(.dark) .hero-cinematic-bg p strong.text-white {
  color: #0B172A !important;
}
html:not(.dark) .hero-cinematic-bg p.text-slate-300,
html:not(.dark) .hero-cinematic-bg p.text-sky-200 {
  color: #334155 !important;
}
html:not(.dark) .hero-cinematic-bg span.text-sky-300:not(#terminal-rr) {
  color: #0369A1 !important;
  background-color: rgba(14, 165, 233, 0.12) !important;
  border-color: rgba(14, 165, 233, 0.30) !important;
}
html:not(.dark) .hero-cinematic-bg span.text-emerald-300 {
  color: #047857 !important;
  background-color: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
html:not(.dark) .hero-cinematic-bg .bg-white\/5,
html:not(.dark) .hero-cinematic-bg .bg-white\/\[0\.04\] {
  background-color: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
  box-shadow: 0 4px 14px -3px rgba(15, 23, 42, 0.07);
}
html:not(.dark) .hero-cinematic-bg .bg-\[\#071326\]\/85,
html:not(.dark) .hero-cinematic-bg .bg-\[\#071529\]\/80 {
  background-color: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(14, 165, 233, 0.25) !important;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.08) !important;
}
html:not(.dark) .hero-cinematic-bg .bg-\[\#071326\]\/85 p.text-white,
html:not(.dark) .hero-cinematic-bg .bg-\[\#071529\]\/80 dd.text-white {
  color: #0B172A !important;
}
html:not(.dark) .hero-cinematic-bg .bg-\[\#071326\]\/85 p.text-slate-300,
html:not(.dark) .hero-cinematic-bg .bg-\[\#071529\]\/80 dt {
  color: #475569 !important;
}
html:not(.dark) .hero-cinematic-bg .bg-\[\#071326\]\/85 > div > div,
html:not(.dark) .hero-cinematic-bg .bg-\[\#071529\]\/80 > div {
  border-color: #E2E8F0 !important;
}

/* 3D Perspective-Tilted Monitor Frame (Stays Dark Hardware Display in both modes for 3D contrast) */
.hero-monitor-wrap {
  perspective: 1300px;
}

.hero-monitor-3d {
  position: relative;
  background: linear-gradient(165deg, #0B1D36 0%, #061121 55%, #040B16 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.55) !important;
  box-shadow:
    0 30px 70px -15px rgba(15, 23, 42, 0.40),
    0 0 40px -5px rgba(14, 165, 233, 0.28),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25);
  color: #F8FAFC !important;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
html:not(.dark) .hero-monitor-3d #terminal-instrument {
  color: #FFFFFF !important;
}
html:not(.dark) .hero-monitor-3d span.text-emerald-300 {
  color: #6EE7B7 !important;
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.40) !important;
}
html:not(.dark) .hero-monitor-3d .bg-white\/\[0\.04\] {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: rgba(255, 255, 255, 0.65) !important;
  box-shadow: none !important;
}
html.dark .hero-monitor-3d {
  box-shadow:
    0 35px 80px -15px rgba(0, 0, 0, 0.9),
    0 0 45px -5px rgba(14, 165, 233, 0.35),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25);
}

@media (min-width: 1024px) {
  .hero-monitor-3d {
    transform: rotateY(-8deg) rotateX(2deg);
  }
  .hero-monitor-3d:hover {
    transform: rotateY(-3deg) rotateX(0.5deg) translateY(-4px);
    box-shadow:
      0 40px 90px -15px rgba(15, 23, 42, 0.55),
      0 0 60px -4px rgba(56, 189, 248, 0.45),
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.35);
  }
}

/* Glowing top neon edge on the 3D Monitor */
.hero-monitor-3d::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38BDF8, #60A5FA, transparent);
  filter: drop-shadow(0 0 8px #38BDF8);
  pointer-events: none;
}

/* Inner Page Hero Background: Crisp Sky-Blue Daylight in Light Mode, Deep Navy in Dark Mode */
.bg-price-grid,
.bg-aurora {
  position: relative;
  background-color: #EEF6FF;
  background-image:
    radial-gradient(ellipse 65% 55% at 50% 0%, rgba(14, 165, 233, 0.16) 0%, transparent 72%),
    radial-gradient(ellipse 40% 40% at 85% 25%, rgba(45, 212, 191, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, #E4F1FF 0%, #F2F8FF 65%, #F8FAFC 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

html.dark .bg-price-grid,
html.dark .bg-aurora {
  background-color: #040B18;
  background-image:
    radial-gradient(ellipse 65% 55% at 50% 0%, rgba(14, 165, 233, 0.22) 0%, transparent 72%),
    radial-gradient(ellipse 40% 40% at 85% 25%, rgba(45, 212, 191, 0.12) 0%, transparent 70%);
  color: #F8FAFC;
}

.bg-terminal-grid {
  position: relative;
}
.bg-terminal-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(14, 165, 233, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 165, 233, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 25%, transparent 85%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 25%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}
html.dark .bg-terminal-grid::before {
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
}
.bg-terminal-grid > * {
  position: relative;
  z-index: 1;
}

/* ---------- 4. Glass Header (Frosted White in Light Mode, Deep Navy in Dark Mode) ---------- */
.glass-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px -6px rgba(15, 23, 42, 0.05);
  color: #0F172A;
}

html.dark .glass-nav {
  background: rgba(4, 10, 22, 0.90);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #FFFFFF;
}

/* Light Mode Header Text & Controls */
html:not(.dark) #site-header a span.text-white {
  color: #0B172A !important;
}
html:not(.dark) #site-header a span.text-sky-400 {
  color: #0284C7 !important;
}
html:not(.dark) #site-header [data-theme-toggle] {
  background-color: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}
html:not(.dark) #site-header [data-theme-toggle]:hover {
  border-color: #0EA5E9 !important;
  color: #0284C7 !important;
}
html:not(.dark) #site-header #menu-toggle {
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}
html:not(.dark) #site-header #mobile-menu {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}
html:not(.dark) #site-header #mobile-menu a:not(.btn-glow-blue) {
  color: #1E293B !important;
}

#site-header nav a,
#site-header nav button {
  white-space: nowrap;
}

#site-header .lg\:flex,
#site-header .xl\:flex {
  gap: 2.25rem !important;
}

#site-header .lg\:flex > a,
#site-header .xl\:flex > a {
  position: relative;
  padding: 0.4rem 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569 !important;
  transition: color 0.2s ease;
}
html.dark #site-header .lg\:flex > a,
html.dark #site-header .xl\:flex > a {
  color: rgba(226, 232, 240, 0.80) !important;
}

#site-header .lg\:flex > a:hover,
#site-header .xl\:flex > a:hover {
  color: #0284C7 !important;
}
html.dark #site-header .lg\:flex > a:hover,
html.dark #site-header .xl\:flex > a:hover {
  color: #FFFFFF !important;
}

/* Active Nav Link with glowing blue underline */
#site-header .lg\:flex > a[aria-current="page"],
#site-header .xl\:flex > a[aria-current="page"] {
  color: #0284C7 !important;
  font-weight: 700;
}
html.dark #site-header .lg\:flex > a[aria-current="page"],
html.dark #site-header .xl\:flex > a[aria-current="page"] {
  color: #FFFFFF !important;
  font-weight: 600;
}
#site-header .lg\:flex > a[aria-current="page"]::after,
#site-header .xl\:flex > a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38BDF8, #0EA5E9);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
}

/* Glowing Electric Blue CTA Button (Screenshot 2 style) */
.btn-glow-blue {
  background: linear-gradient(90deg, #0EA5E9 0%, #2563EB 100%);
  color: #FFFFFF !important;
  box-shadow:
    0 10px 25px -4px rgba(14, 165, 233, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.25s ease;
}
.btn-glow-blue:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 32px -4px rgba(37, 99, 235, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  filter: brightness(1.06);
}

/* ---------- 5. Bento Cards, Feature Cards & Terminal Windows ---------- */
.bento-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease;
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    var(--spotlight-color),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card:hover,
.bento-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.bento-card > * {
  position: relative;
  z-index: 1;
}

/* Corner Arrow Button inside Feature Cards (Screenshot 2 style) */
.card-arrow-btn {
  display: inline-flex;
  height: 32px;
  width: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.10);
  color: #0284C7;
  transition: all 0.25s ease;
}
html.dark .card-arrow-btn {
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
}
.bento-card:hover .card-arrow-btn {
  background: #0EA5E9;
  color: #FFFFFF;
  transform: translateX(2px);
}

/* Featured Pricing / Highlight Card */
.bento-card-featured {
  border: 2px solid #0EA5E9 !important;
  box-shadow: 0 24px 50px -12px rgba(14, 165, 233, 0.22);
}

/* Terminal Window: Crisp Slate-Sky Panel in Light Mode, Deep Navy Terminal in Dark Mode */
.terminal-window {
  position: relative;
  background: linear-gradient(160deg, #F0F7FF 0%, #E6F0FD 100%);
  border: 1px solid rgba(14, 165, 233, 0.30);
  box-shadow:
    0 18px 40px -15px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.90);
  color: #0F172A;
}

html.dark .terminal-window {
  background: radial-gradient(120% 100% at 50% 0%, #0C1E35 0%, #06101E 60%, #040A13 100%);
  border: 1px solid rgba(56, 189, 248, 0.30);
  box-shadow:
    0 28px 64px -15px rgba(2, 8, 20, 0.65),
    0 0 40px -10px rgba(14, 165, 233, 0.20),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.14);
  color: #F8FAFC;
}

/* Light Mode text & border adaptations inside .terminal-window */
html:not(.dark) .terminal-window .text-white,
html:not(.dark) .terminal-window .text-white\/90,
html:not(.dark) .terminal-window .text-white\/85,
html:not(.dark) .terminal-window .text-white\/80,
html:not(.dark) .terminal-window .text-white\/75 {
  color: #0F172A !important;
}
html:not(.dark) .terminal-window .text-white\/60,
html:not(.dark) .terminal-window .text-white\/55,
html:not(.dark) .terminal-window .text-white\/50,
html:not(.dark) .terminal-window .text-white\/45 {
  color: #475569 !important;
}
html:not(.dark) .terminal-window .text-sky-300,
html:not(.dark) .terminal-window .text-ocean-300 {
  color: #0284C7 !important;
}
html:not(.dark) .terminal-window .text-emerald-400,
html:not(.dark) .terminal-window .text-emerald-300,
html:not(.dark) .terminal-window .text-teal-300 {
  color: #047857 !important;
}
html:not(.dark) .terminal-window .text-amber-300 {
  color: #B45309 !important;
}
html:not(.dark) .terminal-window .text-red-300 {
  color: #B91C1C !important;
}
html:not(.dark) .terminal-window .border-white\/10,
html:not(.dark) .terminal-window .border-white\/15 {
  border-color: rgba(15, 23, 42, 0.12) !important;
}
html:not(.dark) .terminal-window .bg-white\/\[0\.03\],
html:not(.dark) .terminal-window .bg-white\/5,
html:not(.dark) .terminal-window .bg-black\/30,
html:not(.dark) .terminal-window .bg-black\/25 {
  background-color: rgba(255, 255, 255, 0.85) !important;
}

/* Light Mode Footer adaptation */
html:not(.dark) #site-footer {
  background-color: #EEF3F9 !important;
  border-top: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}
html:not(.dark) #site-footer .text-white {
  color: #0B172A !important;
}
html:not(.dark) #site-footer .text-sky-400 {
  color: #0284C7 !important;
}
html:not(.dark) #site-footer .text-slate-400,
html:not(.dark) #site-footer .text-slate-500,
html:not(.dark) #site-footer .text-white\/60 {
  color: #475569 !important;
}
html:not(.dark) #site-footer .border-white\/10 {
  border-color: #CBD5E1 !important;
}

.terminal-dot-red { width: 10px; height: 10px; border-radius: 999px; background: #FB7185; }
.terminal-dot-amber { width: 10px; height: 10px; border-radius: 999px; background: #FBBF24; }
.terminal-dot-green { width: 10px; height: 10px; border-radius: 999px; background: #34D399; }

/* ---------- 6. Badges & Status Pills ---------- */
.tag-bracket {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 9999px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  background: rgba(14, 165, 233, 0.08);
  padding: 0.35rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0284C7;
}
html.dark .section-pill {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
}

.result-badge-win {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
}
html.dark .result-badge-win,
.terminal-window .result-badge-win,
.hero-monitor-3d .result-badge-win {
  color: #34D399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.38);
}

.result-badge-loss {
  color: #DC2626;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.28);
}
html.dark .result-badge-loss,
.terminal-window .result-badge-loss,
.hero-monitor-3d .result-badge-loss {
  color: #FB7185;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(251, 113, 133, 0.38);
}

.result-badge-neutral {
  color: #B45309;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.30);
}
html.dark .result-badge-neutral,
.terminal-window .result-badge-neutral,
.hero-monitor-3d .result-badge-neutral {
  color: #FBBF24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.36);
}

/* Live pulsing indicator dot */
.pulse-dot {
  position: relative;
  display: inline-flex;
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background-color: #10B981;
  opacity: 0.55;
  animation: pulsePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes pulsePing {
  75%, 100% {
    transform: scale(2.3);
    opacity: 0;
  }
}

/* ---------- 7. Buttons & Ripple ---------- */
.btn-ripple {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.ripple-span {
  position: absolute;
  border-radius: 9999px;
  transform: scale(0);
  animation: ripple 650ms linear;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
@keyframes ripple {
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}

/* ---------- 8. Form Inputs & Custom Range Slider ---------- */
.theme-input {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.theme-input:focus {
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.theme-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

input[type="range"].risk-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #10B981 0%, #0EA5E9 60%, #F59E0B 100%);
  outline: none;
}
input[type="range"].risk-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #0284C7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
}
input[type="range"].risk-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

/* ---------- 9. Scroll Reveal Animations ---------- */
[data-animate] {
  opacity: 0;
  will-change: transform, opacity;
}
[data-animate="fade-up"] {
  transform: translateY(20px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-animate="fade-left"] {
  transform: translateX(-24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-animate="fade-right"] {
  transform: translateX(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-animate="zoom-in"] {
  transform: scale(0.96);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-animate].is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

.delay-1 { transition-delay: 0.06s; }
.delay-2 { transition-delay: 0.12s; }
.delay-3 { transition-delay: 0.18s; }
.delay-4 { transition-delay: 0.24s; }
.delay-5 { transition-delay: 0.30s; }
.delay-6 { transition-delay: 0.36s; }

.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ---------- 10. Accordion & Mobile Drawer ---------- */
.accordion-panel {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.accordion-panel > div {
  overflow: hidden;
  min-height: 0;
}
.accordion-item[data-open="true"] .accordion-panel {
  grid-template-rows: minmax(0, 1fr);
}
.accordion-item[data-open="true"] .accordion-icon {
  transform: rotate(45deg);
}
.accordion-icon {
  transition: transform 0.3s ease;
}

#site-header.is-scrolled {
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5);
}

#mobile-menu {
  background: #FFFFFF;
  border-color: #E2E8F0;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
html.dark #mobile-menu {
  background: #061020 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
#mobile-menu.open {
  max-height: 760px;
  opacity: 1;
}

/* ---------- 11. Trade Setup Inspector Modal ---------- */
.modal-backdrop {
  background: rgba(2, 6, 14, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.25s ease;
}
.modal-panel {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

/* ---------- 12. Reduced Motion & Print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .pulse-dot::after {
    animation: none !important;
  }
}

@media print {
  #site-header, #site-footer, #whatsapp-fab, #back-to-top, .no-print {
    display: none !important;
  }
}
