/* ===================================================================
   lit-monitor docs — brand theme
   Aesthetic: dark-first "research instrument". Obsidian purple is the
   dominant accent; Zotero red is reserved for the primary CTA and the
   "Zotero" wordmark so the two brand colours never vibrate together.
   Display: Fraunces (editorial serif, fits "literature"). Body: IBM Plex.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&display=swap');

:root {
  --lm-purple:        #7c6cf0;   /* Obsidian-family purple */
  --lm-purple-bright: #a78bfa;   /* links on dark */
  --lm-purple-deep:   #5b4bd6;
  --lm-red:           #d6402f;   /* Zotero red, slightly warmed for screens */
  --lm-red-deep:      #cc2936;
  --md-text-font: "IBM Plex Sans";
  --md-code-font: "IBM Plex Mono";
}

/* Editorial serif for headings everywhere — characterful, on-theme, readable. */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-header__title,
.lm-hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}
.md-typeset h1 { font-weight: 600; }
.md-typeset h2 { font-weight: 600; }

/* ---------- DARK (default) ---------- */
[data-md-color-scheme="slate"] {
  --md-default-bg-color:        #141019;   /* deep purple-black canvas */
  --md-default-bg-color--light: #1b1626;
  --md-primary-fg-color:        #15131c;   /* header bar */
  --md-primary-fg-color--light: #221d30;
  --md-primary-fg-color--dark:  #0f0d15;
  --md-primary-bg-color:        #ece9f6;   /* text/icons on header */
  --md-primary-bg-color--light: #b9b2cf;
  --md-accent-fg-color:         var(--lm-purple-bright);
  --md-typeset-a-color:         var(--lm-purple-bright);
  --md-footer-bg-color:         #100d16;
  --md-footer-bg-color--dark:   #0c0a11;
}
[data-md-color-scheme="slate"] .md-header {
  border-bottom: 1px solid #2a2438;
}

/* ---------- LIGHT ---------- */
[data-md-color-scheme="default"] {
  --md-default-bg-color:   #fbfaff;
  --md-primary-fg-color:   var(--lm-purple-deep);  /* purple header in light mode */
  --md-primary-bg-color:   #ffffff;
  --md-accent-fg-color:    var(--lm-purple-deep);
  --md-typeset-a-color:    var(--lm-purple-deep);
}

/* A thin Zotero-red hairline under the header — the one place red meets the chrome. */
.md-header {
  box-shadow: inset 0 -2px 0 0 var(--lm-red);
}

/* Brand wordmarks (used in copy + footer) */
.lm-zotero  { color: var(--lm-red);          font-weight: 600; }
.lm-obsidian{ color: var(--lm-purple-bright); font-weight: 600; }
[data-md-color-scheme="default"] .lm-obsidian { color: var(--lm-purple-deep); }

/* ===================================================================
   HERO (home page)
   =================================================================== */
.lm-hero {
  position: relative;
  margin: -1.2rem -.8rem 2.5rem;
  padding: 4.5rem 1.4rem 3.2rem;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
/* Atmosphere: two soft radial glows (purple + a whisper of red), not a flat gradient. */
.lm-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 80% at 22% 8%,  rgba(124,108,240,.30), transparent 60%),
    radial-gradient(55% 70% at 88% 12%, rgba(204,41,54,.16),  transparent 62%),
    linear-gradient(180deg, #1a1426 0%, #141019 70%);
}
[data-md-color-scheme="default"] .lm-hero::before {
  background:
    radial-gradient(60% 80% at 22% 8%,  rgba(124,108,240,.16), transparent 60%),
    radial-gradient(55% 70% at 88% 12%, rgba(204,41,54,.07),  transparent 62%),
    linear-gradient(180deg, #f4f1fe 0%, #fbfaff 70%);
}
/* Fine grain so the glows don't look like AI gradient-slop. */
.lm-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
}

.lm-eyebrow {
  font-family: var(--md-code-font), monospace;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lm-purple-bright);
  margin: 0 0 1.1rem;
  animation: lm-rise .6s both;
}
[data-md-color-scheme="default"] .lm-eyebrow { color: var(--lm-purple-deep); }

.lm-hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.04;
  margin: 0 auto .9rem;
  max-width: 16ch;
  font-weight: 600;
  animation: lm-rise .6s .05s both;
}
.lm-hero .lm-sub {
  font-size: clamp(1rem, 2.1vw, 1.22rem);
  line-height: 1.5;
  max-width: 46ch;
  margin: 0 auto 2rem;
  color: var(--md-default-fg-color--light);
  animation: lm-rise .6s .12s both;
}

.lm-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; animation: lm-rise .6s .2s both; }
.lm-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.4rem; border-radius: 9px;
  font-weight: 600; font-size: .9rem; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.lm-btn:hover { transform: translateY(-2px); }
.lm-btn--primary {                      /* the ONE place Zotero red leads */
  background: var(--lm-red);
  color: #fff !important;
  box-shadow: 0 6px 22px -8px rgba(214,64,47,.7);
}
.lm-btn--primary:hover { background: var(--lm-red-deep); box-shadow: 0 10px 26px -8px rgba(214,64,47,.8); }
.lm-btn--ghost {
  background: transparent;
  color: var(--lm-purple-bright) !important;
  border: 1px solid rgba(124,108,240,.5);
}
[data-md-color-scheme="default"] .lm-btn--ghost { color: var(--lm-purple-deep) !important; border-color: rgba(91,75,214,.45); }
.lm-btn--ghost:hover { border-color: var(--lm-purple); background: rgba(124,108,240,.10); }

/* Copyable install line */
.lm-install {
  display: inline-block;
  margin: 1.6rem auto 0;
  padding: .55rem 1rem;
  border-radius: 8px;
  font-family: var(--md-code-font), monospace;
  font-size: .85rem;
  background: rgba(124,108,240,.10);
  border: 1px solid rgba(124,108,240,.28);
  color: var(--md-default-fg-color);
  animation: lm-rise .6s .26s both;
}
.lm-install b { color: var(--lm-purple-bright); font-weight: 600; }
[data-md-color-scheme="default"] .lm-install b { color: var(--lm-purple-deep); }

/* "works with" wordmark row */
.lm-pills {
  display: flex; gap: .4rem .9rem; justify-content: center; flex-wrap: wrap;
  margin: 1.9rem auto 0; font-size: .76rem; letter-spacing: .04em;
  color: var(--md-default-fg-color--light);
  animation: lm-rise .6s .32s both;
}
.lm-pills span { opacity: .85; }
.lm-pills span::before { content: "·"; margin-right: .9rem; opacity: .4; }
.lm-pills span:first-child::before { content: none; }

@keyframes lm-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lm-hero *[style], .lm-eyebrow, .lm-hero h1, .lm-sub, .lm-cta, .lm-install, .lm-pills { animation: none !important; } }

/* ===================================================================
   Feature grid cards (Material .grid.cards) — brand-tinted
   =================================================================== */
.md-typeset .grid.cards > :is(ul, ol) > li,
.md-typeset .grid > .card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 11px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.md-typeset .grid.cards > :is(ul, ol) > li:hover {
  border-color: var(--lm-purple);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -16px rgba(124,108,240,.55);
}
.md-typeset .grid.cards > ul > li > :first-child { color: var(--lm-purple-bright); }
[data-md-color-scheme="default"] .md-typeset .grid.cards > ul > li > :first-child { color: var(--lm-purple-deep); }

/* Whole-card-clickable (.lm-linked grids): the card title's link stretches to
   cover the entire card, so the whole tile is the click target — not just the
   word. The title link MUST stay statically positioned so its ::after maps to
   the (relative) <li>, not to the link's own inline box. Any *additional* links
   (e.g. a second link in the title line) are lifted above the overlay so they
   stay independently clickable. */
.md-typeset .grid.cards.lm-linked > ul > li { position: relative; cursor: pointer; }
.md-typeset .grid.cards.lm-linked > ul > li > :first-child a:first-of-type::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
/* A non-first link in the same line sits above the stretched overlay. */
.md-typeset .grid.cards.lm-linked > ul > li > :first-child a:not(:first-of-type) {
  position: relative;
  z-index: 2;
}
/* Card titles read as links (colour) but without underline clutter. */
.md-typeset .grid.cards.lm-linked > ul > li > :first-child a {
  color: inherit;
  text-decoration: none;
}
.md-typeset .grid.cards.lm-linked > ul > li:hover > :first-child a { color: var(--lm-purple-bright); }
[data-md-color-scheme="default"] .md-typeset .grid.cards.lm-linked > ul > li:hover > :first-child a { color: var(--lm-purple-deep); }
