/* Harmonics Capital — built on Brand Guidelines V1.
   Ink and Paper carry the brand; Signal appears once per page. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-400-600.woff2") format("woff2");
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #0f1a24;
  --paper: #f4f2ed;
  --slate: #5b6672;
  --mist: #dce0e3;
  --signal: #3346e0;

  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(20px, 5vw, 80px);
  --max: 1280px;
  --hairline: 1px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Tones ------------------------------------------------------------------ */
.tone-dark  { background: var(--ink);   color: var(--paper); --fg-2: #aab3bc; --rule: rgba(244, 242, 237, 0.16); }
.tone-light { background: var(--paper); color: var(--ink);   --fg-2: var(--slate); --rule: rgba(15, 26, 36, 0.14); }

/* Type ------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.display {
  font-weight: 500;
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.heading {
  font-weight: 500;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--fg-2);
  max-width: 34em;
}
.body {
  color: var(--fg-2);
  max-width: 36em;
}
.mono-sm {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-2);
}

/* Symbol sprite */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Skip link -------------------------------------------------------------- */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 1.5px solid currentColor;
  outline-offset: 4px;
}

/* Lockup — mark height equals the wordmark's cap-to-descender height (p.05) */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}
.lockup-mark {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  margin-top: -0.06em;
}
.lockup-word { padding-bottom: 0.08em; }
.lockup-sm { font-size: 18px; }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--paper);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: var(--hairline) solid transparent;
}
.site-header.is-scrolled[data-tone="dark"]  { background: rgba(15, 26, 36, 0.92); border-color: rgba(244, 242, 237, 0.1); }
.site-header.is-scrolled[data-tone="light"] { background: rgba(244, 242, 237, 0.94); border-color: rgba(15, 26, 36, 0.1); color: var(--ink); }
@supports (backdrop-filter: blur(1px)) {
  .site-header.is-scrolled { backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 0.2s;
  padding-block: 8px;
}
.nav a:hover { opacity: 1; }
@media (max-width: 520px) {
  .nav { gap: 18px; }
  .nav a { font-size: 11px; letter-spacing: 0.1em; }
  .nav a[href="#approach"] { display: none; }
  .lockup { font-size: 19px; }
}

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(100vh, 1000px);
  min-height: min(100svh, 1000px);
  display: flex;
  align-items: flex-end;
  padding-block: 140px clamp(56px, 9vh, 112px);
}
.hero-inner { position: relative; z-index: 1; }
.hero .eyebrow { margin-bottom: 28px; }
.hero .display { margin-bottom: 32px; }

/* One large cropped mark per surface, hairline weight (p.11). */
.hero-mark {
  position: absolute;
  top: clamp(88px, 14vh, 160px);
  left: 44vw;
  width: 68vw;
  max-width: 1300px;
  height: auto;
  color: var(--paper);
  pointer-events: none;
}
.hero-mark path { vector-effect: non-scaling-stroke; }
.hero-mark .string { stroke-width: 1px; opacity: 0.9; }
.hero-mark .neck   { stroke-width: 2px; }

/* Draw-in: the neck sweeps in left to right, then each string drops from it. */
.js .hero-mark .neck { clip-path: inset(-10% 100% -10% 0); }
.js .hero-mark .string { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); }
.js .hero-mark.is-drawn .neck {
  clip-path: inset(-10% 0 -10% 0);
  transition: clip-path 1.4s var(--ease);
}
.js .hero-mark.is-drawn .string {
  transform: scaleY(1);
  transition: transform 1.8s var(--ease);
}
.js .hero-mark.is-drawn .string:nth-child(2) { transition-delay: 0.50s; }
.js .hero-mark.is-drawn .string:nth-child(3) { transition-delay: 0.59s; }
.js .hero-mark.is-drawn .string:nth-child(4) { transition-delay: 0.68s; }
.js .hero-mark.is-drawn .string:nth-child(5) { transition-delay: 0.77s; }
.js .hero-mark.is-drawn .string:nth-child(6) { transition-delay: 0.86s; }
.js .hero-mark.is-drawn .string:nth-child(7) { transition-delay: 0.95s; }
@media (prefers-reduced-motion: reduce) {
  .js .hero-mark .neck, .js .hero-mark .string { clip-path: none; transform: none; transition: none !important; }
}

@media (max-width: 720px) {
  .hero-mark { left: 22vw; width: 104vw; top: 96px; opacity: 0.5; }
}

/* Sections --------------------------------------------------------------- */
.section { padding-block: clamp(88px, 13vw, 176px); }

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: clamp(48px, 7vw, 96px);
}

/* Six-string divider opens each section (p.11, p.13). */
.divider {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  height: 28px;
  flex: none;
}
.divider i {
  display: block;
  width: var(--hairline);
  background: currentColor;
}
.divider i:nth-child(1) { height: 100%; }
.divider i:nth-child(2) { height: 84%; }
.divider i:nth-child(3) { height: 68%; }
.divider i:nth-child(4) { height: 52%; }
.divider i:nth-child(5) { height: 36%; }
.divider i:nth-child(6) { height: 20%; }
.section-head .eyebrow { line-height: 1; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 128px);
  align-items: start;
}
.split .heading { margin-bottom: 28px; max-width: 12em; }

.principles { border-top: var(--hairline) solid var(--ink); }
.principles > div {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 24px;
  padding-block: 22px;
  border-bottom: var(--hairline) solid var(--rule);
}
.principles dt { font-weight: 500; }
.principles dd { color: var(--fg-2); }

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .principles > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* Portfolio -------------------------------------------------------------- */
.portfolio { border-top: var(--hairline) solid var(--rule); }
.portfolio .heading { margin-bottom: clamp(40px, 5vw, 64px); }
.portfolio-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: var(--hairline) solid var(--ink);
}
.co {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  aspect-ratio: 16 / 10;
  padding: 18px 20px;
  border-bottom: var(--hairline) solid var(--rule);
}
.co:not(:nth-child(3n)) { border-right: var(--hairline) solid var(--rule); }
.co-no, .co-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.co-logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
/* Logos in their official colours. */
.co-logo img {
  display: block;
  max-width: 72%;
  height: auto;
  opacity: 0.92;
  transition: opacity 0.25s var(--ease);
}
.co:hover .co-logo img { opacity: 1; }
/* Name set in the brand face where no official vector logo is published. */
.co-wordmark {
  font-weight: 500;
  font-size: clamp(17px, 1.7vw, 22px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
}

@media (max-width: 640px) {
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co { padding: 14px; aspect-ratio: 1 / 1; }
  .co:not(:nth-child(3n)) { border-right: 0; }
  .co:nth-child(odd) { border-right: var(--hairline) solid var(--rule); }
  .co-logo img { max-width: 80%; }
  .co-name { font-size: 10px; }
}

/* Contact ---------------------------------------------------------------- */
.contact { border-bottom: var(--hairline) solid var(--rule); }
.contact .heading { margin-bottom: 20px; }
.contact .body { margin-bottom: 40px; }

/* The page's single Signal highlight. */
.signal-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(16px, 2.1vw, 26px);
  letter-spacing: -0.01em;
  text-decoration: none;
  padding-bottom: 6px;
  background: linear-gradient(var(--signal), var(--signal)) left bottom / 100% 2px no-repeat;
  transition: background-size 0.4s var(--ease), color 0.2s;
  overflow-wrap: anywhere;
}
.signal-link:hover { background-size: 100% 100%; color: var(--paper); }

/* Footer ----------------------------------------------------------------- */
.site-footer { padding-block: 40px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* 404 -------------------------------------------------------------------- */
.not-found {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.not-found .display { margin-block: 24px 32px; }
.not-found a.back {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
