/* ============================================================
   C&M Networks — site styles
   Editorial, print-inspired system: paper & ink, hairline
   rules, letterspaced caps. Light/dark via [data-theme].
   ============================================================ */

/* ---------- Self-hosted fonts (subset from Google Fonts; font-display: swap) ---------- */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #efece3;
  --paper-2: #e8e4d6;
  --ink: #181512;
  --muted: #655d4e;
  --line: #d3cdba;
  --line-strong: #181512;
  --accent: #a8431f;
  --font-body: "Archivo", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #161310;
  --paper-2: #1d1915;
  --ink: #ece7da;
  --muted: #a59c88;
  --line: #353027;
  --line-strong: #ece7da;
  --accent: #d97e48;
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1,
h2,
h3 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2rem, 6.5vw, 5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Anchor targets land below the sticky header instead of underneath it */
[id] {
  scroll-margin-top: 96px;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  padding: 0.7rem 1.1rem;
}

.skip-link:focus {
  left: 0;
}

/* Letterspaced caps — the "NETWORKS" of the logo */
.label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Italic serif accent for headline words */
.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 58ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.8rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover {
  background: transparent;
  color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.text-link:hover {
  color: var(--accent);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
  transition: background-color 0.25s ease;
}

.header-grid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 76px;
}

/* Stacked wordmark, as in the logo */
.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}

.brand-mark {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-word {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  margin-top: 0.3rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}

.site-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.3rem 0;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

/* Training > Videos dropdown */
.has-sub {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.has-sub > a::after {
  content: "▾";
  display: inline-block;
  margin-left: 0.45em;
  font-size: 0.85em;
  opacity: 0.65;
  transition: transform 0.18s ease;
}

.has-sub:hover > a {
  color: var(--ink);
}

.has-sub:hover > a::after {
  transform: rotate(180deg);
}

.sub-nav {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 50%;
  transform: translate(-50%, -6px);
  white-space: nowrap;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: 0 22px 34px -20px rgba(0, 0, 0, 0.45);
  z-index: 60;
  transition: opacity 0.18s ease, transform 0.18s ease,
    visibility 0s linear 0.18s;
}

/* invisible bridge so the menu doesn't close while moving the cursor down */
.sub-nav::before {
  content: "";
  position: absolute;
  top: -0.9rem;
  left: -1rem;
  right: -1rem;
  height: 0.9rem;
}

/* notch pointing back up at the Training item */
.sub-nav::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--paper);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  transform: translateX(-50%) rotate(45deg);
}

.has-sub:hover .sub-nav,
.has-sub:focus-within .sub-nav {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

/* keep Training highlighted when the current page lives in its submenu */
.has-sub:has(.sub-nav a[aria-current="page"]) > a {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

.sub-nav a {
  display: block;
  padding: 0.8rem 1.6rem;
  text-align: left;
}

.sub-nav a:hover {
  background: var(--paper-2);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle,
.nav-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.theme-toggle:hover,
.nav-toggle:hover {
  background: var(--ink);
  color: var(--paper);
}

/* moon shows in light mode, sun in dark */
.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.open .icon-close {
  display: block;
}

.nav-toggle.open .icon-menu {
  display: none;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

.hero .label {
  margin-bottom: 1.5rem;
}

/* Oversized outlined ampersand — brand motif */
.big-amp {
  position: absolute;
  right: -4rem;
  top: -5rem;
  z-index: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18rem, 36vw, 32rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  pointer-events: none;
  user-select: none;
}

.hero-sub {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.hero-sub h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

/* Photo hero — data center image with editorial overlay.
   Fixed min-height (not vh) so every image hero is the SAME height on
   every page, regardless of how long its headline/lede is; the content
   is vertically centered within it. */
.hero-photo {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 640px;
  background: #12100e;
  color: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.hero-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  z-index: 0;
}

/* Extra blur for the videos channel hero (softens the screenshot-style image).
   The scale() pushes the soft blurred edges out of the frame so there's no halo. */
.hero-photo-img--blur {
  filter: blur(8px);
  transform: scale(1.08);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(18, 16, 14, 0.95) 0%,
    rgba(18, 16, 14, 0.74) 48%,
    rgba(18, 16, 14, 0.3) 100%
  );
}

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

.hero-photo .label {
  color: rgba(255, 255, 255, 0.72);
}

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

.hero-photo .lede {
  color: rgba(255, 255, 255, 0.86);
}

.hero-photo .btn {
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}

.hero-photo .btn:hover {
  background: #fff;
  color: #161310;
}

.hero-photo .btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hero-photo .btn-solid:hover {
  background: transparent;
  color: #fff;
}

/* Stats strip below the homepage hero (paper background) */
.stat-band {
  padding-block: clamp(2.25rem, 4.5vw, 3.25rem);
}

.stat-band .stat-row {
  margin-top: 0;
}

/* ---------- Stat row ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.stat {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}

.stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat-num {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ---------- Ticker ---------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 0.85rem 0;
}

.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker 36s linear infinite;
}

.ticker-track span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 3.5rem;
}

.ticker-track span::after {
  content: "·";
  color: var(--accent);
  margin-left: 3.5rem;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

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

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1.25rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-head .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent);
}

.section-head h2 {
  margin: 0;
}

.section-head .label {
  margin-left: auto;
  text-align: right;
}

/* ---------- Index rows (services as a table of contents) ---------- */

.index-list {
  border-top: 1px solid var(--line-strong);
}

.index-row {
  display: grid;
  grid-template-columns: 4.5rem 1.1fr 1.6fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.2s ease;
}

.index-list .index-row:last-child {
  border-bottom: 1px solid var(--line-strong);
}

a.index-row:hover {
  padding-left: 0.75rem;
}

a.index-row:hover .row-arrow {
  color: var(--accent);
}

.row-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}

.row-title {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.row-body {
  color: var(--muted);
  margin: 0;
}

.row-meta {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.75rem;
}

.row-arrow {
  font-size: 1.4rem;
  line-height: 1;
  transition: color 0.15s ease;
}

/* ---------- Split (editorial two-column) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.split-sticky {
  position: sticky;
  top: 100px;
}

.split p {
  color: var(--muted);
}

.split h2 {
  color: var(--ink);
}

/* ---------- Point list (numbered arguments) ---------- */

.point-list li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.point-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.point-list .num {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  font-size: 1.1rem;
}

.point-list h3 {
  margin-bottom: 0.4rem;
}

.point-list p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Spec list (definition table) ---------- */

.spec-list {
  border: 1px solid var(--line-strong);
  padding: 0 1.75rem;
}

.spec-list div {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.spec-list div:last-child {
  border-bottom: 0;
}

.spec-list dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
}

.spec-list dd {
  margin: 0;
  font-weight: 500;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.step {
  padding: 1.75rem 1.5rem 1.75rem 0;
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}

.step:first-child {
  border-left: 0;
  padding-left: 0;
}

.step-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.9rem;
}

.step h3 {
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Check list ---------- */

.check-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.6rem;
  color: var(--muted);
}

.check-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Inverted CTA block ---------- */

.invert {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.invert .label {
  display: block;
  margin-bottom: 1.5rem;
}

.invert .label,
.invert p {
  color: color-mix(in srgb, var(--paper) 72%, var(--ink));
}

.invert h2 {
  color: var(--paper);
  max-width: 22ch;
}

.invert .btn {
  border-color: var(--paper);
  color: var(--paper);
}

.invert .btn:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Aside note ---------- */

.aside-note {
  border-left: 2px solid var(--ink);
  padding: 0.35rem 0 0.35rem 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 70ch;
}

/* ---------- Videos ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem);
}

.video {
  border-top: 1px solid var(--line-strong);
  padding-top: 1.25rem;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  display: block;
  background: #000;
  margin-top: 1rem;
}

.video h3 {
  margin-bottom: 0.35rem;
}

.video p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.field .req {
  color: var(--accent);
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.85rem 1rem;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 0;
}

.form-status {
  color: var(--accent);
  font-size: 0.95rem;
  min-height: 1.4em;
  margin-top: 0.9rem;
}

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

.site-footer {
  border-top: 1px solid var(--line-strong);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-col h3 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.footer-col li {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-mark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  margin-top: clamp(2.25rem, 4vw, 3rem);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.footer-mark span {
  display: block;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 1.75rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- 404 ---------- */

.error-wrap {
  min-height: 55vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 5rem 0;
}

.error-code {
  font-size: clamp(6rem, 18vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ---------- Coverage map ---------- */

.coverage {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.coverage-intro .label {
  margin-bottom: 1.25rem;
}

.coverage-intro p {
  color: var(--muted);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.is-active {
  background: var(--accent);
}

.legend-dot.is-soon {
  background: transparent;
  border: 1.5px solid var(--muted);
}

.map-frame {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: clamp(1rem, 3vw, 2rem);
}

.map-scroll {
  overflow-x: auto;
}

.us-map {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
}

.us-land {
  fill: var(--paper-2);
  stroke: var(--line-strong);
  stroke-width: 1.25;
  stroke-linejoin: round;
}

/* data-dot texture over the landmass */
.mk-grid-dot {
  fill: var(--line);
}

.us-grid {
  stroke: none;
  opacity: 0.75;
}

/* network links radiating from the active hub
   (opacity-only animation so it stays compositor-friendly) */
.map-link {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
  opacity: 0.4;
  animation: link-breathe 2.8s ease-in-out infinite alternate;
}

@keyframes link-breathe {
  from {
    opacity: 0.22;
  }

  to {
    opacity: 0.55;
  }
}

/* markers rendered as network nodes (outer ring + inner dot) */
.map-marker {
  cursor: default;
}

.mk-ring {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  transition: stroke 0.15s ease;
}

.mk-dot {
  fill: var(--muted);
  transition: r 0.15s ease;
}

.map-marker--active .mk-ring {
  stroke: var(--accent);
}

.map-marker--active .mk-dot {
  fill: var(--accent);
}

.mk-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  fill: var(--muted);
}

.map-marker--active .mk-label {
  fill: var(--ink);
  font-weight: 700;
}

.map-marker:hover .mk-dot {
  r: 5;
}

.map-marker:hover .mk-ring {
  stroke: var(--accent);
}

.map-marker:hover .mk-label {
  fill: var(--accent);
}

/* pulse on the active (Northern Virginia) node */
.mk-pulse {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: center;
  animation: mk-pulse 2.4s ease-out infinite;
}

@keyframes mk-pulse {
  0% {
    transform: scale(0.5);
    opacity: 0.5;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mk-pulse {
    animation: none;
    opacity: 0.22;
    transform: scale(1.7);
  }

  .map-link {
    animation: none;
  }
}

.map-caption {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

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

.form-status.is-ok {
  color: var(--ink);
}

.form-status.is-error {
  color: var(--accent);
}

button[disabled] {
  opacity: 0.55;
  cursor: progress;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .nav-toggle {
    display: grid;
  }

  /* The header container spans the full viewport at this width, so
     left/right: 0 makes the panel full-bleed. Links carry the same
     gutter as the container, keeping them perfectly aligned with the
     brand mark — no negative-offset tricks. */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line-strong);
    padding: 0 0 1.35rem;
    box-shadow: 0 30px 40px -28px rgba(0, 0, 0, 0.5);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 1.05rem clamp(1.25rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--ink);
    transition: color 0.15s ease, background-color 0.15s ease;
  }

  .site-nav > a:first-child {
    border-top: 0;
  }

  .site-nav a:hover {
    color: var(--accent);
    background: var(--paper-2);
  }

  .site-nav a[aria-current="page"] {
    border-bottom: 0;
    color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
  }

  /* Videos sits indented beneath Training in the mobile menu */
  .has-sub {
    display: block;
    position: static;
  }

  .has-sub > a {
    display: block;
  }

  .has-sub > a::after {
    content: none;
  }

  .sub-nav {
    display: block;
    visibility: visible;
    opacity: 1;
    position: static;
    transform: none;
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    white-space: normal;
    transition: none;
  }

  .sub-nav::before,
  .sub-nav::after {
    content: none;
  }

  .sub-nav a {
    padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
    padding-left: calc(clamp(1.25rem, 4vw, 3rem) + 1.4rem);
    font-size: 0.72rem;
    color: var(--muted);
    text-align: left;
    position: relative;
  }

  /* small accent tick marking Videos as a child of Training */
  .sub-nav a::before {
    content: "";
    position: absolute;
    left: clamp(1.25rem, 4vw, 3rem);
    top: 50%;
    width: 0.6rem;
    height: 1px;
    background: var(--accent);
  }

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

  .split-sticky {
    position: static;
  }

  .coverage {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .step {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }

  .step:first-child,
  .step:nth-child(2) {
    border-top: 0;
  }

  .stat-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat:first-child,
  .stat:nth-child(2) {
    border-top: 0;
  }

  .index-row {
    grid-template-columns: 3rem 1fr auto;
  }

  .index-row .row-body {
    grid-column: 2 / 3;
  }

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

@media (max-width: 720px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

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

  .index-row {
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
  }

  .row-num {
    grid-column: 1 / -1;
  }

  .index-row .row-body {
    grid-column: 1 / 2;
  }

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .section-head {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
  }

  .section-head .label {
    margin-left: 0;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .step:nth-child(2) {
    border-top: 1px solid var(--line);
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .stat:nth-child(2) {
    border-top: 1px solid var(--line);
  }

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

/* ---------- Phones ---------- */

@media (max-width: 640px) {
  /* Compact sticky header */
  .header-grid {
    height: 60px;
  }

  .brand-mark {
    font-size: 1.2rem;
  }

  .theme-toggle,
  .nav-toggle {
    width: 36px;
    height: 36px;
  }

  [id] {
    scroll-margin-top: 76px;
  }

  /* Photo heroes: shorter and higher-contrast on small screens */
  .hero-photo {
    min-height: 420px;
    padding-block: clamp(2.5rem, 9vw, 3.75rem);
  }

  .hero-photo::after {
    background: linear-gradient(
      180deg,
      rgba(18, 16, 14, 0.78) 0%,
      rgba(18, 16, 14, 0.9) 100%
    );
  }

  /* Stack ALL call-to-action button rows full width for easy tapping */
  .btn-row {
    gap: 0.75rem;
  }

  .btn-row .btn {
    width: 100%;
  }

  /* Tighter vertical rhythm */
  .section {
    padding: 2.75rem 0;
  }

  .section-head {
    margin-bottom: 1.75rem;
  }

  .section-head .num {
    font-size: 1.05rem;
  }

  .index-row {
    padding: 1.4rem 0;
  }

  /* A touch more breathing room around body copy */
  .lede {
    font-size: 1.05rem;
  }

  /* Coverage map: fit the whole map on screen — no side-scrolling.
     In-map text labels are hidden at this scale (the caption below the
     map lists every city); markers and links are scaled up to stay visible. */
  .map-frame {
    padding: 0.85rem;
  }

  .us-map {
    min-width: 0;
  }

  .mk-label {
    display: none;
  }

  .mk-dot,
  .map-marker:hover .mk-dot {
    r: 10;
  }

  .mk-ring {
    r: 18;
    stroke-width: 3;
  }

  .mk-pulse {
    r: 15;
  }

  .map-link {
    stroke-width: 2.5;
  }

  .map-caption {
    font-size: 0.85rem;
  }

  /* Inverted CTA blocks: don't tower over small screens */
  .invert {
    padding: 3rem 0;
  }
}
