/**
 * ==============================================================================
 * Curious Rabit Design System — Unified High-Contrast sRGB Specification
 * ==============================================================================
 * Colors:
 *   - Header Background:            #0A161A (Ultra Dark Charcoal-Green)
 *   - Primary Page Background:      #F0F0E0 (Clean Off-White)
 *   - Primary Text & Headings:      #0D1C22 (Deep Charcoal-Green)
 *   - Secondary / Paragraph Text:   #3B4E49 (Dark Muted Green)
 *   - Accent / Primary CTA:         #B8E82B (Vibrant Lime Green)
 *   - Secondary Buttons / Badges:   #FFFFFF (Solid White with #0D1C22 text)
 *
 * Cross-Browser Verification (Chrome, Safari, Firefox):
 *   - Explicit sRGB color definitions
 *   - -webkit-font-smoothing: antialiased
 *   - -moz-osx-font-smoothing: grayscale
 *   - color-scheme: light only (prevents unwanted Safari dark mode overrides)
 *   - Contrast Ratios:
 *       #0D1C22 on #F0F0E0 = 13.62:1 (WCAG AAA)
 *       #3B4E49 on #F0F0E0 =  7.31:1 (WCAG AAA)
 *       #0D1C22 on #B8E82B = 10.68:1 (WCAG AAA)
 *       #FFFFFF on #0A161A = 17.50:1 (WCAG AAA)
 * ==============================================================================
 */

:root {
  /* Exact Color Tokens */
  --header-bg: #0A161A;
  --header-bg-rgb: 10, 22, 26;

  --bg-page: #F0F0E0;
  --bg-page-rgb: 240, 240, 224;

  --text-primary: #0D1C22;
  --text-primary-rgb: 13, 28, 34;

  --text-secondary: #3B4E49;
  --text-secondary-rgb: 59, 78, 73;

  --accent-lime: #B8E82B;
  --accent-lime-rgb: 184, 232, 43;
  --accent-lime-hover: #A5D61F;
  --accent-lime-glow: rgba(184, 232, 43, 0.4);

  --surface-white: #FFFFFF;
  --border-subtle: rgba(13, 28, 34, 0.12);
  --border-medium: rgba(13, 28, 34, 0.22);
}

/* ==============================================================================
   1. Base Cross-Browser Normalization & Canvas
   ============================================================================== */
html {
  color-scheme: light only;
  background-color: var(--bg-page);
}

html, body {
  background-color: var(--bg-page) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  background-image: 
    radial-gradient(ellipse 70% 40% at 50% -10%, rgba(184, 232, 43, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(13, 28, 34, 0.04), transparent) !important;
}

/* All Headings H1-H6: Deep Charcoal-Green #0D1C22 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  font-weight: 700;
}

body > header h1, body > header h2,
body > main h1, body > main h2, body > main h3,
body > section h1, body > section h2, body > section h3 {
  color: var(--text-primary) !important;
}

/* Paragraphs & Muted text: Dark Muted Green #3B4E49 */
p, li, span.body-text {
  color: var(--text-secondary);
  line-height: 1.6;
}

body > header p, body > main p, body > section p {
  color: var(--text-secondary) !important;
}

/* Focus states with Lime Ring */
:focus-visible {
  outline: 2px solid var(--accent-lime) !important;
  outline-offset: 2px !important;
}

/* ==============================================================================
   2. Header & Sticky Navigation (#0A161A Ultra Dark Charcoal-Green)
   ============================================================================== */
header.header-nav,
nav.glass-nav,
nav.header-sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 50 !important;
  background-color: #0A161A !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px -2px rgba(10, 22, 26, 0.4) !important;
}

/* Logo container in header */
.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
}

.logo-container,
.nav-logo-box {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px;
  min-height: 52px;
  border-radius: 0.85rem !important;
  background-color: #F0F0E0 !important;
  padding: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  border: none !important;
}

.logo-container:hover,
.nav-logo-box:hover {
  transform: scale(1.05) !important;
}

.logo-img,
.nav-logo-box img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0.6rem !important;
  display: block !important;
}

/* Header brand text */
.brand-text-main,
.nav-brand-title {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  letter-spacing: -0.02em !important;
  color: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  line-height: 1 !important;
}

.brand-text-sub {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.2em !important;
  color: #A0B0A8 !important;
  margin-top: 0.3rem !important;
  line-height: 1 !important;
}

/* Header Nav Links: Solid #FFFFFF shifting to #B8E82B on hover */
nav.glass-nav a,
header.header-nav a {
  color: #FFFFFF !important;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

nav.glass-nav a:hover,
header.header-nav a:hover {
  color: var(--accent-lime) !important;
}

/* Header CTA Button: #B8E82B background + #0D1C22 text */
.nav-cta-btn,
header.header-nav a.btn-primary,
nav.glass-nav a[class*="bg-gradient"],
nav.glass-nav a[class*="bg-brand-"] {
  background-color: var(--accent-lime) !important;
  background-image: none !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  border-radius: 0.75rem !important;
  border: 1px solid var(--accent-lime) !important;
  box-shadow: 0 4px 14px 0 var(--accent-lime-glow) !important;
  padding: 0.625rem 1.25rem !important;
}

.nav-cta-btn:hover,
header.header-nav a.btn-primary:hover {
  background-color: var(--accent-lime-hover) !important;
  color: var(--text-primary) !important;
  transform: translateY(-1px);
}

/* ==============================================================================
   3. Buttons & Badges (Primary Lime & Secondary White)
   ============================================================================== */
/* Primary High-Impact CTA (#B8E82B with #0D1C22 text) */
.btn-primary,
.cta-lime,
.bg-lime,
.bg-gradient-to-r.from-brand-cyan.to-brand-indigo,
.bg-gradient-to-r.from-cyan-500.to-violet-600,
button[type="submit"],
.btn-action {
  background-color: var(--accent-lime) !important;
  background-image: none !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  border-radius: 0.75rem !important;
  border: 1px solid var(--accent-lime) !important;
  box-shadow: 0 4px 16px 0 var(--accent-lime-glow) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover,
.cta-lime:hover,
button[type="submit"]:hover,
.btn-action:hover {
  background-color: var(--accent-lime-hover) !important;
  box-shadow: 0 6px 22px 0 rgba(184, 232, 43, 0.5) !important;
  transform: translateY(-1px) !important;
}

.btn-primary:active,
.cta-lime:active {
  transform: translateY(0) !important;
}

/* Secondary CTA / Badge: #FFFFFF with #0D1C22 text */
.btn-secondary,
.btn-white {
  background-color: var(--surface-white) !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  border-radius: 0.75rem !important;
  border: 1.5px solid var(--border-medium) !important;
  box-shadow: 0 2px 8px -1px rgba(13, 28, 34, 0.08) !important;
  padding: 0.75rem 1.5rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease !important;
}

.btn-secondary:hover,
.btn-white:hover {
  background-color: var(--text-primary) !important;
  color: #FFFFFF !important;
  border-color: var(--text-primary) !important;
  transform: translateY(-1px) !important;
}

/* Solid White Badges */
.badge-white {
  background-color: var(--surface-white) !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 9999px !important;
  padding: 0.25rem 0.75rem !important;
  box-shadow: 0 1px 3px rgba(13, 28, 34, 0.06) !important;
}

.badge-lime {
  background-color: var(--accent-lime) !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  padding: 0.25rem 0.625rem !important;
}

/* ==============================================================================
   4. Feature Cards & Content Containers
   ============================================================================== */
.glass-card,
.theme-card,
.content-card {
  background-color: var(--surface-white) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 6px 24px -2px rgba(13, 28, 34, 0.07) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.glass-card:hover,
.theme-card:hover,
.content-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(13, 28, 34, 0.28) !important;
  box-shadow: 0 12px 32px -4px rgba(13, 28, 34, 0.12) !important;
}

/* Headings inside content cards */
.glass-card h1, .glass-card h2, .glass-card h3, .glass-card h4, .glass-card h5,
.theme-card h1, .theme-card h2, .theme-card h3, .theme-card h4, .theme-card h5 {
  color: var(--text-primary) !important;
  font-weight: 700;
}

/* Paragraphs inside content cards */
.glass-card p, .theme-card p,
.glass-card .text-zinc-400, .theme-card .text-zinc-400,
.glass-card .text-slate-400, .theme-card .text-slate-400 {
  color: var(--text-secondary) !important;
}

/* Feature Spotlight / Dark Containers */
.card-spotlight,
.dark-container {
  background-color: var(--header-bg) !important;
  color: #FFFFFF !important;
  border-radius: 1.5rem !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 12px 36px -4px rgba(10, 22, 26, 0.35) !important;
}

.card-spotlight h1, .card-spotlight h2, .card-spotlight h3,
.dark-container h1, .dark-container h2, .dark-container h3 {
  color: #FFFFFF !important;
}

.card-spotlight p,
.dark-container p {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* ==============================================================================
   5. Form Inputs & Interactive Controls
   ============================================================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
  background-color: #FFFFFF !important;
  color: var(--text-primary) !important;
  border: 1.5px solid var(--border-medium) !important;
  border-radius: 0.75rem !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(59, 78, 73, 0.6) !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--text-primary) !important;
  box-shadow: 0 0 0 3px rgba(184, 232, 43, 0.45) !important;
}

/* ==============================================================================
   6. Footer (#0A161A Ultra Dark Charcoal-Green)
   ============================================================================== */
footer {
  background-color: var(--header-bg) !important;
  color: #FFFFFF !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

footer h1, footer h2, footer h3, footer h4,
footer div[class*="font-bold"], footer span[class*="font-bold"] {
  color: var(--accent-lime) !important;
  font-weight: 700 !important;
}

footer a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

footer a:hover {
  color: var(--accent-lime) !important;
}

footer p {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* ==============================================================================
   7. Typography Accents & Overrides
   ============================================================================== */
.gradient-accent {
  background: linear-gradient(135deg, #0D1C22 0%, #3B4E49 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.gradient-text {
  background: linear-gradient(135deg, #0D1C22 0%, #3B4E49 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ==============================================================================
   8. Neural Rabbit Full-Screen Splash Loader
   ============================================================================== */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  z-index: 999999;
  background-color: var(--bg-page, #F0F0E0);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(184, 232, 43, 0.14), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(13, 28, 34, 0.04), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.55s ease;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.loader-overlay.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Prevent body scrolling while splash loader is active */
body.loader-active {
  overflow: hidden !important;
}

.loader {
  width: min(100%, 340px);
  max-width: calc(100vw - 32px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transform: translateZ(0);
}

.network {
  width: 100%;
  max-width: min(280px, 75vw);
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: visible;
  filter: drop-shadow(0 10px 25px rgba(13, 28, 34, 0.08));
}

.network-lines {
  fill: none;
  stroke: #0D1C22;
  stroke-width: 1.1;
  opacity: 0.28;
}

.signal {
  fill: #B8E82B;
  filter: drop-shadow(0 0 4px rgba(184, 232, 43, 0.9));
}

.node {
  fill: #0D1C22;
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pulse 2s ease-in-out infinite;
}

.node.accent {
  fill: #B8E82B;
}

.node:nth-of-type(2n) {
  animation-delay: -0.7s;
}

.core-halo {
  fill: #B8E82B;
  transform-box: fill-box;
  transform-origin: center;
  animation: halo 2.8s ease-out infinite;
}

.rabbit-core {
  transform-box: fill-box;
  transform-origin: center;
  animation: core-breathe 3s ease-in-out infinite;
}

.ear-left {
  transform-box: view-box;
  transform-origin: 138px 120px;
  animation: ear-left 2.7s ease-in-out infinite;
}

.ear-right {
  transform-box: view-box;
  transform-origin: 151px 121px;
  animation: ear-right 2.7s ease-in-out infinite;
}

.eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 4s ease-in-out infinite;
}

.loader-status {
  color: #0D1C22;
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
}

.loader-status .dots::after {
  content: "";
  display: inline-block;
  width: 1.5em;
  text-align: left;
  animation: dots 1.2s steps(4, end) infinite;
}

.loader-progress {
  width: 120px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(13, 28, 34, 0.12);
  position: relative;
}

.loader-progress::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: #B8E82B;
  animation: progress 1.5s ease-in-out infinite;
}

@keyframes halo {
  0% { opacity: 0.35; transform: scale(0.85); }
  70%, 100% { opacity: 0; transform: scale(1.85); }
}

@keyframes node-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.6); }
}

@keyframes core-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes ear-left {
  0%, 100% { transform: rotate(0); }
  35% { transform: rotate(-5deg); }
  65% { transform: rotate(2deg); }
}

@keyframes ear-right {
  0%, 100% { transform: rotate(0); }
  35% { transform: rotate(5deg); }
  65% { transform: rotate(-2deg); }
}

@keyframes blink {
  0%, 44%, 48%, 100% { transform: scaleY(1); }
  46% { transform: scaleY(0.08); }
}

@keyframes progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

@media (prefers-reduced-motion: reduce) {
  .loader *, .loader *::before, .loader *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==============================================================================
   9. Mobile-First Responsive System & Accessibility Helpers
   ============================================================================== */

/* Fluid Typography Utilities */
.fluid-h1 {
  font-size: clamp(2.125rem, 5vw + 1rem, 4rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.03em !important;
}

.fluid-h2 {
  font-size: clamp(1.75rem, 3.5vw + 0.5rem, 2.75rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.025em !important;
}

.fluid-h3 {
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem) !important;
  line-height: 1.25 !important;
}

.fluid-sub {
  font-size: clamp(0.95rem, 1.2vw + 0.6rem, 1.125rem) !important;
  line-height: 1.6 !important;
}

/* Touch Targets: minimum 44x44px for WCAG 2.5.5 / iOS HIG */
.touch-target {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  cursor: pointer;
}

.mobile-nav-link {
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  border-radius: 0.75rem !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  touch-action: manipulation;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--accent-lime) !important;
}

.mobile-nav-link.active {
  background-color: rgba(184, 232, 43, 0.12) !important;
  color: var(--accent-lime) !important;
}

/* Ensure SVGs inside nav buttons never intercept touch clicks */
#mobile-menu-btn svg,
#mobile-nav-toggle svg {
  pointer-events: none !important;
}

/* Mobile & Tablet Hamburger Button and Drawer Behavior */
@media (max-width: 1023.98px) {
  #mobile-menu-btn,
  #mobile-nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Mobile Drawer Transition */
.mobile-drawer-wrapper {
  display: block;
  width: 100%;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.35s;
}

.mobile-drawer-wrapper.open {
  max-height: calc(100vh - 4.5rem) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* LAPTOP / DESKTOP BREAKPOINT (>= 1024px):
   Hide hamburger menu button and drawer completely. */
@media (min-width: 1024px) {
  .touch-target.lg\:hidden,
  .lg\:hidden,
  #mobile-menu-btn,
  #mobile-nav-toggle,
  #mobile-nav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Responsive Image & Embed Normalization */
img, svg, video {
  max-width: 100%;
  height: auto;
}

/* Prevent horizontal scroll leakage on mobile */
html, body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

