/* Governova — base styles.
   Colors and type are carried over from the template for now;
   they will be replaced when the visual identity is decided. */

:root {
  --ink: #0a1628;
  --accent: #1e3a8a;
  --text: #1f2a3a;
  --muted: #5b6676;
  --line: #dde2ea;
  --surface: #ffffff;
  --surface-alt: #f4f6f9;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 68ch;
  --container: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --space: clamp(56px, 9vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
}
img { max-width: 100%; height: auto; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); }

.skip-link { position: absolute; inset-inline-start: -9999px; }
.skip-link:focus { inset-inline-start: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.wordmark { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; margin: 0; }
.site-header .wordmark { display: inline-flex; align-items: center; }
.site-header .wordmark img { display: block; height: 32px; width: auto; }
.nav { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] { text-decoration: underline; }
.nav-cta { border: 1px solid var(--ink); padding: 8px 16px; }

/* Buttons */
.button {
  display: inline-block; padding: 12px 22px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  text-decoration: none; font-weight: 600;
}
.button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.button-quiet { background: transparent; color: var(--ink); }
.button-quiet:hover { background: var(--surface-alt); color: var(--ink); border-color: var(--ink); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
.hero {
  padding-top: var(--space); padding-bottom: var(--space);
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero h1 { max-width: 20ch; }
.hero-visual { position: relative; height: 520px; }
#node-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.section { padding-top: calc(var(--space) * 0.75); padding-bottom: calc(var(--space) * 0.75); border-top: 1px solid var(--line); }
.page { padding-top: var(--space); padding-bottom: var(--space); }

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.inline-list { display: flex; flex-wrap: wrap; gap: 12px 32px; list-style: none; padding: 0; margin: 0; font-weight: 600; color: var(--ink); }
.cta-band { background: var(--surface-alt); padding: var(--space) var(--gutter); max-width: none; }
.cta-band > * { max-width: calc(var(--container) - 2 * var(--gutter)); margin-inline: auto; }

.statement { max-width: var(--measure); font-size: 1.15rem; }
.area-list h3 a { color: var(--ink); text-decoration: none; }
.area-list h3 a:hover { color: var(--accent); text-decoration: underline; }

/* Post lists */
.post-list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.post-list li { padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-list a { font-size: 1.25rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.post-list a:hover { color: var(--accent); text-decoration: underline; }
.post-list time { display: block; color: var(--muted); font-size: 0.95rem; margin: 4px 0 8px; }
.post-list p { margin: 0; }

/* Articles */
.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); padding-top: var(--space); padding-bottom: var(--space); }
.prose h2 { margin-top: 2em; }
.prose blockquote { margin: 1.5em 0; padding-inline-start: 20px; border-inline-start: 3px solid var(--accent); color: var(--muted); }
.prose pre { overflow-x: auto; background: var(--surface-alt); padding: 16px; }
.post-header { margin-bottom: 2.5em; }
.post-header time { color: var(--muted); }
.post-header .lede { margin-top: 1em; }
.back { margin-bottom: 2em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; margin-top: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-inner .muted { max-width: 42ch; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a { color: var(--text); }
.footer-bottom { margin-top: 32px; font-size: 0.9rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { height: 320px; }
}

@media (max-width: 760px) {
  .header-inner { padding-top: 14px; padding-bottom: 10px; }
  .site-header .wordmark img { height: 28px; }
  .columns { grid-template-columns: 1fr; gap: 24px; }
  .nav { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
