/* ============================================================
   site.css — Federated Cybersecurity methodologies
   federatedcybersecurity.com

   Identity A, "The Constellation": midnight navy, teal, warm
   off-white. Headings in Red Hat Display, reading text in
   Source Serif 4.

   Load this AFTER content.css: it supplies the tokens the
   content components use and adjusts a few of their details.
   ============================================================ */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  /* Brand */
  --navy: #0b2d4a;
  --teal: #14b8a6;
  --teal-deep: #0c7a70;      /* teal dark enough for text and links */
  --teal-wash: #e4f3f0;
  --paper: #f7f5ef;
  --paper-deep: #efebe1;
  --white: #ffffff;
  --hairline: rgba(11, 45, 74, 0.16);

  --font-display: 'Red Hat Display', 'Helvetica Neue', Arial, sans-serif;
  --font-reading: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Names the content components expect (see content.css) */
  --primary: var(--teal-deep);
  --primary-dark: var(--navy);
  --primary-light: var(--teal);
  --primary-subtle: var(--teal-wash);
  --ink: var(--navy);
  --ink-soft: #33495f;
  --muted: #5a6e80;
  --border: rgba(11, 45, 74, 0.22);
  --off-white: var(--paper-deep);
  --orange: #9a5b13;
  --blue: #2c6288;
  --green: #4d6b3c;
  --radius: 4px;
  --radius-lg: 6px;
  --shadow-sm: none;
  --shadow-md: 0 8px 24px rgba(11, 45, 74, 0.1);
  --shadow-lg: 0 12px 32px rgba(11, 45, 74, 0.14);

  --cx-font-display: var(--font-display);
  --cx-font-body: var(--font-display);       /* buttons, chips, form fields */
  --cx-surface: var(--white);
  --cx-rule: var(--hairline);
  --cx-mark: rgba(20, 184, 166, 0.28);
  --cx-tone-0: var(--teal-deep);
  --cx-tone-1: var(--navy);
  --cx-tone-2: var(--blue);
  --cx-tone-3: var(--orange);

  --page: 1200px;
  --gutter: 2.5rem;
}

/* ── Base ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Keep in-page links clear of the sticky header. site.js sets
     --nav-height from the header's real height. */
  scroll-padding-top: calc(var(--nav-height, 84px) + 1rem);
}

body {
  font-family: var(--font-reading);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
}

a {
  color: var(--teal-deep);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--navy);
}

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

img {
  max-width: 100%;
}

.tm {
  font-size: 0.5em;
  font-weight: 500;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.05em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Site header ───────────────────────────────────────────── */
#nav-placeholder {
  min-height: 84px;
}

/* The header stays at the top of the window while the page scrolls */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}

.site-nav-inner {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
}

/* The lockup: icon, name, and the word "Methodologies" */
.lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--navy);
}

.lockup img {
  width: 48px;
  height: 48px;
  display: block;
}

.lockup-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.lockup-name b {
  font-weight: 800;
}

.lockup-name span {
  font-weight: 500;
}

.lockup-kind {
  display: block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.site-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.site-links a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-links a:hover {
  color: var(--navy);
}

.site-links a.active {
  color: var(--navy);
  border-bottom-color: var(--teal);
}

/* The Methodologies menu */
.has-menu {
  position: relative;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.35rem 0;
  cursor: pointer;
}

.menu-button::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}

.menu-button[aria-expanded="true"]::after {
  transform: translateY(1px) rotate(225deg);
}

.menu-button:hover,
.menu-button.active,
.menu-button[aria-expanded="true"] {
  color: var(--navy);
}

.menu-button.active {
  border-bottom-color: var(--teal);
}

.menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  left: -1rem;
  width: 22rem;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
}

.menu-button[aria-expanded="true"] + .menu {
  display: block;
}

.site-links .menu a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-bottom: 0;
  border-radius: var(--radius);
}

.site-links .menu a:hover {
  background: var(--teal-wash);
}

.site-links .menu a.active {
  background: var(--paper-deep);
}

.menu-name {
  display: block;
  font-weight: 700;
  color: var(--navy);
}

.menu-note {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--navy);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

/* ── Page opening ──────────────────────────────────────────── */
.hero {
  padding: 4.5rem var(--gutter) 4.5rem;
}

.hero-inner {
  max-width: var(--page);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 16ch;
}

.hero-sub {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34em;
  margin-top: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
}

.hero-note {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* Home: headline beside the mark */
.hero-home .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 4rem;
  align-items: center;
}

.hero-mark img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 400px;
  margin-left: auto;
}

/* Three short lines from the identity, set as a quiet row */
.tenets {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2.5rem;
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

/* Methodology page: name with its family line */
.hero-kind {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--navy);
  margin-top: 0.9rem;
}

/* ── Bands: heading in the left rail, text on the right ────── */
.band {
  border-top: 1px solid var(--hairline);
  padding: 4.5rem var(--gutter);
}

/* Bands alternate automatically, so sections can be added or moved
   without touching their classes. */
main > section.band:nth-of-type(even) {
  background: var(--paper-deep);
}

.band-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 2rem 4rem;
}

.band-inner > h2 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.band-body > * + * {
  margin-top: 1.15rem;
}

.band-body p,
.band-body li {
  max-width: 40em;
}

.band-body ul,
.band-body ol {
  padding-left: 1.3rem;
}

.band-body li + li {
  margin-top: 0.5rem;
}

.band-body strong {
  color: var(--ink);
  font-weight: 600;
}

.band-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
}

.lede {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ── Methodology list ──────────────────────────────────────── */
.method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 2rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

a.method:hover {
  color: inherit;
  box-shadow: var(--shadow-md);
}

.method h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
}

.method p {
  font-size: 1.05rem;
  margin-top: 0.4rem;
}

.method .method-covers {
  color: var(--ink);
}

.method-go {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.method-go {
  color: var(--teal-deep);
}

/* ── Two-up panels (terms summary) ─────────────────────────── */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.panel {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
}

.panel h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
}

.panel p {
  font-size: 1.02rem;
}

.panel p + p {
  margin-top: 0.75rem;
}

/* ── Formulas ──────────────────────────────────────────────── */
.band-body .formula {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  overflow-x: auto;
}

.formula sup,
.formula sub {
  font-size: 0.75em;
  line-height: 0;
}

/* ── Tables ────────────────────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
}

.plain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.02rem;
}

.plain-table th,
.plain-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.9rem 1.25rem 0.9rem 0;
  border-bottom: 1px solid var(--hairline);
}

.plain-table th {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--navy);
}

.plain-table td:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  width: 34%;
}

.plain-table.wide-first td:first-child {
  width: 26%;
}

/* ── Numbered lists: the five principles, and steps that happen in order */
.numbered {
  list-style: none;
  padding: 0 !important;
  counter-reset: principle;
}

.numbered li {
  counter-increment: principle;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0 0.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
  margin: 0 !important;
  max-width: none;
}

.numbered li:first-child {
  border-top: 2px solid var(--navy);
}

.numbered li::before {
  content: counter(principle, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--teal-deep);
  padding-top: 0.1rem;
}

.numbered h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.numbered p {
  grid-column: 2;
  font-size: 1.02rem;
  margin-top: 0.2rem;
}

/* ── Dated history (about page) ────────────────────────────── */
.timeline {
  border-top: 2px solid var(--navy);
}

.timeline > div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.timeline dt {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
}

.timeline dd {
  grid-column: 2;
  max-width: 38em;
}

.timeline dd + dd {
  margin-top: 0.9rem;
}

/* What kind of event it was: Foundation, Validation, Expansion and so on */
.timeline .kind {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

/* ── Figures ───────────────────────────────────────────────── */
.figure {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  overflow-x: auto;
}

.figure img {
  display: block;
  width: 100%;
  min-width: 600px;
  height: auto;
}

/* ── Draft banner (terms page) ─────────────────────────────── */
.draft-banner {
  background: #fff4d6;
  border-bottom: 1px solid #e3c877;
  color: #5c4400;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.85rem var(--gutter);
  text-align: center;
}

.draft-banner strong {
  font-weight: 800;
}

/* ── The family: links between the methodology pages ───────── */
.family {
  border-top: 1px solid var(--hairline);
  padding: 4rem var(--gutter);
}

.family-inner {
  max-width: var(--page);
  margin: 0 auto;
}

.family h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.family-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.family-list a {
  display: block;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.family-list a:hover {
  border-top-color: var(--teal);
  box-shadow: var(--shadow-md);
}

.family-list a[aria-current="page"] {
  border-top-color: var(--navy);
  background: var(--paper-deep);
}

.family-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
}

.family-note {
  display: block;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

/* ── Site footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding: 3.5rem var(--gutter) 3rem;
  font-size: 0.95rem;
}

.site-footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem 4rem;
}

.site-footer .lockup {
  color: var(--white);
}

.site-footer .by {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1.5rem;
}

.site-footer .legal {
  max-width: 44em;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.9rem;
}

.site-footer a {
  color: var(--white);
}

.site-footer a:hover {
  color: var(--teal);
}

.footer-columns {
  display: flex;
  gap: 3.5rem;
}

.footer-links {
  list-style: none;
  font-family: var(--font-display);
  font-weight: 500;
}

.footer-links li + li {
  margin-top: 0.6rem;
}

.footer-links a {
  text-decoration: none;
}

/* ── Content components: adjustments for this site ─────────── */
.section-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

/* Sentence case, not tracked capitals, for the small labels */
.cx-card-eyebrow,
.cx-crumbs,
.cx-series-dir {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0;
}

.cx-card-eyebrow {
  font-size: 0.85rem;
}

.cx-crumbs {
  font-size: 0.95rem;
}

.cx-card-meta,
.cx-card-more,
.cx-status,
.cx-article-meta,
.cx-slider-all,
.cx-article-body .cx-tag {
  font-family: var(--font-display);
}

.cx-card-summary {
  font-size: 1rem;
}

.cx-card-title {
  font-size: 1.15rem;
  font-weight: 800;
}

/* This site's header is not fixed, so articles need less room on top */
.hero.cx-article-hero {
  padding: 3.5rem var(--gutter) 3rem;
  border-bottom: 1px solid var(--hairline);
}

.cx-article-hero h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3rem);
}

.cx-article-hero .hero-sub {
  margin-top: 1rem;
}

.cx-article-body p,
.cx-article-body li {
  font-size: 1.15rem;
  line-height: 1.7;
}

.cx-article-body h2 {
  font-weight: 800;
  letter-spacing: -0.015em;
}

/* html's scroll-padding-top already clears the header */
.cx-article-body h2,
.cx-article-body h3 {
  scroll-margin-top: 0;
}

.cx-slider {
  border-top: 1px solid var(--hairline);
}

.cx-related {
  border-top: 1px solid var(--hairline);
}

/* ── Smaller screens ───────────────────────────────────────── */
/* ── Back to top: appears on long pages once you have scrolled ── */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 15;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.to-top[hidden] {
  display: none;
}

.to-top::before {
  content: '';
  width: 0.6rem;
  height: 0.6rem;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: translateY(0.15rem) rotate(45deg);
}

.to-top:hover {
  background: var(--teal-deep);
}

.to-top:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  :root {
    --gutter: 1.25rem;
  }

  body {
    font-size: 1.0625rem;
  }

  .hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero-home .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .hero-mark {
    order: -1;
  }

  .hero-mark img {
    max-width: 180px;
    margin-left: 0;
  }

  .band {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .band-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .method {
    grid-template-columns: minmax(0, 1fr);
  }

  .method-go {
    grid-row: auto;
    grid-column: 1;
    margin-top: 0.5rem;
  }

  .site-footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-columns {
    flex-wrap: wrap;
    gap: 2rem 3rem;
  }

  .family-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* A shorter header, since it now stays on screen */
  .site-nav {
    max-height: 100vh;
    overflow-y: auto;
  }

  .site-nav-inner {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    gap: 0.35rem 1.5rem;
  }

  .lockup img {
    width: 36px;
    height: 36px;
  }

  .lockup-name {
    font-size: 1.05rem;
  }

  .site-links {
    gap: 0.15rem 1.25rem;
  }

  /* The menu opens in place, under its button */
  .has-menu {
    flex-basis: 100%;
  }

  .menu {
    position: static;
    width: auto;
    box-shadow: none;
    margin-top: 0.5rem;
  }

  .hero.cx-article-hero {
    padding: 2.5rem var(--gutter) 2rem;
  }
}

@media (max-width: 560px) {
  .family-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  * {
    transition: none !important;
  }
}
