/*
 * Blue View Imaging.
 *
 * Palette is the BVOS design system verbatim with one substitution: where
 * BVOS uses swarm green for its product accent, Imaging uses red. Trust blue,
 * warning yellow, both surface sets and the radius are BVOS's own values, so
 * the two products read as one family.
 *
 * System font stack, not a webfont. This stylesheet is also copied onto
 * imaging servers on isolated networks, where a CDN font would silently fall
 * back and the brand would become whatever the box happened to have.
 */
:root {
    --blue: #2861b8;
    --gold: #d9a800;
    --red: #c23a3d;

    --surface: #f6f5f1;
    --card: #efede6;
    --ink: #1f242c;
    --muted: #5d6472;
    --border: #d6d2c8;
    --code: #e7e4da;

    --chrome: #0b1326;
    --chrome-card: #131b2e;
    --on-chrome: #dae2fd;
    --chrome-muted: #97a3c4;
    --chrome-border: #464554;

    --radius: .625rem;
    --sans: "Segoe UI Variable Text", "Segoe UI", Inter, Ubuntu, Cantarell,
        -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --surface: #0b1326;
        --card: #131b2e;
        --ink: #dae2fd;
        --muted: #97a3c4;
        --border: #464554;
        --code: #091020;
    }
}
/* The dark treatment is deliberately confined to the top of the page -- the
   chrome bar and the hero, both of which name the --chrome variables
   directly. Everything below follows the visitor's theme, so the dark field
   reads as an opening rather than as the whole site's mood. */
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
.skip { position: absolute; left: -9999px; }
.skip:focus {
    left: 1rem; top: 1rem; z-index: 30;
    background: var(--card); padding: .5rem 1rem; border-radius: var(--radius);
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
a { color: var(--blue); }
@media (prefers-color-scheme: dark) { a { color: #7aa5f0; } }

/* --- chrome ---------------------------------------------------------- */
.chrome {
    background: var(--chrome);
    border-bottom: 1px solid var(--chrome-border);
    padding: 0 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    position: relative; z-index: 10;
}
.brand {
    display: inline-flex; align-items: center; gap: .55rem; height: 60px;
    color: var(--on-chrome); text-decoration: none;
    font-weight: 600; font-size: 18px; letter-spacing: -.01em;
}
.brand-product { color: var(--red); }
.chrome-nav a { color: var(--chrome-muted); text-decoration: none; font-size: .95rem; margin-left: 1.25rem; }
.chrome-nav a:hover { color: var(--on-chrome); }

/* --- cinematic hero --------------------------------------------------- */
.hero {
    position: relative; overflow: hidden;
    background: var(--chrome); color: var(--on-chrome);
    min-height: calc(100vh - 60px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 4rem 1.5rem 5rem;
}
/* Two slow radial washes in the brand colours: depth on a dark field with no
   image to download and nothing to go stale. */
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%;
    filter: blur(90px); opacity: .36; pointer-events: none;
}
.hero::before {
    width: 48vw; height: 48vw; left: -10vw; top: -14vw;
    background: var(--blue); animation: drift-a 24s ease-in-out infinite alternate;
}
.hero::after {
    width: 34vw; height: 34vw; right: -6vw; bottom: -16vw;
    background: var(--red); animation: drift-b 28s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(7vw, 5vh, 0) scale(1.16); } }
@keyframes drift-b { to { transform: translate3d(-5vw, -7vh, 0) scale(1.1); } }
.hero > * { position: relative; z-index: 1; }
.hero-mark { width: 74px; height: 74px; margin-bottom: 1.8rem; }
.hero h1 {
    font-size: clamp(2.5rem, 6.6vw, 4.8rem);
    line-height: 1.02; letter-spacing: -.038em; font-weight: 700;
    margin: 0 0 1.25rem; max-width: 15em;
}
.hero h1 .accent { color: var(--gold); }
.hero-sub {
    font-size: clamp(1.02rem, 1.7vw, 1.3rem);
    color: var(--chrome-muted); max-width: 38em; margin: 0 auto 2.5rem;
}
.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin: 0; }
.hero-scroll {
    position: absolute; bottom: 1.75rem; left: 50%; transform: translateX(-50%);
    color: #6f7da6; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
}

/* --- buttons ---------------------------------------------------------- */
.btn {
    display: inline-block; padding: .72rem 1.55rem; border-radius: var(--radius);
    border: 1px solid var(--border); text-decoration: none;
    color: var(--ink); font-weight: 600;
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { border-color: var(--blue); transform: translateY(-1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: #1f4f9c; border-color: #1f4f9c; color: #fff; }
.hero .btn { border-color: var(--chrome-border); color: var(--on-chrome); }
.hero .btn:hover { border-color: var(--on-chrome); }
.hero .btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }

/* --- the horizontal reel ---------------------------------------------- */
/* Scroll-jacking earns its keep once: the product is a sequence of stages,
   and horizontal travel says "sequence" without a word of copy. The panels
   are ordinary DOM either way -- the script changes how they are traversed,
   never whether they exist, so no-JS, reduced-motion and narrow screens get
   the same content swiped or stacked. */
.reel {
    background: var(--surface);
    color: var(--ink);
    position: relative;
    overflow: hidden;
}
/* The hero's two washes again, at a fraction of the opacity. On a light
   surface the same gesture has to be much quieter or it reads as a stain
   rather than as depth. */
.reel::before, .reel::after {
    content: ""; position: absolute; border-radius: 50%;
    filter: blur(110px); pointer-events: none; z-index: 0;
}
.reel::before {
    width: 42vw; height: 42vw; left: -12vw; top: -10vw;
    background: var(--blue); opacity: .12;
}
.reel::after {
    width: 30vw; height: 30vw; right: -8vw; bottom: -12vw;
    background: var(--red); opacity: .1;
}
.reel > * { position: relative; z-index: 1; }
.reel-inner { padding: 4.5rem 0; }
.reel-head { text-align: center; margin-bottom: 2.75rem; padding: 0 1.5rem; }
.reel-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -.03em; margin: 0 0 .5rem; }
.reel-head p { color: var(--muted); margin: 0; }
.reel-track {
    display: flex; gap: 1.25rem; padding: 0 1.5rem 1.25rem;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.panel {
    flex: 0 0 min(78vw, 430px); scroll-snap-align: center;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2.1rem 1.9rem 2.3rem;
    min-height: 340px; display: flex; flex-direction: column;
}
.panel-num { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 1.1rem; }
.panel-rule { width: 46px; height: 3px; background: var(--red); border-radius: 2px; margin-bottom: 1.4rem; }
.panel h3 { font-size: 1.55rem; letter-spacing: -.025em; margin: 0 0 .75rem; }
.panel p { color: var(--muted); margin: 0; line-height: 1.65; }
.reel-progress { height: 3px; background: var(--border); margin: 0 1.5rem; border-radius: 2px; overflow: hidden; }
.reel-bar { height: 100%; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); }
.reel-active .reel-inner {
    position: sticky; top: 0; height: 100vh; padding: 0; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
}
.reel-active .reel-track { overflow: visible; scroll-snap-type: none; will-change: transform; padding-bottom: 0; }
.reel-active .panel { flex-basis: min(44vw, 520px); min-height: 370px; }
.reel-active .reel-progress { margin-top: 2.75rem; }

/* --- generic sections -------------------------------------------------- */
.band { padding: 5rem 0; }
.band-alt { background: var(--card); border-block: 1px solid var(--border); }
.band h2, .flow-section h2, .closing h2 {
    text-align: center; font-size: clamp(1.6rem, 2.8vw, 2.3rem);
    letter-spacing: -.03em; margin: 0 0 .6rem;
}
.lede { text-align: center; color: var(--muted); max-width: 46em; margin: 0 auto 2.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.55rem 1.65rem; }
.band-alt .card { background: var(--surface); }
.card h3 { margin: 0 0 .55rem; font-size: 1.1rem; letter-spacing: -.015em; }
.card p { margin: 0; color: var(--muted); line-height: 1.62; }
.flow-section { padding: 5rem 0; }
.flow { width: 100%; height: auto; color: var(--muted); }
.flow-box rect { fill: var(--card); stroke: var(--border); stroke-width: 1.5; }
.flow-box.flow-accent rect { stroke: var(--blue); }
.flow-box text { fill: var(--ink); font-size: 15px; font-weight: 600; text-anchor: middle; }
.flow-box text.flow-sub { fill: var(--muted); font-size: 12px; font-weight: 400; }
.flow-line line, .flow-line path { stroke: currentColor; stroke-width: 1.5; fill: none; }
.flow-line text { fill: var(--muted); font-size: 12px; text-anchor: middle; }
.closing { max-width: 46em; margin: 0 auto; padding: 5rem 1.5rem; text-align: center; }
.closing p { color: var(--muted); }

/* --- docs -------------------------------------------------------------- */
.shell { display: flex; gap: 2.5rem; max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; align-items: flex-start; }
.nav { flex: 0 0 210px; position: sticky; top: 2rem; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .42rem .65rem; border-radius: var(--radius); color: var(--muted); text-decoration: none; }
.nav a:hover { background: var(--card); color: var(--ink); }
main.doc { flex: 1 1 auto; min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.25rem 2.4rem 2.75rem; }
main.doc h1 { margin-top: 0; font-size: 2rem; letter-spacing: -.03em; line-height: 1.2; }
main.doc h2 { margin-top: 2.4rem; font-size: 1.32rem; letter-spacing: -.02em; border-bottom: 1px solid var(--border); padding-bottom: .35rem; }
main.doc h3 { margin-top: 1.8rem; font-size: 1.08rem; }
code { background: var(--code); border-radius: 4px; padding: .12em .35em; font-family: ui-monospace, "Cascadia Code", Consolas, "DejaVu Sans Mono", monospace; font-size: .9em; }
pre { background: var(--code); border: 1px solid var(--border); border-radius: var(--radius); padding: .95rem 1.15rem; overflow-x: auto; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--border); padding: .5rem .7rem; text-align: left; }
th { background: var(--code); }
blockquote { margin: 1.25rem 0; padding: .1rem 1.1rem; border-left: 3px solid var(--gold); color: var(--muted); }

/* --- products + footer -------------------------------------------------- */
.products { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem 3.5rem; }
.products h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); font-weight: 700; margin: 0 0 1.1rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.product { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.3rem; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.product:hover { border-color: var(--blue); transform: translateY(-2px); }
.product-name { display: block; font-weight: 600; }
.product-tagline { display: block; color: #7aa5f0; margin: .15rem 0 .4rem; }
.product-blurb { display: block; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.foot { border-top: 1px solid var(--border); padding: 1.75rem 1.5rem; text-align: center; color: var(--muted); font-size: .85rem; }

@media (max-width: 860px) {
    .shell { flex-direction: column; gap: 1.25rem; padding: 1.5rem 1rem 3rem; }
    .nav { position: static; flex: 1 1 auto; width: 100%; }
    .nav ul { display: flex; flex-wrap: wrap; gap: .25rem; }
    main.doc { padding: 1.5rem 1.4rem 2rem; }
    .chrome { padding: 0 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hero::before, .hero::after { animation: none; }
    .btn:hover, .product:hover { transform: none; }
}
