/* Firm First. OnePrime Capital homepage direction.
   John's draft taken further, on Max's two references: one object on near-black
   under a centered serif headline, and the Dot Shapes drawing that regroups as
   the visitor scrolls. Marcellus echoes the inscriptional capitals of the
   OnePrime wordmark. */

:root {
  --black: #09090e;
  --ink: #121218;
  --text: #eceef8;
  --soft: #c3c6dc;
  --muted: #9a9eb8;
  --soft-blue: #b9c2ff;
  --blue: #1308e1;
  --line: rgba(236, 238, 248, 0.2);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --pad: clamp(20px, 4.4vw, 64px);
  --nav-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scrollbar-color: #3a3d55 var(--black);
  background: var(--black);
}

body {
  margin: 0;
  font-family: "Geist", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.5;
  color: var(--text); background: var(--black);
  -webkit-font-smoothing: antialiased;
}

::selection { background: #2b3bff; color: #fff; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; list-style: none;
}
.skip {
  position: absolute; left: var(--pad); top: -80px; z-index: 30;
  padding: 10px 14px; border-radius: 8px; background: #fff; color: var(--black);
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.skip:focus { top: 12px; }
.ico { flex: none; }

/* ---------- Navigation ---------- */

.nav {
  position: absolute; left: 0; right: 0; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--nav-h); padding: 0 var(--pad);
}
.brand { display: block; line-height: 0; }
.brand img { height: 30px; width: auto; }

.nav ul { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); list-style: none; margin: 0; padding: 0; }
.nav a:not(.brand) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 15px; font-weight: 450; color: var(--soft); text-decoration: none;
  transition: color 150ms var(--ease-out);
}
.nav a[aria-current="page"] { color: #fff; font-weight: 550; }
.nav a.portal {
  min-height: 40px; padding: 0 14px; border-radius: 6px; color: #fff; font-weight: 550;
  box-shadow: inset 0 0 0 1.5px rgba(236, 238, 248, 0.42);
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav a:not(.brand):not(.portal):hover { color: #fff; }
  .nav a.portal:hover { background: #fff; color: var(--black); box-shadow: inset 0 0 0 1.5px #fff; }
}

.menu-btn {
  display: none; align-items: center; height: 44px; padding: 0 14px;
  border: 0; border-radius: 6px; background: transparent; color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(236, 238, 248, 0.42);
  font-family: inherit; font-size: 15px; font-weight: 550; line-height: 1; cursor: pointer;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}

@media (max-width: 899px) {
  .menu-btn { display: inline-flex; }
  .nav nav {
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    padding: 4px var(--pad) 20px; background: var(--ink);
    box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.8);
    display: none;
  }
  .nav.is-open nav { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li + li { border-top: 1px solid var(--line); }
  .nav a:not(.brand) { width: 100%; min-height: 52px; font-size: 17px; color: #fff; }
  .nav a.portal { box-shadow: none; padding: 0; justify-content: space-between; }
}

/* ---------- The story: one pinned drawing, two scenes of text ---------- */

.story { position: relative; overflow-x: clip; }

/* Light rising from under the object, so the ground is never one flat fill. */
.ground {
  position: sticky; top: 0; height: 100svh; margin-bottom: -100svh;
  background:
    radial-gradient(64% 46% at 50% 104%, rgba(43, 59, 255, 0.34) 0%, rgba(43, 59, 255, 0) 72%),
    radial-gradient(40% 30% at 50% 100%, rgba(130, 224, 239, 0.1) 0%, rgba(130, 224, 239, 0) 70%);
  pointer-events: none;
}

/* From the pasted Dot Shapes prompt. Colours are set to OnePrime's blue and
   cyan. The supplied colours are kept below, one line to switch back. */
[data-dot-shapes] {
  --dot-color-1: #a1eafa;
  --dot-color-2: #82e0ef;
  --dot-color-3: #6f8dff;
  --dot-color-4: #2b3bff;
  --dot-color-5: #cbc8ff;
  /* As supplied: #82bcfe, #2483fe, #ff66f3, #ff3028, #fe7b01 */
  position: sticky; top: 0;
  width: 100%; height: 100svh;
  background: transparent;
  transform: translate3d(0, 44svh, 0);
  transition: transform 1100ms var(--ease-in-out);
  will-change: transform;
}
[data-dot-shapes] > [data-dot-shapes-canvas] {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none;
}
.story:not([data-scene="hero"]) [data-dot-shapes] { transform: translate3d(0, 22svh, 0); }

.panels { position: relative; z-index: 1; margin-top: -100svh; pointer-events: none; }
.panels a, .panels h1, .panels h2, .panels p { pointer-events: auto; }

.panel-hero {
  min-height: 100svh;
  display: flex; justify-content: center;
  padding: calc(var(--nav-h) + clamp(28px, 7svh, 76px)) var(--pad) 0;
}
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 1180px; }

h1, h2 { font-family: "Marcellus", "Trajan Pro", "Times New Roman", serif; font-weight: 400; }

h1 {
  margin: 0;
  /* Sized so the last two words, tied together, always fit on one line. */
  font-size: clamp(25px, calc((100vw - 2 * var(--pad)) / 12.4), 74px);
  line-height: 1.12; letter-spacing: -0.012em; color: #fff;
  text-wrap: balance;
}
.sub {
  margin: clamp(14px, 2.4svh, 24px) 0 0; max-width: 50ch;
  font-size: clamp(16px, 1.32vw, 19px); line-height: 1.5; color: var(--soft); text-wrap: balance;
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 26px; margin-top: clamp(18px, 3svh, 30px); }

.cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 8px;
  background: #fff; color: var(--black); font-size: 15px; font-weight: 600; text-decoration: none;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: background-color 150ms var(--ease-out), transform 140ms var(--ease-out);
}
.cta:active { transform: scale(0.98); }
.more {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 15px; font-weight: 500; color: #fff; text-decoration: none;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: color 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .cta:hover { background: #dfe3ff; }
  .more:hover { color: var(--soft-blue); }
}

/* A pinned scene: the text rests while the drawing changes beside it. */
.panel-pin { min-height: 150svh; padding: 0 var(--pad) 24svh; }
.scene-copy { position: sticky; top: calc(var(--nav-h) + 2svh); max-width: 60ch; margin: 0 auto; text-align: center; }

.sectors { list-style: none; margin: clamp(14px, 2.4svh, 24px) 0 0; padding: 0; text-align: left; }
.sectors li { display: grid; gap: 1px; padding: 8px 0; border-top: 1px solid var(--line); }
.sectors strong { font-size: clamp(17px, 1.4vw, 20px); font-weight: 550; color: #fff; }
.sectors span { font-size: 14.5px; line-height: 1.45; color: var(--muted); }

/* A scene of statements: they scroll past the drawing, and the one being read is lit. */
.panel-says { padding: 16svh var(--pad) 10svh; }
.panel-says h2 { text-align: center; }
.say { max-width: 34rem; margin: 0 auto; padding: 5svh 0; transition: opacity 220ms var(--ease-out); }
.say h3 { margin: 0 0 10px; font-family: inherit; font-size: clamp(21px, 2vw, 28px); line-height: 1.2; font-weight: 550; letter-spacing: -0.012em; color: #fff; text-wrap: balance; }
.say p { margin: 0; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.56; color: var(--soft); text-wrap: balance; }
.story.is-lit .say:not(.is-on) { opacity: 0.34; }
h2 {
  margin: 0 0 clamp(12px, 2svh, 20px);
  font-size: clamp(32px, 4.4vw, 62px); line-height: 1.12; letter-spacing: -0.012em; color: #fff;
}
.scene-copy p { margin: 0; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.56; color: var(--soft); text-wrap: pretty; }
.scene-copy p a { color: #fff; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.scene-copy .key { margin-top: 16px; font-size: 14.5px; color: var(--muted); }

/* Wide screens: the scene's text takes the left and the record stands on the right. */
@media (min-width: 1000px) {
  .story[data-scene="investments"] [data-dot-shapes] { transform: translate3d(19vw, 4svh, 0); }
  .story[data-scene="areas"] [data-dot-shapes],
  .story[data-scene="who"] [data-dot-shapes],
  .story[data-scene="approach"] [data-dot-shapes] { transform: translate3d(-21vw, 4svh, 0); }
  .panel-pin { min-height: 160svh; }
  .scene-copy { top: 24svh; max-width: 30rem; margin: 0; text-align: left; }
  .side-right .scene-copy { margin-left: auto; }
  #areas .scene-copy { top: calc(var(--nav-h) + 6svh); max-width: 35rem; }
  #areas h2 { font-size: clamp(30px, 3.3vw, 48px); }
  .panel-says { padding-top: 22svh; }
  .panel-says h2, .panel-says .say { width: min(34rem, 44vw); max-width: none; margin-left: auto; margin-right: 0; text-align: left; }
  .say { padding: 9svh 0; }
}

/* Below that width the text runs over the drawing, so the drawing steps back. */
@media (max-width: 999px) {
  [data-dot-shapes] > [data-dot-shapes-canvas] { transition: opacity 280ms var(--ease-out); }
  .story[data-scene="areas"] [data-dot-shapes-canvas],
  .story[data-scene="who"] [data-dot-shapes-canvas],
  .story[data-scene="approach"] [data-dot-shapes-canvas] { opacity: 0.3; }
  .story[data-scene="areas"] [data-dot-shapes],
  .story[data-scene="who"] [data-dot-shapes],
  .story[data-scene="approach"] [data-dot-shapes] { transform: translate3d(0, 34svh, 0); }
}

/* Phones: a wider canvas than the screen, so the object keeps its size. */
@media (max-width: 640px) {
  [data-dot-shapes] > [data-dot-shapes-canvas] { left: -14vw; width: 128vw; }
  [data-dot-shapes] { transform: translate3d(0, 34svh, 0); }
  .story[data-scene="investments"] [data-dot-shapes] { transform: translate3d(0, 24svh, 0); }
}

/* ---------- The sign-off: the wordmark, full width, with the bay showing through ---------- */

.sign { position: relative; z-index: 2; padding: clamp(56px, 10svh, 120px) var(--pad) 0; background: var(--black); }
.sign-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-bottom: clamp(28px, 5svh, 56px); }
.mail {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 16px; color: #fff; text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: color 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .mail:hover { color: var(--soft-blue); } }
.sign-mark {
  width: 100%; aspect-ratio: 855 / 229;
  /* The still from the current site's own hero film, so the old page shows through the new mark. */
  background: #2c3fd6 url("https://cdn.prod.website-files.com/64bd7c6d7b08937b06747cb3%2F6841040ef937ec70d197e218_6518a80623e88eb0c2939960_hero-video-transcode-poster-00001.jpg") center 42% / cover no-repeat;
  /* The still is a night shot. Screening it over blue keeps every letter readable on the black ground. */
  background-blend-mode: screen;
  filter: brightness(1.35);
  -webkit-mask: url("assets/oneprime-capital-1.png") center / contain no-repeat;
  mask: url("assets/oneprime-capital-1.png") center / contain no-repeat;
}

/* ---------- Footer ---------- */

.foot {
  position: relative; z-index: 2;
  padding: 32px var(--pad) calc(40px + env(safe-area-inset-bottom));
  background: var(--black);
}
.foot-legal p { margin: 0 0 6px; max-width: 72ch; font-size: 13.5px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

/* Capture switch (?scene=exits). Not part of the design. */
html.cap .panel:not(.is-cap) { display: none; }
html.cap #areas.panel-pin { padding-top: calc(var(--nav-h) + 6svh); }
html.cap-sign .story { display: none; }
html.cap-sign .sign { padding-top: 120px; }
html.cap [data-dot-shapes] { transition: none; }
html.cap .panel-pin { min-height: 100svh; padding-top: 24svh; padding-bottom: 0; }
html.cap .scene-copy { position: static; }
html.cap .panel-says { padding-top: 14svh; }
html.cap .say { padding: 3svh 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-dot-shapes], .say { transition-duration: 1ms; }
  .cta { transform: none !important; }
}
