/*
 * Nordlith Editoral CSS — shared across all pages
 * Matches the homepage: light theme, Poppins font, signal-red/blue accents, clean white cards
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --navy: #09111b;
  --signal-red: #c84a3a;
  --control-blue: #3a6ea5;
  --ink: #111827;
  --body: #374151;
  --muted: #6b7280;
  --line: rgba(23, 23, 23, 0.08);
  --white: #ffffff;
  --surface: #f8f8f8;
  --max: 1200px;
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--white);
  color: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ─── Container ─── */
.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

@media (max-width: 860px) {
  .container { width: min(var(--max), calc(100% - 28px)); }
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--ink);
  color: #fff;
}

.brand-word {
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

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

.nav-actions { flex-shrink: 0; }

/* ─── Buttons ─── */
.button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  cursor: pointer;
}

.button:hover, .btn:hover { transform: translateY(-1px); }

.button.primary, .btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.button.primary:hover, .btn.primary:hover {
  background: #1a2332;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

/* ─── Typography ─── */
.eyebrow {
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--signal-red);
  margin-bottom: 10px;
}

.eyebrow.blue-accent {
  color: var(--control-blue);
}

.display, h1 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  line-height: 0.92;
  color: var(--ink);
}

h2 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
}

h3 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
}

/* ─── Sections ─── */
.hero {
  padding: 80px 0 48px;
}

.section {
  padding: 48px 0;
}

/* ─── Hero Grid ─── */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr);
  gap: 56px;
  align-items: start;
}

.hero-visual {
  background: var(--surface);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(23,23,23,0.06);
}

.hero-visual img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Light Cards ─── */
.light-card {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.light-card h3 {
  font-size: 21px;
}

/* ─── Minimal Grid ─── */
.minimal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ─── Thin line divider ─── */
.thin-line {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

/* ─── Section head ─── */
.section-head {
  margin-bottom: 32px;
}

.section-title {
  font-size: 30px;
  margin: 0 0 14px;
}

/* ─── Editorial split ─── */
.editorial-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.compare-table {
  margin-top: 0;
}

.compare-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: background .2s ease, box-shadow .2s ease;
}

.compare-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.compare-row:hover {
  background: var(--surface);
}

.compare-label {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  align-self: start;
  padding-top: 2px;
}

.compare-row .compare-label.red-accent { color: var(--signal-red); }
.compare-row .compare-label.blue-accent { color: var(--control-blue); }
.compare-row .compare-label.muted { color: var(--muted); }

.compare-row p { margin: 0; color: var(--body); line-height: 1.65; font-size: 15px; }

/* Left border accent for compare rows */
.compare-row.row-fit { border-left-color: var(--signal-red); }
.compare-row.row-not-point { border-left-color: var(--muted); }
.compare-row.row-changes { border-left-color: var(--control-blue); }

/* ─── CTA band ─── */
.cta-band {
  padding: 48px 0;
}

.cta-band-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ─── Diagrams ─── */
.diagram {
  width: 100%;
  height: auto;
}

/* ─── Footer ─── */
.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

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

.brand-desc {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

/* ─── Page hero (non-home pages) ─── */
.page-hero, .page-hero-open {
  padding: 60px 0 32px;
}

.page-hero .display {
  font-size: clamp(42px, 6vw, 64px);
  max-width: 13ch;
}

/* ─── Feature visual section ─── */
.feature-visual-section {
  padding: 24px 0;
}

.feature-visual-frame {
  background: var(--surface);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(23,23,23,0.06);
}

.feature-visual-frame img {
  border-radius: 12px;
  width: 100%;
  height: auto;
}

.feature-visual-frame figcaption {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* ─── Signature sections (dark diagrams) ─── */
.signature-section {
  padding: 48px 0;
}

.signature-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ─── Method flow ─── */
.method-flow {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

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

.method-step h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* ─── Card grids ─── */
.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.card p { margin: 0; }

/* ─── Matrix / lux grid ─── */
.minimal-matrix, .lux-grid-two {
  margin-top: 16px;
}

.matrix-row {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.matrix-row h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lux-grid-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.lux-item {
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.lux-item h3 {
  margin: 10px 0;
  font-size: 20px;
}

/* ─── Form ─── */
.form-shell-lux {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.form-card-main {
  border-radius: var(--radius);
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.form-card-main h2 {
  font-size: 30px;
  margin-bottom: 14px;
}

.trust-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 8px;
  margin-top: 14px;
}

.form-intro-meta { margin: 0; }

.field + .field { margin-top: 14px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field input, .field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 13px 14px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus, .field textarea:focus {
  border-color: var(--control-blue);
  box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.08);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.notice { font-size: 13px; color: var(--muted); margin-top: 14px; }
.field-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.support-stack {
  display: grid;
  gap: 20px;
}

.support-row h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.support-row p {
  margin: 0;
  font-size: 14px;
  color: var(--body);
  line-height: 1.6;
}

/* ─── Research grid ─── */
.research-grid {
  display: grid;
  gap: 18px;
}

.research-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.research-card h3 {
  margin: 6px 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.research-card h3 a {
  color: var(--ink);
  font-weight: 600;
}

.research-card h3 a:hover {
  color: var(--control-blue);
}

.research-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Statement band ─── */
.statement-band {
  padding-bottom: 8px;
}

.statement-band h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

/* ─── Red / Blue accents ─── */
.red-accent { color: var(--signal-red); }
.blue-accent { color: var(--control-blue); }

/* ─── Responsive ─── */
@media (max-width: 980px) {
  .hero-grid,
  .editorial-split,
  .signature-shell,
  .form-shell-lux {
    grid-template-columns: 1fr;
  }

  .card-grid.two,
  .card-grid.three,
  .lux-grid-two {
    grid-template-columns: 1fr;
  }

  .method-flow {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .cta-band-shell {
    grid-template-columns: 1fr;
  }
}

/* ─── Blog post layout (research posts) ─── */
.page-hero-open {
  padding: 96px 0 40px;
}

.page-hero-open .eyebrow {
  margin-bottom: 10px;
}

.page-hero-open .display {
  margin-bottom: 12px;
}

/* Blog post hero: single column, tidy summary placement */
.page-hero-open .editorial-split {
  grid-template-columns: 1fr;
  gap: 20px;
}

.editorial-copy {
  font-size: 16px;
  color: var(--body);
  line-height: 1.7;
}

.post-meta-row {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  flex-wrap: wrap;
}

.post-meta-row span {
  padding: 4px 0;
}

.post-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 56px;
  align-items: start;
}

.post-main {
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
}

.post-main h2 {
  font-size: 24px;
  margin: 32px 0 14px;
  color: var(--ink);
  font-weight: 600;
}

.post-main h3 {
  font-size: 20px;
  margin: 28px 0 10px;
  color: var(--ink);
  font-weight: 600;
}

.post-main p {
  margin: 0 0 16px;
  line-height: 1.75;
}

.post-main ul, .post-main ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.post-main li {
  margin-bottom: 6px;
  line-height: 1.65;
}

.callout {
  padding: 18px 22px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 20px;
}

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

.article-visual-frame {
  background: var(--surface);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(23,23,23,0.06);
  margin: 24px 0;
}

.article-visual-frame img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
}

.article-visual-frame figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.post-aside {
  position: sticky;
  top: 100px;
  align-self: start;
  padding: 32px 28px;
  /* override old dark theme */
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius);
  color: var(--body) !important;
}

.post-aside *, .post-aside h3, .post-aside .support-row h3,
.post-aside p, .post-aside .support-row p,
.post-aside .eyebrow, .post-aside .support-row {
  color: var(--body) !important;
}

.post-aside h3, .post-aside .support-row h3 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--ink) !important;
  font-weight: 600;
  line-height: 1.2;
}

.post-aside p, .post-aside .support-row p {
  font-size: 14px;
  color: var(--body) !important;
  line-height: 1.6;
  margin: 0 0 12px;
}

.post-aside .eyebrow {
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--signal-red) !important;
  margin-bottom: 10px;
}

.post-aside strong {
  color: var(--ink) !important;
}

.post-aside-content {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.page-quiet {
  padding: 32px 0 64px;
}

/* ─── Responsive ─── */
@media (max-width: 980px) {
  .hero-grid,
  .editorial-split,
  .signature-shell,
  .form-shell-lux,
  .post-shell {
    grid-template-columns: 1fr;
  }

  .post-aside {
    position: static;
    margin-top: 40px;
  }

  .card-grid.two,
  .card-grid.three,
  .lux-grid-two {
    grid-template-columns: 1fr;
  }

  .method-flow {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .cta-band-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-row { flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; gap: 10px 14px; }
  .display { font-size: 42px !important; }
  .page-hero .display { font-size: 36px !important; }
  .page-hero-open .display { font-size: 32px !important; }
  .section { padding: 32px 0; }
  .hero { padding-top: 60px; }
  .actions { flex-direction: column; }
  .button, .btn { width: 100%; justify-content: center; }
  .method-flow { grid-template-columns: 1fr; }
  .matrix-row { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 1fr; }
  .post-shell { grid-template-columns: 1fr; gap: 32px; }
}
