/* ===================================================================
   OmniCache-AI — Custom Theme (Agno-inspired, permanent dark mode)
   Brand: Electric Teal (#06b6d4) + Vivid Purple (#a855f7)
   =================================================================== */

/* ----- CSS Variables (dark-only) ----- */
:root {
  /* Brand colors */
  --oc-primary: #06b6d4;
  --oc-primary-dark: #0891b2;
  --oc-primary-light: #22d3ee;
  --oc-accent: #a855f7;
  --oc-accent-dark: #9333ea;
  --oc-accent-light: #c084fc;
  --oc-gradient: linear-gradient(135deg, #06b6d4, #a855f7);
  --oc-gradient-hover: linear-gradient(135deg, #0891b2, #9333ea);

  /* Dark surfaces */
  --oc-bg: #0f172a;
  --oc-bg-alt: #1e293b;
  --oc-surface: #1e293b;
  --oc-border: #334155;
  --oc-text: #f1f5f9;
  --oc-text-secondary: #94a3b8;
  --oc-code-bg: #020617;

  /* Shadows */
  --oc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --oc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --oc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --oc-shadow-glow: 0 0 32px rgba(6, 182, 212, 0.2);
  --oc-shadow-accent: 0 4px 20px rgba(168, 85, 247, 0.2);

  /* Radius */
  --oc-radius: 12px;
  --oc-radius-lg: 16px;
  --oc-radius-pill: 100px;

  /* Material theme overrides */
  --md-primary-fg-color: #06b6d4;
  --md-primary-fg-color--light: #22d3ee;
  --md-primary-fg-color--dark: #0891b2;
  --md-accent-fg-color: #a855f7;
  --md-typeset-a-color: #22d3ee;
  --md-default-bg-color: #0f172a;
  --md-default-fg-color: #f1f5f9;
  --md-default-fg-color--light: #94a3b8;
  --md-default-fg-color--lighter: #64748b;
  --md-default-fg-color--lightest: #475569;
  --md-code-bg-color: #020617;
  --md-code-fg-color: #e2e8f0;
}

/* ----- Typography ----- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--oc-text);
}

.md-typeset h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.md-typeset h3 {
  font-weight: 600;
}

/* ----- Header / Nav Bar ----- */
.md-header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--oc-border);
  box-shadow: var(--oc-shadow-sm);
  backdrop-filter: blur(12px);
}

.md-header__title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Nav tabs */
.md-tabs {
  background: transparent;
  border-bottom: 1px solid var(--oc-border);
}

.md-tabs__link {
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  opacity: 1;
  color: var(--oc-primary);
}

.md-tabs__link--active {
  border-bottom: 2px solid var(--oc-primary);
}

/* ----- Sidebar ----- */
.md-sidebar {
  border-right: 1px solid var(--oc-border);
}

.md-nav__link {
  font-size: 0.84rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.md-nav__link:hover {
  color: var(--oc-primary) !important;
  background: rgba(6, 182, 212, 0.06);
}

.md-nav__link--active {
  color: var(--oc-primary) !important;
  font-weight: 600;
}

.md-nav__item--active > .md-nav__link {
  color: var(--oc-primary) !important;
  font-weight: 600;
}

/* ----- Code blocks ----- */
.md-typeset pre {
  border-radius: var(--oc-radius);
  border: 1px solid #1e293b;
  background: #020617;
  box-shadow: var(--oc-shadow-sm);
  overflow: hidden;
}

.md-typeset code {
  border-radius: 6px;
  font-size: 0.82em;
  padding: 0.15em 0.4em;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.md-typeset pre > code {
  font-size: 0.82em;
  line-height: 1.7;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Inline code */
.md-typeset :not(pre) > code {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--oc-primary-light);
}

/* Copy button */
.md-clipboard {
  color: var(--oc-text-secondary) !important;
  transition: color 0.2s ease;
}

.md-clipboard:hover {
  color: var(--oc-primary) !important;
}

/* ----- Cards (feature grids) ----- */
.md-typeset .grid.cards > ol > li,
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 1px solid #334155;
  border-radius: var(--oc-radius-lg);
  padding: 1.4rem;
  background: #1e293b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--oc-shadow-sm);
  position: relative;
  overflow: hidden;
}

.md-typeset .grid.cards > ol > li::before,
.md-typeset .grid.cards > ul > li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--oc-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.md-typeset .grid.cards > ol > li:hover,
.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid > .card:hover {
  border-color: var(--oc-primary);
  box-shadow: var(--oc-shadow-glow);
  transform: translateY(-2px);
}

.md-typeset .grid.cards > ol > li:hover::before,
.md-typeset .grid.cards > ul > li:hover::before {
  opacity: 1;
}

/* Card icons */
.md-typeset .grid.cards .twemoji,
.md-typeset .grid.cards .card-icon {
  color: var(--oc-primary);
}

/* ----- Admonitions ----- */
.md-typeset .admonition,
.md-typeset details {
  border-radius: var(--oc-radius);
  border: 1px solid var(--oc-border);
  box-shadow: var(--oc-shadow-sm);
  overflow: hidden;
}

.md-typeset .admonition-title,
.md-typeset details > summary {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left: 4px solid var(--oc-primary);
}

.md-typeset .admonition.note,
.md-typeset details.note {
  border-left: 4px solid var(--oc-accent);
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left: 4px solid #f59e0b;
}

/* ----- Tables ----- */
.md-typeset table:not([class]) {
  border-radius: var(--oc-radius);
  overflow: hidden;
  border: 1px solid var(--oc-border);
  box-shadow: var(--oc-shadow-sm);
}

.md-typeset table:not([class]) th {
  background: #1e293b;
  font-weight: 600;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
  border-bottom: 2px solid var(--oc-border);
}

.md-typeset table:not([class]) td {
  font-size: 0.88rem;
}

.md-typeset table:not([class]) tr:hover td {
  background: rgba(6, 182, 212, 0.06);
}

/* ----- Tabbed content ----- */
.md-typeset .tabbed-labels > label {
  font-weight: 500;
  font-size: 0.84rem;
  border-radius: var(--oc-radius) var(--oc-radius) 0 0;
  transition: all 0.2s ease;
}

.md-typeset .tabbed-labels > label:hover {
  color: var(--oc-primary);
}

.md-typeset .tabbed-labels > label.tabbed-labels__label--active,
.md-typeset .tabbed-labels > .tabbed-alternate .tabbed-control--active label {
  color: var(--oc-primary);
  border-color: var(--oc-primary);
}

/* ----- Search ----- */
.md-search__form {
  border-radius: var(--oc-radius);
  border: 1px solid var(--oc-border);
  background: var(--oc-bg);
  transition: all 0.2s ease;
}

.md-search__form:hover,
.md-search__form:focus-within {
  border-color: var(--oc-primary);
  box-shadow: var(--oc-shadow-glow);
}

/* ----- Footer ----- */
.md-footer {
  border-top: 1px solid var(--oc-border);
  background: #0c1222;
}

.md-footer-meta {
  background: transparent;
}

/* ----- Links ----- */
.md-typeset a {
  transition: color 0.15s ease;
}

.md-typeset a:hover {
  color: var(--oc-primary-light);
}

/* ----- Mermaid diagrams ----- */
.mermaid {
  background: transparent !important;
}

/* ===================================================================
   HERO SECTION
   =================================================================== */

.hero-section {
  text-align: center;
  padding: 3rem 1rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: radial-gradient(circle at 30% 50%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: var(--oc-radius-pill);
  background: #1e293b;
  border: 1px solid #334155;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--oc-text-secondary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-badge .badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 0.5rem;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--oc-text);
}

.hero-title .gradient-text {
  background: var(--oc-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--oc-text-secondary);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--oc-radius-pill);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.hero-btn-primary {
  background: var(--oc-gradient);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

.hero-btn-primary:hover {
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
  color: #fff !important;
}

.hero-btn-secondary {
  background: #1e293b;
  color: #e2e8f0 !important;
  border: 1px solid #334155;
  box-shadow: var(--oc-shadow-sm);
}

.hero-btn-secondary:hover {
  border-color: var(--oc-primary);
  box-shadow: var(--oc-shadow-glow);
  transform: translateY(-1px);
  color: var(--oc-primary-light) !important;
}

/* Install command box */
.hero-install {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--oc-code-bg);
  border: 1px solid var(--oc-border);
  border-radius: var(--oc-radius);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  margin-bottom: 2.5rem;
}

.hero-install .prompt {
  color: var(--oc-primary);
  user-select: none;
}

/* ===================================================================
   FEATURE CARDS
   =================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.feature-card {
  padding: 1.5rem;
  border-radius: var(--oc-radius-lg);
  border: 1px solid #334155;
  background: #1e293b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
  display: block;
  color: #f1f5f9 !important;
}

.feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--oc-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: var(--oc-primary);
  box-shadow: var(--oc-shadow-glow);
  transform: translateY(-3px);
  color: #f1f5f9 !important;
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card .card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}

.feature-card .card-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: #f1f5f9;
}

.feature-card .card-desc {
  color: var(--oc-text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

.feature-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--oc-primary) !important;
  transition: gap 0.2s ease;
}

.feature-card:hover .card-link {
  gap: 0.5rem;
}

/* ===================================================================
   STATS BAR
   =================================================================== */

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 1.5rem 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--oc-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--oc-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

/* ===================================================================
   SECTION DIVIDER
   =================================================================== */

.section-divider {
  height: 2px;
  background: var(--oc-gradient);
  border: none;
  margin: 3rem 0;
  border-radius: 1px;
  opacity: 0.4;
}

/* ===================================================================
   FRAMEWORK BADGES
   =================================================================== */

.framework-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.framework-row:hover {
  opacity: 1;
}

.framework-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--oc-radius-pill);
  background: #1e293b;
  border: 1px solid #334155;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--oc-text-secondary);
  transition: all 0.2s ease;
}

.framework-badge:hover {
  border-color: var(--oc-primary);
  color: var(--oc-primary);
  box-shadow: var(--oc-shadow-glow);
}

/* ===================================================================
   GET STARTED SECTION
   =================================================================== */

.get-started-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.get-started-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--oc-radius-lg);
  border: 1px solid #334155;
  background: #1e293b;
  text-decoration: none !important;
  color: #f1f5f9 !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.get-started-card:hover {
  border-color: var(--oc-primary);
  box-shadow: var(--oc-shadow-glow);
  transform: translateY(-2px);
  color: #f1f5f9 !important;
}

.get-started-card .gs-icon {
  font-size: 1.5rem;
  color: var(--oc-primary);
  flex-shrink: 0;
}

.get-started-card .gs-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.get-started-card .gs-desc {
  font-size: 0.82rem;
  color: var(--oc-text-secondary);
  margin: 0;
}

/* ===================================================================
   PIPELINE DIAGRAM WRAPPER
   =================================================================== */

.pipeline-wrapper {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--oc-radius-lg);
  padding: 2rem 1rem;
  margin: 2rem 0;
  text-align: center;
}

/* ===================================================================
   SCROLLBAR
   =================================================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

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

/* ===================================================================
   MOBILE RESPONSIVE
   =================================================================== */

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .stats-bar {
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ===================================================================
   CONTENT WIDTH
   =================================================================== */

.md-content__inner {
  max-width: 960px;
}

/* ===================================================================
   TOC (right sidebar)
   =================================================================== */

.md-nav--secondary .md-nav__link {
  font-size: 0.78rem;
}

.md-nav--secondary .md-nav__link--active {
  color: var(--oc-primary) !important;
  font-weight: 600;
}
