/* InkDashboard v3. Editorial, paper-like: a serif display face (Fraunces) and a quiet
   newspaper grotesk (Schibsted Grotesk) for UI text. Monochrome + calm blue accent.
   The @font-face rules live in /fonts/fonts.css (self-hosted woff2, linked from
   index.html and inlined by the PNG renderer); no Google Fonts. */
button:disabled { opacity: .45; cursor: not-allowed; }

:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --bg-sink: #efefec;
  --ink: #16171a;
  --ink-2: #5a5d64;
  --ink-3: #9498a0;
  --line: #e6e6e2;
  --line-2: #d8d8d3;
  --accent: #2f5ecc;       /* calm blue */
  --accent-soft: #eaf0fc;
  --accent-ink: #23499c;
  --paper: #f7f5ef;        /* e-ink paper for device screens */
  --paper-ink: #1a1a18;
  --radius: 10px;
  --radius-lg: 18px;
  --maxw: 1120px;
  --shadow-sm: 0 1px 2px rgba(20,20,25,0.04);
  --shadow: 0 4px 24px -8px rgba(20,20,25,0.12);
  --shadow-lg: 0 30px 70px -30px rgba(20,25,40,0.30);

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-ui: 'Schibsted Grotesk', -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

.display, h1, h2, h3, h4, h5, h6, .t-h1, .t-h2, .t-h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  font-optical-sizing: auto;
}
/* Kept for the other pages: no longer monospace, just a quiet label face with aligned digits. */
.mono {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.005em;
}

/* ---- Type scale (17 base, ~1.25 ratio) ---- */
.t-hero { font-family: var(--font-display); font-weight: 500; font-size: clamp(44px, 6.4vw, 84px); line-height: 0.96; letter-spacing: -0.025em; text-wrap: balance; }
.t-h1 { font-size: clamp(34px, 4.4vw, 56px); letter-spacing: -0.02em; line-height: 1.0; text-wrap: balance; }
.t-h2 { font-size: clamp(27px, 3vw, 40px); letter-spacing: -0.018em; line-height: 1.06; text-wrap: balance; }
.t-h3 { font-size: 23px; letter-spacing: -0.01em; line-height: 1.18; }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--ink-2); font-weight: 400; }
.body-2 { color: var(--ink-2); }
.small { font-size: 14px; }

/* Section kicker: an italic serif line, sentence case. Reads like a magazine section head. */
.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}
.accent { color: var(--accent); }

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; width: 100%; }
.wrap-tight { max-width: 760px; margin: 0 auto; padding: 0 28px; width: 100%; }
.section { padding: 96px 0; }
.section-sm { padding: 60px 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background-color 0.18s, border-color 0.18s;
  line-height: 1; white-space: nowrap;
}
.btn:focus-visible, .nav-link:focus-visible, .footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(47,94,204,0.5); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-soft); }
.btn-lg { font-size: 16px; padding: 15px 26px; }
.btn-sm { font-size: 13px; padding: 8px 14px; }

/* ---- Pills / tags ---- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding: 5px 11px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-2);
  border: 1px solid var(--line);
}
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot-live { background: #23a05b; box-shadow: 0 0 0 0 rgba(35,160,91,0.5); animation: livePulse 2.4s infinite; }
@keyframes livePulse { 0%{box-shadow:0 0 0 0 rgba(35,160,91,0.45);} 70%{box-shadow:0 0 0 7px rgba(35,160,91,0);} 100%{box-shadow:0 0 0 0 rgba(35,160,91,0);} }

/* ---- Cards ---- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card-soft { background: var(--bg-soft); border-color: transparent; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: var(--maxw); margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 500; font-size: 21px; letter-spacing: -0.01em; }
.brand-mark {
  width: 22px; height: 28px; border-radius: 4px;
  background: var(--ink); position: relative; flex-shrink: 0;
  display: grid; place-items: center;
}
.brand-mark::after { content: ''; width: 12px; height: 16px; border-radius: 1px; background: var(--paper);
  background-image: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.12) 2px 3px); }
.nav-links { display: flex; gap: 6px; }
.nav-link { font-size: 14.5px; font-weight: 500; color: var(--ink-2); padding: 7px 12px; border-radius: 8px; white-space: nowrap; transition: color 0.14s, background-color 0.14s; }
.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link.active { color: var(--ink); }
.nav-spacer { flex: 1; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg-soft); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h5 { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 16px; letter-spacing: 0; color: var(--ink-3); margin: 0 0 12px; }
.footer a { display: block; color: var(--ink-2); font-size: 14.5px; padding: 5px 0; }
.footer a:hover { color: var(--ink); }
.footer .brand { display: inline-flex; }

/* ---- Utility ---- */
.stack-2 > * + * { margin-top: 8px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-6 > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { flex-wrap: wrap; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.grid { display: grid; }

/* ---- Scroll reveal (opt-in: the landing adds html.js-reveal while mounted) ---- */
.js-reveal [data-reveal] {
  opacity: 0; transform: translate3d(0, 18px, 0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; will-change: auto; }
.js-reveal [data-reveal="stagger"] { opacity: 1; transform: none; }
.js-reveal [data-reveal="stagger"] > * {
  opacity: 0; transform: translate3d(0, 18px, 0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js-reveal [data-reveal="stagger"].is-in > * { opacity: 1; transform: none; }
.js-reveal [data-reveal="stagger"].is-in > :nth-child(2) { transition-delay: 65ms; }
.js-reveal [data-reveal="stagger"].is-in > :nth-child(3) { transition-delay: 130ms; }
.js-reveal [data-reveal="stagger"].is-in > :nth-child(4) { transition-delay: 195ms; }
.js-reveal [data-reveal="stagger"].is-in > :nth-child(5) { transition-delay: 260ms; }
.js-reveal [data-reveal="stagger"].is-in > :nth-child(6) { transition-delay: 325ms; }
.js-reveal [data-reveal="stagger"].is-in > :nth-child(7) { transition-delay: 390ms; }
.js-reveal [data-reveal="stagger"].is-in > :nth-child(8) { transition-delay: 455ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal [data-reveal], .js-reveal [data-reveal="stagger"] > * { opacity: 1; transform: none; transition: none; }
  .dot-live { animation: none; }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .section { padding: 64px 0; }
  .nav-in { padding: 12px 20px; gap: 16px; }
  .wrap, .wrap-tight { padding: 0 20px; }
}
@media (max-width: 480px) {
  .nav-in { padding: 10px 16px; gap: 10px; }
  .brand { font-size: 19px; gap: 8px; }
  .nav-link { padding: 7px 8px; }
  .nav .btn-sm { padding: 8px 12px; }
}
