/* ==========================================================================
   MAIN.CSS — Site Template
   Global styles shared across ALL pages.
   Fonts, variables, resets, header, footer, layouts.
   ========================================================================== */

/* --- @font-face: IBM Plex Mono (Headings / Code) --- */
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* Metric overrides — match Consolas fallback to prevent CLS on swap */
  size-adjust: 100%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  size-adjust: 100%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* --- Design Tokens --- */
:root {
  /* Colors — Dark + Blue/Grey */
  --color-bg: #0d1117;
  --color-surface: #161b22;
  --color-border: #30363d;
  --color-text: #c9d1d9;
  --color-heading: #e6edf3;
  --color-muted: #6e7681;
  --color-accent: #388bfd;
  --color-accent-hover: #79c0ff;

  /* Typography — Utilitarian Mono */
  --font-heading: 'IBM Plex Mono', 'Consolas', monospace;
  --font-body: 'IBM Plex Mono', 'Consolas', monospace;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --narrow-width: 650px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Base Typography --- */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

h3 {
  font-size: 1.125rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 1rem;
}

p {
  max-width: 70ch;
  line-height: 1.65;
}

p+p {
  margin-top: var(--space-md);
}

/* Content links */
main a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

main a:hover {
  color: var(--color-heading);
}

/* Strong */
strong {
  color: var(--color-heading);
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: var(--space-lg);
  margin-block: var(--space-lg);
  font-style: italic;
  color: var(--color-muted);
  background: var(--color-surface);
  padding: var(--space-md) var(--space-lg);
}

/* First paragraph in each section — slightly larger */
section>.container>p:first-of-type,
section>.container>.layout-narrow>p:first-of-type,
section>.container>div:first-of-type>p:first-of-type {
  font-size: 1.05em;
}

/* Code (inline) */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

/* Lists */
ul,
ol {
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
  line-height: 1.6;
}

dl {
  display: grid;
  gap: var(--space-md);
}

dt {
  font-weight: 700;
  font-family: var(--font-heading);
}

dd {
  margin-left: 0;
  color: var(--color-muted);
}

/* Focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Figure --- */
figure {
  margin-block: var(--space-lg);
}

figcaption {
  margin-top: var(--space-xs);
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* --- Header --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.96);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Scroll-offset: when jumping to #access, land near the onion URLs (not the h2) */
#access {
  scroll-margin-top: -320px;
}

/* ═══════════════════════════════════════════════════════════
   SECTION DESIGN SYSTEM — numbered sections, decorated headings,
   callouts, figures. Applied to all main > article > sections
   except the hero.
   ═══════════════════════════════════════════════════════════ */

main > article {
  counter-reset: section;
}

main > article > section:not(.hero) {
  counter-increment: section;
  position: relative;
}

/* Thin gradient divider at the top of each section */
main > article > section:not(.hero)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--max-width));
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(48, 54, 61, 0) 5%,
    var(--color-border) 20%,
    var(--color-border) 80%,
    rgba(48, 54, 61, 0) 95%,
    transparent 100%);
  pointer-events: none;
}

/* "§ 01" label above each H2 */
main > article > section:not(.hero) > .container > h2::before,
main > article > section:not(.hero) > .container > .layout-narrow > h2::before,
main > article > section:not(.hero) > .container > div:first-child > h2::before {
  content: "§ " counter(section, decimal-leading-zero);
  display: block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-accent);
  letter-spacing: 0.22em;
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  border: none;
  padding: 0;
}

/* H3 inline marker */
main > article h3 {
  position: relative;
  padding-left: 1.4em;
}

main > article h3::before {
  content: "//";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent);
  font-weight: 400;
  letter-spacing: -0.05em;
  opacity: 0.85;
}

/* First-paragraph left accent (layered on top of existing +font-size rule) */
main > article > section:not(.hero) > .container > p:first-of-type,
main > article > section:not(.hero) > .container > .layout-narrow > p:first-of-type,
main > article > section:not(.hero) > .container > div:first-of-type > p:first-of-type {
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-md);
  margin-left: 0;
}

/* Enhanced blockquote — monitoring-desk callout */
main blockquote {
  position: relative;
  border-left: 3px solid var(--color-accent);
  background: linear-gradient(135deg, rgba(56, 139, 253, 0.05), transparent 70%), var(--color-surface);
  padding: var(--space-lg) var(--space-lg) var(--space-lg) calc(var(--space-xl) + 0.5rem);
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-style: normal;
  color: var(--color-heading);
  margin-block: var(--space-xl);
  overflow: hidden;
}

main blockquote::before {
  content: "\201C"; /* Left double quote */
  position: absolute;
  left: var(--space-md);
  top: 0.2rem;
  font-size: 4.5rem;
  color: var(--color-accent);
  opacity: 0.45;
  line-height: 1;
  font-family: 'Georgia', serif;
  pointer-events: none;
}

main blockquote::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--color-accent);
  border-right: 1px solid var(--color-accent);
  opacity: 0.55;
}

/* Figure / screenshot container — framed, with caption strip */
main figure {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 6px;
  margin-block: var(--space-xl);
  max-width: 100%;
}

main figure::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--color-accent);
  border-left: 2px solid var(--color-accent);
  pointer-events: none;
}

main figure::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--color-accent);
  border-right: 2px solid var(--color-accent);
  pointer-events: none;
}

main figure > img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-bg);
}

main figure figcaption {
  padding: var(--space-sm) var(--space-xs) 0;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--color-muted);
  line-height: 1.5;
  border-top: 1px dashed var(--color-border);
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
}

main figure figcaption::before {
  content: "FIG " counter(figure, decimal-leading-zero);
  counter-increment: figure;
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.12em;
  flex-shrink: 0;
  font-size: 0.72rem;
}

main > article {
  counter-reset: section figure;
}

/* Research disclaimer — above-the-fold NLP anchor.
   Structurally first in the DOM for classifier framing;
   visually compact so it does not distract readers. */
.research-disclaimer {
  background: rgba(56, 139, 253, 0.03);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--color-muted);
  letter-spacing: 0.01em;
}

.research-disclaimer p {
  max-width: none;
  margin: 0;
}

.research-disclaimer strong {
  color: var(--color-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.research-disclaimer a {
  color: var(--color-muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-border);
}

.research-disclaimer a:hover {
  color: var(--color-accent);
}

/* Exclude disclaimer from section numbering */
main > article > .research-disclaimer {
  counter-increment: none;
  border-top: none;
  padding-block: var(--space-sm);
}

/* Callout: pulled-out insight box */
.callout {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  padding: var(--space-md) var(--space-lg);
  margin-block: var(--space-lg);
  font-size: 0.95rem;
  position: relative;
}

.callout__title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

/* ── Site logo: DM emblem framed in a targeting reticle ── */
.site-logo {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  text-shadow: 0 0 12px rgba(56, 139, 253, 0.25);
}

.site-logo:hover,
.site-logo:focus-visible {
  color: var(--color-accent-hover);
  text-shadow: 0 0 14px rgba(121, 192, 255, 0.4);
}

.site-logo__mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  overflow: hidden;
  /* 4 L-shaped corner brackets drawn via background gradients (8 layers) */
  background:
    linear-gradient(var(--color-accent), var(--color-accent)) top left    / 8px 1px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) top left    / 1px 8px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) top right   / 8px 1px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) top right   / 1px 8px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) bottom left / 8px 1px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) bottom left / 1px 8px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) bottom right/ 8px 1px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) bottom right/ 1px 8px no-repeat;
  transition: filter 0.3s ease;
}

.site-logo__img {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(56, 139, 253, 0.35));
  transition: transform 0.4s ease;
}

/* Scan-line sweep across the mark on hover */
.site-logo__mark::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-hover), transparent);
  opacity: 0;
  pointer-events: none;
}

.site-logo:hover .site-logo__mark,
.site-logo:focus-visible .site-logo__mark {
  filter: drop-shadow(0 0 5px rgba(56, 139, 253, 0.55));
}

.site-logo:hover .site-logo__img,
.site-logo:focus-visible .site-logo__img {
  transform: scale(1.05);
}

.site-logo:hover .site-logo__mark::before {
  animation: logo-scan 1.1s ease-in-out;
}

@keyframes logo-scan {
  0%   { opacity: 0; transform: translateY(0); }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(34px); }
}


/* Nav toggle (mobile hamburger) */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: opacity 0.2s ease;
}

/* Nav list */
.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.nav-list label {
  cursor: pointer;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-accent);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle-label {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.98);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
  }

  .nav-toggle:checked~.main-nav {
    max-height: 400px;
  }

  .nav-list {
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
  }
}

/* --- Dropdown Navigation --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-sm));
  left: 0;
  min-width: 240px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
  list-style: none;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li {
  margin: 0;
}

.nav-dropdown-menu .nav-link {
  display: block;
  padding: var(--space-xs) var(--space-lg);
  text-transform: none;
  font-size: 0.82rem;
  white-space: nowrap;
}

.nav-dropdown-menu .nav-link:hover {
  background: rgba(56, 139, 253, 0.08);
}

@media (max-width: 768px) {
  .nav-dropdown-menu {
    position: static;
    display: block;
    background: none;
    border: none;
    padding: 0 0 0 var(--space-lg);
    min-width: 0;
  }

  .nav-dropdown-menu .nav-link {
    padding: var(--space-xs) 0;
  }
}

/* --- Freshness Badge --- */
.freshness-badge {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  max-width: none;
}

.freshness-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-lg);
  margin-top: var(--space-xl);
}

.footer-contact {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: var(--space-xs);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.footer-brand {
  flex-shrink: 0;
  min-width: 180px;
}

.footer-logo {
  display: inline-block;
  line-height: 0;
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-heading);
}

.footer-logo img {
  height: 30px;
  width: auto;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-top: var(--space-xs);
  max-width: none;
}

.footer-nav {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  flex: 1;
}

.footer-nav__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 120px;
}

.footer-nav__group strong {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-heading);
  margin-bottom: var(--space-xs);
}

.footer-nav__group a {
  font-size: 0.8rem;
  color: var(--color-muted);
  transition: color 0.2s ease;
}

.footer-nav__group a:hover {
  color: var(--color-accent);
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.layout-narrow {
  max-width: var(--narrow-width);
  margin-inline: auto;
}

/* Grid splits — mobile-first (stacked), tablet+: columns */
.layout-split-60-40,
.layout-split-65-35,
.layout-split-70-30,
.layout-split-35-65 {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .layout-split-60-40 {
    grid-template-columns: 3fr 2fr;
  }

  .layout-split-65-35 {
    grid-template-columns: 65fr 35fr;
  }

  .layout-split-70-30 {
    grid-template-columns: 7fr 3fr;
  }

  .layout-split-35-65 {
    grid-template-columns: 35fr 65fr;
  }
}

/* --- Section Spacing --- */
section {
  padding-block: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

section:first-child {
  border-top: none;
}

/* --- Responsive Typography --- */
h1 {
  font-size: clamp(2rem, 4vw + 1rem, 4rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw + 0.5rem, 2.4rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.5rem);
  line-height: 1.3;
}

/* ==========================================================================
   HOMEPAGE STYLES
   Styles specific to the homepage (index.html).
   ========================================================================== */

/* --- Hero Section --- */
.hero {
  padding-block: var(--space-2xl) var(--space-xl);
  border-top: none;
  position: relative;
  overflow: hidden;
  /* Dot-grid texture + radial accent glow */
  background-image:
    radial-gradient(ellipse 70% 50% at 20% 60%, rgba(56, 139, 253, 0.07) 0%, transparent 65%),
    radial-gradient(circle, rgba(56, 139, 253, 0.13) 1px, transparent 1px);
  background-size: auto, 28px 28px;
}

/* Faint scanlines across the hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* Glowing top accent line */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--color-accent) 35%, var(--color-accent-hover) 65%, transparent 100%);
  opacity: 0.7;
}

.hero__primary {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

/* ── Decorative observatory scope (top-right corner) ── */
.hero__scope {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 220px;
  height: 220px;
  color: var(--color-accent);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 0 12px rgba(56, 139, 253, 0.2));
}

.hero__scope-sweep {
  transform-origin: 100px 100px;
  animation: scope-sweep 6s linear infinite;
}

@keyframes scope-sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (max-width: 1023px) {
  .hero__scope { width: 150px; height: 150px; opacity: 0.18; }
}
@media (max-width: 767px) {
  .hero__scope { display: none; }
}

/* ── Live telemetry bar ── */
.hero__telemetry {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-block: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  background: rgba(22, 27, 34, 0.7);
  backdrop-filter: blur(4px);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.hero__telemetry-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.5rem 0.9rem;
  border-right: 1px solid var(--color-border);
  flex: 1 1 auto;
  white-space: nowrap;
}

.hero__telemetry-cell:last-child {
  border-right: none;
}

.hero__telemetry-key {
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero__telemetry-val {
  color: var(--color-heading);
  font-weight: 700;
}

.hero__telemetry-val--ok {
  color: #27c93f;
}

.hero__telemetry-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-muted);
  flex-shrink: 0;
}

.hero__telemetry-dot--live {
  background: #27c93f;
  box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.6);
  animation: status-pulse 2.4s ease-in-out infinite;
}

@media (max-width: 640px) {
  .hero__telemetry { font-size: 0.68rem; }
  .hero__telemetry-cell {
    flex: 1 1 45%;
    border-bottom: 1px solid var(--color-border);
  }
  .hero__telemetry-cell:nth-child(2n) { border-right: none; }
  .hero__telemetry-cell:nth-last-child(-n+2) { border-bottom: none; }
}

/* Eyebrow label above H1 */
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: calc(var(--space-sm) * -0.5);
}

.hero__eyebrow-prompt {
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0.8;
}

/* Blinking cursor on H1 */
.hero h1::after {
  content: '_';
  display: inline-block;
  color: var(--color-accent);
  margin-left: 3px;
  font-weight: 400;
  animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero__subtitle {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-muted);
  max-width: 60ch;
}

/* ── Terminal-chrome aside card ── */
.hero__aside {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
  position: relative;
  z-index: 1;
}

.hero__aside-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px var(--space-md);
  background: rgba(48, 54, 61, 0.5);
  border: 1px solid var(--color-border);
  border-bottom: 1px solid rgba(56, 139, 253, 0.2);
}

.chrome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chrome-dot--red    { background: #ff5f57; }
.chrome-dot--yellow { background: #ffbd2e; }
.chrome-dot--green  { background: #27c93f; }

.chrome-titlebar-label {
  margin-left: auto;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  opacity: 0.65;
}

.hero__aside-inner {
  padding: var(--space-lg);
  border-left: 3px solid var(--color-accent);
}

.hero__aside-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.hero__stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  font-size: 0.82rem;
}

.hero__stats dt,
.hero__stats dd {
  padding-block: calc(var(--space-sm) * 0.8);
  border-bottom: 1px solid rgba(48, 54, 61, 0.7);
}

.hero__stats dt {
  font-weight: 400;
  font-family: var(--font-body);
  color: var(--color-muted);
  padding-right: var(--space-md);
}

.hero__stats dd {
  font-weight: 700;
  color: var(--color-heading);
  margin-left: 0;
  text-align: right;
}

.hero__stats dd:last-child,
.hero__stats dt:nth-last-child(2) {
  border-bottom: none;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.btn-primary {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--color-accent);
  color: #0d1117;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--color-accent);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #0d1117;
  box-shadow: 0 0 20px rgba(56, 139, 253, 0.45), 0 0 40px rgba(56, 139, 253, 0.15);
}

.btn-secondary {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: var(--color-muted);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--color-border);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.hero__market-link {
  display: block;
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(56, 139, 253, 0.07);
  border: 1px solid var(--color-accent);
  border-left: 4px solid #ffbd2e;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.hero__market-link:hover,
.hero__market-link:focus-visible {
  background: rgba(56, 139, 253, 0.16);
  box-shadow: 0 0 18px rgba(56, 139, 253, 0.22);
}

.hero__market-link-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ffbd2e;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.hero__market-link-label::before {
  content: "◆";
  font-size: 0.7em;
  color: #ffbd2e;
}

.hero__market-link-url {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-accent-hover);
  word-break: break-all;
  line-height: 1.5;
  text-shadow: 0 0 10px rgba(121, 192, 255, 0.3);
}

/* Status indicator dot */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #27c93f;
  border-radius: 50%;
  margin-right: var(--space-xs);
  vertical-align: middle;
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.55); }
  50%       { box-shadow: 0 0 0 5px rgba(39, 201, 63, 0); }
}

/* CTA block */
.cta-block {
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-lg);
  margin-block: var(--space-lg);
}

.cta-block__label {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  display: inline-block;
}

.cta-block__url {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.5;
  color: #fff;
  max-width: none;
  letter-spacing: -0.01em;
}

.cta-block__hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: var(--space-sm);
  max-width: none;
}

/* --- Figure Variations --- */

/* Full-width figure — breaks out of container */
.figure-full {
  margin-inline: calc(-1 * var(--space-lg));
  margin-block: var(--space-xl);
}

.figure-full img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.figure-full figcaption {
  padding-inline: var(--space-lg);
}

/* Offset figure — pushed to the right edge */
.figure-offset {
  width: 80%;
  margin-left: auto;
  margin-block: var(--space-xl);
}

.figure-offset img {
  width: 100%;
  height: auto;
}

/* Column figure — fills grid cell in split layouts */
.figure-column {
  margin-block: 0;
}

.figure-column img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 500px;
}

/* --- Section-specific spacing --- */
#faq dl {
  gap: var(--space-lg);
}

#faq dt {
  font-size: 1.05rem;
  color: var(--color-heading);
}

#faq dd {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

#faq dd:last-child {
  border-bottom: none;
}

/* Aside in split layouts */
#features aside,
#access aside {
  background: var(--color-surface);
  padding: var(--space-lg);
  align-self: start;
}

#features aside strong,
#access aside strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

#features aside ul,
#access aside ul {
  list-style: none;
  padding-left: 0;
}

#features aside li,
#access aside li {
  padding-block: var(--space-xs);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

#features aside li:last-child,
#access aside li:last-child {
  border-bottom: none;
}

/* ==========================================================================
   RESPONSIVE — Mobile-first
   ========================================================================== */

/* --- Mobile (≤ 767px) — single column, no horizontal scroll --- */
@media (max-width: 767px) {
  .hero {
    padding-block: var(--space-xl);
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .hero__aside {
    border-left: none;
  }

  .hero__aside-inner {
    border-left: none;
    border-top: 3px solid var(--color-accent);
  }

  /* Prevent figure-full from causing horizontal scroll on narrow screens */
  .figure-full {
    margin-inline: 0;
  }

  /* Offset figure goes full-width on mobile */
  .figure-offset {
    width: 100%;
  }

  /* Column figure stacks naturally */
  .figure-column img {
    max-height: 300px;
  }

  /* Sidebars stack below content */
  #features aside,
  #access aside {
    border-top: 1px solid var(--color-border);
  }

  /* Code blocks don't overflow */
  code {
    word-break: break-all;
  }
}

/* --- Tablet (768px+) — splits activate --- */
@media (min-width: 768px) {
  .hero__aside {
    align-self: start;
  }

  .figure-column img {
    max-height: 500px;
  }
}

/* --- Desktop (1024px+) — full layout --- */
@media (min-width: 1024px) {
  .hero {
    padding-block: var(--space-2xl) var(--space-xl);
  }

  .figure-full {
    margin-inline: calc(-1 * var(--space-xl));
  }

  .figure-full figcaption {
    padding-inline: var(--space-xl);
  }
}

/* ==========================================================================
   PERFORMANCE — content-visibility for below-fold sections
   Browser skips rendering until section is near the viewport.
   contain-intrinsic-size prevents scroll-bar jank.
   ========================================================================== */
#snapshot,
#interface,
#security,
#payments,
#vendors,
#order-flow,
#timeline,
#context,
#methodology,
#faq {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}