/* ============================================================================
   BriskFyr Docs — brand theming for MkDocs Material.
   Audience: mechanical / automotive / aerospace engineers (a simulation tool,
   not a dev tool). Goal: clean, credible, technical — Adams/Simscape/COMSOL-doc
   feel — on the BriskFyr palette (brisk-blue + fyr-green), dark and light.
   Tokens mirror website/style_v2.css so the docs feel of a piece with the site.
   ============================================================================ */

/* Brand wordmark font (self-hosted; matches website/). */
@font-face {
  font-family: "Bryndan Hand";
  src: url("../assets/fonts/Bryndan_Hand.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bf-brisk: #1f7ec4;   /* light-mode brisk-blue */
  --bf-fyr:   #17a862;   /* light-mode fyr-green  */
  --bf-ink:   #16171a;

  --md-primary-fg-color: var(--bf-brisk);
  --md-primary-fg-color--light: #4aa3e6;
  --md-primary-fg-color--dark: #1a6ba8;
  --md-accent-fg-color: var(--bf-fyr);

  --md-text-font: "Inter";
}

/* Dark theme — brand-matched surfaces (slate defaults are too blue/generic). */
[data-md-color-scheme="slate"] {
  --bf-brisk: #258fde;
  --bf-fyr:   #26d980;

  --md-primary-fg-color: var(--bf-brisk);
  --md-accent-fg-color: var(--bf-fyr);

  --md-hue: 222;
  --md-default-bg-color:        #16171a;
  --md-default-bg-color--light: #1c1d21;
  --md-code-bg-color:           #1c1d21;
  --md-footer-bg-color:         #121316;
  --md-footer-bg-color--dark:   #0e0f11;
}

/* Header: keep it dark/branded in BOTH themes (a coloured header bar reads more
   "product" than "wiki") with a thin brand-gradient hairline underneath. */
.md-header,
.md-tabs {
  background-color: var(--bf-ink);
  color: #f2f4f7;
}
.md-header {
  box-shadow: 0 1px 0 0 color-mix(in srgb, var(--bf-brisk) 40%, transparent);
}
.md-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bf-brisk), var(--bf-fyr));
  opacity: 0.9;
}
/* Header wordmark: "Brisk"+"Fyr" two-tone in Bryndan, "Docs" in the UI font.
   (Header is dark in both themes, so the brand blue/green pop on it directly.) */
.bf-wordmark {
  font-family: "Bryndan Hand", var(--md-text-font), sans-serif;
  font-size: 1.4rem;
  font-weight: normal;
  letter-spacing: 0.3px;
  line-height: 1;
}
.bf-brisk-txt { color: #258fde; }   /* brisk-blue (app / landing) */
.bf-fyr-txt   { color: #26d980; }   /* fyr-green (app / landing)  */
.bf-docs-txt {
  font-family: var(--md-text-font), -apple-system, sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: #e6e9ee;
  opacity: 0.9;
  margin-left: 0.4rem;
  letter-spacing: 0.2px;
  vertical-align: middle;
}

/* Typography — slightly more line height + measured headings read as
   engineering documentation rather than a blog. */
.md-typeset { font-feature-settings: "kern", "liga", "tnum"; line-height: 1.7; }
.md-typeset h1 { font-weight: 700; letter-spacing: -0.01em; }
.md-typeset h2 {
  font-weight: 650;
  letter-spacing: -0.005em;
  margin-top: 2.2rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}
.md-typeset h3 { font-weight: 600; }

/* Links + inline emphasis in the brand blue. */
.md-typeset a { color: var(--md-accent-fg-color); }
.md-content a:hover { text-decoration: underline; }

/* Screenshots — frame them so the tutorial images read as figures. */
.md-typeset img[src*="assets/"] {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  max-width: 100%;
}

/* Tables — the DOF / drive-law tables are core content; make them tidy. */
.md-typeset table:not([class]) {
  font-size: 0.78rem;
  border: 1px solid var(--md-default-fg-color--lightest);
}
.md-typeset table:not([class]) th {
  background: color-mix(in srgb, var(--bf-brisk) 12%, transparent);
  font-weight: 650;
}

/* ---- Home hero ---------------------------------------------------------- */
.bf-hero {
  padding: 2.4rem 0 1.2rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  margin-bottom: 1.6rem;
}
.bf-hero .bf-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--md-accent-fg-color);
  margin: 0 0 0.6rem;
}
.bf-hero h1 {
  font-size: 2.3rem;
  line-height: 1.12;
  margin: 0 0 0.7rem;
}
.bf-hero .bf-grad {
  background: linear-gradient(120deg, var(--bf-brisk), var(--bf-fyr));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bf-hero p.bf-lede {
  font-size: 1.05rem;
  max-width: 46rem;
  color: var(--md-default-fg-color--light);
}

/* Grid "cards" (Material) — brand hover accent. */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 10px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.md-typeset .grid.cards > ul > li:hover {
  border-color: color-mix(in srgb, var(--bf-brisk) 55%, transparent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}
.md-typeset .grid.cards .twemoji,
.md-typeset .grid.cards svg { color: var(--bf-brisk); }

/* Footer brand tint. */
.md-footer-meta { border-top: 2px solid transparent; border-image: linear-gradient(90deg, var(--bf-brisk), var(--bf-fyr)) 1; }
