/* Shared site chrome: fonts and the header. Each page's own content keeps its
   inline <style>. See docs/website.md ("Shared header and footer"). */

/* Fonts are self-hosted (never from Google Fonts): the files Google Fonts
   serves, Latin subset, variable weight. Both SIL OFL 1.1; licenses in
   /fonts/OFL-Inter.txt and /fonts/OFL-SourceCodePro.txt. */

/* Inter: the brand typeface, used for page text. */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter-latin-wght.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Display titles in the wordmark's style: Inter Extra Bold Italic, the
   brand's wordmark face (asp/brand/fonts/Inter/static/
   Inter_28pt-ExtraBoldItalic.ttf), subset to Latin plus the Cyrillic И
   (U+0418) by pyftsubset. Its own family name so it never stands in for
   upright Inter. Same OFL license as Inter (OFL-Inter.txt). */
@font-face {
    font-family: 'Antinote Display';
    src: url('/fonts/inter-display-extrabold-italic.woff2') format('woff2');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

/* Source Code Pro: header and footer. */
@font-face {
    font-family: 'Source Code Pro';
    src: url('/fonts/source-code-pro-latin-wght.woff2') format('woff2');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Page text: a soft off-white rather than pure white, which is harsh on
       black. Headings, bold lead-ins and links stay pure white. */
    --text: #e4e4e7;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --mono: 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --chrome-muted: #9999a3;
    --chrome-dim: #5c5c66;
    /* Width of the header and footer rows. Pages with a wider layout than
       the 720px text column (the home page's image tiles) override it. */
    --chrome-width: 720px;
}

/* ---------- Page text ---------- */

/* macOS renders light text on black heavier than dark on light; greyscale
   smoothing thins it to match. No effect elsewhere. */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* A title set like the AИTIИOTE wordmark: extra bold italic capitals, with
   each N written as the Cyrillic И in the HTML. Screen readers get the
   plain word from a .sr-only twin; the styled one is aria-hidden:
   <h1><span aria-hidden="true">IИSTRUMEИTS</span><span class="sr-only">Instruments</span></h1> */
.display-title {
    font-family: 'Antinote Display', var(--sans);
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.01em;  /* the wordmark's tight spacing */
    line-height: 1.05;
    color: #fff;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

:where(h1, h2, h3, h4, strong) {  /* zero specificity: page styles (e.g. grey h3 on /samples) win */
    color: #fff;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.site-header-inner {
    max-width: var(--chrome-width);
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.brand-block {
    display: flex;
    align-items: center;
    gap: 18px;
}
.brand-sub {
    font-family: var(--mono);
    font-size: 0.68rem;
    line-height: 1.4;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--chrome-dim);
    padding-left: 14px;  /* space, not a divider, sets it apart from the wordmark */
}
.site-nav {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--chrome-muted);
    text-decoration: none;
}
.site-nav a:hover {
    color: #fff;
}
/* Current page: each page's <body data-page="..."> picks its nav link,
   shown in white (no underline). */
body[data-page="samples"] .site-nav a[href="/samples"] {
    color: #fff;
}

@media (max-width: 560px) {
    .site-header-inner { padding: 18px 16px; }
    .brand-sub { display: none; }
}

/* ---------- Page banner ---------- */

/* A page reached from a home page tile opens with a wide, short crop of
   that tile's photo, with the page title laid over it like the tiles.
   Same image file as the tile; object-position on the <img> picks the part
   of the photo shown.
   <div class="page-banner"><img ...><h1 class="display-title">...</h1></div> */
.page-banner {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 1;
    min-height: 140px;  /* room for the title on phones */
    margin: 8px 0 28px;
    background: #111;
}
.page-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) brightness(0.92);  /* matches the home tiles */
}
/* Dark gradient from the bottom left so the white title reads. */
.page-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, 0) 80%),
        linear-gradient(to right, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
}
.page-banner h1 {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 18px;
    z-index: 1;
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
}

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

.site-footer {
    padding: 72px 0 56px;  /* space, not a rule, separates it from the page */
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--chrome-dim);
}
.site-footer-inner {
    max-width: var(--chrome-width);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-left img {
    display: block;
}
.footer-legal {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.12em;
    white-space: nowrap;  /* keep the © with the slanted text after it */
}
/* Slanted at the logomark's angle (9.3deg), like the home page's tile link
   labels; a skew because the mono font has no italic. The © stays upright
   so it doesn't distort. */
.footer-slant {
    display: inline-block;
    transform: skewX(-9.3deg);
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links a {
    color: var(--chrome-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}
.footer-links a:hover {
    color: #fff;
}
/* Email addresses read wrong in capitals. */
.footer-links a.footer-email {
    text-transform: none;
    letter-spacing: 0.04em;
}
