/* ============================================================
   LOY O'KELLEY — SHARED STYLES FOR INSIGHTS + ARTICLES
   Mirrors the design tokens used in index.html.
   ============================================================ */

:root {
  --paper: #0B1020;          /* page background (deep navy) */
  --paper-2: #121A2C;        /* card background */
  --panel: #0E1526;          /* contrast panel */
  --ink: #F4F6FB;            /* primary text */
  --ink-2: #C7D0DE;          /* secondary text */
  --muted: #8E9AAD;          /* muted text */
  --rule: #243049;           /* hairlines / grid gaps */
  --olive: #C9A227;          /* gold accent (legacy var name) */
  --olive-deep: #E2BC4B;     /* bright gold */
  --accent: #B45309;         /* warning amber — sparing */
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1280px;
  --measure: 70ch;
  --gutter: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1200px 600px at 100% 0%, rgba(201,162,39,0.05), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(59,98,166,0.07), transparent 60%);
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 2px;
}
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--panel); color: var(--ink); }

.vh {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--olive); color: #0B1020;
  padding: 8px 12px; font-family: var(--mono); font-size: 13px; z-index: 100;
}
.skip:focus { left: 8px; }

.wrap {
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}

/* ---------- Nav (mirrors index.html) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: rgba(11, 16, 32, 0.82);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter); max-width: var(--max); margin: 0 auto;
}
.brand {
  font-family: var(--serif); font-style: italic; font-size: 22px;
  letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 10px;
}
.brand .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--olive); display: inline-block; transform: translateY(-2px);
}
.nav-links {
  display: flex; gap: 28px; font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.nav-links a { position: relative; padding: 4px 0; color: var(--ink-2); transition: color .2s ease; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--olive); transition: width .25s ease;
}
.nav-links a[aria-current="page"] { color: var(--olive); }
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a:hover { color: var(--olive); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 9px 14px;
  border: 1px solid var(--ink); background: var(--panel); color: var(--ink);
  transition: background .2s ease, color .2s ease;
}
.nav-cta:hover { background: var(--olive-deep); border-color: var(--olive-deep); }
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
    background: transparent; border: 1px solid var(--ink); color: var(--ink);
    padding: 8px 12px; cursor: pointer;
  }
  .mobile-menu {
    display: none; border-bottom: 1px solid var(--rule);
    background: var(--paper); padding: 16px var(--gutter) 24px;
  }
  .mobile-menu.open { display: block; }
  .mobile-menu a {
    display: block; padding: 12px 0; border-bottom: 1px solid var(--rule);
    font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  }
  .mobile-menu a:last-child { border-bottom: 0; }
}

/* ---------- Shared primitives ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--olive); margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--olive); display: inline-block; }

/* ---------- Insights index ---------- */
.page-head {
  padding: clamp(56px, 8vw, 110px) 0 clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--rule);
}
.page-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7vw, 88px); line-height: 0.98;
  letter-spacing: -0.02em; margin: 0 0 24px; max-width: 16ch;
}
.page-title em { font-style: italic; color: var(--olive-deep); }
.page-lede {
  font-family: var(--serif); font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4; color: var(--ink-2); max-width: 46ch;
}
.insights-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
  margin: clamp(50px, 7vw, 80px) 0 clamp(70px, 9vw, 120px);
}
.insight-card {
  background: var(--paper); padding: 40px 36px 44px;
  display: flex; flex-direction: column; min-height: 300px;
  transition: background .25s ease;
}
.insight-card { transition: background .25s ease, transform .25s ease, box-shadow .25s ease; }
.insight-card:hover { background: var(--paper-2); transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(201,162,39,0.3), 0 22px 50px -24px rgba(0,0,0,0.7); }
.insight-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--olive); margin-bottom: 22px;
}
.insight-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.insight-title {
  font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 16px;
}
.insight-title em { font-style: italic; color: var(--olive-deep); }
.insight-dek { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0 0 24px; }
.insight-more {
  margin-top: auto; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive);
  display: inline-flex; align-items: center; gap: 8px;
}
.insight-card:hover .insight-more .arrow { transform: translateX(3px); }
.insight-more .arrow { transition: transform .2s ease; }
@media (max-width: 760px) { .insights-grid { grid-template-columns: 1fr; } }

/* ---------- Article ---------- */
.article-head {
  padding: clamp(48px, 7vw, 96px) 0 clamp(30px, 4vw, 48px);
  max-width: 78ch; margin: 0 auto;
}
.article-kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--olive); margin-bottom: 22px;
  display: inline-block;
}
.article-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 5.5vw, 68px); line-height: 1.0;
  letter-spacing: -0.02em; margin: 0 0 28px;
}
.article-title em { font-style: italic; color: var(--olive-deep); }
.article-standfirst {
  font-family: var(--serif); font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4; color: var(--ink-2); margin: 0 0 32px; max-width: 50ch;
}
.article-byline {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 18px 0; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.article-byline strong { color: var(--ink-2); font-weight: 500; }
.article-byline .sep { color: var(--rule); }

.article-body {
  max-width: 70ch; margin: 0 auto;
  padding: clamp(36px, 5vw, 56px) 0 clamp(56px, 8vw, 96px);
  font-size: 18px; line-height: 1.7; color: var(--ink-2);
}
.article-body > p { margin: 0 0 24px; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 4.4em; line-height: 0.8;
  float: left; padding: 6px 12px 0 0; color: var(--olive-deep);
}
.article-body h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1; letter-spacing: -0.015em; color: var(--ink);
  margin: 52px 0 18px;
}
.article-body h2 em { font-style: italic; color: var(--olive-deep); }
.article-body h3 {
  font-family: var(--sans); font-weight: 600; font-size: 20px;
  letter-spacing: -0.005em; color: var(--ink); margin: 38px 0 12px;
}
.article-body a {
  color: var(--olive-deep);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px; transition: border-color .2s ease;
}
.article-body a:hover { border-color: var(--olive); }
.article-body ul, .article-body ol { margin: 0 0 24px; padding-left: 1.4em; }
.article-body li { margin: 0 0 10px; padding-left: 6px; }
.article-body li::marker { color: var(--olive); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body blockquote {
  margin: 36px 0; padding: 8px 0 8px 32px;
  border-left: 3px solid var(--olive);
  font-family: var(--serif); font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3; color: var(--ink); font-style: italic;
}

/* Callout / takeaways */
.callout {
  background: var(--panel); color: var(--ink);
  padding: 32px 34px; margin: 40px 0;
}
.callout .label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--olive); margin-bottom: 14px; display: block;
}
.callout p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.callout strong { color: var(--ink); }

.takeaways {
  background: var(--paper-2); border: 1px solid var(--rule);
  padding: 28px 32px; margin: 40px 0;
}
.takeaways .label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--olive); margin-bottom: 16px; display: block;
}
.takeaways ul { margin: 0; padding-left: 0; list-style: none; }
.takeaways li {
  padding: 0 0 12px 28px; position: relative; font-size: 16px; line-height: 1.55; color: var(--ink-2);
}
.takeaways li:last-child { padding-bottom: 0; }
.takeaways li::before {
  content: "→"; position: absolute; left: 0; color: var(--olive); font-weight: 700;
}

.article-footnote {
  max-width: 70ch; margin: 0 auto; padding: 0 0 40px;
  font-size: 13px; line-height: 1.6; color: var(--muted);
  border-top: 1px solid var(--rule); padding-top: 20px;
}
.article-footnote a { color: var(--muted); border-bottom: 1px solid var(--rule); }

/* ---------- Author bio ---------- */
.author-bio {
  max-width: 70ch; margin: 0 auto;
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--paper-2); border: 1px solid var(--rule);
  padding: 28px 30px; margin-bottom: 8px;
}
.author-bio img {
  width: 92px; height: 92px; border-radius: 50%;
  object-fit: cover; object-position: center 25%;
  border: 1px solid var(--rule); flex-shrink: 0;
}
.author-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--olive); display: block; margin-bottom: 8px;
}
.author-name { font-family: var(--serif); font-size: 26px; line-height: 1; margin: 0 0 10px; }
.author-desc { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.author-desc a { color: var(--olive-deep); border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.author-desc a:hover { border-color: var(--olive); }
@media (max-width: 560px) { .author-bio { flex-direction: column; } }

/* ---------- CTA band ---------- */
.cta {
  background: var(--panel); color: var(--ink);
  padding: clamp(56px, 8vw, 96px) 0;
}
.cta .eyebrow { color: var(--olive); }
.cta .eyebrow::before { background: var(--olive); }
.cta h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04; letter-spacing: -0.015em; margin: 0 0 24px; max-width: 20ch; color: var(--ink);
}
.cta h2 em { font-style: italic; color: var(--olive); }
.cta p { font-family: var(--serif); font-size: clamp(19px, 2vw, 23px); color: var(--ink-2); max-width: 40ch; margin: 0 0 32px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 26px; background: var(--olive); color: #0B1020;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; transition: background .2s ease;
}
.cta-btn:hover { background: var(--olive-deep); }

/* ---------- Related ---------- */
.related { padding: clamp(50px, 7vw, 80px) 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.related-card { border-top: 1px solid var(--ink); padding-top: 20px; }
.related-card .insight-kicker { margin-bottom: 10px; }
.related-card .rt {
  font-family: var(--serif); font-size: 22px; line-height: 1.12; margin: 0;
}
@media (max-width: 760px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer {
  background: var(--panel); color: var(--muted);
  border-top: 1px solid var(--rule); padding: 40px 0 56px;
}
.foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.foot-brand { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); }
.foot-line { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); }
.foot-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
