/* SeqChain docs — matched to AtacFluxDemo dark theme
   Palette: #0a0f14 background, blue/purple accents, IBM Plex fonts */

/* ------------------------------------------------------------------ */
/* Keyframes — AtacFluxDemo fadeInUp pattern                           */
/* ------------------------------------------------------------------ */

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

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------------ */
/* Dark mode overrides (slate scheme)                                  */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] {
  /* Backgrounds — AtacFlux #0a0f14 base */
  --md-default-bg-color: #0d1117;
  --md-default-bg-color--light: #111820;
  --md-default-bg-color--lighter: #161d27;
  --md-default-bg-color--lightest: #1c2533;

  /* Text — AtacFlux slate-200 / slate-400 */
  --md-default-fg-color: #e2e8f0;
  --md-default-fg-color--light: #94a3b8;
  --md-default-fg-color--lighter: #64748b;
  --md-default-fg-color--lightest: #475569;

  /* Primary — AtacFlux blue #3b82f6 */
  --md-primary-fg-color: #3b82f6;
  --md-primary-fg-color--light: #60a5fa;
  --md-primary-fg-color--dark: #2563eb;
  --md-primary-bg-color: #e2e8f0;
  --md-primary-bg-color--light: #f1f5f9;

  /* Accent — AtacFlux purple #8b5cf6 */
  --md-accent-fg-color: #8b5cf6;
  --md-accent-fg-color--transparent: rgba(139, 92, 246, 0.1);
  --md-accent-bg-color: #e2e8f0;

  /* Code blocks — very dark with subtle border */
  --md-code-bg-color: #0a0f14;
  --md-code-fg-color: #e2e8f0;
  --md-code-hl-color: rgba(59, 130, 246, 0.15);

  /* Links */
  --md-typeset-a-color: #60a5fa;

  /* Admonitions */
  --md-admonition-bg-color: rgba(255, 255, 255, 0.02);

  /* Footer */
  --md-footer-bg-color: #0a0f14;
  --md-footer-bg-color--dark: #080c10;
  --md-footer-fg-color: #94a3b8;
  --md-footer-fg-color--light: #64748b;
  --md-footer-fg-color--lighter: #475569;
}

/* ------------------------------------------------------------------ */
/* Header — gradient from blue to purple like AtacFlux logo            */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .md-header {
  background: linear-gradient(135deg, #1a2332 0%, #0d1117 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

[data-md-color-scheme="slate"] .md-tabs {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ------------------------------------------------------------------ */
/* Navigation sidebar                                                  */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .md-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

[data-md-color-scheme="slate"] .md-nav__link--active {
  color: #60a5fa;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-nav__link:hover {
  color: #8b5cf6;
}

/* Active navigation indicator — blue-purple like AtacFlux nav */
[data-md-color-scheme="slate"] .md-nav__link--active::before {
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
}

/* ------------------------------------------------------------------ */
/* Code blocks — AtacFlux dark panel with subtle borders               */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .highlight pre,
[data-md-color-scheme="slate"] .highlighttable {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

[data-md-color-scheme="slate"] code {
  border-radius: 4px;
}

[data-md-color-scheme="slate"] .md-typeset code:not(.highlight code) {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #a78bfa;
}

/* ------------------------------------------------------------------ */
/* Tables — glass-panel style like AtacFlux cards                      */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: rgba(59, 130, 246, 0.08);
  color: #60a5fa;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) td {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ------------------------------------------------------------------ */
/* Admonitions — glass panels                                          */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

/* ------------------------------------------------------------------ */
/* Search bar                                                          */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .md-search__input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

[data-md-color-scheme="slate"] .md-search__input:focus {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ------------------------------------------------------------------ */
/* Headings — subtle blue tint on h1                                   */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .md-typeset h1 {
  color: #f1f5f9;
  font-weight: 300;
}

[data-md-color-scheme="slate"] .md-typeset h2 {
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.3em;
}

/* ------------------------------------------------------------------ */
/* Source code view (mkdocstrings)                                      */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .doc-heading {
  border-left: 3px solid #3b82f6;
  padding-left: 0.75em;
}

[data-md-color-scheme="slate"] .doc-object .doc-heading:hover {
  border-left-color: #8b5cf6;
}

/* ------------------------------------------------------------------ */
/* Scrollbar — match dark theme                                        */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-track {
  background: transparent;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------------------------ */
/* Hero section — landing page                                         */
/* ------------------------------------------------------------------ */

.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  margin: -0.6rem -0.6rem 2rem;
  border-radius: 12px;
  animation: heroFadeIn 0.35s ease-out both;
}

.hero-logo {
  margin: 0 auto -0.5rem;
  padding: 0;
  animation: heroFadeIn 0.3s ease-out both;
}

.hero-logo img {
  display: block;
  margin: 0 auto;
}

.md-typeset figure.hero-logo {
  margin-top: 0;
  margin-bottom: 0;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 200;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero p {
  max-width: 540px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.hero .md-button {
  border-radius: 8px;
  padding: 0.6em 1.6em;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  margin: 0.25rem;
}

[data-md-color-scheme="slate"] .hero {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

[data-md-color-scheme="slate"] .hero h1 {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-md-color-scheme="slate"] .hero p {
  font-size: 1.1rem;
  color: #94a3b8;
}

[data-md-color-scheme="slate"] .hero .md-button--primary {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border-color: transparent;
  color: #fff;
}

[data-md-color-scheme="slate"] .hero .md-button--primary:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

[data-md-color-scheme="slate"] .hero .md-button:not(.md-button--primary) {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

[data-md-color-scheme="slate"] .hero .md-button:not(.md-button--primary):hover {
  border-color: rgba(139, 92, 246, 0.4);
  color: #a78bfa;
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------ */
/* Page enter — every page fades up on navigation                      */
/* ------------------------------------------------------------------ */

.md-content__inner.page-enter {
  animation: fadeInUp 0.35s ease-out both;
}

/* ------------------------------------------------------------------ */
/* Mount animations — staggered fade-in-up like AtacFluxDemo           */
/* ------------------------------------------------------------------ */

.fade-in-up {
  animation: fadeInUp 0.4s ease-out both;
}

.fade-in-up.delay-1 {
  animation-delay: 0.1s;
}

.fade-in-up.delay-2 {
  animation-delay: 0.2s;
}

.fade-in-up.delay-3 {
  animation-delay: 0.3s;
}

/* ------------------------------------------------------------------ */
/* Scroll reveal — elements animate up when entering viewport          */
/* ------------------------------------------------------------------ */

.scroll-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------------ */
/* Grid cards — recipe cards on landing page                           */
/* ------------------------------------------------------------------ */

.grid.cards > ul > li {
  transition: all 0.2s ease;
}

[data-md-color-scheme="slate"] .grid.cards > ul > li {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

[data-md-color-scheme="slate"] .grid.cards > ul > li:hover {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

[data-md-color-scheme="slate"] .grid.cards > ul > li > hr {
  border-color: rgba(255, 255, 255, 0.06);
}

/* Card icons — blue-purple gradient */
[data-md-color-scheme="slate"] .grid.cards .twemoji,
[data-md-color-scheme="slate"] .grid.cards .emojione,
[data-md-color-scheme="slate"] .grid.cards > ul > li > p:first-child .twemoji {
  color: #60a5fa;
}

/* ------------------------------------------------------------------ */
/* Concept cards — architecture section on landing page                */
/* ------------------------------------------------------------------ */

.concepts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .concepts {
    grid-template-columns: 1fr;
  }
}

.concept-card {
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.concept-card h3 {
  margin-top: 0;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

[data-md-color-scheme="slate"] .concept-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="slate"] .concept-card:hover {
  border-color: rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.04);
}

[data-md-color-scheme="slate"] .concept-card h3 {
  color: #a78bfa;
  border-bottom: none;
  padding-bottom: 0;
}

/* Stagger concept card reveals */
.concepts .concept-card:nth-child(1) { transition-delay: 0s; }
.concepts .concept-card:nth-child(2) { transition-delay: 0.06s; }
.concepts .concept-card:nth-child(3) { transition-delay: 0.12s; }
.concepts .concept-card:nth-child(4) { transition-delay: 0.18s; }

/* ------------------------------------------------------------------ */
/* Smooth transitions everywhere                                       */
/* ------------------------------------------------------------------ */

.md-nav__link,
.md-tabs__link,
.md-header,
.md-sidebar {
  transition: all 0.2s ease;
}

/* ------------------------------------------------------------------ */
/* Horizontal rules — subtle                                           */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="slate"] .md-typeset hr {
  border-color: rgba(255, 255, 255, 0.06);
}

/* ------------------------------------------------------------------ */
/* Light mode — keep it clean, minimal overrides                       */
/* ------------------------------------------------------------------ */

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #2563eb;
  --md-accent-fg-color: #7c3aed;
  --md-typeset-a-color: #2563eb;
}

[data-md-color-scheme="default"] .hero {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.06) 0%, rgba(124, 58, 237, 0.04) 100%);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

[data-md-color-scheme="default"] .hero h1 {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-md-color-scheme="default"] .concept-card {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-md-color-scheme="default"] .concept-card:hover {
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.04);
}

[data-md-color-scheme="default"] .concept-card h3 {
  color: #7c3aed;
}
