/* Quant Partners — quantpartners.dk
   Tokens from the design book v1.0 (brand/quant-partners-design-book.html) */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/instrument-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/spline-sans-mono.woff2') format('woff2');
}

:root {
  /* surfaces */
  --qp-ink: #15181E;
  --qp-ink-raised: #1C2027;
  --qp-ink-line: #2A2F39;
  --qp-paper: #F4F6F9;
  --qp-white: #FFFFFF;
  /* text */
  --qp-slate: #8E99AB;
  --qp-slate-dark: #5B6572;
  --qp-line: #DDE2EA;
  /* accent — max 10% of any surface */
  --qp-signal: #4A7CFF;
  --qp-signal-deep: #2E5BD6;
  /* market semantics — data only */
  --qp-long: #2FA97C;
  --qp-short: #E5484D;
  /* type */
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Spline Sans Mono', 'SF Mono', Menlo, monospace;
}

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

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

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  background: var(--qp-ink);
  color: var(--qp-white);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { line-height: 1.12; text-wrap: balance; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--qp-signal); outline-offset: 3px; }

/* ---------- nav ---------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(21, 24, 30, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--qp-ink-line);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.wordmark {
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--qp-white);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .dot { color: var(--qp-signal); }
nav ul { display: flex; gap: 28px; list-style: none; flex-wrap: wrap; }
nav ul a {
  color: var(--qp-slate);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
nav ul a:hover { color: var(--qp-white); }
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--qp-white);
  cursor: pointer;
  padding: 10px;
  margin: -10px;
}
@media (max-width: 620px) {
  nav ul { display: none; }
  .menu-btn { display: block; }
}

/* ---------- full-screen menu overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--qp-ink);
  display: flex;
  flex-direction: column;
  padding: 0 28px 36px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.overlay.open { opacity: 1; }
.overlay:not(.open) { pointer-events: none; }
.overlay[hidden] { display: none; }
/* mirrors the nav bar geometry exactly so the wordmark does not shift */
.ov-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}
.menu-close {
  background: none;
  border: none;
  color: var(--qp-slate);
  cursor: pointer;
  padding: 10px;
  margin: -10px;
}
.menu-close:hover { color: var(--qp-white); }
.ov-links {
  list-style: none;
  margin-top: auto;
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov-links a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  color: var(--qp-white);
  text-decoration: none;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 650;
  letter-spacing: -0.02em;
  padding: 10px 0;
}
.ov-links a:hover { color: var(--qp-signal); }
.ov-links .num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--qp-signal);
  letter-spacing: 0.1em;
}
.ov-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--qp-slate);
}
.ov-foot a { color: var(--qp-slate); text-decoration: none; }
.ov-foot a:hover { color: var(--qp-white); }
body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; }
#heroChart { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 640px) { #heroChart { opacity: 0.5; } }
.hero .wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 96px;
  padding-bottom: clamp(24px, calc(10svh - 30px), 80px);
  width: 100%;
}
.ticker {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--qp-ink-line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--qp-slate);
  display: flex;
  gap: 34px;
  padding: 14px 28px;
  white-space: nowrap;
  overflow: hidden;
}
.ticker b { font-weight: 500; }
.ticker .up { color: var(--qp-long); }
.ticker .down { color: var(--qp-short); }
@media (max-width: 720px) { .ticker span:nth-child(4), .ticker span:nth-child(5) { display: none; } }
.hero .eyebrow { color: var(--qp-signal); }
.hero h1 {
  /* fluid: scales with width AND height so laptops get a compact hero and the chart keeps room */
  font-size: clamp(38px, min(6.5vw, 6.3svh), 68px);
  font-weight: 650;
  letter-spacing: -0.022em;
  max-width: 17ch;
  margin-top: clamp(12px, 2svh, 18px);
}
.hero p {
  margin-top: clamp(14px, 2.4svh, 22px);
  max-width: 56ch;
  font-size: clamp(16px, 2.1svh, 19px);
  color: var(--qp-slate);
}
.cta-row { display: flex; gap: 14px; margin-top: clamp(24px, 3.6svh, 36px); flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 24px;
  letter-spacing: 0.01em;
}
.btn-primary { background: var(--qp-signal); color: var(--qp-white); }
.btn-primary:hover { background: var(--qp-signal-deep); }
.btn-ghost { color: var(--qp-white); border: 1px solid var(--qp-ink-line); }
.btn-ghost:hover { border-color: var(--qp-slate); }

/* ---------- sections ---------- */
section { padding: 96px 0; scroll-margin-top: 64px; }
@media (max-width: 720px) { section { padding: 72px 0; } }
.light { background: var(--qp-paper); color: var(--qp-ink); }
.sec-head { max-width: 720px; }
.sec-head .eyebrow { color: var(--qp-signal-deep); }
.dark .sec-head .eyebrow, .hero .eyebrow { color: var(--qp-signal); }
.sec-head h2 {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-top: 14px;
}
.sec-head p.lead { margin-top: 18px; font-size: 18.5px; }
.light .sec-head p.lead { color: var(--qp-slate-dark); }
.dark .sec-head p.lead { color: var(--qp-slate); }

/* about */
.about-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 48px;
}
@media (max-width: 760px) { .about-cols { grid-template-columns: 1fr; } }
.about-cols h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.about-cols p { margin-top: 12px; font-size: 16px; color: var(--qp-slate-dark); }

/* ---------- platform diagram (three satellites around the core) ----------
   Geometry: square container. Satellite centers on a circle of radius R = 30%
   from container center, at 90° (top), 210° (bottom-left), 330° (bottom-right).
   Central diameter 34%, satellites 30%. R < (17% + 15%) = tight overlap that
   the central circle covers (higher z-index), so satellites "run just under"
   the black core at their contact points. */
.platform-diagram {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1;
  margin: 64px auto 8px;
}
.pd-satellite, .pd-core {
  position: absolute;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
}
.pd-satellite {
  width: 30%;
  aspect-ratio: 1;
  background: rgba(74, 124, 255, 0.10);
  border: 1px solid rgba(74, 124, 255, 0.35);
  color: var(--qp-ink);
}
/* 90°  → (50%, 20%)                       (top center) */
.pd-top { top: 20%;   left: 50%;     }
/* 330° → (50% + 30*cos30°, 50% + 30*sin30°) = (75.98%, 65%)  (bottom-right) */
.pd-br  { top: 65%;   left: 75.98%;  }
/* 210° → (50% − 30*cos30°, 50% + 30*sin30°) = (24.02%, 65%)  (bottom-left)  */
.pd-bl  { top: 65%;   left: 24.02%;  }
.pd-core {
  width: 34%;
  aspect-ratio: 1;
  top: 50%; left: 50%;
  background: var(--qp-ink);
  color: var(--qp-white);
  z-index: 1;
}
.pd-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--qp-signal-deep);
  margin-bottom: 10px;
}
.pd-satellite h3 {
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
  max-width: 12ch;
  line-height: 1.2;
}
.pd-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qp-signal);
  margin-bottom: 8px;
}
.pd-brand {
  font-family: var(--sans);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.pd-brand .dot { color: var(--qp-signal); }
@media (max-width: 720px) {
  .platform-diagram {
    aspect-ratio: auto;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 48px;
  }
  .pd-satellite, .pd-core {
    position: static;
    transform: none;
    width: 100%;
    aspect-ratio: auto;
    border-radius: 12px;
    padding: 24px;
  }
  .pd-core { order: -1; }
  .pd-satellite h3, .pd-brand { max-width: none; }
}

/* partnership */
.partner-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 52px;
}
@media (max-width: 860px) { .partner-cards { grid-template-columns: 1fr; } }
.p-card {
  background: var(--qp-ink-raised);
  border: 1px solid var(--qp-ink-line);
  padding: 28px 26px;
}
.p-card .num {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--qp-signal);
  letter-spacing: 0.1em;
}
.p-card h3 { font-size: 19px; font-weight: 600; margin-top: 14px; letter-spacing: -0.01em; }
.p-card p { margin-top: 12px; font-size: 15px; color: var(--qp-slate); }
.upside {
  margin-top: 44px;
  border-left: 3px solid var(--qp-signal);
  padding: 4px 0 4px 24px;
  max-width: 62ch;
}
.upside p { font-size: 18.5px; font-weight: 500; }
.upside p b { color: var(--qp-signal); font-weight: 600; }

/* partners */
.partners-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .partners-grid { grid-template-columns: 1fr; gap: 36px; } }
.partner-names {
  margin-top: 32px;
  display: flex;
  gap: 12px 28px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.partner-names span { border-left: 3px solid var(--qp-signal); padding-left: 12px; }
.partners-photo { margin: 0; }
.partners-photo img { display: block; width: 100%; height: auto; }
.partners-photo figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--qp-slate-dark);
}

/* technology */
.tech-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .tech-cards { grid-template-columns: 1fr; } }
.tech-cards .num { text-transform: uppercase; letter-spacing: 0.12em; font-size: 11.5px; }

/* roadmap */
.roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 52px;
}
@media (max-width: 1000px) { .roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .roadmap { grid-template-columns: 1fr; } }
.rm-step { border-top: 1px solid var(--qp-ink-line); padding-top: 22px; position: relative; }
.rm-num {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 500;
  color: var(--qp-signal);
  display: block;
}
.rm-tag {
  position: absolute;
  top: 26px;
  right: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qp-ink);
  background: var(--qp-signal);
  padding: 4px 8px;
}
.rm-tag.done { background: transparent; border: 1px solid var(--qp-ink-line); color: var(--qp-slate); }
.rm-step h3 { font-size: 19px; font-weight: 600; margin-top: 18px; letter-spacing: -0.01em; }
.rm-step p { margin-top: 12px; font-size: 15px; color: var(--qp-slate); }
.rm-bridge a { color: var(--qp-signal); text-decoration: none; }
.rm-bridge a:hover { text-decoration: underline; }

section.dark.bordered { border-top: 1px solid var(--qp-ink-line); }

/* beliefs */
.beliefs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 52px;
}
@media (max-width: 860px) { .beliefs { grid-template-columns: 1fr; } }
.belief {
  background: var(--qp-white);
  border: 1px solid var(--qp-line);
  padding: 28px 26px;
}
.belief .tag {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qp-signal-deep);
}
.belief h3 { font-size: 19px; font-weight: 600; margin-top: 14px; letter-spacing: -0.01em; }
.belief p { margin-top: 12px; font-size: 15px; color: var(--qp-slate-dark); }

/* opportunities */
.roles { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.role {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--qp-white);
  border: 1px solid var(--qp-ink-line);
  background: var(--qp-ink-raised);
  padding: 10px 18px;
}
.opp-cta { margin-top: 44px; }

/* world map background (roadmap) */
#roadmap { position: relative; overflow: hidden; }
@media (min-width: 641px) { #roadmap { padding-bottom: 440px; } }
#roadmap .wrap { position: relative; z-index: 1; }
#worldMap { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-legend {
  position: absolute;
  right: max(28px, calc((100% - 1100px) / 2 + 28px));
  bottom: 20px;
  z-index: 1;
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--qp-slate);
}
.map-legend .sw { display: inline-block; width: 8px; height: 8px; margin-right: 8px; }
.map-legend .sw.act { background: var(--qp-signal); }
.map-legend .sw.plan { background: var(--qp-slate); opacity: 0.55; }
@media (max-width: 640px) { .map-legend { display: none; } }

/* footer */
/* footer photo rises behind the end of Opportunities */
#opportunities { position: relative; z-index: 2; }
footer { position: relative; overflow: hidden; margin-top: -260px; }
/* office photo, toned toward ink and faded in from the section above */
footer::before,
footer::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
footer::before {
  background: url("footer-photo.jpg") center 48% / cover no-repeat;
  filter: grayscale(0.4) brightness(0.95) contrast(1.05);
}
footer::after {
  background:
    linear-gradient(to bottom, var(--qp-ink) 0%, rgba(21, 24, 30, 0.7) 15%, rgba(21, 24, 30, 0.25) 30%, rgba(21, 24, 30, 0) 42%, rgba(21, 24, 30, 0) 55%, var(--qp-ink) 100%),
    radial-gradient(ellipse 70% 80% at 50% 50%, rgba(21, 24, 30, 0.35) 0%, var(--qp-ink) 100%);
}
footer .wrap {
  position: relative;
  z-index: 1;
  min-height: 720px;
  align-content: flex-end;
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
footer .meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--qp-slate);
}
footer a { color: var(--qp-slate); text-decoration: none; }
footer a:hover { color: var(--qp-white); }
