/* EUCAP — quantitative trading research
   Direction (unslop pass):
   - Character: exact, open, unhurried
   - World: a research desk by day, ink on white paper, charts and notes
   - Moment: the walk-forward validation diagram in the hero
   - Signature: the in-sample / out-of-sample split bar, used in the hero and the research lifecycle only
   Rules: one accent (brand mint), no glows or gradients, no looping motion, sentence case,
   spacing on a 4px grid, Newsreader for headlines only, Inter for everything else. */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --raised: #eef1f4;
  --line: rgba(17, 24, 39, 0.08);
  --line-strong: rgba(17, 24, 39, 0.14);
  --fit: #8391a5;

  --text: #111827;
  --text-2: #4b5565;
  --text-3: #5d6676;

  /* Brand mint, deepened for a light page. --accent fills shapes (3:1 on white);
     --accent-text is the same hue dark enough for text (5:1). */
  --accent: #12a383;
  --accent-text: #0b7560;
  --accent-ink: #ffffff;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1200px;
  --pad: 32px;
  --section: 96px;
  --header: 64px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.625 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 8px; font-size: 14px;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header);
  background: rgba(247, 248, 250, 0.94); border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
.brand-word { font-size: 16px; font-weight: 600; letter-spacing: 0.04em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { font-size: 14px; color: var(--text-2); padding: 8px 12px; border-radius: 8px; transition: color 150ms var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.nav .nav-cta {
  margin-left: 12px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); height: 36px; display: inline-flex; align-items: center; padding: 0 16px;
  transition: background-color 150ms var(--ease);
}
.nav .nav-cta:hover { background: var(--raised); }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 8px;
  background: none; border: 1px solid var(--line-strong); color: var(--text); cursor: pointer;
}
.nav-toggle svg { margin: auto; }
.mobile-nav { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px;
  border-radius: 10px; font-size: 15px; font-weight: 500;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--text); color: #ffffff; }
.btn-primary:hover { background: #2a3140; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn-secondary:hover { background: var(--raised); }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--header) + 96px) 0 96px; min-height: 100svh; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; width: 100%; }
.hero h1 {
  font: 400 64px/1.05 var(--serif); letter-spacing: -0.02em; max-width: 12ch; text-wrap: balance;
}
.hero-lede { margin-top: 24px; font-size: 19px; line-height: 30px; color: var(--text-2); max-width: 36rem; text-wrap: pretty; }
.hero-actions { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Walk-forward diagram: the one rich moment on the page */
.wf {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}
.wf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.wf-title { font-size: 15px; font-weight: 500; }
.wf-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); }
.wf-legend span { display: inline-flex; align-items: center; gap: 8px; }
.wf-legend i { width: 16px; height: 8px; border-radius: 2px; background: var(--fit); }
.wf-legend i.oos { background: var(--accent); }
.wf-rows { margin-top: 24px; display: grid; gap: 12px; }
.wf-row { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px; }
.wf-label { font-size: 12px; color: var(--text-2); }
.wf-track { position: relative; height: 12px; border-radius: 4px; background: var(--raised); }
.wf-track b, .wf-track em {
  position: absolute; top: 0; bottom: 0; border-radius: 4px;
  left: var(--s); width: var(--w);
}
.wf-track b { background: var(--fit); border-radius: 4px 0 0 4px; }
.wf-track em { border-radius: 0 4px 4px 0; box-shadow: -2px 0 0 var(--surface); }
.wf-track em { background: var(--accent); }
.wf-row.live { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.wf-row.live .wf-label { color: var(--text); }
.wf-axis {
  margin-top: 16px; padding-left: 68px; display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 12px;
}
.wf-note { margin-top: 16px; font-size: 14px; line-height: 22px; color: var(--text-2); }

/* One entrance on load, hero only */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter 400ms var(--ease) both; }
  .enter-2 { animation-delay: 60ms; }
  @keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---------- Stats: four figures, static ---------- */
.stats { border-top: 1px solid var(--line); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; align-items: start; }
.stats-grid p { display: flex; flex-direction: column; gap: 8px; }
.stat-label { font-size: 14px; line-height: 20px; color: var(--text-2); }
.stat-num { font: 400 40px/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.label { font-size: 13px; font-weight: 500; color: var(--text-3); margin-bottom: 16px; }
.section-title { font: 400 40px/1.1 var(--serif); letter-spacing: -0.02em; max-width: 20ch; text-wrap: balance; }
.section-sub { margin-top: 16px; font-size: 17px; line-height: 28px; color: var(--text-2); max-width: 40rem; }
.section-head { margin-bottom: 48px; }

/* Every two-column layout is 1fr 1fr with a 32px gap, so second columns share one line
   with the hero diagram and the third lifecycle step. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.lead { font-size: 19px; line-height: 30px; color: var(--text); }
.body-2 { margin-top: 20px; color: var(--text-2); }

/* Plain list with hairlines (principles, roles) */
.plain-list { margin-top: 32px; border-top: 1px solid var(--line); }
.plain-list li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }

/* Three columns under a hairline (capabilities) */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.cols-3 > div { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.item-title { font-size: 17px; font-weight: 500; line-height: 24px; }
.item-text { margin-top: 8px; color: var(--text-2); font-size: 15px; line-height: 24px; }

/* 2x2 definition grid (markets) */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.grid-2 > div { padding: 24px 0; border-top: 1px solid var(--line); }

/* Rows: name left, text right (technology, research, contact) */
.rows { border-top: 1px solid var(--line); }
.rows > * { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rows > :last-child { border-bottom: 0; }
.rows .item-text { margin-top: 0; }

/* Research lifecycle with the signature split bar */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.step-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 20px; }
.step-bar i { height: 4px; border-radius: 2px; background: var(--fit); }
.step-bar i.on { background: var(--accent); }
.step-num { font-size: 13px; color: var(--text-3); }
.step .item-title { margin-top: 4px; }

/* Data API */
.api-actions { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.api-note { font-size: 15px; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.api-note:hover { color: var(--accent-text); }

/* Careers summary */
.careers-actions { margin-top: 32px; }

/* Contact */
.contact .rows > a { transition: color 150ms var(--ease); }
.contact .rows > a:hover .contact-email { color: var(--accent-text); }
.contact-label { color: var(--text-2); }
.contact-email { font-size: 17px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: color 150ms var(--ease); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.footer-tag { display: block; font-size: 13px; color: var(--text-3); margin-top: 4px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.footer-nav a:hover { color: var(--text); }
.footer-meta {
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--text-3);
}
.footer-meta a:hover { color: var(--text); }
.footer-disclaimer { margin-top: 16px; font-size: 13px; line-height: 20px; color: var(--text-3); max-width: 48rem; }

/* ---------- Careers page ---------- */
.page-hero { padding: calc(var(--header) + 96px) 0 64px; }
.page-hero h1 { font: 400 56px/1.05 var(--serif); letter-spacing: -0.02em; }
.page-hero .hero-lede { max-width: 40rem; }

.jobs { display: grid; gap: 24px; }
.job { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; padding: 32px; box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05); }
.job-meta { font-size: 13px; color: var(--text-3); }
.job-title { margin-top: 8px; font: 400 32px/1.15 var(--serif); letter-spacing: -0.01em; }
.job-body { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.job-desc { color: var(--text-2); }
.job-req-label { font-size: 13px; font-weight: 500; color: var(--text-3); margin-bottom: 8px; }
.job-req li { padding: 8px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 15px; line-height: 24px; }
.job-actions { margin-top: 32px; }
.general-app { margin-top: 64px; max-width: 40rem; }
.general-app h2 { font: 400 32px/1.15 var(--serif); }
.general-app p { margin: 12px 0 24px; color: var(--text-2); }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  :root { --pad: 24px; --section: 64px; }
  .hero { padding: calc(var(--header) + 48px) 0 64px; min-height: 0; }
  .hero-grid, .split, .job-body { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 44px; }
  .section-title { font-size: 32px; }
  .cols-3, .steps { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .page-hero { padding: calc(var(--header) + 48px) 0 40px; }
  .page-hero h1 { font-size: 40px; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .mobile-nav.open { display: block; border-top: 1px solid var(--line); background: var(--bg); padding: 8px var(--pad) 16px; }
  .mobile-nav a { display: block; padding: 12px 0; color: var(--text-2); border-bottom: 1px solid var(--line); }
  .hero h1 { font-size: 40px; }
  .hero-lede { font-size: 17px; line-height: 28px; }
  .cols-3, .steps, .grid-2, .rows > * { grid-template-columns: 1fr; }
  .rows > * { gap: 4px; }
  .wf { padding: 20px; }
  .wf-head { flex-direction: column; gap: 8px; }
  .wf-row { grid-template-columns: 48px 1fr; }
  .wf-axis { padding-left: 60px; }
  .job { padding: 24px; }
  .job-title { font-size: 28px; }
}
