/* Project Navi Brand Overrides for Zensical
   Brand guide: project-navi-brand-guide.html
   Palette: #141414 bg, #e8e4de text, #7eb8a8 accent
   Blessing tiers: #7eb8a8 positive, #d4a574 neutral, #c47a7a negative */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&family=Fraunces:wght@300;400;500&family=JetBrains+Mono:wght@400&display=swap');

/* --- Color overrides --- */
:root {
  --md-primary-fg-color: #1a1a1a;
  --md-primary-bg-color: #e8e4de;
  --md-accent-fg-color: #7eb8a8;
  --md-accent-bg-color: #4a7a6d;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #141414;
  --md-default-fg-color: #e8e4de;
  --md-default-fg-color--light: #9a958e;
  --md-default-fg-color--lighter: #8a867f;
  --md-code-bg-color: #1a1a1a;
  --md-typeset-a-color: #7eb8a8;
  --md-footer-bg-color: #1a1a1a;
  --md-footer-bg-color--dark: #141414;
}

/* --- Typography --- */
:root {
  --md-text-font: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --md-code-font: "JetBrains Mono", Consolas, monospace;
}

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

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  letter-spacing: -0.02em;
}

/* h2: 2rem + accent underline per brand guide */
.md-typeset h2 {
  font-size: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #2a2a2a;
}

.md-typeset h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: #7eb8a8;
  margin-top: 0.75rem;
  opacity: 0.6;
}

/* h3: accent color, 1.35rem per brand guide */
.md-typeset h3 {
  font-size: 1.35rem;
  color: #7eb8a8;
}

/* h4: body font (DM Sans) at weight 500 per brand guide */
.md-typeset h4 {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.md-typeset {
  font-weight: 300;
  line-height: 1.7;
}

/* --- Accent list markers --- */
.md-typeset li::marker {
  color: #7eb8a8;
}

/* --- Code --- */
/* Inline code: accent color */
.md-typeset code {
  color: #7eb8a8;
}

/* Block code: text-secondary, not accent */
.md-typeset pre code {
  color: #9a958e;
}

/* Code blocks: explicit border + radius per brand guide */
.md-typeset pre {
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}

/* --- Tables — brand header background --- */
.md-typeset th {
  background: #1a1a1a;
  font-weight: 500;
}

.md-typeset th,
.md-typeset td {
  border-bottom: 1px solid #2a2a2a;
}

/* --- Navigation accent --- */
.md-nav__link--active,
.md-nav__link:hover {
  color: #7eb8a8 !important;
}

/* --- Admonition blessing tiers --- */
/* Positive: note, tip, success, check, done */
.md-typeset .admonition.note,
.md-typeset .admonition.tip,
.md-typeset .admonition.success,
.md-typeset details.note,
.md-typeset details.tip,
.md-typeset details.success {
  border-color: #7eb8a8;
}

.md-typeset .note > .admonition-title,
.md-typeset .tip > .admonition-title,
.md-typeset .success > .admonition-title {
  background-color: rgba(126, 184, 168, 0.1);
}

.md-typeset .note > .admonition-title::before,
.md-typeset .tip > .admonition-title::before,
.md-typeset .success > .admonition-title::before {
  color: #7eb8a8;
}

/* Neutral: warning, caution, attention */
.md-typeset .admonition.warning,
.md-typeset .admonition.caution,
.md-typeset .admonition.attention,
.md-typeset details.warning,
.md-typeset details.caution,
.md-typeset details.attention {
  border-color: #d4a574;
}

.md-typeset .warning > .admonition-title,
.md-typeset .caution > .admonition-title,
.md-typeset .attention > .admonition-title {
  background-color: rgba(212, 165, 116, 0.1);
}

.md-typeset .warning > .admonition-title::before,
.md-typeset .caution > .admonition-title::before,
.md-typeset .attention > .admonition-title::before {
  color: #d4a574;
}

/* Negative: danger, error, bug, failure */
.md-typeset .admonition.danger,
.md-typeset .admonition.error,
.md-typeset .admonition.bug,
.md-typeset .admonition.failure,
.md-typeset details.danger,
.md-typeset details.error,
.md-typeset details.bug,
.md-typeset details.failure {
  border-color: #c47a7a;
}

.md-typeset .danger > .admonition-title,
.md-typeset .error > .admonition-title,
.md-typeset .bug > .admonition-title,
.md-typeset .failure > .admonition-title {
  background-color: rgba(196, 122, 122, 0.1);
}

.md-typeset .danger > .admonition-title::before,
.md-typeset .error > .admonition-title::before,
.md-typeset .bug > .admonition-title::before,
.md-typeset .failure > .admonition-title::before {
  color: #c47a7a;
}

/* Info/abstract — use accent (positive tier) */
.md-typeset .admonition.info,
.md-typeset .admonition.abstract,
.md-typeset details.info,
.md-typeset details.abstract {
  border-color: #7eb8a8;
}

.md-typeset .info > .admonition-title,
.md-typeset .abstract > .admonition-title {
  background-color: rgba(126, 184, 168, 0.1);
}

.md-typeset .info > .admonition-title::before,
.md-typeset .abstract > .admonition-title::before {
  color: #7eb8a8;
}

/* --- Primary button — inverted per brand guide --- */
.md-typeset .md-button--primary {
  background: #e8e4de;
  color: #141414;
  border-color: #e8e4de;
}

.md-typeset .md-button--primary:hover {
  background: #7eb8a8;
  border-color: #7eb8a8;
  color: #141414;
}

.md-typeset .md-button:not(.md-button--primary) {
  background: transparent;
  border-color: #2a2a2a;
  color: #e8e4de;
}

.md-typeset .md-button:not(.md-button--primary):hover {
  border-color: #7eb8a8;
  color: #7eb8a8;
}

/* --- Blockquote accent — 3px per brand guide --- */
.md-typeset blockquote {
  border-left: 3px solid #7eb8a8;
}

/* --- Card-like containers --- */
.md-typeset .grid-card {
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1.5rem;
}

.md-typeset .grid-card.featured {
  border-color: #4a7a6d;
}

/* --- Focus states — accessibility + brand --- */
:focus-visible {
  outline: 3px solid #7eb8a8;
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- Footer muted --- */
.md-footer-meta {
  color: #8a867f;
}
