/* ---------------------------------------------------------------------------
   Mycelium palette
   Derived from the logo (design/icons/svg/Mycelium.svg):
     #29473A  deep green   — primary
     #3A6250  mid green    — hover / accent
     #F1EDE1  cream        — light surface tint
     #C9D1CD  cool grey    — muted fills
   The mkdocs.yml palette declares `primary: custom` / `accent: custom`, which
   makes Material read these variables instead of shipping a named theme color.
   --------------------------------------------------------------------------- */

:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #29473a;
  --md-primary-fg-color--light: #3a6250;
  --md-primary-fg-color--dark: #1c3128;
  --md-primary-bg-color: #f1ede1;
  --md-primary-bg-color--light: rgba(241, 237, 225, 0.7);

  --md-accent-fg-color: #3a6250;
  --md-accent-fg-color--transparent: rgba(58, 98, 80, 0.1);
  --md-accent-bg-color: #ffffff;
  --md-accent-bg-color--light: rgba(255, 255, 255, 0.7);

  /* Material defaults link colour to the primary, which is the right call on a light
     background but not on a dark one — see the slate block below. */
  --md-typeset-a-color: #29473a;

  --mycelium-cream: #f1ede1;
  --mycelium-grey: #c9d1cd;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1c3128;
  --md-primary-fg-color--light: #3a6250;
  --md-primary-fg-color--dark: #12211b;
  --md-primary-bg-color: #f1ede1;

  --md-accent-fg-color: #8fb3a2;
  --md-accent-fg-color--transparent: rgba(143, 179, 162, 0.1);

  /* The deep green primary is near-black against the slate background, so links and the
     active nav item would be unreadable if they inherited it. */
  --md-typeset-a-color: #8fb3a2;

  --mycelium-cream: #242b27;
  --mycelium-grey: #3a4540;
}

/* --- Announcement bar ---------------------------------------------------- */

/* The banner sits on the near-black footer colour in both schemes, so the
   default link colour (the deep-green accent) fails contrast against it. */
.md-banner a,
.md-banner a:hover,
.md-banner a:focus {
  color: #a8c9b8;
}

.md-banner a:hover,
.md-banner a:focus {
  text-decoration: underline;
}

/* --- Hero ---------------------------------------------------------------- */

.hero-logo {
  text-align: center;
  margin-bottom: 0.75rem;
}

/* The wordmark, not a document heading — Material's h1 defaults (left aligned, 2rem,
   300 weight, a large top margin) all read wrong directly under the logo. */
.md-typeset .hero-title {
  text-align: center;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--md-default-fg-color);
}

.hero-tagline {
  text-align: center;
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0.5rem auto 1.5rem;
  max-width: 34rem;
  color: var(--md-default-fg-color--light);
}

@media screen and (max-width: 30em) {
  .md-typeset .hero-title {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1.15rem;
  }
}

/* The logo already carries a cream plate, so it stays legible on dark
   backgrounds — do not invert it the way a monochrome wordmark would need. */

/* --- Buttons ------------------------------------------------------------- */

.md-content__button {
  display: none;
}

.md-button {
  font-size: 16px;
  font-weight: bold;
  padding: 12px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.md-button:hover,
.md-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.md-button:focus-visible {
  outline: 3px solid var(--md-primary-fg-color--light);
  outline-offset: 2px;
}

/* Material styles buttons off --md-primary-fg-color: the outline variant takes it as text
   and border, the primary variant as fill. In the slate scheme that variable is the
   near-black green the header needs (#1c3128), which lands within a hair of the slate page
   background (#1e2129) — the outline button measured ~1:1 against it, and the primary
   button's fill vanished so only its label showed.
   Both variants are therefore pinned per scheme below.
   Selectors must carry .md-typeset: Material's own rules are `.md-typeset .md-button--…`
   (0,2,0), so a bare `.md-button--primary` (0,1,0) silently loses and does nothing. */

.md-typeset .md-button--primary {
  background-color: #29473a;
  border-color: #29473a;
  color: #f1ede1;
}

.md-typeset .md-button:focus,
.md-typeset .md-button:hover {
  background-color: #3a6250;
  border-color: #3a6250;
  color: #ffffff;
}

/* Dark mode inverts the call to action — a light fill reads as a button against the slate
   background, where any tint of the primary green does not. */

[data-md-color-scheme="slate"] .md-typeset .md-button {
  color: #8fb3a2;
}

[data-md-color-scheme="slate"] .md-typeset .md-button--primary {
  background-color: #8fb3a2;
  border-color: #8fb3a2;
  color: #12211b;
}

/* Hovering the outline button turns it into the primary button, so the two states stay
   one visual language. */
[data-md-color-scheme="slate"] .md-typeset .md-button:focus,
[data-md-color-scheme="slate"] .md-typeset .md-button:hover {
  background-color: #8fb3a2;
  border-color: #8fb3a2;
  color: #12211b;
}

/* --- Card grids ---------------------------------------------------------- */

/* Material lays `.grid.cards` out as auto-fit / minmax(16rem, 1fr), which lands on three
   across at the landing page's width and leaves a fourth card stranded on its own row.
   `cards--four` pins the count instead. Scoped to the modifier class so it cannot catch
   card grids added elsewhere later. */

@media screen and (min-width: 60em) {
  .md-typeset .grid.cards--four {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (min-width: 30em) and (max-width: 59.9375em) {
  .md-typeset .grid.cards--four {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Below 30em Material's own single-column rule applies unchanged. */

/* --- Layout helpers ------------------------------------------------------ */

.center-text {
  text-align: center;
  display: block;
}

.center {
  display: block;
  margin: 0 auto;
}

.separator {
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

span.faint {
  color: var(--md-default-fg-color--light);
}

/* Visually hidden but readable by screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Team ---------------------------------------------------------------- */

.mdx-users {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}

.mdx-users__testimonial {
  text-align: center;
  max-width: 220px;
}

.mdx-users__testimonial img {
  border-radius: 50%;
  border: 3px solid var(--mycelium-grey);
  width: 150px;
  height: 150px;
  object-fit: cover;
}

.black-and-white {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.black-and-white:hover {
  filter: grayscale(0%);
}

/* --- Gallery ------------------------------------------------------------- */

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

.mycelium-gallery figure {
  margin: 0;
}

.mycelium-gallery img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.mycelium-gallery figcaption {
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
  text-align: center;
  margin-top: 0.35rem;
}

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

/* Material title-cases nav labels; keep authored casing except for FAQ. */
.md-tabs__link,
.md-nav__link,
.md-nav__title,
.md-nav__item,
.md-tabs__title {
  text-transform: none !important;
}

.md-nav__link[href*="faq"],
.md-tabs__link[href*="faq"] {
  text-transform: uppercase !important;
}
