/* ============================================================
   OG Capital — Universal Stylesheet
   ogcapital.one/styles.css
   Extracted from: index.html, companies.html, press.html,
                   team.html, thesis.html (Editorial, May 2026)

   Usage: <link rel="stylesheet" href="styles.css" />
   Then add a <style> block per page for page-specific rules.
   ============================================================ */

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* Brand palette */
  --deep-forest: #061A12;
  --evergreen:   #0E3B29;
  --emerald:     #16A46C;
  --emerald-text:#0E7E51;   /* WCAG AA on --bone: ~5:1 */
  --pale-aura:   #D8F3E4;
  --stone:       #F4F1E8;
  --bone:        #FAF7EF;
  --ink:         #0B0F0D;
  --charcoal:    #1D2A24;
  --fog:         #E9E5DA;
  --ash:         #A7AEA6;

  /* Text on bone */
  --text:        #0B0F0D;
  --text-soft:   rgba(11,15,13,.62);
  --text-mute:   rgba(11,15,13,.66);
  --rule:        rgba(11,15,13,.12);
  --rule-soft:   rgba(11,15,13,.06);

  /* Text on dark */
  --on-dark-soft:  rgba(244,241,232,.82);
  --on-dark-mute:  rgba(244,241,232,.70);
  --rule-dark:     rgba(244,241,232,.14);
  --rule-dark-soft:rgba(244,241,232,.07);

  /* Focus */
  --focus-ring:         #0E7E51;
  --focus-ring-on-dark: #6FE4B0;

  /* Type families */
  --display: "IBM Plex Sans", system-ui, sans-serif;
  --body:    Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif:   "Libre Baskerville", Georgia, serif;
  --mono:    "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Layout */
  --shell-max: 1440px;
  --gutter:    64px;
  --col-gap:   32px;

  /* Type scale (pages may override per-page tokens as needed) */
  --t-hero:    clamp(52px, 9.4vw, 148px);   /* index hero H1 */
  --t-display: clamp(38px, 5.2vw, 78px);    /* large section headings */
  --t-page:    clamp(44px, 7vw, 112px);     /* inner-page H1 */
  --t-section: clamp(28px, 3.0vw, 40px);   /* mid-weight section H2 */
  --t-lede:    clamp(18px, 1.45vw, 21px);   /* lede / intro text */
  --t-body:    17px;
  --t-meta:    11px;
  --t-nav:     14px;

  /* Spacing */
  --scroll-offset: 96px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-offset);
}
body {
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-weight: 400;
  overflow-x: hidden;
}
img, svg   { display: block; max-width: 100%; }
a          { color: inherit; text-decoration: none; }
button     { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
strong     { font-weight: 600; }
[id]       { scroll-margin-top: var(--scroll-offset); }
::selection{ background: var(--deep-forest); color: var(--bone); }

/* ── SKIP LINK (WCAG 2.4.1) ─────────────────────────────────── */
.skip-link {
  position: fixed; left: 16px; top: 16px;
  padding: 12px 18px;
  background: var(--ink); color: var(--bone);
  font-family: var(--body); font-weight: 500; font-size: 14px;
  letter-spacing: .01em; border-radius: 2px; z-index: 300;
  transform: translateY(calc(-100% - 24px));
  transition: transform .15s ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--focus-ring); outline-offset: 3px;
}

/* ── FOCUS (WCAG 2.4.7 / 2.4.13) ───────────────────────────── */
:focus              { outline: none; }
:focus-visible      { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }
.section--dark :focus-visible,
.cta--dark :focus-visible,
footer :focus-visible,
nav.top :focus-visible { outline-color: var(--focus-ring-on-dark); }
[id="main"]:focus   { outline: none; }

/* ── LAYOUT PRIMITIVES ──────────────────────────────────────── */
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}
.rule      { height: 1px; background: var(--rule);      width: 100%; border: 0; }
.rule-soft { height: 1px; background: var(--rule-soft); width: 100%; border: 0; }

/* ── COLOUR PRIMITIVES ──────────────────────────────────────── */
.em { color: var(--emerald-text); }
.section--dark .em,
.cta--dark .em,
footer .em,
.foot-line .em { color: var(--emerald); }

.quiet      { color: var(--text-mute); }
.quiet-dark { color: rgba(244,241,232,.42); }

/* ── TYPE PRIMITIVES ────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .22em; text-transform: uppercase;
  font-weight: 500; color: var(--text-soft);
  display: inline-flex; align-items: center; gap: 14px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-text); display: inline-block;
  box-shadow: 0 0 0 4px rgba(14,126,81,.14);
}
.section-tag {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 500;
}
.display {
  font-family: var(--display); font-weight: 500;
  letter-spacing: -0.028em; line-height: .98;
}
.display .em    { color: var(--emerald-text); }
.display .quiet { color: var(--text-mute); }
.lede {
  font-family: var(--body); font-size: var(--t-lede);
  line-height: 1.45; color: var(--text-soft);
  max-width: 56ch; font-weight: 400;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-size: 14px; font-weight: 500;
  padding: 12px 18px; border-radius: 2px;
  transition: all .2s ease; letter-spacing: 0.005em;
  min-height: 44px; /* WCAG 2.5.8 touch target */
  white-space: nowrap;
}
.btn--primary            { background: var(--deep-forest); color: var(--bone); }
.btn--primary:hover      { background: var(--evergreen); }
.btn--primary .arrow     { transition: transform .2s ease; }
.btn--primary:hover .arrow { transform: translateX(3px); }
.btn--ghost              { border: 1px solid var(--rule); color: var(--text); }
.btn--ghost:hover        { border-color: var(--ink); }
.btn--ghost--dark        { border-color: rgba(244,241,232,.22); color: var(--stone); }
.btn--ghost--dark:hover  { border-color: rgba(244,241,232,.5); }
.btn--link               { color: var(--text); padding: 4px 0; border-bottom: 1px solid var(--ink); border-radius: 0; }
.btn--link:hover         { color: var(--emerald-text); border-color: var(--emerald-text); }
.btn--quiet {
  color: var(--text); padding: 6px 0;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--body); font-size: 14px; font-weight: 500;
  min-height: 32px; /* WCAG 2.5.8 */
}
.btn--quiet .arrow  { transition: transform .2s ease; }
.btn--quiet:hover .arrow { transform: translateX(3px); }
.btn--quiet:hover   { color: var(--emerald-text); }
.section--dark .btn--quiet:hover,
footer .btn--quiet:hover { color: var(--emerald); }

/* ── NAVIGATION ─────────────────────────────────────────────── */
nav.top {
  position: sticky; top: 0; z-index: 80;
  background: color-mix(in oklab, var(--bone) 88%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--rule-soft);
}
nav.top .row {
  max-width: var(--shell-max); margin: 0 auto;
  padding: 20px var(--gutter);
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 48px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 500;
  font-size: 17px; letter-spacing: -0.01em;
  color: var(--ink); white-space: nowrap;
}
.wordmark .mark { width: 22px; height: 22px; flex-shrink: 0; }
.wordmark .mark svg, .wordmark .mark img { width: 100%; height: 100%; display: block; }
nav .links {
  display: flex; gap: 36px; justify-content: center; list-style: none;
}
nav .links a {
  font-family: var(--body); font-size: var(--t-nav); font-weight: 500;
  color: var(--text); letter-spacing: 0.005em;
  position: relative; padding: 6px 0;
  display: inline-flex; align-items: center; min-height: 36px; /* WCAG 2.5.8 */
  transition: color .2s ease;
}
nav .links a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1px; background: var(--emerald);
  transition: right .25s ease;
}
nav .links a:hover::after,
nav .links a[aria-current="page"]::after { right: 0; }
nav .right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 44px; height: 44px; padding: 11px;
  border-radius: 2px; cursor: pointer;
}
.hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--ink); border-radius: 1px;
  transition: transform .2s ease, opacity .2s ease;
  transform-origin: center;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; inset: 0; top: 63px;
  background: var(--bone); z-index: 70;
  padding: 40px var(--gutter);
  overflow-y: auto;
}
.mobile-menu.is-open { display: flex; flex-direction: column; gap: 0; }
.mobile-menu ul { list-style: none; border-top: 1px solid var(--rule); }
.mobile-menu ul li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid var(--rule-soft);
  font-family: var(--display); font-size: 26px; font-weight: 500;
  letter-spacing: -0.015em; color: var(--ink);
}
.mobile-menu .mobile-actions {
  display: flex; flex-direction: column; gap: 12px; margin-top: 40px;
}
.mobile-menu .mobile-actions .btn { width: 100%; justify-content: center; }

/* ── SECTION SHELL ──────────────────────────────────────────── */
.section             { padding: 120px 0; position: relative; }
.section--compact    { padding: 88px 0; }
.section--first      { padding-top: 64px; }
.section--dark {
  background: var(--deep-forest); color: var(--stone);
  overflow: hidden; position: relative;
}
.section--dark::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(22,164,108,.08), transparent 60%),
    radial-gradient(50% 50% at 15% 90%, rgba(14,59,41,.65), transparent 70%);
  pointer-events: none;
}
.section--dark > .shell { position: relative; z-index: 1; }

/* ── SECTION HEAD ───────────────────────────────────────────── */
.section-head {
  display: grid; grid-template-columns: 1fr 11fr;
  gap: var(--col-gap); padding-bottom: 24px;
  margin-bottom: 64px; border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.section--dark .section-head { border-bottom-color: var(--rule-dark); }
.section-head .num {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .22em; color: var(--emerald-text); font-weight: 500;
}
.section--dark .section-head .num { color: var(--emerald); }
.section-head .row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; flex-wrap: wrap;
}
.section-head .label {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 500;
}
.section--dark .section-head .label { color: var(--on-dark-mute); }
.section-head .tag {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 500;
}
.section-head h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.02em; color: var(--ink);
}
.section--dark .section-head h2 { color: var(--stone); }

/* ── PAGE HERO (inner pages: companies, team, thesis) ───────── */
.page-hero {
  position: relative; padding: 56px 0 0;
  background: var(--bone); border-bottom: 1px solid var(--rule);
}
/* Column-grid atmosphere (same on all inner page heroes) */
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--rule-soft) 1px, transparent 1px);
  background-size: calc((100% - 2 * var(--gutter)) / 12) 100%;
  background-position: var(--gutter) 0;
  mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%);
  pointer-events: none; opacity: .9;
}
.page-hero .shell { padding-top: 64px; padding-bottom: 56px; position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: var(--t-page); line-height: .94;
  letter-spacing: -0.032em; color: var(--ink);
}

/* ── BREADCRUMBS ────────────────────────────────────────────── */
.crumbs {
  display: flex; gap: 14px; align-items: center;
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 500;
  margin-bottom: 56px; flex-wrap: wrap; row-gap: 8px;
}
/* dot variant (companies, team, thesis) */
.crumbs .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-text); }
/* separator line variant (press) */
.crumbs .sep { width: 22px; height: 1px; background: var(--text-mute); display: inline-block; flex-shrink: 0; }
.crumbs a { color: var(--text-mute); transition: color .2s ease; }
.crumbs a:hover { color: var(--ink); }

/* ── SUB ROW (lede + actions, inner pages) ──────────────────── */
.sub {
  display: grid; grid-template-columns: 8fr 4fr;
  gap: var(--col-gap); margin-top: 48px; align-items: end;
}
.sub .lede {
  font-size: var(--t-lede); line-height: 1.5;
  color: var(--text-soft); max-width: 56ch;
}
.sub .lede .em { color: var(--ink); font-weight: 500; }
.sub .actions {
  display: flex; gap: 16px; align-items: center;
  justify-content: flex-end; padding-bottom: 4px; flex-wrap: wrap;
}

/* ── INDEX KPI STRIP (inner pages) ─────────────────────────── */
.index-strip {
  display: grid; grid-template-columns: 1fr auto auto auto auto;
  align-items: end; gap: 48px;
  margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--rule-soft);
}
.index-strip .lab-left {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-mute); display: flex; align-items: center; gap: 12px;
}
.index-strip .lab-left::after { content: ""; width: 40px; height: 1px; background: var(--text-mute); }

/* Inner-page KPI block */
.idx-kpi { display: flex; flex-direction: column; gap: 6px; min-width: 118px; }
.idx-kpi .num {
  font-family: var(--display); font-weight: 400;
  font-size: 40px; line-height: 1; letter-spacing: -0.025em; color: var(--ink);
}
.idx-kpi .num .unit { color: var(--text-mute); margin-left: 2px; font-size: .7em; }
.idx-kpi .lab {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 500;
}

/* Hero / press KPI block (index.html, press.html) */
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 118px; }
.kpi .num {
  font-family: var(--display); font-weight: 400;
  font-size: 40px; line-height: 1; letter-spacing: -0.025em; color: var(--ink);
}
.kpi .num .unit { color: var(--text-mute); margin-left: 2px; font-size: .72em; }
.kpi .lab {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 500;
}

/* ── CTA (dark, contact / pitch section) ───────────────────── */
.cta--dark {
  background: var(--deep-forest); color: var(--stone);
  position: relative; overflow: hidden;
}
.cta--dark::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(22,164,108,.10), transparent 60%),
    radial-gradient(50% 50% at 15% 90%, rgba(14,59,41,.7), transparent 70%);
  pointer-events: none;
}
.cta--dark .shell { position: relative; z-index: 1; }
.cta-grid {
  display: grid; grid-template-columns: 1fr 11fr;
  gap: var(--col-gap); padding: 120px 0;
}
.cta-grid .num {
  font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .22em; color: var(--emerald); font-weight: 500;
}
.cta-body {
  grid-column: 2 / -1;
  display: grid; grid-template-columns: 8fr 4fr;
  gap: calc(var(--col-gap) * 2); align-items: end;
}
.cta-body h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(48px, 7vw, 108px);
  line-height: .94; letter-spacing: -0.035em;
  color: var(--stone); max-width: 14ch;
}
.cta-side { display: flex; flex-direction: column; gap: 28px; padding-bottom: 14px; }
.cta-side p { font-size: 17px; line-height: 1.55; color: var(--on-dark-soft); max-width: 36ch; }
.cta-side .actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-side .btn--primary { background: var(--emerald); color: var(--deep-forest); font-weight: 600; }
.cta-side .btn--primary:hover { background: #1bbb7c; }
.cta-side .btn--ghost { border-color: rgba(244,241,232,.22); color: var(--stone); }
.cta-side .btn--ghost:hover { border-color: rgba(244,241,232,.5); }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  background: var(--deep-forest); color: var(--stone);
  padding: 0 0 32px;
  border-top: 1px solid var(--rule-dark);
}
footer .shell { padding-top: 80px; }
.foot-line {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: .98; letter-spacing: -0.03em; color: var(--stone);
  max-width: 18ch; padding-bottom: 72px;
  border-bottom: 1px solid var(--rule-dark);
}
.foot-grid {
  display: grid; grid-template-columns: 4fr 2fr 2fr 2fr 2fr;
  gap: var(--col-gap); padding: 56px 0 40px;
}
.foot-grid .col { display: flex; flex-direction: column; gap: 14px; }
.foot-grid .col .h {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--on-dark-mute);
  font-weight: 500; margin-bottom: 6px;
}
.foot-grid .col a {
  font-size: 14px; font-weight: 400;
  color: var(--on-dark-soft); letter-spacing: 0.005em;
  transition: color .2s ease; min-height: 28px; display: flex; align-items: center;
}
.foot-grid .col a:hover { color: var(--emerald); }
.foot-grid .brand .wordmark { color: var(--stone); margin-bottom: 18px; }
.foot-grid .brand p {
  font-size: 14px; line-height: 1.55; color: var(--on-dark-soft); max-width: 30ch;
}
.foot-base {
  padding-top: 28px; border-top: 1px solid rgba(244,241,232,.10);
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--on-dark-mute);
  flex-wrap: wrap; gap: 18px;
}
.foot-base .b { display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap; }
.foot-base a { color: var(--on-dark-mute); transition: color .2s ease; }
.foot-base a:hover { color: var(--emerald); }

/* ── RESPONSIVE — 1024px ────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --gutter: 40px; }
  nav.top .row { gap: 28px; }

  /* Sub / page hero */
  .sub              { grid-template-columns: 1fr; gap: 32px; }
  .sub .actions     { justify-content: flex-start; }
  .index-strip      { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .index-strip .lab-left { grid-column: 1 / -1; }

  /* Section head */
  .section-head     { grid-template-columns: auto 1fr; }

  /* CTA dark */
  .cta-body         { grid-template-columns: 1fr; gap: 32px; }
  .cta-grid         { grid-template-columns: 1fr; padding: 64px 0; }
  .cta-body         { grid-column: 1; }

  /* Footer */
  .foot-grid        { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .foot-grid .brand { grid-column: 1 / -1; }
}

/* ── RESPONSIVE — 640px (mobile) ────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --gutter:  20px;
    --col-gap: 20px;
  }

  /* Nav collapses to hamburger */
  nav.top .row { grid-template-columns: 1fr auto; gap: 12px; padding: 16px var(--gutter); }
  nav .links   { display: none; }
  nav .right   { display: none; }
  .hamburger   { display: flex; }

  /* Page hero */
  .page-hero .shell { padding-top: 40px; padding-bottom: 40px; }
  .crumbs      { margin-bottom: 36px; }
  .sub         { margin-top: 32px; }
  .sub .actions { flex-direction: column; align-items: flex-start; }
  .index-strip { grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
  .index-strip .lab-left { display: none; }

  /* Sections */
  .section         { padding: 80px 0; }
  .section--compact{ padding: 64px 0; }
  .section-head    { grid-template-columns: auto 1fr; }

  /* CTA dark */
  .cta-grid        { grid-template-columns: 1fr; padding: 80px 0; }
  .cta-body        { grid-template-columns: 1fr; }

  /* Footer */
  .foot-grid       { grid-template-columns: 1fr; gap: 32px; }
  .foot-grid .brand{ grid-column: 1; }
  .foot-base       { flex-direction: column; gap: 12px; }
  .foot-base .b    { gap: 16px; flex-wrap: wrap; }
  .foot-line       { padding-bottom: 48px; }
}

/* ── REDUCED MOTION (WCAG 2.3.3) ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
