/* ============================================================================
   &VLM quant — proprietary quant fund
   Static one-page site. Plain CSS, no framework.
   ========================================================================== */

/* ---------- fonts ---------- */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root {
  --bg:        #1D1D1F;
  --fg:        #FFFFFF;
  --fg-2:      rgba(255, 255, 255, 0.68);
  --fg-3:      rgba(255, 255, 255, 0.42);
  --rule:      rgba(255, 255, 255, 0.16);
  --rule-soft: rgba(255, 255, 255, 0.09);
  --tick:      rgba(255, 255, 255, 0.30);
  --tick-soft: rgba(255, 255, 255, 0.16);

  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono",
               Menlo, Consolas, "Liberation Mono", monospace;

  /* horizontal rhythm */
  --gutter: clamp(20px, 4.4vw, 76px);
  --maxw: 1680px;

  /* vertical rhythm */
  --section-y: clamp(88px, 12vh, 180px);

  /* type */
  --fs-label:   clamp(10px, 0.78vw, 12px);
  --fs-body:    clamp(13px, 1.02vw, 16px);
  --fs-display: clamp(28px, 4.9vw, 72px);
  --fs-heading: clamp(20px, 2.2vw, 34px);

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

/* ---------- reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
a:hover { border-bottom-color: var(--fg); }
a:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
  border-bottom-color: transparent;
}

::selection { background: rgba(255, 255, 255, 0.86); color: var(--bg); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- page texture: grid + grain + scanlines ---------- */

.grain,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* faint 40px technical grid, dissolving toward the bottom */
.grain {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  opacity: 0.9;
}

/* 3px scanline weave, very low contrast */
.scanlines {
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.016) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: soft-light;
}

/* ---------- layout ---------- */

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
  overflow: clip;
}

.section + .section { border-top: 1px solid var(--rule-soft); }

.section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 96px);
}

.section__head--stack {
  flex-direction: column;
  gap: clamp(30px, 4.4vw, 64px);
}

.rule {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.dash {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--fg-3);
  margin-block: clamp(18px, 2vw, 30px);
}

/* ---------- type primitives ---------- */

.label {
  font-size: var(--fs-label);
  line-height: 1.4;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
}

.label--top { margin-bottom: clamp(22px, 3.4vh, 46px); }

.prompt {
  display: block;
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  color: var(--fg-3);
  margin-bottom: clamp(14px, 1.6vw, 24px);
}

.display {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 1.06;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.display--hero { font-size: clamp(20px, 2.75vw, 44px); line-height: 1.16; }
.display--status { font-size: clamp(34px, 6.6vw, 96px); }

.heading {
  font-weight: 400;
  font-size: var(--fs-heading);
  line-height: 1.24;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prose {
  color: var(--fg-2);
  max-width: 56ch;
  line-height: 1.72;
}
.prose p + p { margin-top: 1.4em; }
.prose--wide { max-width: 72ch; }

/* ---------- reveal on scroll (progressive enhancement) ---------- */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}
.js .reveal[data-delay="1"] { transition-delay: 0.07s; }
.js .reveal[data-delay="2"] { transition-delay: 0.14s; }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================================
   HERO
   ========================================================================== */

.section--hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(44px, 6.2vh, 80px);
}

.section--hero > .wrap {
  display: flex;
  flex-direction: column;
}

/* brand lockup: the &VLM mark riding on an oversized halftone "quant" */
.brandblock {
  position: relative;
  margin-bottom: clamp(24px, 4.4vh, 58px);
}

.brandblock__mark {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(28px, 5.45vw, 80px);
}

/* Width-driven so the box always hugs the artwork: it takes the full column
   unless that would make it taller than ~36vh, in which case height wins. */
.brandblock__word {
  position: relative;
  z-index: 1;
  --word-bleed: 106%;
  width: min(var(--word-bleed), calc(36.5vh * 3.256), 1400px);
  max-width: none;
  height: auto;
  margin-top: clamp(-35px, -3.5vh, -10px);
  margin-left: clamp(-14px, -0.9vw, -4px);
  will-change: transform;
}

.hero__body {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr);
  gap: clamp(28px, 3.4vw, 72px);
  align-items: start;
  margin-bottom: clamp(30px, 4.6vh, 64px);
}

.hero__copy {
  border-left: 1px solid var(--rule);
  padding-left: clamp(18px, 2.4vw, 40px);
  max-width: 62ch;
}

/* ---------- terminal data strip ---------- */

.strip { margin-top: clamp(18px, 2.2vw, 30px); }

.strip__row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(10px, 1.4vw, 22px);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
  overflow: hidden;
}

@media (max-width: 1080px) {
  .strip__row {
    mask-image: linear-gradient(to right, #000 84%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 84%, transparent 100%);
  }
}

.strip__ts { color: var(--fg-2); }
.strip__cell { flex: none; }

.strip__sep {
  flex: none;
  width: 1px;
  height: 11px;
  background: var(--rule);
}

.strip__note {
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.strip--foot { margin-top: clamp(34px, 5vw, 66px); }

/* microstructure tick line: three overlaid periods, pure CSS */
.ticks {
  height: 15px;
  background-repeat: repeat-x;
  background-position: left bottom, left bottom, left bottom;
  background-image:
    repeating-linear-gradient(to right, var(--tick-soft) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(to right, var(--tick) 0 1px, transparent 1px 53px),
    repeating-linear-gradient(to right, var(--tick) 0 1px, transparent 1px 127px);
  background-size: 100% 3px, 100% 9px, 100% 15px;
}

.ticks--inline {
  flex: 1 1 140px;
  min-width: 90px;
  margin-left: clamp(8px, 2vw, 40px);
}

.ticks--flat {
  margin-top: 14px;
  height: 5px;
  background-image:
    repeating-linear-gradient(to right, var(--tick-soft) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(to right, var(--tick) 0 1px, transparent 1px 53px);
  background-size: 100% 3px, 100% 5px;
}

/* ============================================================================
   SPLIT LAYOUTS
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 4vw, 80px);
  align-items: start;
}

.split--team {
  align-items: center;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr);
}

/* ============================================================================
   CARD ROWS
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  margin-top: clamp(56px, 9vw, 150px);
}

.card {
  position: relative;
  padding: clamp(26px, 2.6vw, 44px) clamp(20px, 2.2vw, 42px) clamp(20px, 2vw, 32px);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card + .card { border-left: 1px solid var(--rule); }

/* small crosshair where the vertical divider meets the top rule */
.card + .card::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  width: 11px;
  height: 11px;
  background:
    linear-gradient(to right, var(--rule) 0 100%) center / 100% 1px no-repeat,
    linear-gradient(to bottom, var(--rule) 0 100%) center / 1px 100% no-repeat;
}

.card__title {
  font-weight: 400;
  font-size: clamp(17px, 1.7vw, 27px);
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: clamp(12px, 1.2vw, 20px);
}

.card__body {
  color: var(--fg-2);
  max-width: 34ch;
  flex: 1 1 auto;
}

.card__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(28px, 3.4vw, 56px);
  padding-top: 14px;
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  background-image: repeating-linear-gradient(
    to right, var(--tick-soft) 0 1px, transparent 1px 5px);
  background-size: 100% 1px;
  background-position: left top;
  background-repeat: repeat-x;
}

.card__state { color: var(--fg-2); }

/* provenance variant */
.cards--provenance { margin-top: clamp(48px, 7vw, 110px); }

.card--flat { padding-block: clamp(24px, 2.4vw, 40px) clamp(28px, 3vw, 48px); }

.card__kicker {
  font-size: var(--fs-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: clamp(14px, 1.4vw, 24px);
}

.card__name {
  font-weight: 400;
  font-size: clamp(18px, 2vw, 34px);
  line-height: 1.14;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card--flat .dash { margin-block: clamp(14px, 1.4vw, 22px) 0; }

/* ============================================================================
   OVERSIZED HALFTONE GHOSTS
   ========================================================================== */

.ghost {
  position: absolute;
  pointer-events: none;
  user-select: none;
  max-width: none;
  opacity: 0.05;
  z-index: 0;
  will-change: transform;
}

.ghost--approach {
  left: -6%;
  top: 40%;
  width: 128%;
  mask-image: linear-gradient(to bottom, #000 0 46%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0 46%, transparent 88%);
}

.ghost--infra {
  left: -4%;
  bottom: -6%;
  width: 120%;
  opacity: 0.045;
}

/* team: a giant crop of the halftone, cropped to the "qu" */
.team__glyph {
  position: relative;
  height: clamp(190px, 30vw, 460px);
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}

.ghost--team {
  position: absolute;
  top: -8%;
  left: -6%;
  width: 420%;
  opacity: 0.16;
}

/* ============================================================================
   SECTION 01 — APPROACH lockup
   ========================================================================== */

.lockup {
  flex: none;
  width: clamp(74px, 8vw, 128px);
  opacity: 0.9;
}

.lockup--right { text-align: right; }

.lockup__mark {
  display: block;
  width: auto;
  height: clamp(9px, 0.97vw, 15px);
}

.lockup--right .lockup__mark { margin-left: auto; }

.lockup__word {
  width: 100%;
  margin-top: clamp(-7px, -0.44vw, -2px);
  opacity: 0.82;
}

/* ============================================================================
   SECTION 03 — INFRASTRUCTURE
   ========================================================================== */

.infra__body {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}

.infra__figure { min-width: 0; }

.latency {
  width: 100%;
  max-width: 760px;
}

.infra__text .heading { margin-bottom: clamp(20px, 2.2vw, 36px); }

.timeline {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 20px);
  margin-top: clamp(48px, 7vw, 110px);
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
}

.timeline__mark { flex: none; }

.timeline__seg {
  flex: 1 1 auto;
  height: 7px;
  min-width: 24px;
  background-repeat: repeat-x;
  background-position: left bottom;
  background-image:
    repeating-linear-gradient(to right, var(--tick-soft) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(to right, var(--tick) 0 1px, transparent 1px 34px);
  background-size: 100% 3px, 100% 7px;
}

/* ============================================================================
   SECTION 04 — STATUS
   ========================================================================== */

.status__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(28px, 4vw, 80px);
  align-items: center;
}

.display--status { margin-block: clamp(20px, 2.4vw, 40px) clamp(22px, 2.6vw, 40px); }

.contact { margin-top: clamp(48px, 7vw, 108px); }
.contact__label { color: var(--fg-2); }
.contact__mail { margin-top: 2px; }
.contact__mail a { color: var(--fg); }

.status__glyph {
  position: relative;
  height: clamp(180px, 26vw, 380px);
  overflow: hidden;
  opacity: 0.9;
}

.lockup__mark--ghost {
  position: absolute;
  top: 6%;
  right: 4%;
  z-index: 1;
  height: clamp(20px, 2.6vw, 42px);
  opacity: 0.12;
}

.ghost--status {
  position: absolute;
  top: 20%;
  left: -12%;
  width: 235%;
  opacity: 0.075;
}

/* ============================================================================
   FOOTER
   ========================================================================== */

.footer {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(28px, 4vw, 56px);
}

.footer__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 56px);
  padding-top: clamp(18px, 2.2vw, 30px);
  font-size: var(--fs-label);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.footer__id {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__addr {
  color: var(--fg-3);
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.footer__legal {
  max-width: 74ch;
  line-height: 1.6;
  letter-spacing: 0.1em;
}

.footer__prompt {
  flex: none;
  color: var(--fg-2);
  letter-spacing: 0.1em;
}

.caret {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  margin-left: 0.28em;
  vertical-align: -0.14em;
  background: var(--fg-3);
  animation: blink 1.6s steps(1, end) infinite;
}

@keyframes blink {
  0%, 55%  { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* ============================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1080px) {
  .hero__body,
  .infra__body,
  .status__grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(24px, 5vw, 44px);
  }

  .hero__copy {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: clamp(20px, 4vw, 32px);
  }

  .split--team { align-items: start; }

  .team__glyph { height: clamp(150px, 34vw, 300px); }
  .ghost--team { width: 260%; }

  .status__glyph { height: clamp(150px, 30vw, 260px); }

  .footer__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 760px) {
  :root {
    --section-y: clamp(72px, 11vh, 112px);
    --fs-body: 13px;
    --fs-label: 10px;
  }

  .section--hero { min-height: auto; padding-block: 84px 72px; }

  .brandblock__mark { height: clamp(25px, 8.9vw, 44px); }
  .brandblock__word { --word-bleed: 124%; margin-top: -14px; }

  .display { font-size: clamp(26px, 8.8vw, 50px); }
  .display--hero { font-size: clamp(18px, 5.9vw, 32px); letter-spacing: 0.015em; }
  .display--status { font-size: clamp(32px, 11.4vw, 58px); }

  /* keep the strip readable rather than cramped: allow it to run off-edge */
  .strip__row { gap: 12px; }

  .cards,
  .cards--provenance {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding-inline: 0;
    padding-block: 24px 22px;
  }

  .card + .card {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .card + .card::before { display: none; }

  .card__body { max-width: none; }
  .card__meta { margin-top: 26px; }

  .section__head { flex-direction: row; align-items: flex-start; }
  .lockup { width: 62px; }

  .timeline { gap: 6px; letter-spacing: 0.1em; }
  .timeline__seg { min-width: 10px; }

  .grain { background-size: 28px 28px, 28px 28px; }
}

@media (max-width: 420px) {
  .timeline__mark:nth-of-type(2),
  .timeline__mark:nth-of-type(4) { display: none; }
}

/* ============================================================================
   MOTION PREFERENCES
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .caret { animation: none; }

  .js-parallax { transform: none !important; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================================
   PRINT
   ========================================================================== */

@media print {
  .grain, .scanlines, .ghost, .ticks { display: none; }
  body { background: #fff; color: #000; }
  .prose, .label, .strip__row { color: #333; }
}
