/* ==========================================================================
   ZT INFOSEC — main stylesheet
   Dark, angular, recon-HUD visual language. No third-party CSS.
   No inline styles anywhere (strict CSP).
   ========================================================================== */

/* ---- Fonts (self-hosted, variable) ------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-var-latin.woff2") format("woff2");
}

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Brand — derived from the ZT INFOSEC logo and existing site palette */
  --ink-950: #070c16;
  --ink-900: #0b1220;   /* page background */
  --ink-850: #101a2c;
  --ink-800: #16213a;   /* card surface (brand #162133 family) */
  --ink-700: #1d2c42;   /* raised surface */
  --orange: #ff9138;    /* logo sphere highlight */
  --orange-deep: #ff6a00; /* brand accent (existing site) */
  --text: #e9effa;
  --muted: #a7b4cc;
  --faint: #7a889f;
  --line: rgba(190, 208, 240, 0.13);
  --line-strong: rgba(190, 208, 240, 0.22);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --notch: 16px;        /* signature clipped corner */
  --container: 73.75rem; /* 1180px */
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(4rem, 9vw, 6.5rem);

  --shadow-1: 0 1px 2px rgba(2, 6, 14, 0.5), 0 12px 32px rgba(2, 6, 14, 0.35);
  --focus-ring: 0 0 0 3px rgba(255, 145, 56, 0.55);

  /* Notched-corner shapes (top-right + bottom-left cut) */
  --clip-panel: polygon(
    0 0, calc(100% - var(--notch)) 0, 100% var(--notch),
    100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch))
  );
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.3rem); }
h4 { font-size: 1.05rem; }

p, ul, ol {
  margin: 0 0 1.1em;
}

a {
  color: var(--orange);
  text-decoration: none;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration: underline;
}

strong { color: var(--text); }

::selection {
  background: var(--orange-deep);
  color: var(--ink-950);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* ---- Utilities ----------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--orange);
  color: var(--ink-950);
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* Signature notched panel: 1px "border" drawn by layering two clipped
   surfaces. Children must sit above the ::before surface. */
.panel {
  position: relative;
  clip-path: var(--clip-panel);
  background: linear-gradient(150deg, var(--line-strong), rgba(190, 208, 240, 0.06));
}
.panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  clip-path: var(--clip-panel);
  background: linear-gradient(165deg, rgba(29, 44, 66, 0.72), rgba(13, 20, 36, 0.9));
}
.panel > * {
  position: relative;
}

/* Hatched divider strip — brand texture between major blocks */
.hatch {
  height: 8px;
  background: repeating-linear-gradient(
    -55deg,
    rgba(255, 145, 56, 0.28) 0 2px,
    transparent 2px 9px
  );
  opacity: 0.5;
}

/* ---- Header / navigation -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 12, 22, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(7, 12, 22, 0.94);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  width: auto;
  height: 2.35rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-list a:hover {
  color: var(--text);
  background: rgba(190, 208, 240, 0.07);
  text-decoration: none;
}
.nav-list a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--orange);
}
.nav-list a.nav-cta {
  margin-left: 0.5rem;
  color: var(--ink-950);
  background: var(--orange);
  font-weight: 600;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.nav-list a.nav-cta:hover {
  background: #ffa35c;
}

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--line-strong);
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 47.99rem) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--ink-950);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(2, 6, 14, 0.6);
    display: none;
  }
  .nav-list.is-open { display: flex; }
  .nav-list a { padding: 0.8rem 0.9rem; font-size: 1.05rem; }
  .nav-list a.nav-cta { margin-left: 0; text-align: center; }
}

/* ---- Kicker: monospace recon tag ------------------------------------------ */
.kicker {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}
.kicker::before {
  content: "//";
  color: var(--faint);
  letter-spacing: 0;
}

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background:
    radial-gradient(52rem 30rem at 82% -18%, rgba(255, 106, 0, 0.15), transparent 62%),
    radial-gradient(40rem 26rem at -12% 108%, rgba(57, 130, 232, 0.09), transparent 60%),
    linear-gradient(180deg, var(--ink-950), var(--ink-900) 65%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(190, 208, 240, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 208, 240, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(60rem 34rem at 60% 0%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(60rem 34rem at 60% 0%, #000 25%, transparent 78%);
  pointer-events: none;
}
.hero > .container {
  position: relative;
}

.hero-inner {
  max-width: 46rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 63.99rem) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 .accent {
  background: linear-gradient(100deg, var(--orange) 10%, var(--orange-deep) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.08rem, 1.9vw, 1.22rem);
  color: var(--muted);
  max-width: 40rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.1rem;
}

/* ---- HUD figure: bracketed, annotated image frame ---------------------------- */
.figure-hud {
  position: relative;
  margin: 0;
  padding: 10px;
  /* corner brackets drawn with gradients (2px strokes, 26px long) */
  background:
    linear-gradient(var(--orange) 0 0) top left / 26px 2px,
    linear-gradient(var(--orange) 0 0) top left / 2px 26px,
    linear-gradient(var(--orange) 0 0) top right / 26px 2px,
    linear-gradient(var(--orange) 0 0) top right / 2px 26px,
    linear-gradient(var(--orange) 0 0) bottom left / 26px 2px,
    linear-gradient(var(--orange) 0 0) bottom left / 2px 26px,
    linear-gradient(var(--orange) 0 0) bottom right / 26px 2px,
    linear-gradient(var(--orange) 0 0) bottom right / 2px 26px;
  background-repeat: no-repeat;
}
.figure-hud .frame {
  position: relative;
  overflow: hidden;
  clip-path: var(--clip-panel);
}
.figure-hud img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}
/* navy grade so photos sit inside the palette */
.figure-hud .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(11, 18, 32, 0.28), rgba(11, 18, 32, 0) 45%, rgba(7, 12, 22, 0.42) 100%);
  pointer-events: none;
}
.figure-hud figcaption {
  position: absolute;
  z-index: 1;
  left: 10px;
  bottom: 10px;
  margin: 0.9rem;
  padding: 0.4rem 0.75rem;
  background: rgba(7, 12, 22, 0.88);
  border-left: 2px solid var(--orange);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}
/* aspect variants keep rows tidy regardless of source image shape */
.figure-hud.ratio-45 .frame { aspect-ratio: 4 / 4.6; }
.figure-hud.ratio-43 .frame { aspect-ratio: 4 / 3; }
.figure-hud.ratio-11 .frame { aspect-ratio: 1 / 1; }
.figure-hud.ratio-21 .frame { aspect-ratio: 21 / 9; }
.figure-hud.ratio-45 img,
.figure-hud.ratio-43 img,
.figure-hud.ratio-11 img,
.figure-hud.ratio-21 img { position: absolute; inset: 0; }

/* ---- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 0;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: linear-gradient(120deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: var(--ink-950);
}
.btn-primary:hover {
  background: linear-gradient(120deg, #ffa35c 0%, var(--orange-deep) 100%);
}
.btn-ghost {
  background: rgba(22, 33, 58, 0.6);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(29, 44, 66, 0.75);
  box-shadow: inset 0 0 0 1px var(--faint);
}

/* ---- Credential strip: mono readout ------------------------------------------ */
.cred-strip {
  border-block: 1px solid var(--line);
  background: var(--ink-950);
}
.cred-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}
.cred {
  background: var(--ink-950);
  padding: 1.4rem 1.25rem;
  text-align: center;
}
.cred b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.02em;
}
.cred span {
  display: block;
  margin-top: 0.3rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 47.99rem) {
  .cred-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Sections ------------------------------------------------------------------ */
.section {
  padding-block: var(--section-y);
}
.section-alt {
  background: linear-gradient(180deg, var(--ink-950), var(--ink-900));
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.25rem, 5vw, 3.25rem);
}
.section-head p {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 0;
}

/* ---- Feature rows (alternating image + text) -------------------------------------- */
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(1.75rem, 4.5vw, 4rem);
  align-items: center;
}
.feature-row + .feature-row {
  margin-top: clamp(2.75rem, 6vw, 4.5rem);
}
.feature-row--flip .feature-media { order: 2; }
@media (max-width: 63.99rem) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row--flip .feature-media { order: 0; }
}
.feature-copy h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}
.feature-copy p {
  color: var(--muted);
}
.feature-copy .checklist {
  grid-template-columns: 1fr;
  margin-top: 1.1rem;
}

/* ---- Cards ------------------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 63.99rem) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 47.99rem) {
  .card-grid { grid-template-columns: 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.6rem;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  filter: brightness(1.12);
}
.card h3 {
  margin-bottom: 0.5rem;
}
.card p {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 0;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.2rem;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  background: rgba(255, 145, 56, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 145, 56, 0.3);
  color: var(--orange);
}
.card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ---- Numbered steps -------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 1.1rem;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  padding: 1.5rem 1.5rem 1.4rem;
}
.step::after {
  content: "0" counter(step);
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  padding-top: 0.15rem;
  background: linear-gradient(120deg, var(--orange), var(--orange-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step h3 {
  grid-column: 2;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.step p {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.97rem;
  margin: 0;
}

/* ---- Split (two-column) sections --------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split--top {
  align-items: start;
}
@media (max-width: 63.99rem) {
  .split { grid-template-columns: 1fr; }
}
.split .section-head {
  margin-bottom: 1.5rem;
}
.split + .card-grid,
.split + .checklist {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
}
.engagement-sub {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  margin-bottom: 1.2rem;
}

/* ---- Checklist ------------------------------------------------------------------------ */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1.5rem;
}
@media (max-width: 47.99rem) {
  .checklist { grid-template-columns: 1fr; }
}
.checklist li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.checklist li::before {
  content: ">";
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--orange);
}

/* ---- Chips (compliance frameworks) ------------------------------------------------------ */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 0 0 2.25rem;
  list-style: none;
}
.chip {
  padding: 0.45rem 1rem;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  background: rgba(22, 33, 58, 0.85);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ---- Testimonials -------------------------------------------------------------------------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 63.99rem) {
  .quote-grid { grid-template-columns: 1fr; }
}
.quote {
  margin: 0;
  padding: 1.9rem 1.75rem;
}
.quote p {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}
.quote p::before { content: "\201C"; color: var(--orange); }
.quote p::after { content: "\201D"; color: var(--orange); }
.quote footer {
  color: var(--faint);
  font-size: 0.92rem;
}
.quote footer b {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

/* ---- CTA band --------------------------------------------------------------------------------- */
.cta-band {
  --notch: 26px;
  position: relative;
  padding: clamp(2.75rem, 6vw, 4.25rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}
.cta-band::before {
  background:
    radial-gradient(38rem 20rem at 85% -30%, rgba(255, 106, 0, 0.2), transparent 65%),
    linear-gradient(160deg, var(--ink-800), var(--ink-950));
}
.cta-band h2 {
  margin-bottom: 0.5rem;
}
.cta-band p {
  color: var(--muted);
  max-width: 38rem;
  margin-inline: auto;
}
.cta-band .cta-row {
  justify-content: center;
  margin-top: 1.75rem;
}

/* ---- Contact ------------------------------------------------------------------------------------- */
.contact-stack {
  display: grid;
  gap: 1.1rem;
}
.contact-card {
  padding: 1.4rem 1.5rem;
}
.contact-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}
.contact-card h3 svg {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--orange);
  flex-shrink: 0;
}
.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.contact-card a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---- Page hero (interior pages) --------------------------------------------------------------------- */
.page-hero {
  padding-block: clamp(3.5rem, 8vw, 5.25rem) clamp(2.5rem, 6vw, 3.75rem);
  background:
    radial-gradient(44rem 22rem at 85% -30%, rgba(255, 106, 0, 0.13), transparent 62%),
    linear-gradient(180deg, var(--ink-950), var(--ink-900));
  border-bottom: 1px solid var(--line);
}
.page-hero .lede {
  margin-bottom: 0;
}
.breadcrumb {
  margin-bottom: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--faint);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current="page"] { color: var(--orange); }

/* Full-width banner figure below interior page heroes */
.banner-figure {
  margin-top: clamp(2rem, 5vw, 3rem);
}

/* ---- Legal / long-form articles ------------------------------------------------------------------------ */
.article {
  max-width: 50rem;
}
.article h2 {
  font-size: 1.55rem;
  margin-top: 2.6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
}
.article h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.article h3 {
  font-size: 1.15rem;
  margin-top: 1.9em;
  color: var(--text);
}
.article p,
.article li {
  color: var(--muted);
  font-size: 1rem;
}
.article p a,
.article li a {
  text-decoration: underline;
}
.article li {
  margin-bottom: 0.35em;
}
.article table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.article th,
.article td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--line);
  color: var(--muted);
}
.article th {
  background: rgba(22, 33, 58, 0.6);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
}
.table-wrap {
  overflow-x: auto;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 2.25rem;
  padding: 0;
  list-style: none;
}
.doc-meta li {
  padding: 0.4rem 0.9rem;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  background: rgba(22, 33, 58, 0.85);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.callout {
  margin: 1.5em 0;
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(255, 145, 56, 0.35);
  border-left-width: 3px;
  background: rgba(255, 145, 56, 0.07);
}
.callout p {
  margin: 0;
}

/* ---- Footer ----------------------------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--section-y);
  border-top: 1px solid var(--line);
  background: var(--ink-950);
  padding-block: clamp(2.75rem, 6vw, 4rem) 2rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.4fr);
  gap: 2.25rem;
  margin-bottom: 2.75rem;
}
@media (max-width: 63.99rem) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 47.99rem) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand img {
  height: 2.1rem;
  width: auto;
  margin-bottom: 1rem;
}
.footer-brand p {
  color: var(--faint);
  max-width: 24rem;
  margin: 0;
}
.site-footer h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.9rem;
}
.site-footer h2::before {
  content: "// ";
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li {
  margin-bottom: 0.55rem;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }

/* ---- Reveal animation (progressive enhancement; JS adds classes) ------------------------------------------- */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js-anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@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;
  }
  .js-anim .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---- Print ---------------------------------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .skip-link,
  .hatch {
    display: none;
  }
  body {
    background: #fff;
    color: #111;
  }
  .article p,
  .article li,
  .article td {
    color: #222;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}
