/* ═══════════════════════════════════════════════════════════════════════════════
   TEHISINTELLEKTI ALUSED — Custom CSS
   Stack: MkDocs Material · Inter · JetBrains Mono
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────────── */

.md-typeset {
  font-size: 0.72rem;
  line-height: 1.45;
}

.md-typeset h1 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.md-typeset h2 {
  font-size: 1.15rem;
  margin-top: 1.2rem;
  margin-bottom: 0.3rem;
}

.md-typeset h3 {
  font-size: 0.95rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CODE BLOCKS
   ───────────────────────────────────────────────────────────────────────────── */

.md-typeset pre > code {
  font-size: 0.68rem;
  line-height: 1.4;
}

.md-typeset pre {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TABLES
   ───────────────────────────────────────────────────────────────────────────── */

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  font-size: 0.7rem;
  padding: 0.4em 0.6em;
}

.md-typeset table:not([class]) th {
  background: linear-gradient(135deg, #5e35b1 0%, #7c4dff 100%);
  color: white;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ADMONITIONS
   ───────────────────────────────────────────────────────────────────────────── */

.md-typeset .admonition,
.md-typeset details {
  font-size: 0.7rem;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  border-radius: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   IMAGES & FIGURES
   ───────────────────────────────────────────────────────────────────────────── */

.md-content img {
  max-width: 600px;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-md-color-scheme="slate"] .md-content img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.md-typeset figcaption {
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
  font-style: italic;
  text-align: center;
  margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FOOTNOTES
   ───────────────────────────────────────────────────────────────────────────── */

.md-typeset .footnotes {
  font-size: 0.75rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  margin-top: 2.5rem;
  padding-top: 1rem;
}

.md-typeset .footnotes li {
  font-size: 0.75rem;
}

.md-typeset .footnote-ref {
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HORIZONTAL RULES
   ───────────────────────────────────────────────────────────────────────────── */

.md-typeset hr {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO / LANDING PAGE
   ───────────────────────────────────────────────────────────────────────────── */

.mdx-container {
  padding-top: 1rem;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1123 258'><path d='M1124,2c0,0 0,256 0,256l-1125,0l0,-48c0,0 16,5 55,5c116,0 197,-92 325,-92c121,0 114,46 254,46c140,0 214,-167 572,-166Z' style='fill: white' /></svg>") no-repeat bottom,
    linear-gradient(
      to bottom,
      #5e35b1,
      #7c4dff 99%,
      var(--md-default-bg-color) 99%
    );
}

[data-md-color-scheme="slate"] .mdx-container {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1123 258'><path d='M1124,2c0,0 0,256 0,256l-1125,0l0,-48c0,0 16,5 55,5c116,0 197,-92 325,-92c121,0 114,46 254,46c140,0 214,-167 572,-166Z' style='fill: %231e1e2e' /></svg>") no-repeat bottom,
    linear-gradient(
      to bottom,
      #7e57c2,
      #5e35b1 99%,
      var(--md-default-bg-color) 99%
    );
}

.mdx-hero {
  margin: 0 1rem;
  color: white;
}

.mdx-hero h1 {
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 2.5rem;
  color: white;
}

.mdx-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.mdx-hero__content {
  padding-bottom: 6rem;
}

.mdx-hero__image {
  display: none;
}

@media screen and (min-width: 60em) {
  .mdx-hero {
    display: flex;
    align-items: stretch;
  }

  .mdx-hero__content {
    max-width: 24rem;
    padding-bottom: 14vw;
    margin-top: 3.5rem;
  }

  .mdx-hero__image {
    display: block;
    order: 1;
    width: 38rem;
    transform: translateX(4rem);
  }

  .mdx-hero__image img {
    width: 100%;
    height: auto;
  }
}

@media screen and (min-width: 76.25em) {
  .mdx-hero__image {
    transform: translateX(8rem);
  }
}

.mdx-hero .md-button {
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  color: white;
  border-color: rgba(255,255,255,0.5);
  font-size: 1rem;
  padding: 0.7em 1.8em;
}

.mdx-hero .md-button:hover {
  color: white;
  background-color: rgba(255,255,255,0.1);
  border-color: white;
}

.mdx-hero .md-button--primary {
  color: #5e35b1;
  background-color: white;
  border-color: white;
}

.mdx-hero .md-button--primary:hover {
  color: #4527a0;
  background-color: #f5f5f5;
}

.mdx-hero__image figcaption {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  text-align: center;
  margin-top: 0.4rem;
}

/* Feature cards */
.mdx-features {
  padding: 3rem 0;
}

.mdx-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.mdx-features__item {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.mdx-features__item:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

[data-md-color-scheme="slate"] .mdx-features__item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mdx-features__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
}

.mdx-features__icon svg {
  width: 100%;
  height: 100%;
}

.mdx-features__icon.icon-blue { color: #448aff; }
.mdx-features__icon.icon-amber { color: #ffab00; }
.mdx-features__icon.icon-green { color: #00c853; }
.mdx-features__icon.icon-purple { color: #7c4dff; }
.mdx-features__icon.icon-red { color: #ff5252; }
.mdx-features__icon.icon-teal { color: #00bfa5; }

.mdx-features__text h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.mdx-features__text p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.7;
}
