/* ═══════════════════════════════════════════════════════════
   BEZALT · site.css: shared foundation
   Tokens, type, buttons, brand lockup, footer, footage tint
   layer, code and callouts. Page layouts live in home.css,
   docs.css and terminal.css.
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────
   DESIGN TOKENS
───────────────────────────── */
:root {
    /* brand */
    --gold: #F2B441;
    --gold-bright: #FFD27A;
    --gold-deep: #C98F1E;
    --gold-ink: #1A1200;
    --tint: #F5A623;

    /* surfaces */
    --bg: #000;
    --bg-1: #0B0A08;
    --bg-2: #12100D;
    --bg-3: #1A1713;
    --bg-features: #14120F;

    /* lines */
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --line-gold: rgba(242, 180, 65, 0.22);
    --line-gold-strong: rgba(242, 180, 65, 0.45);

    /* text */
    --text: #fff;
    --text-2: rgba(255, 255, 255, 0.72);
    --text-3: rgba(255, 255, 255, 0.5);
    --text-4: rgba(255, 255, 255, 0.34);

    /* type + shape */
    --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --r-card: 20px;
    --r-btn: 999px;

    /* layout */
    --gutter: clamp(20px, 5.5vw, 80px);
    --section-x: clamp(20px, 11vw, 160px);
    --content-max: 1200px;

    /* motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/manrope-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/instrument-serif-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/instrument-serif-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─────────────────────────────
   BASE
───────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.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: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--gold-ink);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 0.2s;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

::selection {
    background: var(--gold);
    color: var(--gold-ink);
}

/* ─────────────────────────────
   TYPE ROLES
   Display headlines are set in the serif at regular weight; the
   key phrase of a headline is italic gold. Labels are tracked
   sans caps. The sans carries UI and body.
───────────────────────────── */
.display,
.nf h1 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.015em;
    font-feature-settings: 'kern' 1, 'liga' 1;
}

.highlight {
    display: inline;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: -0.01em;
}

.eyebrow {
    display: block;
    color: var(--gold);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1;
}

/* ─────────────────────────────
   MEDIA · video + colour-tint layer
   The MP4s are untouched; the tint layer re-hues them at runtime.
───────────────────────────── */
.media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #000;
    isolation: isolate;
    pointer-events: none;
}

.media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.media--cover video {
    object-fit: cover;
}

.media-tint {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--tint);
    mix-blend-mode: color;
    pointer-events: none;
}

/* Browsers without blend modes: warm the footage with a filter instead. */
@supports not (mix-blend-mode: color) {
    .media-tint {
        display: none;
    }
    .media video {
        filter: sepia(1) saturate(2.4) hue-rotate(-8deg) brightness(1.04);
    }
}

/* ─────────────────────────────
   BUTTONS
───────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-primary {
    min-width: 200px;
    height: 56px;
    padding: 0 28px;
    background: var(--gold);
    border-radius: var(--r-btn);
    border: 1px solid var(--gold);
    font-size: 15px;
    letter-spacing: 0.01em;
    color: var(--gold-ink);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    box-shadow: 0 10px 30px rgba(242, 180, 65, 0.28);
}

.btn-ghost {
    min-width: 200px;
    height: 56px;
    padding: 0 28px;
    background: rgba(11, 10, 8, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: var(--r-btn);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 15px;
    letter-spacing: 0.01em;
    color: #fff;
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    color: var(--gold-bright);
}

/* text link with an arrow, used for "read more" moves */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.link-arrow::after {
    content: '→';
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after {
    transform: translateX(4px);
}

/* ─────────────────────────────
   BRAND LOCKUP
───────────────────────────── */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    flex: 0 0 auto;
    filter: drop-shadow(0 0 10px rgba(242, 180, 65, 0.28));
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 25px;
    letter-spacing: -0.01em;
    line-height: 1;
}

.brand--footer .brand-name {
    font-size: 22px;
}

/* ─────────────────────────────
   FOOTER
───────────────────────────── */
.footer {
    background: #000;
    border-top: 1px solid var(--line);
    padding: 24px var(--section-x);
}

.footer--wide {
    padding-top: 56px;
    padding-bottom: 28px;
}

.footer-grid {
    max-width: var(--content-max);
    margin: 0 auto 36px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px;
}

.footer-blurb {
    margin-top: 14px;
    max-width: 300px;
    color: var(--text-3);
    font-size: 14px;
    line-height: 1.55;
}

.footer-col h4 {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-col a {
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-bottom {
    max-width: var(--content-max);
    margin: 0 auto;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-3);
    font-size: 13px;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .footer-bottom {
        flex-direction: column;
    }
}

/* ─────────────────────────────
   SCROLL REVEAL (JS-enhanced only)
───────────────────────────── */
.js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s var(--ease);
}

.js .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────
   CALLOUTS + CODE (docs / whitepaper)
───────────────────────────── */
.callout {
    margin: 22px 0;
    padding: 16px 18px 16px 20px;
    border: 1px solid var(--line-gold);
    border-left: 3px solid var(--gold);
    border-radius: 12px;
    background: rgba(242, 180, 65, 0.05);
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.55;
}

.callout strong {
    color: var(--text);
}

.callout--warn {
    border-color: rgba(255, 143, 115, 0.35);
    border-left-color: #FF8F73;
    background: rgba(255, 143, 115, 0.06);
}

.code {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #070604;
    color: #E8E1D4;
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

.code .c {
    color: #7A7266;
}

.code .k {
    color: var(--gold);
}

.code .t {
    color: #9BD0FF;
}

code.inline {
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
    font-size: 0.9em;
    color: var(--gold-bright);
}

@media (max-width: 480px) {
    .code {
        padding: 14px;
        font-size: 12px;
        /* a faded right edge hints that long lines scroll */
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, 0.6));
        mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, 0.6));
    }
}

/* ─────────────────────────────
   REDUCED MOTION
───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .btn:hover,
    .link-arrow:hover::after {
        transform: none;
    }
}
