/* =========================================================================
   backbrief.dev
   Single stylesheet. Every colour, space and radius comes from a token.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Typefaces — self-hosted Latin subsets, same files as sector-website.
   Self-hosted rather than Google Fonts: that CDN sends the viewer's IP to
   Google, which a German court has held to breach GDPR.
   ------------------------------------------------------------------------- */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-v24-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-v24-latin-500.woff2") format("woff2");
}

/* -------------------------------------------------------------------------
   Tokens — the canonical FDT set (design.frontierdefensetech.com), verbatim.
   The --bb-* block is this site only: three surfaces the shared scale has no
   name for, kept in their own namespace so nobody mistakes them for canon.
   ------------------------------------------------------------------------- */

:root {
  /* Navy surfaces */
  --fdt-navy-900: #0a1220;
  --fdt-navy-800: #0f1a2e;
  --fdt-navy-700: #16243d;
  --fdt-navy-600: #1e3050;

  /* Fog — text and light UI */
  --fdt-fog-100: #e8eef7;
  --fdt-fog-200: #c5d1e2;

  /* Steel — metadata and muted UI */
  --fdt-steel-300: #8a9bb4;
  --fdt-steel-400: #5a6d8a;

  /* Electric — the single accent */
  --fdt-electric-300: #7ba9ff;
  --fdt-electric-400: #4a8dff;
  --fdt-electric-500: #1d6ef5;

  /* Semantic. The -400 variants are the AA-body-safe cuts; the base hues
     are fills, and pass only the large-text and UI thresholds. */
  --fdt-hostile: #e0322c;
  --fdt-hostile-400: #ee5050;
  --fdt-neutral: #2fa85a;
  --fdt-caution: #f2b535;

  --fdt-divider: #1f3352;

  /* Glow */
  --fdt-glow-xs: 0 0 8px 2px rgb(29 110 245 / 20%);
  --fdt-glow-sm: 0 0 16px 2px rgb(29 110 245 / 30%);

  /* Typography */
  --fdt-font-body: inter, -apple-system, blinkmacsystemfont, "Segoe UI", system-ui, sans-serif;
  --fdt-font-wordmark: "Barlow Condensed", oswald, "Arial Narrow", sans-serif;
  --fdt-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", menlo, consolas, monospace;

  /* Spacing — 4px base */
  --fdt-space-1: 4px;
  --fdt-space-2: 8px;
  --fdt-space-3: 12px;
  --fdt-space-4: 16px;
  --fdt-space-5: 24px;
  --fdt-space-6: 32px;
  --fdt-space-7: 48px;
  --fdt-space-8: 64px;

  /* Radii */
  --fdt-radius-sm: 2px;
  --fdt-radius-md: 4px;

  /* Motion */
  --fdt-motion-fast: 150ms;
  --fdt-motion-base: 200ms;
  --fdt-ease-ui: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Site-local surfaces, below navy-900. The terminal well reads as cut into
     the page rather than raised off it, and the row hairline has to separate
     rows inside a navy-900 panel without drawing a visible line. */
  --bb-well: #060d18;
  --bb-hairline: #101d33;

  /* The mark's middle bar. Named because the favicon and OG image repeat it. */
  --bb-mark-mid: #3a4a66;

  --bb-shell: 1160px;
  --bb-glow-panel: 0 0 32px 4px rgb(29 110 245 / 12%);
  --bb-grid-line: rgb(232 238 247 / 3.5%);
}

/* -------------------------------------------------------------------------
   Reset and base
   ------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--fdt-navy-900);
  color: var(--fdt-fog-200);
  font-family: var(--fdt-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--fdt-fog-100);
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--fdt-electric-400);
  text-decoration: none;
  transition: color var(--fdt-motion-fast) var(--fdt-ease-ui);
}

a:hover {
  color: var(--fdt-electric-300);
}

::selection {
  background: var(--fdt-electric-500);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--fdt-electric-400);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   Utilities
   ------------------------------------------------------------------------- */

.shell {
  max-width: var(--bb-shell);
  margin: 0 auto;
  padding: 0 var(--fdt-space-6);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--fdt-space-4);
  z-index: 10;
  padding: var(--fdt-space-2) var(--fdt-space-4);
  background: var(--fdt-electric-500);
  color: #fff;
  border-radius: var(--fdt-radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--fdt-space-4);
  color: #fff;
}

.eyebrow {
  font-family: var(--fdt-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--fdt-electric-400);
}

.section-headline {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* A `1fr` track is `minmax(auto, 1fr)`, and that `auto` floor is the track's
   min-content width — so the deploy command, one unbreakable monospace
   string, widened the whole page by 33px at 390px rather than scrolling
   inside its own `overflow-x` box. Every grid child needs this, not just the
   one that overflowed today. */
.hero-inner > *,
.deploy-inner > * {
  min-width: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--fdt-space-2);
  height: 42px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--fdt-radius-sm);
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition:
    border-color var(--fdt-motion-base) var(--fdt-ease-ui),
    box-shadow var(--fdt-motion-base) var(--fdt-ease-ui);
}

.btn-primary {
  background: var(--fdt-electric-500);
  border-color: var(--fdt-electric-500);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: var(--fdt-glow-sm);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--fdt-navy-600);
  color: var(--fdt-fog-100);
}

.btn-ghost:hover {
  border-color: var(--fdt-electric-500);
  color: var(--fdt-fog-100);
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 14px;
  background: var(--fdt-navy-800);
}

.btn-sm:hover {
  box-shadow: var(--fdt-glow-xs);
}

.btn-sm .fa-github {
  font-size: 15px;
  color: var(--fdt-fog-200);
}

/* -------------------------------------------------------------------------
   Brand
   ------------------------------------------------------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: var(--fdt-space-3);
  color: var(--fdt-fog-100);
}

.brand:hover {
  color: var(--fdt-fog-100);
}

.logo-mark {
  display: block;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--fdt-fog-100);
}

.brand-name-sm {
  font-size: 16px;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--fdt-navy-700);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fdt-space-5);
  height: 64px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fdt-fog-200);
}

.nav-link:hover {
  color: var(--fdt-fog-100);
}

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

.hero {
  border-bottom: 1px solid var(--fdt-navy-700);
  background-image:
    linear-gradient(var(--bb-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--bb-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--fdt-space-8);
  align-items: center;
  padding-top: 80px;
  padding-bottom: 72px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-headline {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.hero-lede {
  font-size: 16.5px;
  line-height: 1.65;
  max-width: 46ch;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: var(--fdt-space-1);
}

.hero-note {
  font-family: var(--fdt-font-mono);
  font-size: 11.5px;
  color: var(--fdt-steel-400);
}

/* -------------------------------------------------------------------------
   Board preview — an illustration, not a live board.
   ------------------------------------------------------------------------- */

.board {
  margin: 0;
  background: var(--fdt-navy-900);
  border: 1px solid var(--fdt-navy-600);
  border-radius: var(--fdt-radius-md);
  overflow: hidden;
  box-shadow: var(--bb-glow-panel);
}

.board-bar {
  display: flex;
  align-items: center;
  gap: var(--fdt-space-3);
  height: 44px;
  padding: 0 var(--fdt-space-3);
  border-bottom: 1px solid var(--fdt-divider);
}

.board-bar-spacer {
  flex: 1;
}

.board-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.board-stat-value {
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.board-stat-label {
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.board-stat.is-hostile .board-stat-value {
  color: var(--fdt-hostile);
}

.board-stat.is-hostile .board-stat-label {
  color: var(--fdt-hostile-400);
}

.board-stat.is-caution .board-stat-value,
.board-stat.is-caution .board-stat-label {
  color: var(--fdt-caution);
}

.board-sync {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 9px;
  background: var(--fdt-navy-800);
  border: 1px solid var(--fdt-navy-600);
  border-radius: var(--fdt-radius-sm);
  flex-shrink: 0;
  white-space: nowrap;
}

.board-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fdt-neutral);
  animation: bb-pulse 2s var(--fdt-ease-ui) infinite;
}

.board-sync-label {
  font-family: var(--fdt-font-mono);
  font-size: 10px;
  color: var(--fdt-steel-400);
}

.board-banner {
  display: flex;
  align-items: center;
  gap: var(--fdt-space-3);
  padding: 7px var(--fdt-space-4);
  background: rgb(224 50 44 / 10%);
  border-bottom: 1px solid rgb(224 50 44 / 35%);
}

.board-banner-headline {
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.09em;
  color: var(--fdt-hostile-400);
}

.board-banner-detail {
  font-family: var(--fdt-font-mono);
  font-size: 10.5px;
}

.board-rows {
  padding: 6px 0 var(--fdt-space-3);
}

.board-row {
  display: grid;
  grid-template-columns: 20px 1fr 52px 42px 46px;
  gap: 10px;
  align-items: center;
  padding: var(--fdt-space-2) var(--fdt-space-4);
  border-top: 1px solid var(--bb-hairline);
}

.board-row-head {
  padding-top: 7px;
  padding-bottom: 7px;
  border-top: 0;
  font-family: var(--fdt-font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fdt-steel-400);
}

.board-row-head > span:nth-child(n + 3) {
  text-align: right;
}

.board-glyph {
  font-size: 14px;
  line-height: 1;
}

.board-glyph.is-hostile {
  color: var(--fdt-hostile-400);
}

.board-glyph.is-neutral {
  color: var(--fdt-neutral);
}

.board-glyph.is-caution {
  color: var(--fdt-caution);
}

.board-repo {
  display: flex;
  align-items: baseline;
  gap: var(--fdt-space-2);
  min-width: 0;
}

.board-repo-name {
  font-family: var(--fdt-font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fdt-fog-100);
}

.board-repo-desc {
  font-size: 11px;
  color: var(--fdt-steel-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-num {
  text-align: right;
  font-family: var(--fdt-font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.board-num.is-hostile {
  color: var(--fdt-hostile-400);
}

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */

.section {
  padding: var(--fdt-space-8) 0;
}

.section-features {
  border-bottom: 1px solid var(--fdt-navy-700);
}

.section-deploy {
  padding-bottom: 80px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--fdt-space-2);
  margin-bottom: 36px;
}

/* -------------------------------------------------------------------------
   Capability cards
   ------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--fdt-space-4);
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--fdt-space-3);
  padding: 22px;
  background: var(--fdt-navy-800);
  border: 1px solid var(--fdt-navy-600);
  border-radius: var(--fdt-radius-sm);
  transition:
    border-color var(--fdt-motion-base) var(--fdt-ease-ui),
    box-shadow var(--fdt-motion-base) var(--fdt-ease-ui);
}

.card:hover {
  border-color: var(--fdt-electric-500);
  box-shadow: 0 0 16px 2px rgb(29 110 245 / 15%);
}

.card-icon {
  font-size: 24px;
  line-height: 1;
  color: var(--fdt-electric-400);
}

.card-icon .fa-stack {
  width: 1em;
  height: 1em;
  line-height: 1em;
  font-size: 1em;
}

.card-icon-overlay {
  color: var(--fdt-hostile);
}

.card-title {
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.06em;
}

.card-body {
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* -------------------------------------------------------------------------
   Deploy
   ------------------------------------------------------------------------- */

.deploy-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
}

.deploy-copy {
  display: flex;
  flex-direction: column;
  gap: var(--fdt-space-3);
}

.deploy-body {
  font-size: 15px;
  line-height: 1.65;
  text-wrap: pretty;
}

.terminal {
  background: var(--bb-well);
  border: 1px solid var(--fdt-navy-600);
  border-radius: var(--fdt-radius-sm);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fdt-space-4);
  padding: 10px var(--fdt-space-4);
  border-bottom: 1px solid var(--fdt-navy-700);
}

.terminal-label {
  font-family: var(--fdt-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--fdt-steel-400);
}

.btn-copy {
  padding: 3px 10px;
  background: none;
  border: 1px solid var(--fdt-navy-600);
  border-radius: var(--fdt-radius-sm);
  cursor: pointer;
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fdt-fog-200);
  transition:
    border-color var(--fdt-motion-fast) var(--fdt-ease-ui),
    color var(--fdt-motion-fast) var(--fdt-ease-ui);
}

.btn-copy:hover {
  border-color: var(--fdt-electric-500);
  color: var(--fdt-fog-100);
}

/* Confirmation is a colour change and a word change, never colour alone. */
.btn-copy.is-copied {
  border-color: var(--fdt-neutral);
  color: var(--fdt-neutral);
}

.terminal-body {
  margin: 0;
  padding: 18px var(--fdt-space-4);
  font-family: var(--fdt-font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--fdt-fog-100);
  overflow-x: auto;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--fdt-navy-700);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fdt-space-5);
  flex-wrap: wrap;
  padding-top: var(--fdt-space-5);
  padding-bottom: var(--fdt-space-5);
}

.site-footer .brand {
  gap: 10px;
}

.footer-domain {
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  color: var(--fdt-steel-400);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--fdt-space-5);
  font-size: 13px;
}

/* Underlined, not colour-only — WCAG 1.4.1. */
.footer-links a {
  color: var(--fdt-fog-200);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: var(--fdt-fog-100);
}

/* -------------------------------------------------------------------------
   Motion
   ------------------------------------------------------------------------- */

@keyframes bb-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.25;
    transform: scale(0.7);
  }
}

/* -------------------------------------------------------------------------
   Narrow viewports. These override the rules above and must stay last.
   ------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--fdt-space-7);
    padding-top: var(--fdt-space-8);
    padding-bottom: var(--fdt-space-8);
  }

  .hero-headline {
    font-size: 42px;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .deploy-inner {
    grid-template-columns: 1fr;
    gap: var(--fdt-space-6);
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 0 var(--fdt-space-5);
  }

  .hero-headline {
    font-size: 34px;
  }

  .section-headline {
    font-size: 24px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .nav-link {
    display: none;
  }

  /* The description is the first thing worth dropping: the repository name
     and its status are what the row exists to show. */
  .board-repo-desc {
    display: none;
  }

  /* The last track holds "COMMIT", the longest header, and a right-aligned
     label wider than its track spills into the gap and touches the one
     beside it. Sizes are set from the labels, not from the numbers. */
  .board-row {
    grid-template-columns: 18px 1fr 42px 30px 52px;
    gap: var(--fdt-space-2);
    padding-left: var(--fdt-space-3);
    padding-right: var(--fdt-space-3);
  }

  .board-row-head {
    padding-left: var(--fdt-space-3);
    padding-right: var(--fdt-space-3);
  }

  .hero-actions {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

