/*
    Azimuth VMS website theme.

    The palette is the product's own, copied from Azimuth.Server/wwwroot/css/tokens.css so the
    site and the recorder read as one thing. Three rules come across with it:

      * DARK ONLY. The product has no light theme and none is planned (an NVR is watched in a dim
        room), so the site does not offer one either. `color-scheme: dark` tells the browser.
      * The amber -> red gradient is the BRAND MARK's, and the only gradient anywhere. It is
        atmosphere and hairlines here, never a button, card, row or panel fill.
      * Amber (--az-accent-text) is never a fill. The one solid accent fill is the blue
        --az-accent, which always carries white text.

    No framework and no JavaScript, which is what lets Program.cs serve a
    `default-src 'none'` content security policy. Fonts are vendored in wwwroot/fonts; nothing
    loads from a third party, so the claim on the privacy page stays true.
*/

/* ---------------------------------------------------------------- fonts */
/* IBM Plex, SIL Open Font License 1.1 — see fonts/LICENSE-IBMPlex.txt.
   Three faces only: the two weights the page sets and mono for commands. */

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/IBMPlexSans-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2');
}

/* --------------------------------------------------------------- tokens */

:root {
    /* Surfaces, darkest first, exactly as the app layers them. */
    --az-bg: #101216;
    --az-surface: #14171c;
    --az-surface-raised: #171a20;
    --az-surface-hover: #2e3442;

    --az-border: #242832;
    --az-border-strong: #5b667d;

    --az-text: #dde4ee;
    --az-text-muted: #99a2b0;
    --az-text-dim: #788394;

    /* The one solid accent fill, and the link colour that sits on dark. */
    --az-accent: #2f6ea8;
    --az-accent-hover: #3b7fbd;
    --az-accent-active: #27608f;
    --az-text-on-accent: #fff;
    --az-link: #7fb3e8;

    --az-record: #dc5454;
    --az-ok: #6fce7f;
    --az-warn: #e8a34c;

    /* Brand. The mark's two stops and the gradient built from them. */
    --az-brand-silver: #C7CDD6;
    --az-brand-amber: #F59E0B;
    --az-brand-red: #EF4444;
    --az-brand-gradient: linear-gradient(135deg, #F59E0B, #EF4444);

    --az-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --az-font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --az-radius-sm: 0.25rem;
    --az-radius-md: 0.5rem;
    --az-shadow-card: 0 3px 6px 2px rgba(0, 0, 0, 0.3);

    --measure: 1100px;

    color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--az-bg);
    color: var(--az-text);
    font-family: var(--az-font);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .35rem; }
strong { color: var(--az-text); font-weight: 600; }

a { color: var(--az-link); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    font-family: var(--az-font-mono);
    font-size: .9em;
    background: var(--az-surface-raised);
    border: 1px solid var(--az-border);
    border-radius: var(--az-radius-sm);
    padding: .1em .35em;
}

pre {
    font-family: var(--az-font-mono);
    font-size: .85rem;
    line-height: 1.6;
    background: var(--az-surface-raised);
    border: 1px solid var(--az-border);
    border-radius: var(--az-radius-md);
    padding: .9rem 1rem;
    overflow-x: auto;
    margin: 0 0 1rem;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

:focus-visible { outline: 2px solid var(--az-brand-amber); outline-offset: 2px; border-radius: var(--az-radius-sm); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: .5rem;
    background: var(--az-surface-raised);
    color: var(--az-text);
    padding: .6rem 1rem;
    border: 1px solid var(--az-border-strong);
    border-radius: var(--az-radius-sm);
    z-index: 100;
}
.skip-link:focus { left: .5rem; }

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 4rem 0; }
.section--tint { background: var(--az-surface); border-block: 1px solid var(--az-border); }
.section__head { max-width: 44rem; margin-bottom: 2.25rem; }
.section__head p { color: var(--az-text-muted); font-size: 1.05rem; margin: 0; }

.eyebrow {
    display: inline-block;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--az-text-muted);
    margin-bottom: .6rem;
}

.lede { font-size: 1.14rem; color: var(--az-text-muted); }

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    padding: .8rem 1.3rem;
    border-radius: var(--az-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
}
.btn:hover { text-decoration: none; }

/* The product's one fill. Blue, white text — never the brand gradient. */
.btn--primary { background: var(--az-accent); color: var(--az-text-on-accent); }
.btn--primary:hover { background: var(--az-accent-hover); color: var(--az-text-on-accent); }
.btn--primary:active { background: var(--az-accent-active); }

.btn--secondary { background: var(--az-surface-raised); color: var(--az-text); border-color: var(--az-border-strong); }
.btn--secondary:hover { background: var(--az-surface-hover); color: var(--az-text); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--az-bg);
    border-bottom: 1px solid var(--az-border);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 58px; }

.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--az-text); font-weight: 600; }
.brand:hover { color: var(--az-text); text-decoration: none; }
.brand img { display: block; height: 22px; width: auto; }

.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.site-nav a {
    color: var(--az-text-muted);
    font-size: .95rem;
    padding: .45rem .7rem;
    border-radius: var(--az-radius-sm);
}
.site-nav a:hover { color: var(--az-text); background: var(--az-surface-hover); text-decoration: none; }
/* Amber marks the active thing, as it does on a tab in the app. Never as a fill. */
.site-nav a[aria-current="page"] { color: var(--az-brand-amber); }
/* `.site-nav a` outranks `.btn--primary`, so the download button has to restate its colours or
   it inherits the muted link colour and lands as low-contrast text on the accent fill. */
.site-nav a.btn { padding: .5rem 1rem; color: var(--az-text-on-accent); }
.site-nav a.btn:hover { background: var(--az-accent-hover); color: var(--az-text-on-accent); }

@media (max-width: 599px) {
    /* The nav wraps to a second row on a phone, and two rows pinned to the top
       is too much chrome for a four-page site. Let the header scroll away. */
    .site-header { position: static; }
}

/* ------------------------------------------------------------------ hero */

.hero { position: relative; overflow: hidden; padding: 4.5rem 0 4rem; }
.hero::before {
    /* The gradient as atmosphere behind the headline — the one brand moment on the page. */
    content: "";
    position: absolute;
    inset: -45% 35% 45% -20%;
    background: var(--az-brand-gradient);
    filter: blur(130px);
    opacity: .14;
    pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { max-width: 36rem; margin-bottom: 1.6rem; }
.hero__note { font-size: .9rem; color: var(--az-text-dim); margin: 1.1rem 0 0; }

.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
    .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; }
}

/* A schematic of the operator view: a tile grid over a timeline. Deliberately not a fake
   screenshot — no invented camera names, no pretend footage. Replace the .shot block in
   Index.cshtml with an <img> when there is a real screenshot to show. */
.shot {
    border: 1px solid var(--az-border);
    border-radius: var(--az-radius-md);
    background: var(--az-surface);
    box-shadow: var(--az-shadow-card);
    overflow: hidden;
}
.shot__bar { display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; border-bottom: 1px solid var(--az-border); background: var(--az-surface-raised); }
.shot__bar span { font-size: .72rem; color: var(--az-text-dim); letter-spacing: .04em; }
.shot__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--az-record); }
.shot__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; background: var(--az-border); }
.shot__tile { aspect-ratio: 16 / 9; background: #000; position: relative; }
/* One tile carries the motion edge, amber, as the live grid does. */
.shot__tile--motion { outline: 2px solid var(--az-warn); outline-offset: -2px; }
.shot__timeline { padding: .6rem .7rem .7rem; background: #14171c; }
.shot__ruler { display: flex; gap: 2px; margin-bottom: .35rem; }
.shot__ruler i { flex: 1; height: 7px; background: #1b1f26; border-radius: 1px; }
.shot__ruler i:nth-child(even) { background: #22272f; }
.shot__band { height: 11px; border-radius: 2px; background: #1b1f26; position: relative; overflow: hidden; }
/* Coverage green, with a motion ribbon over part of it, as on the real canvas. */
.shot__band::before { content: ""; position: absolute; inset: 0 18% 0 4%; background: #2e7d4f; }
.shot__band::after { content: ""; position: absolute; left: 46%; width: 13%; top: 0; bottom: 55%; background: var(--az-warn); }
.shot__head { width: 2px; height: 26px; background: #e8ecf4; margin: -22px 0 0 54%; position: relative; }

/* ----------------------------------------------------------------- cards */

.grid { display: grid; gap: 1.1rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
    background: var(--az-surface-raised);
    border: 1px solid var(--az-border);
    border-radius: var(--az-radius-md);
    padding: 1.35rem;
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--az-text-muted); margin: 0; font-size: .95rem; }
.card p + p { margin-top: .6rem; }

/* The panel's hairline is the second brand moment, and the last. */
.panel {
    position: relative;
    background: var(--az-surface-raised);
    border: 1px solid var(--az-border);
    border-radius: var(--az-radius-md);
    padding: 1.6rem;
    overflow: hidden;
}
.panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--az-brand-gradient); }
.panel h3 { margin-top: 0; }
.panel p:last-child { margin-bottom: 0; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.checklist li { position: relative; padding-left: 1.6rem; color: var(--az-text-muted); margin: 0; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--az-ok); font-weight: 700; }

.callout {
    border: 1px solid var(--az-border);
    border-left: 3px solid var(--az-brand-amber);
    background: var(--az-surface);
    border-radius: var(--az-radius-sm);
    padding: 1rem 1.1rem;
    margin: 0 0 1.25rem;
}
.callout p:last-child { margin-bottom: 0; }

/* A state word, not a promise of a date. See the "in field testing" rule. */
.tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--az-warn);
    border: 1px solid var(--az-border-strong);
    border-radius: var(--az-radius-sm);
    padding: .1rem .45rem;
    vertical-align: middle;
}

/* ------------------------------------------------------------ utilities */
/* These exist as classes because the content security policy forbids inline
   styles — `style="..."` on an element is blocked outright, which is the whole
   point of `default-src 'none'`. Found by loading the page and reading the
   console, not by reading the markup. */

/* Inner pages take a step down from the hero's h1. */
.page-title { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); }

/* A column of headed blocks, each needing air above it but not the first. */
.stack h3 { margin-top: 2rem; }
.stack h3:first-child { margin-top: 0; }

.gap-top { margin-top: 1.2rem; }
.meta--tight { margin-bottom: .2rem; }

/* --------------------------------------------------------------- content */

.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.4rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: 1.7rem; }
.prose .btn-row { margin-top: 1.5rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .93rem; }
.prose th, .prose td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--az-border); vertical-align: top; }
.prose th { font-weight: 600; }
.prose td { color: var(--az-text-muted); }

.table-scroll { overflow-x: auto; }

.meta { color: var(--az-text-dim); font-size: .9rem; }
.mono { font-family: var(--az-font-mono); font-size: .85rem; word-break: break-all; color: var(--az-text-muted); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 0; }
.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: .1rem;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--az-surface-hover);
    color: var(--az-text);
    font-weight: 600;
    font-size: .9rem;
    display: grid;
    place-items: center;
}
.steps h3 { margin-bottom: .3rem; }
.steps p { color: var(--az-text-muted); margin: 0; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--az-border); background: var(--az-surface); padding: 2.75rem 0 2rem; margin-top: auto; }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.site-footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--az-text-muted); margin-bottom: .7rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: var(--az-text-muted); font-size: .95rem; }
.site-footer a:hover { color: var(--az-link); }
.site-footer__brand p { color: var(--az-text-dim); font-size: .9rem; max-width: 21rem; margin: .7rem 0 0; }
.site-footer__legal { margin-top: 2.25rem; padding-top: 1.4rem; border-top: 1px solid var(--az-border); color: var(--az-text-dim); font-size: .85rem; }
.site-footer__legal p { margin: 0 0 .3rem; }
