/* ==========================================================================
   StockX Capital — styles
   Edit design tokens in :root to rebrand. No build step required.
   ========================================================================== */

:root {
  /* Colour */
  --ink: #0C2649;          /* primary dark */
  --ink-2: #133260;        /* raised dark */
  --paper: #F3F5F8;        /* page background */
  --surface: #FFFFFF;
  --tint: #E7ECF2;         /* alternate section background */
  --text: #0F1E33;
  --muted: #4A5668;        /* ≥ 6:1 on --paper */
  --line: #D3DAE3;
  --brass: #C9D1DC;        /* accent on dark backgrounds */
  --brass-deep: #1F4A8A;   /* accent text on light backgrounds (≥ 5:1) */
  --focus: #2F6FED;
  --error: #B42318;
  --error-light: #FFB4A9;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-h3: 1.25rem;
  --fs-h2: clamp(1.85rem, 1.3rem + 2.2vw, 2.75rem);
  --fs-h1: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);

  /* Space & shape */
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(12 38 73 / 0.04), 0 8px 24px rgb(12 38 73 / 0.06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .6em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-family: var(--font-body); font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.container { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 2 * var(--gutter)); }
.section { padding-block: var(--section); }
.section-tint { background: var(--tint); }
.section-dark { background: var(--ink); color: #E8ECF1; }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section-intro { color: var(--muted); font-size: var(--fs-lg); line-height: 1.55; }
.section-dark .section-intro { color: #B8C2CF; }
.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; align-items: start; } }

.eyebrow {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-deep); margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.section-dark .eyebrow, .hero .eyebrow { color: var(--brass); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.5rem; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bg);
  font: 600 var(--fs-sm)/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgb(12 38 73 / .18); }
.btn:active { transform: translateY(0); }
.btn-small { min-height: 40px; padding: .55rem 1.1rem; }
.btn-ghost { --bg: transparent; --fg: currentColor; border-color: currentColor; }
.btn-ghost:hover { box-shadow: none; background: rgb(255 255 255 / .08); }
.btn-light { --bg: var(--brass); --fg: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(12 38 73 / .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  color: #fff; transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgb(255 255 255 / .06), 0 8px 24px rgb(0 0 0 / .18); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; }
.brand-logo { height: 40px; width: auto; }
.brand-footer .brand-logo { height: 96px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.site-nav a:not(.btn) {
  display: block; padding: .5rem .8rem; border-radius: var(--radius-sm);
  text-decoration: none; font-size: var(--fs-sm); font-weight: 500; color: #D3DAE3;
  transition: color .2s, background-color .2s;
}
.site-nav a:not(.btn):hover { color: #fff; background: rgb(255 255 255 / .06); }
.site-nav a.is-active { color: #fff; }
.site-nav .btn { --bg: var(--brass); --fg: var(--ink); margin-left: .5rem; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 0; color: #fff; cursor: pointer; border-radius: var(--radius-sm);
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform .25s var(--ease), opacity .2s;
  }
  .nav-toggle-bar { position: relative; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -7px; }
  .nav-toggle-bar::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: absolute; inset: 68px 0 auto 0; background: var(--ink);
    border-top: 1px solid rgb(255 255 255 / .08);
    padding: .75rem var(--gutter) 1.5rem;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .25s var(--ease); }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .site-nav a:not(.btn) { padding: .85rem .5rem; font-size: var(--fs-base); }
  .site-nav .btn { margin: .75rem 0 0; width: 100%; min-height: 48px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 10%, rgb(201 209 220 / .14), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, #09203F 100%);
  color: #fff;
  padding-block: clamp(4rem, 2.5rem + 7vw, 8.5rem);
}
.hero::after { /* subtle grid texture */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px),
                    linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 7fr 5fr; gap: 4rem; } }
.hero h1 em { font-style: italic; color: var(--brass); font-weight: 500; }
.lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: #C6CFDA; max-width: 36em; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1.5rem; }
.hero .btn:not(.btn-ghost) { --bg: var(--brass); --fg: var(--ink); }
.hero-note { font-size: var(--fs-xs); color: #93A0B0; margin: 0; }
.hero-note a { color: #C6CFDA; }

.process-card {
  background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .1);
  border-radius: var(--radius); padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.process-title { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-weight: 600; margin-bottom: 1.25rem; }
.process-list { list-style: none; margin: 0; padding: 0; }
.process-list li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .75rem; padding: 1rem 0; border-top: 1px solid rgb(255 255 255 / .08); }
.process-list li:first-child { border-top: 0; padding-top: 0; }
.process-list li:last-child { padding-bottom: 0; }
.step { font-family: var(--font-display); color: var(--brass); font-size: 1.05rem; }
.process-list strong { display: block; font-weight: 600; margin-bottom: .15rem; }
.process-list p { margin: 0; font-size: var(--fs-sm); color: #A9B5C3; line-height: 1.5; }

/* ---------- About ---------- */
.prose p { color: var(--muted); font-size: var(--fs-lg); line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 2rem 0 0; padding-top: 2rem; border-top: 1px solid var(--line); }
.facts dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.facts dd { margin: .3rem 0 0; font-weight: 500; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #B9C4D2; }
.card-icon { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: var(--ink); color: var(--brass); margin-bottom: 1.25rem; }
.card p { color: var(--muted); margin: 0; font-size: var(--fs-sm); }

/* ---------- Philosophy ---------- */
.principles { display: grid; gap: 0; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .principles { grid-template-columns: 1fr 1fr; } }
.principles li { padding: 2rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; }
@media (min-width: 760px) {
  .principles li { padding: 2.25rem 2rem 2.25rem 0; }
  .principles li:nth-child(even) { padding-left: 2rem; border-left: 1px solid var(--line); }
}
.principles .num { font-family: var(--font-display); font-style: italic; color: var(--brass-deep); font-size: 1.4rem; grid-row: span 2; }
.principles h3 { margin-bottom: .4rem; }
.principles p { color: var(--muted); margin: 0; }

.risk-panel {
  margin-top: 3rem; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brass);
  border-radius: var(--radius-sm);
}
.risk-panel h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; }
.risk-panel p { margin: 0; color: var(--muted); max-width: 72ch; }

/* ---------- Team ---------- */
.team { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 1.25rem;
  display: grid; place-items: center; background: linear-gradient(135deg, var(--ink), #2A5596);
  color: var(--brass); font-family: var(--font-display); font-size: 2rem;
}
.person h3 { margin-bottom: .2rem; }
.role { color: var(--brass-deep); font-weight: 500; font-size: var(--fs-sm); }
.bio { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.35rem 2.5rem 1.35rem 0; position: relative;
  font-weight: 600; font-size: var(--fs-lg); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .25rem; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--brass-deep); border-bottom: 2px solid var(--brass-deep);
  transform: translateY(-75%) rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq summary:hover { color: var(--brass-deep); }
.faq details p { color: var(--muted); padding-right: 2.5rem; margin: 0 0 1.5rem; }

/* ---------- Contact ---------- */
.contact-list { margin-top: 2rem; }
.contact-list li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px solid rgb(255 255 255 / .1); }
.contact-list .label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: #93A0B0; font-weight: 600; padding-top: .2rem; }

.contact-form {
  display: grid; gap: 1.1rem 1rem; grid-template-columns: 1fr;
  background: var(--ink-2); border: 1px solid rgb(255 255 255 / .08);
  border-radius: var(--radius); padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
}
@media (min-width: 600px) { .contact-form { grid-template-columns: 1fr 1fr; } .field-full { grid-column: 1 / -1; } }
.field label { display: block; font-size: var(--fs-sm); font-weight: 500; margin-bottom: .4rem; color: #DCE3EB; }
.optional { color: #93A0B0; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: #fff;
  background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .18);
  border-radius: var(--radius-sm); padding: .75rem .9rem; min-height: 48px;
  transition: border-color .2s, background-color .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #93A0B0 50%), linear-gradient(135deg, #93A0B0 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: var(--text); }
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgb(255 255 255 / .32); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brass); background: rgb(255 255 255 / .07); box-shadow: 0 0 0 3px rgb(201 209 220 / .25); }
.field [aria-invalid="true"] { border-color: var(--error-light); }
.error { color: var(--error-light); font-size: var(--fs-xs); margin: .35rem 0 0; min-height: 0; }
.error:empty { display: none; }
.checkbox { display: grid; grid-template-columns: 22px 1fr; gap: .75rem; align-items: start; }
.checkbox input { width: 20px; height: 20px; min-height: 0; margin: .2rem 0 0; accent-color: var(--brass); }
.checkbox label { font-size: var(--fs-xs); line-height: 1.55; color: #B8C2CF; font-weight: 400; margin: 0; }
.checkbox label a { color: #fff; }
.checkbox .error { grid-column: 2; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { margin: 0; font-size: var(--fs-sm); color: #B8C2CF; }
.form-status.is-success { color: #9FE0BC; }
.form-status.is-error { color: var(--error-light); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: #071A33; color: #A9B5C3; padding: 4rem 0 2rem; font-size: var(--fs-sm); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: 2rem; border-bottom: 1px solid rgb(255 255 255 / .08); }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-footer nav a { text-decoration: none; color: #C6CFDA; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; }
.disclaimer { padding: 2rem 0; max-width: 90ch; }
.disclaimer h2 { font-family: var(--font-body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--brass); font-weight: 600; margin-bottom: 1rem; }
.disclaimer p { font-size: var(--fs-xs); line-height: 1.7; }
.disclaimer strong { color: #DCE3EB; }
.copyright { font-size: var(--fs-xs); margin: 0; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .08); }

/* ---------- Simple sub-pages (privacy, 404) ---------- */
.page { padding-block: var(--section); min-height: 60vh; }
.page h1 { font-size: var(--fs-h2); }
.page h2 { font-size: 1.4rem; margin-top: 2rem; }
.page p, .page li { color: var(--muted); }

/* ---------- Placeholders ----------
   .ph marks visible placeholder text; [data-placeholder] marks placeholder copy.
   Append ?review to the URL to highlight every placeholder on the page. */
.ph { font-style: italic; opacity: .85; }
.review-mode .ph,
.review-mode [data-placeholder] {
  outline: 2px dashed #E8A13A; outline-offset: 3px; background: rgb(232 161 58 / .12); border-radius: 3px;
}

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .contact-form, .hero::after { display: none; }
  .hero, .section-dark, .site-footer { background: #fff; color: #000; }
}
