/* ==========================================================================
   Bayman Capital Partners
   Institutional design system. Ivory + ink, one muted bronze accent used
   only as hairlines and small labels. Newsreader serif, Inter for micro-type.
   ========================================================================== */

:root {
  --navy: #16324e;
  --navy-deep: #0f2436;
  --ink: #14212c;
  --slate: #55606b;
  --slate-light: #7c8590;
  --muted: #55606b;

  --gold: #9a7c46;          /* decorative bronze */
  --gold-ink: #6f5a2e;      /* readable bronze for small text (AA on ivory) */
  --gold-line: #cbb98f;     /* hairline bronze */

  --ivory: #f7f3ea;
  --ivory-2: #fbf9f3;
  --ivory-3: #f1ebdd;
  --border: #e3dbc9;
  --border-strong: #d5cab2;
  --border-navy: rgba(247, 243, 234, 0.16);

  --maxw: 1180px;
  --measure: 60ch;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --spring: cubic-bezier(.34, 1.56, .64, 1);   /* subtle overshoot for confident, spring-like motion */
  --ease-out: cubic-bezier(.22, .61, .36, 1);   /* smooth deceleration for reveals */
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.011em; }
h1 { font-size: clamp(2.5rem, 5vw, 3.9rem); font-weight: 400; }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.5rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1.15em; }
a { color: var(--navy); text-decoration: none; }
p a { text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 3px; }
p a:hover { text-decoration-color: var(--gold); }
strong { font-weight: 600; color: var(--navy); }
img, svg { max-width: 100%; height: auto; }

/* ---------- a11y ---------- */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 1000; background: var(--navy); color: var(--ivory); padding: 12px 20px; font-family: var(--sans); font-size: .85rem; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.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; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .wrap { padding: 0 22px; } }
section { padding: clamp(68px, 9vw, 122px) 0; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

.eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold-ink);
  margin: 0 0 22px; display: flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold-line); display: inline-block; }
.eyebrow.center { justify-content: center; }
.section-head { max-width: 760px; margin-bottom: 8px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p.intro { font-size: 1.16rem; color: var(--slate); max-width: var(--measure); }
.section-head.center p.intro { margin-left: auto; margin-right: auto; }
.measure { max-width: var(--measure); }
.lead { font-size: 1.2rem; line-height: 1.62; color: var(--ink); }

/* ---------- scroll progress bar ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--gold), var(--gold-line)); z-index: 200; pointer-events: none; will-change: transform; }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(247, 243, 234, .88); backdrop-filter: saturate(150%) blur(10px); border-bottom: 1px solid var(--border); transition: box-shadow .3s var(--ease-out), background .3s var(--ease-out); }
.site-header.scrolled { background: rgba(247, 243, 234, .96); box-shadow: 0 8px 30px rgba(15, 36, 54, .10); }
.site-header .nav { transition: padding .3s var(--ease-out); }
.site-header.scrolled .nav { padding-top: 11px; padding-bottom: 11px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: var(--maxw); margin: 0 auto; padding: 16px 40px; }
@media (max-width: 640px) { .nav { padding: 14px 22px; } }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-emblem { width: auto; height: 34px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 1.22rem; color: var(--navy); letter-spacing: .28em; padding-left: .28em; }
.brand-sub { font-family: var(--sans); font-weight: 600; font-size: .52rem; color: var(--gold-ink); letter-spacing: .34em; margin-top: 5px; padding-left: .34em; }
@media (max-width: 430px) { .brand-sub { display: none; } }

.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: var(--sans); font-size: .76rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); padding: 4px 0; border-bottom: 1px solid transparent; transition: color .2s ease, border-bottom-color .3s var(--ease-out); }
.nav-links a:hover, .nav-links a[aria-current="page"], .nav-links a.is-active { color: var(--navy); border-bottom-color: var(--gold); }
.nav-cta { color: var(--navy) !important; border: 1px solid var(--border-strong) !important; padding: 9px 18px !important; border-radius: 2px; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .34s var(--spring), box-shadow .34s var(--spring); }
.nav-cta:hover { background: var(--navy); color: var(--ivory) !important; border-color: var(--navy) !important; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,36,54,.16); }
.nav-cta.is-active { border-bottom-color: var(--border-strong) !important; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 2px; padding: 8px 12px; font-family: var(--sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); cursor: pointer; }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav[data-open="true"] .nav-links { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; position: absolute; top: 68px; left: 0; right: 0; background: var(--ivory); border-bottom: 1px solid var(--border); padding: 22px 40px 28px; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- buttons / links ---------- */
.btn { display: inline-block; font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 15px 30px; border-radius: 2px; border: 1px solid var(--navy); cursor: pointer; transition: background .18s ease, color .18s ease, transform .34s var(--spring), box-shadow .34s var(--spring); }
.btn:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 8px 20px rgba(15,36,54,.16); }
.btn:active { transform: translateY(0) scale(.997); transition-duration: .09s; }
.btn-solid { background: var(--navy); color: var(--ivory); }
.btn-solid:hover { background: var(--navy-deep); }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--ivory); }
.btn-light { border-color: rgba(247,243,234,.5); color: var(--ivory); background: transparent; }
.btn-light:hover { background: var(--ivory); color: var(--navy); border-color: var(--ivory); }
.arrow-link { display: inline-flex; align-items: center; gap: 9px; font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); transition: transform .34s var(--spring); }
.arrow-link::after { content: "\2192"; transition: transform .34s var(--spring); }
.arrow-link:hover { transform: translateX(2px); }
.arrow-link:hover::after { transform: translateX(5px); }
.arrow-link.on-dark { color: var(--ivory); }

/* ---------- hero ---------- */
.hero { background-color: var(--navy-deep); color: var(--ivory); position: relative; overflow: hidden; padding: clamp(96px, 15vh, 168px) 0 clamp(84px, 13vh, 150px); }
/* Full-bleed bay/lighthouse photo, held to near-monochrome and darkened so the navy dominates. */
.hero::before {
  content: ""; position: absolute; inset: -8% 0 -8% 0; z-index: 0;
  background-image: url("hero.jpg");
  background-size: cover; background-position: center calc(42% + var(--hero-shift, 0px)); background-repeat: no-repeat;
  filter: grayscale(90%) brightness(0.5);
  pointer-events: none;
  will-change: transform;
}
/* Navy wash over the photo (~80–90%) plus a restrained bronze glow, keeping every text element AA. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 82% 12%, rgba(203,185,143,.08), transparent 58%),
    linear-gradient(180deg, rgba(22,50,78,.80) 0%, rgba(15,36,54,.90) 100%);
}
.hero .wrap { position: relative; z-index: 2; max-width: 960px; }
.hero .eyebrow { color: var(--gold-line); }
.hero .eyebrow::before { background: var(--gold-line); }
.hero h1 { color: var(--ivory); max-width: 16ch; margin-bottom: .5em; }
.hero .lede { font-size: clamp(1.12rem, 1.9vw, 1.4rem); line-height: 1.55; color: #d9d0bf; max-width: 46ch; margin: 0 0 34px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero .provenance { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--border-navy); max-width: 50ch; font-size: .82rem; line-height: 1.6; font-style: italic; color: #bbb197; }
.hero-motif { position: absolute; right: -60px; bottom: -40px; width: 520px; max-width: 60%; opacity: .38; z-index: 2; }
@media (max-width: 760px) { .hero-motif { display: none; } }
/* Ambient tide drift: each tide-line swells at a different rate, so the motif
   reads as moving water — visible, but slow enough to stay background texture. */
.hero-motif { will-change: transform; }
.hero-motif path { transform-box: view-box; will-change: transform; }
.hero-motif path:nth-of-type(1) { animation: tide-drift 7s ease-in-out infinite alternate; }
.hero-motif path:nth-of-type(2) { animation: tide-drift 9s ease-in-out -2s infinite alternate; }
.hero-motif path:nth-of-type(3) { animation: tide-drift 11s ease-in-out -4s infinite alternate; }
@keyframes tide-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-34px, 9px, 0); }
}

/* ---------- figures row ---------- */
.figures { background: var(--ivory-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.figures .row { display: grid; grid-template-columns: repeat(4, 1fr); }
.figure { padding: 46px 30px; border-right: 1px solid var(--border); }
.figure:last-child { border-right: 0; }
.figure .n { display: inline-block; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.9rem); color: var(--navy); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; transform-origin: left bottom; transition: transform .4s var(--spring), color .3s ease; }
.figure:hover .n { transform: scale(1.04); color: var(--navy-deep); }
.figure .l { display: block; margin-top: 14px; font-family: var(--sans); font-size: .82rem; line-height: 1.5; color: var(--slate); }
@media (max-width: 800px) { .figures .row { grid-template-columns: 1fr 1fr; } .figure:nth-child(2n) { border-right: 0; } .figure:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }
@media (max-width: 440px) { .figures .row { grid-template-columns: 1fr; } .figure { border-right: 0; border-bottom: 1px solid var(--border); } .figure:last-child { border-bottom: 0; } }

/* ---------- editorial two-column body ---------- */
.two-col { display: grid; grid-template-columns: 340px 1fr; gap: 60px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }
.two-col .aside .intro { color: var(--slate); font-size: 1.08rem; }

/* criteria as definition rows */
.spec { border-top: 1px solid var(--border-strong); }
.spec .r { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.spec .k { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); padding-top: 3px; }
.spec .v { color: var(--ink); }
@media (max-width: 520px) { .spec .r { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- numbered list (differentiators) ---------- */
.enum { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
@media (max-width: 820px) { .enum { grid-template-columns: 1fr; } }
.enum .item { padding: 34px 0; border-top: 1px solid var(--border); }
.enum .item .idx { font-family: var(--serif); font-size: .95rem; color: var(--gold); letter-spacing: .04em; }
.enum .item h3 { margin: 12px 0 10px; }
.enum .item p { margin: 0; color: var(--ink); }

/* ---------- phases (playbook strip) ---------- */
.phases { border-top: 1px solid var(--border-strong); }
.phase { display: grid; grid-template-columns: 300px 1fr; gap: 48px; padding: 40px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 820px) { .phase { grid-template-columns: 1fr; gap: 14px; padding: 30px 0; } }
.phase .when { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
.phase .when .step-no { display: block; font-family: var(--serif); font-size: 2.4rem; font-weight: 300; color: var(--border-strong); letter-spacing: 0; margin-bottom: 10px; text-transform: none; }
.phase h3 { margin: 0 0 10px; }
.phase p { margin: 0; color: var(--ink); }

/* ---------- split (owners / investors) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.split .col { padding: 8px 52px; }
.split .col:first-child { padding-left: 0; border-right: 1px solid var(--border); }
.split .col:last-child { padding-right: 0; }
@media (max-width: 820px) { .split .col { padding: 34px 0; border-right: 0 !important; border-top: 1px solid var(--border); } .split .col:first-child { padding-top: 0; border-top: 0; } }
.split .col h3 { font-size: 1.55rem; margin-bottom: 14px; }

/* ---------- team ---------- */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 720px) { .team { grid-template-columns: 1fr; gap: 40px; } }
.member { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: start; transition: transform .34s var(--spring); }
.member:hover { transform: translateY(-3px); }
.member .headshot { width: 96px; height: 96px; object-fit: cover; object-position: center top; border: 1px solid var(--border-strong); border-radius: 3px; display: block; background: var(--ivory-3); filter: grayscale(100%); transition: filter .5s ease, border-color .34s var(--spring), box-shadow .34s var(--spring); }
.member:hover .headshot { filter: grayscale(55%); border-color: var(--gold-line); box-shadow: 0 10px 24px rgba(15,36,54,.14); }
.member h3 { margin: 0 0 2px; }
.member .role { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 14px; }
.member p { margin: 0; }

/* ---------- contact ---------- */
.contact { background: var(--navy); color: #d9d0bf; }
.contact h2, .contact h3 { color: var(--ivory); }
.contact .eyebrow { color: var(--gold-line); }
.contact .eyebrow::before { background: var(--gold-line); }
.contact .split .col:first-child { border-right: 1px solid var(--border-navy); }
@media (max-width: 820px) { .contact .split .col { border-top-color: var(--border-navy); } }
.contact .col > p { color: #c3baa7; max-width: 42ch; }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #cfc6b2; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 2px; font-family: var(--serif); font-size: 1rem; color: var(--ivory);
  background: transparent; border: 0; border-bottom: 1px solid var(--border-navy); border-radius: 0;
}
.field select { color: #cfc6b2; }
.field select option { color: var(--ink); }
.field textarea { min-height: 92px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8b8372; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-bottom-color: var(--gold-line); }
.form-note { font-family: var(--sans); font-size: .76rem; color: #a89e88; margin-top: 4px; }
.form-note a { color: #cfc6b2; }
.hp { position: absolute; left: -5000px; }
.contact .btn { margin-top: 6px; }

/* ---------- document pages ---------- */
.doc-hero { background: var(--navy); color: var(--ivory); padding: clamp(70px, 12vh, 112px) 0 clamp(52px, 8vh, 74px); }
.doc-hero .eyebrow { color: var(--gold-line); }
.doc-hero .eyebrow::before { background: var(--gold-line); }
.doc-hero h1 { color: var(--ivory); max-width: 22ch; }
.doc-hero .tagline { color: #b3a98f; font-style: italic; margin: 0; }
.doc-body { padding: clamp(52px, 8vw, 84px) 0 clamp(64px, 9vw, 96px); }
.doc-body .wrap { max-width: 760px; }
.doc-body h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 2.2em; padding-bottom: .35em; border-bottom: 1px solid var(--border); }
.doc-body h2:first-of-type { margin-top: 0; }
.doc-body h3 { margin-top: 1.7em; color: var(--navy); }
.doc-body ul, .doc-body ol { padding-left: 1.25em; margin: 0 0 1.25em; }
.doc-body li { margin-bottom: .55em; padding-left: .2em; }
.doc-body li::marker { color: var(--gold); }
.callout { background: var(--ivory-2); border: 1px solid var(--border); border-left: 2px solid var(--gold); padding: 22px 26px; margin: 1.6em 0; font-size: .98rem; }
.doc-toc { border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); padding: 26px 0; margin-bottom: 44px; }
.doc-toc h2 { border: 0; padding: 0; margin: 0 0 14px; font-size: .78rem; font-family: var(--sans); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
.doc-toc ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 40px; font-family: var(--sans); font-size: .92rem; }
.doc-toc li { counter-increment: toc; margin-bottom: 9px; padding: 0; }
.doc-toc li::before { content: counter(toc, decimal-leading-zero); color: var(--gold); margin-right: 10px; font-variant-numeric: tabular-nums; }
.doc-toc ol { counter-reset: toc; }
@media (max-width: 620px) { .doc-toc ol { columns: 1; } }

/* ---------- data tables ---------- */
.table-scroll { overflow-x: auto; margin: 1.7em 0; border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--ivory-2); }
table.data caption { text-align: left; padding: 16px 20px; font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); background: var(--ivory-3); border-bottom: 1px solid var(--border); }
table.data th, table.data td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data thead th { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); background: var(--ivory-3); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data th[scope="row"] { font-weight: 500; color: var(--navy); }
.criteria-table th[scope="row"] { width: 32%; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #a9b4c1; padding: clamp(56px, 7vw, 80px) 0 36px; }
.site-footer a { color: #cdc4b1; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 30px; } }
.footer-brand .logo-lockup { width: 150px; margin-bottom: 18px; }
.footer-brand .motto { font-family: var(--serif); font-style: italic; color: var(--gold-line); font-size: 1.05rem; }
.footer-col h4 { color: var(--ivory); font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; font-size: .95rem; }
.footer-bottom { padding-top: 26px; font-family: var(--sans); font-size: .78rem; color: #7f8b99; line-height: 1.7; }
.footer-bottom p { margin: 0 0 12px; max-width: 960px; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; }
.footer-legal-links a { font-size: .78rem; letter-spacing: .04em; }

/* ---------- scroll reveals (progressive enhancement) ----------
   Hidden state applies ONLY when JS is present (.js on <html>) AND the
   reveal has not yet entered the viewport. If JS fails or is disabled,
   content renders fully visible and static. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(38px) scale(.984);
  transition: opacity .6s var(--ease-out), transform .9s var(--spring);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- reduced motion: everything static and visible ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-motif path { animation: none !important; transform: none !important; }
  .btn:hover, .nav-cta:hover, .member:hover, .figure:hover .n,
  .arrow-link:hover, .arrow-link:hover::after { transform: none !important; box-shadow: none !important; }
}

/* utility */
.mt-lg { margin-top: 40px; }
.center { text-align: center; }
