/* BT4 Invest corporate site. Tokens and rules: design/DESIGN.md */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7f6fb;
  --surface: #ffffff;
  --ink: #16122b;
  --ink-2: #3d3854;
  --muted: #615b78;
  --line: #dcd8e7;
  --line-strong: #c2bcd3;
  --control-border: #857e9e; /* >= 3:1 on paper and white (WCAG 1.4.11) */
  --accent: #5a2fd8;
  --accent-hover: #4722b8;
  --grad: linear-gradient(100deg, #c04ee6 0%, #8a46e6 28%, #4a3fd2 52%, #2b62d6 74%, #19a7dc 100%);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --radius: 4px;
  --section-pad: clamp(72px, 9vw, 128px);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color .15s ease, color .15s ease;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--control-border); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.875rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 251, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.brand:hover { color: var(--ink); }
.brand-mono { width: 30px; height: 37px; }
.brand-word { width: 148px; height: 12px; }

.site-nav ul { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--accent); }
.nav-cta { margin-left: 10px; }

.nav-toggle { display: none; }

@media (max-width: 859px) {
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--control-border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before {
    display: block;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    transition: transform .2s ease;
  }
  .nav-toggle-bars { position: relative; transform: translateY(-3px); }
  .nav-toggle-bars::before { content: ""; position: absolute; top: 6px; left: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: translateY(0) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(-90deg); }

  .header-inner { flex-wrap: wrap; }

  /* Without JavaScript the navigation stays visible as a simple row. */
  .site-nav { width: 100%; padding-bottom: 12px; }
  .site-nav ul { flex-wrap: wrap; }
  .js .site-nav {
    display: none;
    padding: 8px 0 20px;
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .brand { min-height: var(--header-h); }
  .js .site-nav a:not(.btn) {
    display: flex;
    width: 100%;
    padding: 0 2px;
    min-height: 52px;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--line);
  }
  .js .nav-cta { margin: 16px 0 0; }
  .js .nav-cta .btn { width: 100%; min-height: 48px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 5vw, 72px); }

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-bottom: clamp(20px, 3vw, 32px);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 18px;
  border-radius: 50%;
  background: var(--line-strong);
  vertical-align: middle;
  transform: translateY(-1px);
}
.eyebrow { gap: 6px 18px; }

.h1-brand {
  display: block;
  margin-bottom: 0.35em;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.h1-line {
  display: block;
  max-width: 17ch;
  font-size: clamp(2.5rem, 5.4vw, 5rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.hero-row {
  display: grid;
  gap: 28px;
  margin-top: clamp(28px, 4vw, 48px);
  align-items: end;
}
.lead {
  max-width: 36ch;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (min-width: 860px) {
  .hero-row { grid-template-columns: 1fr auto; }
}
@media (max-width: 520px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Brand banner (rebuilt from the LinkedIn banner) ---------- */
.banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(36px, 4.5vw, 60px);
  aspect-ratio: 3 / 1;
  min-height: 260px;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(29, 21, 80, .55), rgba(29, 21, 80, 0) 60%),
    linear-gradient(100deg, #b748de 0%, #8a46e6 24%, #5a3fd6 44%, #3540c4 60%, #2b62d6 78%, #1c9fda 100%);
}
.banner-bokeh {
  position: absolute;
  inset: -10%;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 22%, rgba(243, 154, 247, .55) 0 3.2%, rgba(243, 154, 247, 0) 3.6%),
    radial-gradient(circle at 18% 64%, rgba(243, 154, 247, .35) 0 5.5%, rgba(243, 154, 247, 0) 6%),
    radial-gradient(circle at 29% 30%, rgba(214, 160, 255, .30) 0 7%, rgba(214, 160, 255, 0) 7.5%),
    radial-gradient(circle at 38% 72%, rgba(201, 166, 255, .22) 0 4%, rgba(201, 166, 255, 0) 4.4%),
    radial-gradient(circle at 47% 26%, rgba(214, 160, 255, .26) 0 5%, rgba(214, 160, 255, 0) 5.5%),
    radial-gradient(circle at 56% 58%, rgba(170, 150, 255, .20) 0 8%, rgba(170, 150, 255, 0) 8.5%),
    radial-gradient(circle at 66% 18%, rgba(127, 231, 255, .22) 0 3%, rgba(127, 231, 255, 0) 3.4%),
    radial-gradient(circle at 79% 80%, rgba(127, 231, 255, .18) 0 6%, rgba(127, 231, 255, 0) 6.5%),
    radial-gradient(circle at 92% 34%, rgba(127, 231, 255, .25) 0 2.4%, rgba(127, 231, 255, 0) 2.8%),
    radial-gradient(60% 80% at 10% 40%, rgba(255, 140, 240, .35), rgba(255, 140, 240, 0) 70%);
  filter: blur(1.5px);
  animation: bokeh-drift 40s ease-in-out infinite alternate;
}
@keyframes bokeh-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(2.5%, -2%, 0); }
}

.banner-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.net-edges path { fill: none; stroke: rgba(196, 240, 255, .5); stroke-width: 1; vector-effect: non-scaling-stroke; }
.net-edges .net-edges-warm { stroke: rgba(250, 190, 255, .45); }
.net-glow circle { fill: url(#glow); opacity: .9; }
.net-nodes circle { fill: #fff; }

.banner-mono {
  position: absolute;
  z-index: 1;
  left: 7%;
  top: 50%;
  height: 64%;
  width: auto;
  aspect-ratio: 450 / 560;
  transform: translateY(-50%);
  color: #fff;
  filter: drop-shadow(0 2px 14px rgba(40, 20, 110, .35));
}

@media (min-width: 860px) {
  .banner-mono { left: 26%; height: 70%; }
}
@media (max-width: 859px) {
  .banner { aspect-ratio: 16 / 10; }
  .banner-net { opacity: .55; }
}
@media (max-width: 520px) {
  .banner { aspect-ratio: 4 / 3.4; min-height: 0; border-radius: 8px; }
  .banner-mono { height: 56%; left: 9%; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad) 0; }
.section:last-of-type { padding-bottom: var(--section-pad); }

.section-grid {
  display: grid;
  gap: 20px;
  padding-top: clamp(28px, 3.5vw, 44px);
  /* hairline limited to the content width (not the gutters) */
  background: linear-gradient(var(--line), var(--line)) 50% 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
@media (min-width: 960px) {
  .section-grid { grid-template-columns: 3fr 9fr; gap: 40px; }
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
  padding-top: 0.6em;
}
.section-label::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  flex: none;
}
@media (min-width: 960px) {
  .section-label { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
}

.section-body > h2,
.section-body h2 {
  max-width: 22ch;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.prose { margin-top: clamp(24px, 3vw, 36px); max-width: 62ch; display: grid; gap: 1em; color: var(--ink-2); }
.prose p { text-wrap: pretty; }

/* Activity cards */
.cards {
  display: grid;
  gap: 20px;
  margin-top: clamp(28px, 3.5vw, 44px);
}
@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
}
.card-index {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card h3 {
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.card > p:not(.card-index):not(.card-note) { color: var(--ink-2); }
.card-list { margin-top: 4px; border-top: 1px solid var(--line); }
.card-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink);
}
.card-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}
.card-note { margin-top: auto; padding-top: 8px; font-size: 0.9375rem; color: var(--muted); }

.roles {
  display: grid;
  gap: 12px;
  margin-top: clamp(36px, 4.5vw, 56px);
  padding-left: clamp(16px, 2vw, 24px);
  border-left: 2px solid var(--accent);
  max-width: 70ch;
}
.roles h3 { font-size: 1.125rem; font-weight: 500; }
.roles p { color: var(--ink-2); text-wrap: pretty; }

/* ---------- Footer: company name, registry code, address, email ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  scroll-margin-top: var(--header-h);
}
.footer-inner {
  display: grid;
  gap: 24px 40px;
  padding-block: clamp(40px, 5vw, 56px) 28px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.brand-footer .brand-mono { width: 30px; height: 37px; }
.brand-footer .brand-word { width: 148px; height: 12px; }
.footer-details {
  display: grid;
  gap: 6px;
  font-style: normal;
  line-height: 1.5;
}
.footer-details span + span::before {
  content: "·";
  margin: 0 10px;
  color: var(--muted);
}
.footer-name { color: var(--ink); font-weight: 500; }
.footer-email {
  display: inline-block;
  padding-block: 4px;
  font-size: 1.0625rem;
  color: var(--ink);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
}
@media (min-width: 860px) {
  .footer-inner { grid-template-columns: auto 1fr; align-items: start; }
  .footer-details { justify-self: end; text-align: right; }
  .footer-bottom { grid-column: 1 / -1; }
}

/* ---------- Supporting pages ---------- */
.page-head { padding-top: clamp(48px, 7vw, 96px); }
.page-head h1 {
  margin-top: 4px;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.page-head .page-meta { margin-top: 16px; color: var(--muted); font-size: 0.9375rem; }
.doc {
  max-width: 760px;
  padding-block: clamp(36px, 5vw, 56px) var(--section-pad);
}
.doc h2 {
  margin-top: 2.4em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 1.6em; font-size: 1.0625rem; font-weight: 600; }
.doc p, .doc ul { margin-top: 0.9em; color: var(--ink-2); }
.doc ul { padding-left: 1.2em; list-style: disc; }
.doc li + li { margin-top: 0.35em; }
.doc li::marker { color: var(--accent); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .banner, .skip-link, .hero-actions { display: none !important; }
  body { background: #fff; }
  .section { break-inside: avoid; }
}
