/* CAPITAL CORP — design system
   ink & bone · set like a privately circulated memorandum
   display: Cormorant Garamond · text: Source Serif 4 · data: IBM Plex Mono */

:root {
    --ink: #0c0b09;
    --bone: #ece7db;
    --dim: #b7b0a2;
    --hairline: rgba(236, 231, 219, 0.14);
    --signal: #5da884;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

html { font-size: 19px; }

body {
    background: var(--ink);
    color: var(--bone);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: settle 1.2s ease-out;
}

@keyframes settle {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pagein {
    from { opacity: 0; transform: translateY(24px); filter: blur(9px); }
    60%  { opacity: 1; }
    to   { opacity: 1; transform: none; filter: blur(0); }
}
main, .frontispiece { animation: pagein 1.25s cubic-bezier(0.16, 1, 0.3, 1); }

.mono {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
}

/* page content sits above the ambient globe canvas (#bg-globe, z-index 0) */
nav, main, footer, .frontispiece { position: relative; z-index: 1; }

/* film grain, barely there */
body::after {
    content: '';
    position: fixed; inset: 0;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>');
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

/* ---------- NAV ---------- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 2rem;
    padding: 2rem 2.4rem;
}
.wordmark {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--bone);
    text-decoration: none;
    white-space: nowrap;
}
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    justify-content: flex-end;
}
.nav-links a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dim);
    text-decoration: none;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--bone); }
.nav-links a.here {
    color: var(--bone);
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 2px;
}

/* ---------- PAGE BODY ---------- */
main {
    flex: 1;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 4.5rem 2.4rem 7rem;
}

.page-no {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 3.4rem;
}

h1.declaration {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.3rem, 5.4vw, 3.6rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.01em;
    max-width: 24ch;
    margin-bottom: 2.6rem;
}
h1.declaration em, h2.tenet em { font-style: italic; font-weight: 500; }

.lead {
    font-size: 1.18rem;
    line-height: 1.75;
    color: var(--dim);
    max-width: 60ch;
}
.lead strong { color: var(--bone); font-weight: 500; }

/* ---------- TENETS (philosophy) ---------- */
.tenet { margin-top: 6rem; }
.tenet:first-of-type { margin-top: 0; }
.tenet-no {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.26em;
    color: var(--dim);
    margin-bottom: 1.5rem;
}
h2.tenet {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 500;
    line-height: 1.18;
    max-width: 28ch;
    margin-bottom: 1.7rem;
}
.gloss {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--dim);
    max-width: 60ch;
}
.gloss strong { color: var(--bone); font-weight: 500; }

sup.fn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6em;
    color: var(--signal);
}

.footnote {
    margin-top: 2.2rem;
    max-width: 56ch;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--dim);
}
.footnote .fn-mark { color: var(--signal); }

/* ---------- LABELED SECTIONS (approach / intelligence) ---------- */
.row {
    display: grid;
    grid-template-columns: 175px 1fr;
    gap: 2.4rem;
    padding: 2.4rem 0;
    border-top: 1px solid var(--hairline);
}
.row:last-of-type { border-bottom: 1px solid var(--hairline); }
.row-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dim);
    padding-top: 0.4rem;
    line-height: 1.8;
}
.row-body {
    font-size: 1.15rem;
    line-height: 1.72;
    color: var(--dim);
    max-width: 58ch;
}
.row-body strong { color: var(--bone); font-weight: 500; }
@media (max-width: 700px) {
    .row { grid-template-columns: 1fr; gap: 0.9rem; }
}

.closing {
    font-family: 'Cormorant Garamond', Georgia, serif;
    margin-top: 4.2rem;
    font-size: 1.55rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.55;
    max-width: 46ch;
}

/* ---------- PERSONNEL (expandable roles) ---------- */
.role { border-top: 1px solid var(--hairline); }
.role:last-of-type { border-bottom: 1px solid var(--hairline); }

.role-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 2.1rem 0.2rem;
}
.role-summary::-webkit-details-marker { display: none; }
.role-summary:hover .role-name { color: var(--bone); }
.role-title { display: flex; flex-direction: column; gap: 0.55rem; }
.role-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--bone);
    transition: color 0.3s;
}
.role-req {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dim);
}
.role-toggle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--signal);
    flex-shrink: 0;
}
.role-toggle::before { content: '+'; }
details[open] .role-toggle::before { content: '\2013'; }

.role-body {
    padding: 0 0.2rem 2.6rem;
    max-width: 64ch;
}
details[open] .role-body { animation: settle 0.5s ease-out; }
.role-body p {
    font-size: 1.15rem;
    line-height: 1.72;
    color: var(--dim);
    margin-bottom: 1.6rem;
}
.role-points { list-style: none; }
.role-points li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 1.08rem;
    line-height: 1.6;
    color: var(--dim);
    margin-bottom: 0.7rem;
}
.role-points li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: var(--signal);
}

/* ---------- TABLE OF CONTENTS (index) ---------- */
.frontispiece {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 1.5rem 3rem;
}
.kicker {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 3rem;
}
.frontispiece h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.6rem, 12vw, 6.4rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.015em;
    max-width: 14ch;
}
.frontispiece h1 em { font-style: italic; font-weight: 500; }
.credo {
    margin-top: 3rem;
    font-size: 1.22rem;
    line-height: 1.75;
    color: var(--dim);
    max-width: 56ch;
}
.credo strong { color: var(--bone); font-weight: 500; }

.toc {
    width: 100%;
    max-width: 780px;
    margin: 4.5rem auto 0;
    text-align: left;
}
.toc a {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1.6rem;
    align-items: baseline;
    padding: 1.7rem 0.4rem;
    border-top: 1px solid var(--hairline);
    text-decoration: none;
    color: inherit;
    transition: background 0.4s;
}
.toc a:last-of-type { border-bottom: 1px solid var(--hairline); }
.toc a:hover { background: rgba(236, 231, 219, 0.03); }
.toc .num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.2em;
    color: var(--dim);
}
.toc .name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--bone);
}
.toc .go {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: var(--dim);
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}
.toc a:hover .go { opacity: 1; transform: translateX(4px); color: var(--signal); }

/* ---------- FIGURES ---------- */
.figure { margin: 3.4rem 0 0; }
.figure svg { width: 100%; height: auto; display: block; }
.figcaption {
    margin-top: 1.3rem;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--dim);
    max-width: 62ch;
}
.figcaption .fig-mark {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--signal);
    margin-right: 0.25rem;
}

/* ---------- PROCESS STRIP ---------- */
.process {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}
.step { border-top: 1px solid var(--hairline); padding-top: 1.2rem; }
.step-no {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--signal);
    margin-bottom: 0.7rem;
}
.step-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
}
.step-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dim);
}
@media (max-width: 860px) {
    .process { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .process { grid-template-columns: 1fr; }
}

/* ---------- FOOTER ---------- */
footer {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.8rem 2.4rem;
    border-top: 1px solid var(--hairline);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dim);
}

a.quiet { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--hairline); }

/* ---------- MOBILE ---------- */
@media (max-width: 640px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem 1.4rem;
    }
    .nav-links {
        justify-content: flex-start;
        gap: 0.9rem 1.3rem;
    }
    .nav-links a { font-size: 12px; }

    main { padding: 3rem 1.4rem 5rem; }
    .frontispiece { padding: 2.5rem 1.4rem 2.5rem; }
    .credo { margin-top: 2.4rem; }
    .toc { margin-top: 3.4rem; }
    .toc a {
        grid-template-columns: 34px 1fr auto;
        gap: 1rem;
        padding: 1.5rem 0.2rem;
    }
    .toc .name { font-size: 1.5rem; }

    .page-no { margin-bottom: 2.6rem; }
    .tenet { margin-top: 4.5rem; }
    .closing { font-size: 1.4rem; margin-top: 3.4rem; }
    .figure { margin-top: 2.6rem; }

    .role-summary { padding: 1.8rem 0.2rem; }
    .role-name { font-size: 1.45rem; }

    footer {
        padding: 1.5rem 1.4rem;
        font-size: 10.5px;
        gap: 0.6rem;
    }
}

@media (max-width: 380px) {
    .nav-links { gap: 0.7rem 1rem; }
    .nav-links a { font-size: 11px; letter-spacing: 0.12em; }
}
