/* ==========================================================================
   Belrobotics archive — brand styling
   Palette taken from the Belrobotics corporate colours:
     dark green  #0C3B1D   vivid green #3aaa35   light green #90bc6d
   ========================================================================== */

:root {
  --br-green-dark: #0c3b1d;
  --br-green: #3aaa35;
  --br-green-light: #90bc6d;
  --br-green-deep: #072711;

  /* light scheme */
  --md-primary-fg-color: #0c3b1d;
  --md-primary-fg-color--light: #90bc6d;
  --md-primary-fg-color--dark: #072711;
  --md-accent-fg-color: #3aaa35;
  --md-typeset-a-color: #2f8f2c;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0c3b1d;
  --md-primary-fg-color--light: #90bc6d;
  --md-primary-fg-color--dark: #04170c;
  --md-accent-fg-color: #90bc6d;
  --md-typeset-a-color: #90bc6d;
}

/* keep the header readable on the dark green */
.md-header,
.md-tabs {
  background-color: var(--br-green-dark);
  color: #fff;
}

.md-header__title,
.md-header__topic,
.md-header__button,
.md-tabs__link,
.md-tabs__item {
  color: #fff;
}

.md-tabs__item--active {
  border-bottom-color: var(--br-green-light);
}

.md-tabs__link {
  opacity: 0.82;
}

.md-tabs__link:hover,
.md-tabs__item--active .md-tabs__link {
  opacity: 1;
  color: #fff;
}

/* the white logo on the dark bar */
.md-header__button.md-logo img {
  height: 1.35rem;
}

/* the navigation drawer sits on a light panel: keep the white logo readable
   by putting it on the same dark green chip as the header.
   The theme pins the drawer logo into a 1.6rem square (object-fit: contain),
   which shrinks the wide logo to a speck — the container is overridden too. */
.md-nav .md-nav__title[for="__drawer"] .md-logo {
  align-items: center;
  background: var(--br-green-dark);
  border-radius: 0.25rem;
  display: inline-flex;
  height: auto;
  margin: 0;
  padding: 0.22rem 0.4rem;
  width: auto;
}

.md-nav .md-nav__title[for="__drawer"] .md-logo img {
  height: 0.85rem;
  max-width: none;
  width: auto;
}

/* ================================================================ hero */

.br-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  margin: 0.4rem 0 1.8rem;
  isolation: isolate;
}

.br-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("/assets/images/hero.jpg");
  background-size: cover;
  background-position: center 68%;
  z-index: -2;
}

.br-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(4, 22, 11, 0.94) 0%,
    rgba(4, 22, 11, 0.82) 42%,
    rgba(4, 22, 11, 0.45) 72%,
    rgba(4, 22, 11, 0.25) 100%
  );
}

.br-hero__inner {
  position: relative;
  padding: 2.2rem 1.8rem 2rem;
  color: #fff;
  max-width: 31rem;
}

.br-hero__kicker {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.15rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d9f0c6;
  background: rgba(58, 170, 53, 0.28);
  border: 1px solid rgba(144, 188, 109, 0.6);
}

.br-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

.br-hero p {
  margin: 0 0 1.1rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.br-hero__robot {
  position: absolute;
  right: 0.8rem;
  bottom: 0;
  width: 11rem;
  max-width: 28%;
  opacity: 0.95;
  pointer-events: none;
  filter: drop-shadow(0 0.6rem 1.2rem rgba(0, 0, 0, 0.45));
}

.br-nowrap {
  white-space: nowrap;
}

.br-hero__btn {
  display: inline-block;
  margin: 0 0.5rem 0.4rem 0;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #06230c !important;
  background: var(--br-green);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.br-hero__btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.br-hero__btn--ghost {
  color: #fff !important;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.br-hero__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media screen and (max-width: 44.98em) {
  .br-hero__robot {
    display: none;
  }
  .br-hero__inner {
    padding: 1.6rem 1.2rem;
  }
  .br-hero h1 {
    font-size: 1.4rem;
  }
}

/* =============================================================== cards */

.br-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.7rem;
  margin: 0.8rem 0 1.8rem;
}

.br-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.45rem;
  text-decoration: none !important;
  color: var(--md-default-fg-color) !important;
  background: var(--md-default-bg-color);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.br-card:hover {
  transform: translateY(-2px);
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.13);
}

.br-card__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.br-card__title {
  font-weight: 700;
  font-size: 0.8rem;
}

.br-card__meta {
  font-size: 0.68rem;
  opacity: 0.72;
}

.br-section-title {
  margin: 1.6rem 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
}

/* ============================================================== badges */

.br-badge {
  display: inline-block;
  min-width: 2.4rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  color: #fff;
  background: #78909c;
}

.br-badge--pdf  { background: #c62828; }
.br-badge--zip  { background: #ef6c00; }
.br-badge--exe  { background: #1565c0; }
.br-badge--bmb  { background: #2e7d32; }
.br-badge--otf,
.br-badge--ttf,
.br-badge--dfont { background: #6a1b9a; }
.br-badge--png,
.br-badge--jpg,
.br-badge--jpeg,
.br-badge--gif,
.br-badge--ico { background: #546e7a; }
.br-badge--doc,
.br-badge--docx,
.br-badge--xls,
.br-badge--pub { background: #37474f; }

.br-pill {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 2rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #06230c;
  background: var(--br-green-light);
}

/* ============================================================== tables */

.md-typeset table:not([class]) {
  width: 100%;
  border-radius: 0.35rem;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--md-default-fg-color--lightest);
}

.md-typeset table:not([class]) th {
  background: var(--br-green-dark);
  color: #fff;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: #14472a;
}

.md-typeset table:not([class]) tr:hover {
  background: color-mix(in srgb, var(--br-green-light) 16%, transparent);
}

.md-typeset table small code {
  opacity: 0.6;
  font-size: 0.9em;
}

/* =============================================================== gate */

html.br-locked body {
  display: none !important;
}

#br-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: radial-gradient(circle at 20% 0%, #14472a 0%, #072711 55%, #04170c 100%);
}

#br-gate-card {
  width: min(23rem, 100%);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.8rem 1.7rem 1.6rem;
  border-radius: 0.6rem;
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(144, 188, 109, 0.35);
  border-top: 0.3rem solid var(--br-green);
  background: #ffffff;
  color: #1a1a1a;
}

#br-gate-card .br-gate-logo {
  width: 11rem;
  margin: 0 auto 0.6rem;
}

#br-gate-card h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  color: var(--br-green-dark);
  letter-spacing: 0.01em;
}

#br-gate-card .br-gate-sub {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  text-align: center;
  color: #4b4b4b;
}

#br-gate-card label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4b4b4b;
}

#br-gate-card input {
  padding: 0.5rem 0.6rem;
  font-size: 1rem;
  border: 1px solid #cfd8cf;
  border-radius: 0.25rem;
  background: #fff;
  color: #1a1a1a;
}

#br-gate-card input:focus {
  outline: 2px solid var(--br-green);
  outline-offset: -1px;
}

#br-gate-card button[type="submit"] {
  margin-top: 0.9rem;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  color: #06230c;
  background: var(--br-green);
  transition: filter 0.12s ease;
}

#br-gate-card button[type="submit"]:hover {
  filter: brightness(1.08);
}

#br-gate-card .br-gate-error {
  min-height: 1.1rem;
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: #c62828;
}

#br-gate-logout {
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 900;
  padding: 0.28rem 0.7rem;
  font-size: 0.68rem;
  border-radius: 1rem;
  cursor: pointer;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  opacity: 0.45;
}

#br-gate-logout:hover {
  opacity: 1;
}

/* ====================================================== fw selector */

#fw-selector {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-left: 0.25rem solid var(--br-green);
  border-radius: 0.4rem;
  padding: 1.1rem 1.3rem;
  margin: 1rem 0 1.4rem;
  background: color-mix(in srgb, var(--br-green-light) 8%, var(--md-default-bg-color));
}

.fw-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.6rem 1rem;
}

.fw-controls label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin-bottom: 0.15rem;
}

.fw-controls select {
  width: 100%;
  padding: 0.35rem;
  font-size: 0.85rem;
  background: var(--md-default-bg-color);
  color: inherit;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.25rem;
}

.fw-result {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--md-default-fg-color--lightest);
}

.fw-result .fw-file {
  font-size: 1rem;
  font-weight: 800;
}

.fw-result .fw-meta {
  font-size: 0.75rem;
  opacity: 0.8;
  margin: 0.25rem 0 0.6rem;
}

.fw-result .fw-older {
  font-size: 0.8rem;
}

.fw-result .fw-none {
  color: #c62828;
  font-weight: 700;
}
