/* Shared component vocabulary.
 *
 * These classes are used by more than one page. A rule that only ever applies
 * to one page belongs in pages.css instead.
 *
 * Naming follows the admin portal's BEM-ish convention: block `.card`,
 * element `.card__title`, modifier `.card--flat`, state `.is-active`.
 */

/* ── Section scaffolding ─────────────────────────────────────────────────── */

.section {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: clamp(46px, 6vw, 80px) var(--page-gutter);
}

/* A full-bleed band with its own background; the inner div re-applies the
   page width. Used wherever the original had a coloured/bordered <section>. */
.band {
    border-top: 1px solid rgb(var(--ink-rgb) / 0.1);
    background: var(--surface-sunken);
}

.band--plain {
    border-top: 0;
    background: none;
}

.band--inverse {
    background: var(--surface-inverse);
    border-top: 0;
}

.band__inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: clamp(44px, 6vw, 72px) var(--page-gutter);
}

.section-head {
    max-width: 100%;
}

.section-head--spaced {
    margin-bottom: 34px;
}

.eyebrow {
    font-size: 13px;
    letter-spacing: 0.18em;
    color: var(--ink-muted);
    font-weight: 600;
}

.eyebrow--on-dark {
    color: rgb(255 255 255 / 0.6);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.4vw, 44px);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin: 12px 0 0;
    color: var(--ink);
}

.section-title--on-dark {
    color: #fff;
}

.section-lede {
    font-size: 17px;
    color: var(--ink-muted);
    margin: 14px 0 0;
    max-width: 100%;
}

.section-lede--on-dark {
    color: rgb(255 255 255 / 0.76);
}

/* ── Grids ───────────────────────────────────────────────────────────────── */

.grid {
    display: grid;
    gap: 18px;
}

.grid--auto-230 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--auto-200 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid--auto-260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--auto-280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--auto-300 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--auto-320 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ── Card ────────────────────────────────────────────────────────────────── */

.card {
    display: flex;
    flex-direction: column;
    padding: 28px 24px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--hairline);
    background: var(--surface-card);
    box-shadow: 0 2px 4px rgb(var(--ink-rgb) / 0.04), 0 10px 28px rgb(var(--ink-rgb) / 0.07);
}

/* Cards that navigate somewhere. They are <a> now, not clickable <div>s. */
.card--link {
    color: inherit;
    transition: border-color 0.2s;
}

.card--link:hover {
    border-color: var(--accent-glow);
    color: inherit;
}

.card--flat {
    box-shadow: none;
    border-color: var(--border);
}

.card--tight {
    padding: 22px 20px 20px;
}

.card__title {
    font-family: var(--font-display);
    font-size: 21px;
    line-height: 1.22;
    font-weight: 600;
    color: var(--ink);
    margin: 18px 0 0;
    letter-spacing: -0.015em;
}

.card__title--sm {
    font-size: 18px;
    margin-top: 14px;
}

.card__body {
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--ink-muted);
    margin: 10px 0 16px;
}

.card__body--last {
    margin-bottom: 0;
}

.card__foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgb(var(--ink-rgb) / 0.1);
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-muted);
}

/* Numbered badge in the corner of a capability/model card. */
.badge-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: linear-gradient(140deg, rgb(31 123 255 / 0.14), rgb(139 47 224 / 0.2));
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-text);
    flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border: 0;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 15.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-align: center;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.btn--primary {
    color: #fff;
    background: var(--gradient-brand);
}

.btn--primary:hover {
    color: #fff;
    background: linear-gradient(100deg, var(--brand-strong), var(--accent-strong));
}

.btn--secondary {
    color: var(--ink);
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
}

.btn--secondary:hover {
    color: var(--ink);
    border-color: var(--accent-glow);
}

/* On the dark hero/CTA bands. */
.btn--ghost {
    color: #fff;
    background: rgb(255 255 255 / 0.08);
    border: 1px solid rgb(255 255 255 / 0.24);
}

.btn--ghost:hover {
    color: #fff;
    background: rgb(255 255 255 / 0.16);
}

.btn--on-dark {
    color: var(--ink);
    background: #fff;
}

.btn--on-dark:hover {
    color: var(--ink);
    background: rgb(255 255 255 / 0.88);
}

.btn--sm {
    padding: 11px 20px;
    font-size: 15px;
}

.btn--block {
    width: 100%;
}

/* The header CTA is hidden on narrow screens; the mobile menu carries it. */
.site-header__cta {
    padding: 11px 20px;
    font-size: 15px;
}

/* ── Filter chips ────────────────────────────────────────────────────────── */

.chip {
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    background: var(--surface-card);
    color: var(--ink-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.chip:hover {
    border-color: var(--accent-glow);
    color: var(--ink);
}

/* Replaces three recomputed inline style properties in the original. */
.chip.is-active {
    border-color: transparent;
    background: var(--gradient-brand);
    color: #fff;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Tag / pill ──────────────────────────────────────────────────────────── */

.tag {
    display: inline-block;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    background: var(--accent-wash);
    color: var(--accent-text);
    font-size: 12.5px;
    font-weight: 600;
}

.tag--muted {
    background: rgb(var(--ink-rgb) / 0.06);
    color: var(--ink-muted);
}

.tag--on-dark {
    background: rgb(255 255 255 / 0.12);
    color: #fff;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Stat ────────────────────────────────────────────────────────────────── */

.stat__value {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.stat__label {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-muted);
    margin-top: 8px;
}

.stat__value--on-dark { color: #fff; }
.stat__label--on-dark { color: rgb(255 255 255 / 0.7); }

/* ── Photo card ──────────────────────────────────────────────────────────── */

/* 2026-09-24: replaced the generated gradient initial-tiles. The headshots are
   640x800, so the 4/5 box crops nothing; the background only shows while the
   image is still loading. */
.photo-card {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    margin: 0;
}

.photo-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── Lists ───────────────────────────────────────────────────────────────── */

.tick-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tick-list__item {
    position: relative;
    padding-left: 26px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--ink-muted);
}

.tick-list__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-brand);
}

.tick-list--on-dark .tick-list__item {
    color: rgb(255 255 255 / 0.78);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

.field {
    display: grid;
    gap: 7px;
}

.field__label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink-secondary);
}

.field__input,
.field__textarea,
.field__select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-input);
    background: var(--surface-card);
    color: var(--ink-body);
    font-size: 15.5px;
    transition: border-color 0.18s;
}

.field__textarea {
    min-height: 130px;
    resize: vertical;
}

.field__input:focus,
.field__textarea:focus,
.field__select:focus {
    outline: none;
    border-color: var(--brand);
}

.field__input::placeholder,
.field__textarea::placeholder {
    color: var(--ink-faint);
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* File picker: the real <input type="file"> is hidden and the label is the
   control, so it can be styled and still work with the keyboard. */
.file-field__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.file-field__button {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-input);
    background: var(--surface-sunken);
    color: var(--ink-muted);
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s;
}

.file-field__input:focus-visible + .file-field__button,
.file-field__button:hover {
    border-color: var(--brand);
    color: var(--ink);
}

/* Success panel shown after a form is submitted. */
.form-success {
    display: grid;
    gap: 10px;
    padding: 28px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--accent-glow);
    background: var(--accent-wash);
}

.form-success__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
}

.form-success__body {
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--ink-muted);
}

/* ── Panel ───────────────────────────────────────────────────────────────── */

.panel {
    padding: clamp(24px, 3vw, 34px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface-card);
}

.panel--sunken {
    background: var(--surface-sunken);
    box-shadow: none;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty {
    padding: 44px 24px;
    text-align: center;
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border-strong);
    color: var(--ink-muted);
}

.empty__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

/* ── Table ───────────────────────────────────────────────────────────────── */

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.data-table th {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    font-weight: 600;
    white-space: nowrap;
}

.data-table td {
    color: var(--ink-body);
}

/* ── Scroll-reveal ───────────────────────────────────────────────────────── */
/* js/reveal.js sets the inline transition and clears these. The 2.5s failsafe
   in reveal.js force-shows anything the observer missed. */

[data-reveal] {
    will-change: opacity, transform;
}

/* The wipe hides a heading until it scrolls into view, so it is gated twice:
   on `.js` (set by the inline script in <head>) and on the motion preference.
   Without both gates a heading would be permanently invisible to anyone with
   JavaScript off or reduced motion on — the content is in the HTML either way,
   and it must stay readable. */
@media (prefers-reduced-motion: no-preference) {
    .js [data-wipe] {
        clip-path: inset(0 100% 0 0);
        transition: clip-path 1s cubic-bezier(0.22, 0.8, 0.3, 1);
    }

    .js [data-wipe].is-shown {
        clip-path: inset(0 0 0 0);
    }
}

/* Server-side error shown above a form's submit button. Distinct from native
   field validation, which the browser renders itself. */
.form-error {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgb(176 36 24 / 0.35);
    background: rgb(176 36 24 / 0.08);
    color: #b02418;
    font-size: 14.5px;
    line-height: 1.5;
}

[data-theme="dark"] .form-error {
    color: #ff9c92;
}

.form-success__ref {
    margin: 10px 0 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ink-muted);
}
