/* National Update Today — component & layout styles
   Source: Design System v0.1, Sections 1.2, 1.4–1.7
   This is a DESIGN file. Do not edit for a copy update — see CONTENT_EDITING.md. */

@import url("./tokens.css");

/* Self-hosting note: font files could not be downloaded in the build
   environment (no network egress). Loading from Google Fonts CDN as an
   interim measure — swap to public/fonts/ self-hosted files per the design
   system's self-hosting instruction before this goes further than preview. */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Archivo:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: var(--tracking-display); font-weight: 700; }
/* Rule: Fraunces never below 28px. h4+ and small headings use Archivo instead. */
h4, h5, h6 { margin: 0; font-family: var(--font-body); font-weight: 600; }

p { margin: 0; }

a {
  color: var(--color-violet-on-paper);
  text-decoration: none;
}
a:hover { color: var(--color-amber); }

/* Visible keyboard focus states — required floor, applied globally */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-violet-on-paper);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-navy a:focus-visible,
.on-navy button:focus-visible {
  outline-color: var(--color-amber);
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--font-size-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-violet-on-paper);
  margin-bottom: calc(var(--space-unit) * 1.5);
}
.on-navy .eyebrow { color: var(--color-amber); }

.container {
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--grid-gutter);
}

.section {
  padding: var(--section-padding-desktop) 0;
}
@media (max-width: 720px) {
  .section { padding: var(--section-padding-mobile) 0; }
}

.on-navy {
  background: var(--color-navy);
  color: var(--color-white);
}
.on-navy .subhead { color: var(--color-subhead-on-navy); }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-amber);
  color: var(--color-ink);
  padding: 12px 20px;
  z-index: 1000;
  font-family: var(--font-body);
  font-weight: 600;
}
.skip-link:focus { left: var(--grid-gutter); top: var(--grid-gutter); }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy);
  border-bottom: 1px solid var(--color-navy-rule);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  flex-wrap: wrap;
  gap: var(--space-unit);
}
.site-nav .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-white);
  white-space: nowrap;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: calc(var(--space-unit) * 3);
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--color-subhead-on-navy);
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--color-amber); }
.site-nav .subscribe-link {
  color: var(--color-amber);
  font-weight: 600;
}

/* ---------- Node thread (signature element, Section 1.4) ---------- */
.node-thread-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  pointer-events: none;
  display: none;
}
@media (min-width: 900px) {
  .node-thread-rail { display: block; }
}
.node-thread-rail svg { position: sticky; top: 0; height: 100vh; width: 60px; }
.node-thread-rail .thread-line {
  fill: none;
  stroke: var(--color-violet-on-paper);
  stroke-width: var(--node-line-width);
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  transition: none;
}
.node-thread-rail.drawn .thread-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .node-thread-rail .thread-line {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
}
.node-thread-rail circle {
  fill: var(--color-violet-on-paper);
}

/* Mini node connectors inside framework blocks */
.node-bullets { list-style: none; margin: calc(var(--space-unit) * 2) 0 0; padding: 0; position: relative; }
.node-bullets li {
  position: relative;
  padding-left: 28px;
  padding-bottom: calc(var(--space-unit) * 2);
  font-size: var(--font-size-base);
}
.node-bullets li:last-child { padding-bottom: 0; }
.node-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: var(--node-size);
  height: var(--node-size);
  border-radius: 50%;
  background: var(--color-ink);
}
.node-bullets li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 2.5px;
  top: 14px;
  bottom: -2px;
  width: 1px;
  background: var(--color-ink);
  opacity: 0.35;
}

/* ---------- Hero (Section 1.5) ---------- */
.hero { position: relative; }
.hero .hero-inner { max-width: 720px; }
.hero h1 {
  color: var(--color-white);
  font-size: var(--h1-mobile);
  line-height: 1.1;
}
@media (min-width: 720px) {
  .hero h1 { font-size: var(--h1-desktop); }
}
.hero .subhead {
  font-size: 19px;
  margin-top: calc(var(--space-unit) * 3);
  max-width: 56ch;
}
.hero .cta-row {
  display: flex;
  gap: calc(var(--space-unit) * 2);
  margin-top: calc(var(--space-unit) * 5);
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-amber);
  color: var(--color-ink);
}
.btn-primary:hover { background: #ffd23d; color: var(--color-ink); }
.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-secondary:hover { background: var(--color-white); color: var(--color-navy); }

/* ---------- Pillar strip (Section 1.5) ---------- */
.pillar-strip { padding-top: 0; }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--space-unit) * 5);
}
@media (max-width: 960px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pillar-grid { grid-template-columns: 1fr; }
}
.pillar h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: calc(var(--space-unit) * 1.5);
}
.pillar p { color: var(--color-body-muted); font-size: 16px; }

/* ---------- Framework blocks (Section 1.6) ---------- */
.framework-block {
  position: relative;
  padding: calc(var(--space-unit) * 6) 0;
  border-top: 1px solid #E2E5EC;
}
.framework-block:first-of-type { border-top: none; }
.framework-block .fb-inner { max-width: 640px; position: relative; z-index: 1; }
.framework-block h3 {
  font-size: var(--h3);
  margin-bottom: calc(var(--space-unit) * 2);
}
.framework-block .description {
  color: var(--color-body-muted);
  font-size: var(--font-size-base);
  max-width: 60ch;
}
.framework-block .fb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-top: calc(var(--space-unit) * 3);
}
.framework-block .fb-link .glyph {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-violet-on-paper);
  display: inline-block;
}
.framework-block .fb-link:hover .glyph { background: var(--color-amber); }
.framework-block .fingerprint {
  position: absolute;
  right: 0;
  top: 24px;
  width: 140px;
  height: 140px;
  opacity: 0.08;
  pointer-events: none;
}
/* Below this width the fb-inner text runs full-bleed and would sit under the
   ornament — hide it rather than let it overlap body copy. Purely decorative,
   already aria-hidden, so hiding it costs nothing functionally. */
@media (max-width: 640px) {
  .framework-block .fingerprint { display: none; }
}

/* ---------- Track record (Section 1.5, ledger) ---------- */
.track-record .footnote {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-subhead-on-navy);
  margin-top: calc(var(--space-unit) * 3);
  text-transform: uppercase;
}
.ledger-wrap { overflow-x: auto; margin-top: calc(var(--space-unit) * 5); }
table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 14px;
  min-width: 720px;
}
table.ledger th, table.ledger td {
  text-align: left;
  padding: calc(var(--space-unit) * 2);
  border-bottom: 1px solid var(--color-navy-rule);
}
table.ledger th {
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  font-weight: 500;
  color: var(--color-min-brightness-navy);
  font-size: 12px;
}
.status-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.status-pending { background: var(--color-amber); color: var(--color-ink); }
.status-confirmed { background: var(--color-teal); color: var(--color-ink); }
.status-divergent { background: var(--color-amber); color: var(--color-ink); }

/* ---------- Feed sections ---------- */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--space-unit) * 4);
  margin-top: calc(var(--space-unit) * 5);
}
@media (max-width: 900px) { .feed-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feed-grid { grid-template-columns: 1fr; } }
.feed-card { display: flex; flex-direction: column; gap: calc(var(--space-unit) * 1.5); }
.feed-card .thumb {
  background: #E2E5EC;
  border-radius: var(--radius-media);
  aspect-ratio: 16/9;
  width: 100%;
}
.feed-card h4 { font-size: 17px; }
.feed-card .date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-body-muted);
}
.feed-section .feed-cta { display: inline-block; margin-top: calc(var(--space-unit) * 4); font-weight: 600; }

/* ---------- About ---------- */
.about-section p { max-width: 68ch; color: var(--color-body-muted); font-size: var(--font-size-base); }
.about-section p + p { margin-top: calc(var(--space-unit) * 2.5); }

/* ---------- Footer ---------- */
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: calc(var(--space-unit) * 6);
}
@media (max-width: 720px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h3 { font-size: 24px; color: var(--color-white); }
.site-footer .footer-copy { color: var(--color-subhead-on-navy); margin-top: calc(var(--space-unit) * 2); max-width: 48ch; }
.newsletter-form {
  display: flex;
  gap: var(--space-unit);
  margin-top: calc(var(--space-unit) * 3);
  flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid var(--color-navy-rule);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 15px;
}
.sitemap-cols { display: flex; gap: calc(var(--space-unit) * 6); flex-wrap: wrap; }
.sitemap-cols ul { list-style: none; margin: 0; padding: 0; }
.sitemap-cols a { color: var(--color-subhead-on-navy); display: block; padding: 4px 0; }
.sitemap-cols a:hover { color: var(--color-amber); }
