/*
 * The Trust Gap: public site, Option B "Dark".
 * Values come from design_handoff_trust_gap_website/DESIGN.md + "The Trust Gap B.dc.html".
 * Fluid by design: clamp() sizes and auto-fit grids, no breakpoints.
 * Accent colours arrive per element as --accent (see App\PageBuilder\Palette).
 */

:root {
    --bg: #121214;
    --surface: #18181b;
    --line: #2a2a2f;
    --line-strong: #3a3a40;
    --line-hover: #45454c;
    --text: #f2f2f3;
    --text-2: #c8c8cc;
    --text-muted: #b4b4ba;
    --text-muted-2: #a8a8ae;
    --text-faint: #6c6c74;
    --text-footer: #8a8a92;
    --pink: #ff006a;
    --pink-hover: #e0005d;
    --pink-light: #ff4d94;
    --pink-lighter: #ff80b3;

    --max: 1240px;
    --gutter: clamp(20px, 4vw, 48px);
    --section-y: clamp(48px, 7vw, 88px);
    --section-y-tight: clamp(40px, 6vw, 72px);
    --radius: 16px;
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Outfit", system-ui, sans-serif;
    text-wrap: pretty;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

a {
    color: var(--pink-light);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--pink-lighter);
}

::selection {
    background: var(--pink);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 3px;
}

main:focus {
    outline: none;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
    margin: 0;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

.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;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 20;
    background: var(--pink);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
    color: #fff;
}

.text-pink {
    color: var(--pink);
}

/* ---------- Preview bar (logged-in CMS preview only) ---------- */

.preview-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 20px;
    padding: 10px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line-strong);
    color: var(--text-2);
    font-size: 14px;
    text-align: center;
}

.preview-bar p {
    margin: 0;
}

.preview-bar strong {
    margin-right: 8px;
    color: var(--pink);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.preview-bar a {
    color: var(--text);
    font-weight: 600;
}

/* ---------- Nav ---------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(18, 18, 20, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-nav__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px var(--gutter);
    display: flex;
    align-items: center;
    gap: 12px 32px;
    flex-wrap: wrap;
}

.site-nav__logo {
    margin-right: auto;
    display: flex;
}

.site-nav__logo img {
    height: 38px;
    width: auto;
    display: block;
}

.site-nav__links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 15px;
}

.site-nav__links a {
    color: var(--text-2);
    text-decoration: none;
}

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
    color: #fff;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    text-decoration: none;
    font-size: 16px;
    padding: 14px 24px;
    border-radius: 999px;
}

.btn--primary,
.btn--nav {
    background: var(--pink);
    color: #fff;
    font-weight: 600;
}

.btn--primary:hover,
.btn--nav:hover {
    background: var(--pink-hover);
    color: #fff;
}

.btn--nav {
    font-size: 15px;
    padding: 10px 18px;
}

.btn--outline {
    border: 1px solid var(--line-strong);
    color: var(--text);
    font-weight: 500;
}

.btn--outline:hover {
    border-color: var(--text);
    color: #fff;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.actions:empty {
    display: none;
}

/* ---------- Layout ---------- */

/* The design's 1240px max-width applies to the content box (it has no border-box reset),
   so these containers are content-box to keep the same measure. */
.site-nav__inner,
.site-main,
.site-footer {
    box-sizing: content-box;
}

.site-main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.block {
    padding: var(--section-y) 0;
    scroll-margin-top: 80px;
}

.block--tight {
    padding: var(--section-y-tight) 0;
}

.block--stack {
    display: grid;
    gap: 36px;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 36px 64px;
}

.two-col--profile {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 40px 64px;
}

.split-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 16px 48px;
    align-items: end;
}

.intro {
    display: grid;
    gap: 14px;
    align-content: start;
    max-width: 760px;
}

.intro--tight {
    gap: 12px;
}

/* ---------- Type ---------- */

.eyebrow {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent, var(--pink-light));
}

.h2 {
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.02em;
    font-weight: 600;
    line-height: 1.08;
}

.h2--sm {
    font-size: clamp(30px, 4vw, 44px);
}

.text-body {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
}

.text-small {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted-2);
}

.label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding-bottom: 8px;
}

/* ---------- Hero ---------- */

.hero {
    padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 48px;
    align-items: end;
}

.hero__main {
    display: grid;
    gap: 28px;
}

.swatches {
    display: flex;
    gap: 4px;
}

.swatches span,
.swatch {
    display: block;
    width: 12px;
    height: 12px;
    background: var(--accent);
}

.hero__title {
    font-size: clamp(42px, 6.4vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 600;
}

.hero__lead {
    font-size: 19px;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 52ch;
}

.stat-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat-panel__cell {
    background: var(--surface);
    padding: 24px;
    display: grid;
    gap: 6px;
    align-content: start;
}

.stat-panel__value {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.stat-panel__caption {
    font-size: 14px;
    color: var(--text-muted-2);
}

/* ---------- Card grid ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    display: grid;
    gap: 12px;
    align-content: start;
    transition: border-color 0.15s ease;
}

.card:hover {
    border-color: var(--line-hover);
}

.card .swatch {
    width: 14px;
    height: 14px;
}

.card__title {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ---------- Big figures ---------- */

.figure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 16px;
}

.figure-panel {
    border-radius: var(--radius);
    padding: clamp(24px, 3vw, 40px);
    background: var(--surface);
    border: 1px solid var(--line);
    display: grid;
    gap: 14px;
    align-content: start;
}

.figure-panel--featured {
    background: var(--pink);
    border-color: var(--pink);
    color: #fff;
}

.figure-panel__figure {
    font-size: clamp(56px, 7vw, 88px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--accent, #fff);
}

.figure-panel--featured .figure-panel__figure {
    color: #fff;
}

.figure-panel__title {
    font-size: 24px;
    font-weight: 600;
}

.figure-panel__body {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
}

.figure-panel--featured .figure-panel__body {
    color: #fff;
}

/* ---------- Numbered list ---------- */

.numbered-list__item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 4px 12px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.numbered-list__n {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-faint);
    padding-top: 3px;
}

.numbered-list__item > div {
    display: grid;
    gap: 4px;
}

.numbered-list__title {
    font-size: 18px;
    font-weight: 600;
}

.numbered-list .text-small,
.sector .text-small,
.hairline-panel .text-small {
    line-height: 1.55;
}

/* ---------- Sector grid ---------- */

.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
}

.sector {
    border-top: 2px solid var(--accent);
    padding: 20px 0 0;
    display: grid;
    gap: 8px;
    align-content: start;
}

.sector__title {
    font-size: 18px;
    font-weight: 600;
}

/* ---------- Hairline feature panel ---------- */

.hairline-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.hairline-panel__cell {
    background: var(--bg);
    padding: 28px;
    display: grid;
    gap: 8px;
    align-content: start;
}

.hairline-panel__title {
    font-size: 20px;
    font-weight: 600;
}

/* ---------- Profile ---------- */

.profile {
    display: grid;
    gap: 16px;
    align-content: start;
}

.profile__role {
    font-size: 16px;
    color: var(--text-muted-2);
}

.profile__lead {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-2);
}

.profile__text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-muted-2);
}

.profile-lists {
    display: grid;
    gap: 24px;
    align-content: start;
}

.profile-lists > div {
    display: grid;
}

.rule-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-2);
}

/* ---------- Partner ---------- */

.partner {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 48px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 24px 48px;
    align-items: center;
}

.partner__title {
    font-size: clamp(28px, 3.4vw, 40px);
    letter-spacing: -0.02em;
    font-weight: 600;
}

/* ---------- CTA ---------- */

.cta {
    padding: clamp(56px, 9vw, 112px) 0;
    display: grid;
    gap: 24px;
    justify-items: start;
}

.cta__title {
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 600;
    max-width: 16ch;
}

.cta__body {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 54ch;
}

/* ---------- Rich text ---------- */

.prose {
    max-width: 72ch;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-2);
}

.prose > * + * {
    margin-top: 1em;
}

.prose h1,
.prose h2,
.prose h3 {
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.prose h1 {
    font-size: clamp(36px, 5vw, 56px);
}

.prose h2 {
    font-size: clamp(26px, 3vw, 34px);
    margin-top: 1.6em;
}

.prose h3 {
    font-size: 21px;
    margin-top: 1.4em;
}

.prose > :first-child {
    margin-top: 0;
}

.prose ul,
.prose ol {
    padding-left: 1.25em;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose li + li {
    margin-top: 0.35em;
}

.prose li::marker {
    color: var(--pink-light);
}

.prose strong {
    color: var(--text);
    font-weight: 600;
}

.prose blockquote {
    margin-left: 0;
    padding-left: 20px;
    border-left: 2px solid var(--pink);
    color: var(--text-muted);
}

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

.site-footer {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.site-footer__inner {
    padding: 28px 0 40px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-footer);
}

.site-footer__inner img {
    height: 30px;
    width: auto;
    display: block;
}

.site-footer__social {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer__social a {
    color: var(--text-muted-2);
}
