/* ============================================================
   Intent Record AB: site.css
   Mirrors the IRP Compliance design system v2:
   off-black neutrals · signal-blue accent · paper-grey surfaces ·
   Inter Tight (body) + Source Serif 4 (display) + JetBrains Mono (labels)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&display=swap');

:root {
  --primary-color: #191919;
  --primary-light: #282828;
  --accent-color: #1F5FE0;
  --accent-dark: #1846AE;
  --accent-on-dark: #6699FF;   /* lighter blue for legibility on dark backgrounds */

  --text-primary: #191919;
  --text-secondary: #646464;
  --text-tertiary: #A0A0A0;
  --text-on-dark: #FDFDFD;

  --background: #FDFDFD;
  --surface: #FFFFFF;
  --surface-paper: #F2F2F2;
  --rule: #E6E6E6;
  --rule-soft: #F2F2F2;

  --font-family: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --tracking-tight: -0.022em;
  --tracking-display: -0.04em;
  --tracking-mono: 0.08em;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;

  --shadow-md: 0 4px 12px -2px rgba(25, 25, 25, 0.06);
  --shadow-lg: 0 18px 40px -12px rgba(25, 25, 25, 0.10);

  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --transition-fast: 200ms var(--ease-out);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--background);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  font-optical-sizing: auto;
}
h4, h5 { font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; }

/* ── Layout ── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: 820px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

.section { padding: 96px 0; border-top: 1px solid var(--rule); }
.section--alt { background: var(--surface-paper); }
@media (max-width: 720px) { .section { padding: 64px 0; } }

/* ── Mono label / § section tag ── */
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--accent-color);
}
.section-tag::before { content: "§"; opacity: .55; font-weight: 400; }

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500; line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin: 16px 0;
}
.section-sub {
  font-size: 1.0625rem; color: var(--text-secondary);
  max-width: 60ch; line-height: 1.65;
  margin-bottom: 48px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 44px; padding: 0 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent; background: transparent;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase; color: inherit;
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }
.btn-primary:hover { background: #fff; border-color: var(--accent-color); color: var(--accent-color); }
.btn-ghost { color: var(--accent-color); border-color: var(--accent-color); }
.btn-ghost:hover { background: var(--accent-color); color: #fff; }
.btn-on-dark { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }
.btn-on-dark:hover { background: #fff; color: var(--accent-color); border-color: #fff; }
.btn-ghost-light { color: rgba(255,255,255,.95); border-color: rgba(255,255,255,.5); }
.btn-ghost-light:hover { border-color: var(--text-on-dark); color: var(--text-on-dark); }

/* ── Top nav ── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(253,253,253,.86);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 1px;
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  letter-spacing: -0.03em; color: var(--text-primary); }
.brand .dot { color: var(--accent-color); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: var(--tracking-mono); text-transform: uppercase;
  color: var(--text-secondary); transition: color var(--transition-fast);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a.nav-cta {
  color: var(--accent-color); border: 1px solid var(--accent-color);
  height: 36px; padding: 0 16px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center;
}
.nav-links a.nav-cta:hover { background: var(--accent-color); color: #fff; }

/* ── Mobile nav toggle ── */
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  border: 1px solid var(--rule); border-radius: var(--radius-md);
  background: transparent; padding: 0; cursor: pointer; flex-shrink: 0;
}
.nav-toggle-bar {
  display: block; width: 18px; height: 2px;
  background: var(--text-primary); border-radius: 1px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

@media (max-width: 640px) {
  .nav-inner { position: relative; }
  .nav-toggle { display: inline-flex; order: 2; }
  .nav-links {
    order: 3;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--background);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height var(--transition-fast);
  }
  .nav-links a.nav-desktop-only { display: block; }
  .nav-links a {
    padding: 14px 20px;
    border-top: 1px solid var(--rule-soft);
  }
  .nav-links a.nav-cta {
    margin: 12px 20px 16px;
    justify-content: center;
    border-top: none;
  }
  .nav.nav-open .nav-links { max-height: 320px; visibility: visible; }
  .nav.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── Hero (dark) ── */
.hero { background: var(--primary-color); color: var(--text-on-dark); padding: 128px 0 104px; }
.hero .section-tag { color: var(--accent-on-dark); }
.hero .section-tag::before { color: rgba(255,255,255,.45); }
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 500; line-height: 1.0;
  letter-spacing: var(--tracking-display);
  max-width: 16ch; margin: 30px 0 26px; color: var(--text-on-dark);
}
.hero-headline em { font-style: italic; color: var(--accent-on-dark); font-weight: 500; }
.hero-sub { font-size: 1.15rem; color: rgba(255,255,255,.9); max-width: 58ch; line-height: 1.6; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Page header (light, for about/contact) ── */
.page-head { padding: 120px 0 24px; }
.page-head .section-headline { font-size: clamp(2.4rem, 5vw, 3.75rem); margin-top: 18px; }
.page-head .section-sub { font-size: 1.15rem; margin-bottom: 0; }

/* ── Card grid ── */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 30px 28px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.card:hover { border-color: #d3d3d3; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-mono); text-transform: uppercase;
  color: var(--accent-color);
}
.card h3 { font-size: 1.4rem; font-weight: 600; margin: 12px 0 10px; letter-spacing: -0.02em; }
.card p { color: var(--text-secondary); line-height: 1.6; font-size: 1rem; }

/* ── Prose (about page long-form) ── */
.prose { max-width: 68ch; }
.prose p { color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.75; margin-bottom: 22px; }
.prose p strong { color: var(--text-primary); font-weight: 600; }
.prose h3 { font-size: 1.7rem; margin: 40px 0 14px; letter-spacing: -0.02em; }
.prose a.inline-link { color: var(--accent-color); border-bottom: 1px solid rgba(31,95,224,.35); transition: border-color var(--transition-fast); }
.prose a.inline-link:hover { border-color: var(--accent-color); }

/* ── Feature list (key differentiator) ── */
.feature-list { list-style: none; display: grid; gap: 18px; margin-top: 8px; }
.feature-list li { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.feature-list .fl-mark {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--accent-color); padding-top: 3px; letter-spacing: var(--tracking-mono);
}
.feature-list .fl-body strong { display: block; color: var(--text-primary); font-weight: 600; margin-bottom: 2px; }
.feature-list .fl-body span { color: var(--text-secondary); line-height: 1.6; }

/* ── Contact / detail rows ── */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }
.detail {
  padding: 28px 30px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
  background: var(--surface);
}
.detail:nth-child(1), .detail:nth-child(2) { border-top: 0; }
.detail:nth-child(odd) { border-left: 0; }
@media (max-width: 720px) {
  .detail { border-left: 0; }
  .detail:nth-child(2) { border-top: 1px solid var(--rule); }
}
.detail .detail-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--accent-color);
  margin-bottom: 10px;
}
.detail .detail-value { font-size: 1.0625rem; color: var(--text-primary); line-height: 1.55; }
.detail .detail-value a { color: var(--text-primary); border-bottom: 1px solid rgba(31,95,224,.35); }
.detail .detail-value a:hover { color: var(--accent-color); border-color: var(--accent-color); }
.detail .detail-value span.muted { color: var(--text-tertiary); }

/* ── CTA band (dark) ── */
.cta { background: var(--primary-color); color: var(--text-on-dark); padding: 88px 0; text-align: center; }
.cta .section-tag { color: var(--accent-on-dark); justify-content: center; }
.cta h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4vw, 3rem); color: var(--text-on-dark); margin: 16px 0 14px; letter-spacing: var(--tracking-tight); }
.cta p { color: rgba(255,255,255,.9); max-width: 52ch; margin: 0 auto 32px; line-height: 1.6; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ── */
.footer { background: var(--primary-color); color: rgba(255,255,255,.82); border-top: 1px solid rgba(255,255,255,.08); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr; gap: 32px; } }
.footer .brand { color: #fff; font-size: 16px; }
.footer .brand .dot { color: var(--accent-color); }
.footer-tag { margin-top: 14px; max-width: 42ch; font-size: .95rem; line-height: 1.6; color: rgba(255,255,255,.78); }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-mono); text-transform: uppercase; color: rgba(255,255,255,.72); margin-bottom: 16px; }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,.88); font-size: .95rem; line-height: 1.7; }
.footer-col a { transition: color var(--transition-fast); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: rgba(255,255,255,.68); text-transform: uppercase; }
.cookie-open {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: rgba(255,255,255,.68); text-transform: uppercase;
  transition: color var(--transition-fast);
}
.cookie-open:hover { color: #fff; }

/* ── Cookie consent banner ── */
.ck-banner[hidden] { display: none !important; }
.ck-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 200;
  background: var(--primary-color); color: var(--text-on-dark);
  padding: 16px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: 13px; line-height: 1.5;
  max-width: 720px; margin: 0 auto;
}
.ck-banner__text { flex: 1; color: rgba(255,255,255,.9); }
.ck-banner__link {
  background: none; border: none; padding: 0; color: var(--text-on-dark);
  font: inherit; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; margin-left: 6px;
}
.ck-banner__accept {
  appearance: none; background: var(--text-on-dark); color: var(--primary-color);
  border: 0; border-radius: var(--radius-md); padding: 9px 16px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-mono); text-transform: uppercase;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: opacity var(--transition-fast);
}
.ck-banner__accept:hover { opacity: .85; }

/* ── Cookie notice modal ── */
.ck-modal[hidden] { display: none; }
.ck-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.ck-modal__overlay { position: absolute; inset: 0; background: rgba(25,25,25,.55); cursor: pointer; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.ck-modal__panel {
  position: relative; z-index: 1; background: var(--background);
  border-radius: var(--radius-lg); width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 80px); overflow-y: auto;
  box-shadow: var(--shadow-lg); border: 1px solid var(--rule);
}
.ck-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; background: var(--background); z-index: 1;
}
.ck-modal__title { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: var(--tracking-tight); }
.ck-modal__close {
  appearance: none; background: none; border: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-mono); text-transform: uppercase;
  color: var(--text-secondary); padding: 6px 10px; border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.ck-modal__close:hover { background: var(--rule-soft); color: var(--text-primary); }
.ck-modal__body { padding: 28px; font-size: 14.5px; line-height: 1.7; color: var(--text-secondary); }
.ck-modal__body p { margin-bottom: 12px; }
.ck-modal__body p:last-child { margin-bottom: 0; }
.ck-modal__body h3 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-mono); text-transform: uppercase;
  color: var(--text-primary); margin: 24px 0 8px;
}
.ck-modal__body h3:first-of-type { margin-top: 0; }
.ck-modal__body ul { margin: 8px 0 8px 20px; }
.ck-modal__body li { margin-bottom: 6px; }
.ck-modal__body strong { color: var(--text-primary); }
.ck-modal__body a { color: var(--accent-color); text-decoration: underline; text-underline-offset: 3px; }

/* ── News ──────────────────────────────────────────────────────────────────
   Single page, one entry per item. Generated by tools/build_news.py. */
.hero--compact { padding-bottom: 24px; }

.news-list { max-width: 720px; margin: 0 auto; padding-top: 24px; padding-bottom: 96px; }

.news-item { padding: 34px 0; border-bottom: 1px solid var(--rule); }
.news-item:first-child { padding-top: 8px; }
.news-item:last-child { border-bottom: none; }

.news-item time {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.news-item h2 {
  font-size: 23px;
  line-height: 1.3;
  margin: 8px 0 14px;
}
/* Specificity: `.news-item a` below would otherwise colour the title like a
   link. The title is a heading that happens to be anchor-linkable. */
.news-item h2 .news-anchor { color: var(--text-primary); text-decoration: none; }
.news-item h2 .news-anchor:hover { color: var(--accent-color); }

.news-item p { margin: 0 0 14px; color: var(--text-secondary); line-height: 1.7; }
.news-item p:last-child { margin-bottom: 0; }
.news-item strong { color: var(--text-primary); }
.news-item ul { margin: 0 0 14px; padding-left: 20px; color: var(--text-secondary); line-height: 1.7; }
.news-item li { margin-bottom: 6px; }

.news-item a { color: var(--accent-color); }
.news-link { margin-top: 16px; font-size: 15px; }
.news-link a { text-decoration: none; font-weight: 600; }
.news-link a:hover { text-decoration: underline; }

@media (max-width: 620px) {
  .news-list { padding-top: 16px; padding-bottom: 64px; }
  .news-item h2 { font-size: 20px; }
}
