/* ==========================================================================
   Silver Wolf Technology — brand layer
   Loaded AFTER assets/css/theme.min.css so it overrides Silicon's defaults.
   Palette is derived from the logo: wolf silver #8e99a2 on midnight graphite,
   with a moonlit steel blue as the action colour.
   ========================================================================== */

/* Fonts are bundled locally so the site works with a self-only CSP. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
}

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

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
}

:root,
[data-bs-theme="light"] {
  /* Brand */
  --swt-silver: #8e99a2;
  --swt-silver-light: #c6ced5;
  --swt-midnight: #10151c;
  --swt-midnight-soft: #1b2430;
  --swt-steel: #2e6f95;
  --swt-steel-dark: #22536f;

  /* Re-point Silicon's primary at the brand steel blue */
  --si-primary: #2e6f95;
  --si-primary-rgb: 46, 111, 149;
  --si-primary-text-emphasis: #22536f;
  --si-primary-bg-subtle: #eaf2f7;
  --si-primary-border-subtle: #c3dae7;

  --si-link-color: #2e6f95;
  --si-link-hover-color: #22536f;

  /* Silicon's navbar hover/active vars are separate from --si-primary; keep them in sync. */
  --si-navbar-hover-color: var(--si-primary);
  --si-navbar-active-color: var(--si-primary);

  --swt-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Liquid glass — frost catching the brand's own moonlight, not generic chrome.
     Light-section variant: a Paper-tinted pane. Dark-band variant (--swt-glass-*-on-dark)
     is intentionally fixed regardless of site theme — the hero/footer bands are always Midnight. */
  --swt-glass-fill: rgba(255, 255, 255, 0.55);
  --swt-glass-fill-strong: rgba(255, 255, 255, 0.74);
  --swt-glass-border: rgba(46, 111, 149, 0.16);
  --swt-glass-border-hover: rgba(46, 111, 149, 0.4);
  --swt-glass-highlight: rgba(255, 255, 255, 0.65);

  --swt-glass-fill-on-dark: rgba(27, 36, 48, 0.45);
  --swt-glass-fill-on-dark-strong: rgba(27, 36, 48, 0.6);
  --swt-glass-border-on-dark: rgba(198, 206, 213, 0.22);
  --swt-glass-border-on-dark-hover: rgba(107, 176, 211, 0.55);
  --swt-glass-highlight-on-dark: rgba(255, 255, 255, 0.14);
}

[data-bs-theme="dark"] {
  --si-primary: #6bb0d3;
  --si-primary-rgb: 107, 176, 211;
  --si-primary-text-emphasis: #9ccce4;
  --si-primary-bg-subtle: #13232d;
  --si-primary-border-subtle: #1e3d4f;
  --si-link-color: #6bb0d3;
  --si-link-hover-color: #9ccce4;
  --si-navbar-hover-color: var(--si-primary);
  --si-navbar-active-color: var(--si-primary);

  --swt-glass-fill: rgba(11, 15, 25, 0.55);
  --swt-glass-fill-strong: rgba(11, 15, 25, 0.72);
  --swt-glass-border: rgba(107, 176, 211, 0.2);
  --swt-glass-border-hover: rgba(107, 176, 211, 0.5);
  --swt-glass-highlight: rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   Buttons — route the primary CTA through the brand steel. Silicon's
   compiled .btn-primary / .btn-outline-primary hardcode its stock indigo
   (#6366f1) as literal --si-btn-* values instead of reading --si-primary,
   so the rebrand above never reached them until now.
   -------------------------------------------------------------------------- */

.btn-primary {
  --si-btn-color: #fff;
  --si-btn-bg: var(--swt-steel);
  --si-btn-border-color: var(--swt-steel);
  --si-btn-hover-color: #fff;
  --si-btn-hover-bg: var(--swt-steel-dark);
  --si-btn-hover-border-color: var(--swt-steel-dark);
  --si-btn-active-color: #fff;
  --si-btn-active-bg: var(--swt-steel-dark);
  --si-btn-active-border-color: var(--swt-steel-dark);
  --si-btn-focus-shadow-rgb: var(--si-primary-rgb);
  --si-btn-disabled-color: #fff;
  --si-btn-disabled-bg: var(--swt-steel);
  --si-btn-disabled-border-color: var(--swt-steel);
}

.btn-outline-primary {
  --si-btn-color: var(--swt-steel);
  --si-btn-border-color: var(--swt-steel);
  --si-btn-hover-color: #fff;
  --si-btn-hover-bg: var(--swt-steel);
  --si-btn-hover-border-color: var(--swt-steel);
  --si-btn-active-color: #fff;
  --si-btn-active-bg: var(--swt-steel);
  --si-btn-active-border-color: var(--swt-steel);
  --si-btn-focus-shadow-rgb: var(--si-primary-rgb);
  --si-btn-disabled-color: var(--swt-steel);
  --si-btn-disabled-border-color: var(--swt-steel);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, .h1, h2, .h2, h3, .h3 {
  letter-spacing: -0.02em;
}

.display-1, .display-2, .display-3, .display-4 {
  letter-spacing: -0.03em;
}

/* Terminal-style section labels — the one typographic flourish on the site.
   Reads like a shell prompt, which is the vernacular of the work itself. */
.swt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--swt-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--swt-steel);
  margin-bottom: 0.75rem;
}

.swt-eyebrow::before {
  content: "\003E";
  font-weight: 600;
  opacity: 0.55;
}

.swt-eyebrow-light {
  color: var(--swt-silver-light);
}

.swt-mono {
  font-family: var(--swt-mono);
}

/* --------------------------------------------------------------------------
   Navbar + logo mark
   -------------------------------------------------------------------------- */

.swt-brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.navbar-brand .swt-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.navbar-brand .swt-wordmark strong {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.navbar-brand .swt-wordmark span {
  font-family: var(--swt-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--swt-silver);
}

/* A frosted pane the page scrolls beneath, not a flat bar. */
.swt-glass-nav {
  background: var(--swt-glass-fill-strong);
  border-bottom: 1px solid var(--swt-glass-border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .swt-glass-nav {
    background: var(--si-body-bg);
  }
}

/* --------------------------------------------------------------------------
   Hero — midnight sky, the wolf watching over it
   -------------------------------------------------------------------------- */

.swt-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 90% at 78% 12%, #24313f 0%, var(--swt-midnight-soft) 42%, var(--swt-midnight) 100%);
  color: #fff;
}

.swt-hero::after {
  /* Faint moon-glow behind the mark */
  content: "";
  position: absolute;
  top: -12%;
  right: -6%;
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 153, 162, 0.22) 0%, rgba(142, 153, 162, 0) 68%);
  pointer-events: none;
}

.swt-hero > .container {
  position: relative;
  z-index: 2;
}

.swt-hero h1 {
  color: #fff;
}

.swt-hero p {
  color: rgba(255, 255, 255, 0.72);
}

.swt-hero-mark {
  width: 100%;
  max-width: 380px;
  filter: drop-shadow(0 0 40px rgba(142, 153, 162, 0.35));
  animation: swt-breathe 7s ease-in-out infinite;
}

@keyframes swt-breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Page header for interior pages */
.swt-page-head {
  background: linear-gradient(160deg, var(--swt-midnight) 0%, var(--swt-midnight-soft) 100%);
  color: #fff;
}

.swt-page-head h1 { color: #fff; }
.swt-page-head p  { color: rgba(255, 255, 255, 0.68); }

.swt-page-head .breadcrumb-item,
.swt-page-head .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.6);
}

.swt-page-head .breadcrumb-item.active {
  color: var(--swt-silver-light);
}

/* --------------------------------------------------------------------------
   Cards & icons
   -------------------------------------------------------------------------- */

.swt-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  background: var(--si-primary-bg-subtle);
  color: var(--si-primary);
  font-size: 1.5rem;
}

.swt-card {
  position: relative;
  background: var(--swt-glass-fill);
  border: 1px solid var(--swt-glass-border);
  border-radius: 1rem;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--swt-glass-highlight), 0 1px 2px rgba(16, 21, 28, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.swt-card:hover {
  transform: translateY(-4px);
  border-color: var(--swt-glass-border-hover);
  background: var(--swt-glass-fill-strong);
  box-shadow: inset 0 1px 0 var(--swt-glass-highlight), 0 0.75rem 2rem -0.5rem rgba(16, 21, 28, 0.16);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .swt-card {
    background: var(--si-card-bg, var(--si-body-bg));
  }
}

/* A faint moon-glow behind a glass card cluster — the same device the hero
   uses, reused here so the frost has something of the brand's own light to
   catch instead of reading as empty chrome. */
.swt-glass-field {
  position: relative;
}

.swt-glass-field::before {
  content: "";
  position: absolute;
  top: -3rem;
  right: -3rem;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 111, 149, 0.1) 0%, rgba(46, 111, 149, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

[data-bs-theme="dark"] .swt-glass-field::before {
  background: radial-gradient(circle, rgba(107, 176, 211, 0.16) 0%, rgba(107, 176, 211, 0) 70%);
}

.swt-glass-field > .row {
  position: relative;
  z-index: 1;
}

/* Track cards carry a step index because the tracks really are sequential */
.swt-track-index {
  font-family: var(--swt-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--swt-silver);
}

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */

.swt-post-cover {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.swt-post-meta {
  font-family: var(--swt-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--si-secondary-color);
}

.swt-article {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.swt-article h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.swt-article h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.1875rem;
}

.swt-article ul,
.swt-article ol {
  padding-left: 1.25rem;
}

.swt-article li {
  margin-bottom: 0.5rem;
}

.swt-article blockquote {
  margin: 2rem 0;
  padding: 1rem 0 1rem 1.5rem;
  border-left: 3px solid var(--si-primary);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--si-emphasis-color);
}

.swt-article pre {
  background: var(--swt-midnight);
  color: #d8dee4;
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--swt-mono);
  font-size: 0.875rem;
}

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

.swt-footer {
  background: var(--swt-midnight);
  color: rgba(255, 255, 255, 0.68);
}

.swt-footer h6 {
  color: #fff;
}

.swt-footer .nav-link {
  color: rgba(255, 255, 255, 0.68);
  padding-left: 0;
  padding-right: 0;
}

.swt-footer .nav-link:hover {
  color: #fff;
}

.swt-footer a {
  color: rgba(255, 255, 255, 0.68);
}

.swt-footer a:hover {
  color: #fff;
}

.swt-footer .btn-icon {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.18);
}

.swt-footer .btn-icon:hover {
  color: var(--swt-midnight);
  background: #fff;
  border-color: #fff;
}

/* --------------------------------------------------------------------------
   Stats strip — floats up into the hero's moon-glow so the frost has real
   light behind it to catch, instead of sitting flat in the section below.
   -------------------------------------------------------------------------- */

.swt-stats {
  position: relative;
  z-index: 3;
  margin-top: -4.5rem;
  padding-bottom: 2.5rem;
}

@media (max-width: 991.98px) {
  .swt-stats {
    margin-top: -3rem;
    padding-bottom: 2rem;
  }
}

/* Dark glass — deliberately fixed regardless of site theme; this pane always
   sits against the Midnight hero, never the page's own light/dark surface. */
.swt-glass {
  position: relative;
  background: var(--swt-glass-fill-on-dark);
  border: 1px solid var(--swt-glass-border-on-dark);
  border-radius: 1rem;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: inset 0 1px 0 var(--swt-glass-highlight-on-dark), 0 1px 2px rgba(16, 21, 28, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

/* The signature liquid-glass edge: a thin light ring traced only along the
   border, brightest at the top-left where the moon-glow would hit it. */
.swt-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 45%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .swt-glass {
    background: var(--swt-midnight-soft);
  }
}

.swt-stat-tile {
  color: #fff;
}

.swt-stat-tile:hover {
  transform: translateY(-4px);
  border-color: var(--swt-glass-border-on-dark-hover);
  background: var(--swt-glass-fill-on-dark-strong);
  box-shadow: inset 0 1px 0 var(--swt-glass-highlight-on-dark), 0 1rem 2.5rem -0.75rem rgba(16, 21, 28, 0.5);
}

.swt-stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.swt-stat-tile .swt-stat-label {
  color: var(--swt-silver-light);
}

.swt-stat-label {
  font-family: var(--swt-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--swt-silver);
}

/* --------------------------------------------------------------------------
   Accessibility & motion
   -------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--si-primary);
  outline-offset: 2px;
}

.swt-skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 1080;
  padding: 0.5rem 1rem;
  background: #fff;
  border-radius: 0.5rem;
  transition: top 0.2s ease;
}

.swt-skip-link:focus {
  top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .swt-hero-mark { animation: none; }
  .swt-card:hover { transform: none; }
  * { scroll-behavior: auto !important; }
}

/* Persistent language control */
.swt-language-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.375rem;
  padding: .4rem .7rem;
  border: 1px solid var(--swt-glass-border);
  border-radius: 999px;
  background: var(--swt-glass-fill-strong);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: var(--si-body-color);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.swt-language-switcher:hover {
  border-color: var(--si-primary);
  color: var(--si-primary);
  transform: translateY(-1px);
}

.swt-language-switcher:focus-visible {
  outline: 3px solid rgba(var(--si-primary-rgb), .35);
  outline-offset: 3px;
}

.swt-language-switcher [aria-hidden="true"] {
  font-size: 1.15rem;
  line-height: 1;
}

.swt-language-switcher-fallback {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1080;
  box-shadow: 0 .5rem 1.5rem rgba(16, 21, 28, .18);
}

@media (max-width: 991.98px) {
  .swt-hero-mark { max-width: 240px; }
  .swt-stat-value { font-size: 2rem; }
}
