/* Alexandria — Bimstone brand system.
 *
 * Three colours, sampled from the BIMSTONE wordmark rather than chosen: black,
 * white, and #FFB600. The gold is an accent, not a theme -- it marks actions and
 * one rule under a heading, and appears nowhere else. Everything structural is
 * black on white with hairlines, which is what keeps a data-heavy page quiet.
 *
 * Type is Figtree, the closest open face to the geometric sans of the wordmark.
 * Google Sans itself is Google's proprietary brand face and is not licensed for
 * use on another company's site, so this is the honest equivalent: SIL Open Font
 * License, self-hosted as four 20 KB WOFF2 files so there is no CDN request, no
 * third-party dependency and no licence question.
 */

@font-face {
    font-family: "Figtree";
    font-style: normal;
    /* One variable file covers the whole range. Declaring four weights downloaded
       the same bytes four times: Google serves the variable font for each request,
       which is easy to miss because the CSS looks like four separate faces. */
    font-weight: 300 900;
    font-display: swap;
    src: url("fonts/figtree-var.woff2") format("woff2-variations");
}

:root {
    --ink: #000000;
    --paper: #ffffff;
    --gold: #FFB600;
    --gold-deep: #E3A200;
    --wash: #F7F7F7;
    --rule: #E5E5E5;
    --muted: #6B6B6B;

    --sans: "Figtree", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

    --step--2: 0.6875rem;
    --step--1: 0.8125rem;
    --step-0: 0.9375rem;
    --step-1: 1.0625rem;
    --step-2: 1.375rem;
    --step-3: 1.875rem;
    --step-4: 2.5rem;

    --gutter: 1.5rem;
}

body {
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-size: var(--step-0);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { border-bottom-color: var(--gold); }

/* ------------------------------------------------------------------ masthead */

.site-nav {
    background: var(--ink);
    border-bottom: 3px solid var(--gold);
    padding: 0.75rem 0;
}

.site-nav .brand {
    color: var(--paper);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: var(--step--1);
    border-bottom: 0;
}

.site-nav .nav-link {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--step--1);
    letter-spacing: 0.04em;
    border-bottom: 2px solid transparent;
    padding: 0.25rem 0;
    margin: 0 0.9rem;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus {
    color: var(--paper);
    border-bottom-color: var(--gold);
}

.site-nav .form-control {
    background: #111;
    border: 1px solid #333;
    color: var(--paper);
    font-size: var(--step--1);
}

.site-nav .form-control::placeholder { color: #777; }
.site-nav .form-control:focus { background: #111; color: var(--paper); border-color: var(--gold); box-shadow: none; }

/* --------------------------------------------------------------------- rules */

.rule-gold { height: 3px; width: 56px; background: var(--gold); border: 0; margin: 0 0 1.25rem; opacity: 1; }
.rule-ink { border-top: 1px solid var(--ink); border-bottom: 0; opacity: 1; margin: 0; }

.eyebrow {
    font-size: var(--step--2);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.section-title {
    font-size: var(--step--2);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 0.35rem;
    margin: 2.5rem 0 1rem;
    font-weight: 600;
}

/* ---------------------------------------------------------------- product page */

.product-media {
    background: var(--wash);
    border: 1px solid var(--rule);
}

.product-media img {
    display: block;
    width: 100%;
    max-height: min(520px, 62vh);
    object-fit: contain;
}

.product-name {
    font-size: clamp(1.75rem, 3.2vw, var(--step-4));
    line-height: 1.04;
    letter-spacing: -0.02em;
    font-weight: 650;
    margin: 0.2rem 0 1rem;
}

.product-maker {
    font-size: var(--step-1);
    border-bottom: 0;
}

.product-maker:hover { border-bottom: 0; color: var(--ink); }
.product-maker::after { content: " →"; color: var(--gold); }

.spec-list {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 0.45rem 1rem;
    border-top: 1px solid var(--ink);
    padding-top: 0.9rem;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.spec-list dt {
    font-size: var(--step--2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding-top: 0.1rem;
}

.spec-list dd { margin: 0; }

/* ------------------------------------------------------------------- controls */

.btn-gold {
    background: var(--gold);
    border: 1px solid var(--gold);
    color: var(--ink);
    font-weight: 600;
    font-size: var(--step--1);
    border-radius: 0;
    padding: 0.45rem 0.9rem;
}

.btn-gold:hover, .btn-gold:focus {
    background: var(--gold-deep);
    border-color: var(--gold-deep);
    color: var(--ink);
}

.btn-quiet {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink);
    font-size: var(--step--1);
    border-radius: 0;
    padding: 0.35rem 0.7rem;
}

.btn-quiet:hover { border-color: var(--ink); color: var(--ink); background: transparent; }

.form-control, .form-select { border-radius: 0; border-color: var(--rule); }
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* -------------------------------------------------------------- formats, files */

.chip {
    display: inline-block;
    font-family: var(--mono);
    font-size: var(--step--2);
    letter-spacing: 0.06em;
    border: 1px solid var(--rule);
    padding: 0.08rem 0.4rem;
    margin: 0 0.25rem 0.25rem 0;
    color: var(--ink);
    background: var(--paper);
}

.file-list { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }

.file-list th {
    font-size: var(--step--2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--ink);
    padding: 0.4rem 0.6rem;
}

.file-list td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--rule);
    font-size: var(--step--1);
    vertical-align: middle;
}

.file-list tr:hover td { background: var(--wash); }
.file-list .file-name { font-family: var(--sans); font-size: var(--step--1); word-break: break-all; }
.file-list .file-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.file-list .file-link { border-bottom: 0; }
.file-list .file-link:hover { border-bottom: 1px solid var(--gold); }

/* ------------------------------------------------------------------- products */

.card {
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
    transition: border-color 120ms ease;
}

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

.card-title { font-weight: 600; letter-spacing: -0.01em; }

.card .btn-primary {
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 0;
    font-size: var(--step--1);
    font-weight: 600;
}

.card .btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* gallery thumbnails: squares that line up, gold marks the chosen one */
.gallery-thumb {
    padding: 0;
    border: 1px solid var(--rule);
    background: var(--paper);
    line-height: 0;
    cursor: pointer;
}

.gallery-thumb img { height: 64px; width: auto; object-fit: contain; display: block; }
.gallery-thumb:hover { border-color: var(--ink); }
.gallery-thumb[aria-current="true"] { border-color: var(--gold); border-width: 2px; }

/* --------------------------------------------------------------- progress bars */

.progress { background: var(--rule); border-radius: 0; }
.progress-bar { background: var(--ink); }

/* --------------------------------------------------------------------- footer */

.site-foot {
    border-top: 1px solid var(--rule);
    margin-top: 4rem;
    padding: 1.5rem 0 2rem;
    font-size: var(--step--2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.site-foot strong { color: var(--ink); letter-spacing: 0.18em; }
