/* BARQ SMS — public site. Light, glass.
 *
 * Deliberately not sharing the panel's stylesheet. That one is a Bootstrap 2
 * admin theme carrying 170KB and a decade of table styling; a landing page
 * needs none of it, and coupling the two means every marketing tweak risks a
 * report table. This file is the whole design system for the site.
 *
 * GLASS, HONESTLY. Frosted panels only read as glass when there is something
 * behind them to blur. Blur over flat white is just a lighter grey and costs a
 * compositing layer for nothing. So the page carries a few large, soft colour
 * fields (.aurora) and every glass surface sits over them.
 */

:root {
    --bg:         #f4f7fd;
    --ink:        #0d1526;
    --ink-soft:   #4a5a75;
    --muted:      #6b7c99;

    --brand:      #2563eb;
    --brand-dim:  #1d4ed8;
    --brand-soft: rgba(37, 99, 235, .10);
    --amber:      #b45309;

    /* The glass recipe, in one place so every surface agrees. */
    --glass:      rgba(255, 255, 255, .58);
    --glass-hi:   rgba(255, 255, 255, .78);
    --glass-line: rgba(255, 255, 255, .85);
    --glass-edge: rgba(13, 21, 38, .08);
    --blur:       saturate(180%) blur(18px);
    --shadow:     0 18px 45px -22px rgba(13, 21, 38, .38);
    --shadow-lg:  0 30px 70px -30px rgba(13, 21, 38, .45);

    --radius:     18px;
    --max:        1160px;
    --ease:       cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* What the glass has to look at. Fixed, so panels pick up a different part of
   the field as the page moves, which is what makes the blur read as depth
   rather than as a grey wash. */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i {
    position: absolute; display: block; border-radius: 50%;
    filter: blur(90px); opacity: .55;
}
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -8vw;  top: -10vw;  background: #7cb0ff; }
.aurora i:nth-child(2) { width: 40vw; height: 40vw; right: -6vw; top: 12vh;   background: #ffd28a; opacity: .45; }
.aurora i:nth-child(3) { width: 52vw; height: 52vw; left: 18vw;  bottom: -22vw; background: #a5b4fc; }

.eyebrow {
    display: inline-block; margin-bottom: 14px;
    font-size: 12px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--brand);
}

/* ------------------------------------------------------------------ header */

.site-head {
    position: fixed; inset: 12px 12px auto 12px; z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 12px 20px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    transition: background .3s var(--ease), border-color .3s var(--ease),
                box-shadow .3s var(--ease), backdrop-filter .3s var(--ease);
}
.site-head.is-stuck {
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-color: var(--glass-line);
    box-shadow: var(--shadow);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.logo img { height: 30px; width: auto; display: block; }
.logo b { color: var(--brand); font-weight: 700; }
.site-head nav { display: flex; align-items: center; gap: 24px; }
.site-head nav a { color: var(--ink-soft); font-size: 15px; font-weight: 500; transition: color .2s var(--ease); }
.site-head nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    transition: transform .14s var(--ease), background .22s var(--ease),
                border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--brand); color: #fff;
    box-shadow: 0 12px 28px -12px rgba(37, 99, 235, .95);
}
.btn-primary:hover { background: var(--brand-dim); box-shadow: 0 16px 34px -12px rgba(37, 99, 235, 1); }
.btn-glass {
    background: var(--glass-hi);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-color: var(--glass-line);
    color: var(--ink);
    box-shadow: var(--shadow);
}
.btn-glass:hover { border-color: rgba(37, 99, 235, .45); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 16px 34px; font-size: 17px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* -------------------------------------------------------------------- hero */

.hero-track { position: relative; height: 420vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero-copy {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 0 24px;
    /* The canvas underneath is a live map with lit points and moving arcs.
       Heaviest behind the headline so the type always wins, clearing towards
       the edges where the map is the thing worth looking at. */
    background:
        radial-gradient(ellipse 78% 62% at 50% 46%,
            rgba(244, 247, 253, .90) 0%,
            rgba(244, 247, 253, .62) 55%,
            rgba(244, 247, 253, .28) 100%);
}
.hero-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(36px, 6.4vw, 76px);
    line-height: 1.03; letter-spacing: -0.03em; font-weight: 700;
}
.hero-copy p {
    margin: 0 0 32px; max-width: 640px;
    color: var(--ink-soft); font-size: clamp(16px, 1.9vw, 20px);
}

.scroll-cue {
    position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
    width: 24px; height: 38px;
    border: 2px solid rgba(13, 21, 38, .22); border-radius: 14px;
}
.scroll-cue span {
    position: absolute; left: 50%; top: 8px;
    width: 3px; height: 7px; border-radius: 2px; background: var(--brand);
    transform: translateX(-50%);
    animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0%,100% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 20px; } }

/* ----------------------------------------------------------------- sections */

section { padding: 116px 0; position: relative; }
.section-head { max-width: 700px; margin: 0 0 52px; }
.section-head h2 {
    margin: 0 0 14px;
    font-size: clamp(27px, 3.6vw, 44px);
    line-height: 1.12; letter-spacing: -0.025em;
}
.section-head p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* --------------------------------------------------------------- the glass */

.glass {
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    /* A real pane catches light along its top edge. One inset highlight does
       more for the illusion than any amount of extra blur. */
    position: relative;
}
.glass::after {
    content: ""; position: absolute; inset: 0;
    border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9),
                inset 0 0 0 1px rgba(255,255,255,.28);
}

/* -------------------------------------------------------------------- stats */

.stats-band { padding: 54px 0; }
.stats-grid {
    display: grid; gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    padding: 30px 12px;
}
.stat { text-align: center; padding: 10px 18px; }
.stat + .stat { border-left: 1px solid var(--glass-edge); }
.stat-fig {
    font-size: clamp(30px, 4vw, 44px); font-weight: 700;
    letter-spacing: -0.02em; color: var(--brand);
    font-variant-numeric: tabular-nums;
}
.stat-lbl { margin-top: 6px; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------- cards */

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { padding: 28px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { margin: 0 0 10px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Line icons, not emoji. An emoji is somebody else's artwork, rendered
   differently on every operating system, at a size you do not control. */
.ico {
    width: 26px; height: 26px; margin-bottom: 16px; display: block;
    fill: none; stroke: var(--brand); stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------------- steps */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px;
         grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { padding: 28px 24px; }
.step-n {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin-bottom: 16px;
    border-radius: 50%;
    background: var(--brand-soft); border: 1px solid rgba(37, 99, 235, .28);
    color: var(--brand); font-weight: 700; font-size: 15px;
}
.steps h3 { margin: 0 0 8px; font-size: 17px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* -------------------------------------------------------------------- forms */

.panel { padding: 30px; max-width: 560px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.field input, .field textarea {
    width: 100%; padding: 12px 14px;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--glass-edge);
    border-radius: 12px; color: var(--ink); font: inherit; font-size: 15px;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--brand); background: #fff;
}
.field textarea { min-height: 96px; resize: vertical; }
.form-msg { margin: 14px 0 0; font-size: 14px; min-height: 20px; }
.form-msg.err { color: #b91c1c; }
.form-msg.ok  { color: #047857; }

/* ---------------------------------------------------------------------- cta */

.cta { text-align: center; }
.cta h2 { margin: 0 0 26px; font-size: clamp(26px, 3.6vw, 42px); letter-spacing: -0.025em; }

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

.site-foot { padding: 46px 0; color: var(--ink-soft); font-size: 14px; border-top: 1px solid var(--glass-edge); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.site-foot p { margin: 10px 0 0; max-width: 320px; color: var(--muted); }
.site-foot nav { display: flex; flex-direction: column; gap: 8px; }
.site-foot nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ reveals */

/* Reveal and parallax both want the transform, so they share it through a
   custom property instead of fighting over the inline style: JS writes --py,
   the reveal owns --ry, and the element composes the two. Setting
   element.style.transform directly would have killed the reveal outright --
   inline beats a class. */
[data-parallax] { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }

.reveal {
    opacity: 0;
    --ry: 18px;
    transform: translate3d(0, calc(var(--py, 0px) + var(--ry)), 0);
}
.reveal.is-in {
    opacity: 1;
    --ry: 0px;
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
/* A parallax element's transform changes on every scroll frame; transitioning
   it would make the drift lag behind the wheel. Only the fade is animated. */
.reveal[data-parallax].is-in { transition: opacity .6s var(--ease); }

/* ------------------------------------------------------------ no backdrop */

/* Firefox had backdrop-filter off by default for years and some browsers still
   ship without it. Without this the "glass" is 58% white over a blurred blob
   -- washed out and hard to read. Opaque is the honest fallback. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass, .site-head.is-stuck, .btn-glass { background: rgba(255,255,255,.94); }
}

/* --------------------------------------------------------- reduced motion */

/* Someone who asked their system for less movement gets no pinned 400vh
   scroll, no reveals and no cue: the hero collapses to one screen holding a
   single frame. A full-viewport sequence is the loudest motion on the page,
   not decoration they can look past. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-track { height: 100vh; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-cue span { animation: none; opacity: .8; }
    .btn, .card { transition: none; }
    .btn:hover, .card:hover { transform: none; }
}

@media (max-width: 760px) {
    .site-head { inset: 8px 8px auto 8px; padding: 10px 14px; gap: 12px; }
    .site-head nav { gap: 14px; }
    .site-head nav a.hide-sm { display: none; }
    section { padding: 76px 0; }
    .hero-track { height: 300vh; }
    .stat + .stat { border-left: 0; border-top: 1px solid var(--glass-edge); }
}


/* ------------------------------------------- mobile: colour weight, pass 2
 *
 * WHY THE PHONE LOOKS WASHED OUT AND THE DESKTOP DOES NOT.
 *
 * The whole design is a light-on-light glass system: pale ink over 58% white
 * over a blurred pastel wash. It holds on a wide screen because the wash is
 * spread thin and the type is large. Two things break it at 375px:
 *
 *   1. The aurora blobs are sized in vw but blurred by a fixed 90px. At 1280px
 *      a 46vw blob is 589px across and 90px of blur softens its edge; at 375px
 *      it is 172px across, so the blur is wider than the blob's own half-width
 *      and it stops being a shape at all -- it becomes a flat pastel film over
 *      most of the screen.
 *   2. Every surface is translucent white over that film, and every border is
 *      WHITE (--glass-line). On a wide screen the shadow does the separating.
 *      On a phone, a white border on a near-white card over a pale wash is
 *      three shades of the same thing, and cards stop having edges.
 *
 * MEASURED on the page background, before this block existed:
 *
 *      --muted    #6b7c99   3.94   -- under AA (4.5) for its 14px labels
 *      --ink-soft #4a5a75   6.50
 *      .eyebrow   #2563eb   4.82   -- 12px uppercase, the weakest real text
 *
 * A first pass moved these to 5.40 / 8.08 and was still reported as washed
 * out, which was fair: it treated the text and left the CAUSES -- the wash,
 * the translucency and the white borders -- almost intact. This pass goes at
 * those instead, and takes the text further while it is there.
 *
 * AFTER, same measurement:  --muted 7.13,  --ink-soft 11.09,  eyebrow 6.25.
 *
 * NOTHING HERE IS A NEW COLOUR. Every value is a hue the palette already uses,
 * moved along its own ramp, and every rule is inside this breakpoint so the
 * desktop renders byte-identically. No size, spacing, type, layout, animation
 * or breakpoint is touched.
 */
@media (max-width: 760px) {
    :root {
        /* Body copy, nav, section subtitles. 6.50 -> 11.09. */
        --ink-soft:   #2b3750;
        /* Stat labels, field labels, field hints, footer. 3.94 -> 7.13. */
        --muted:      #44546f;

        /* Surfaces, effectively solid. Translucency is what the wash was
           bleeding through, and it also removes any dependence on
           backdrop-filter, which a phone browser may drop to save power. */
        --glass:      rgba(255, 255, 255, .97);
        --glass-hi:   rgba(255, 255, 255, .99);

        /* THE ONE THAT MAKES CARDS LOOK LIKE CARDS. This is the .glass border,
           and on desktop it is white -- a highlight, with the shadow doing the
           separating. At this size that reads as no edge at all, so here it
           becomes a real ink hairline. */
        --glass-line: rgba(13, 21, 38, .20);
        /* Stat dividers, input borders, the footer rule. 8% ink is invisible
           over a tinted wash. */
        --glass-edge: rgba(13, 21, 38, .26);

        /* Same geometry, more definition. */
        --shadow:     0 12px 28px -16px rgba(13, 21, 38, .62);
        --shadow-lg:  0 20px 44px -22px rgba(13, 21, 38, .66);
    }

    /* The wash itself, turned down to a hint. Same colours, same positions,
       same blur, same animation -- only how much of it reaches the page. */
    .aurora i:nth-child(1) { opacity: .16; }
    .aurora i:nth-child(2) { opacity: .12; }
    .aurora i:nth-child(3) { opacity: .16; }

    /* The hero paragraph sits on a live canvas, not on the page background.
       The scrim that keeps it readable fades to 28% at the edges -- fine
       behind a 76px headline on a wide stage, not fine behind 16px body copy
       on a tall narrow one, where the text reaches well into the faded zone.
       Same gradient, same colour, same shape; only more of it. */
    .hero-copy {
        background:
            radial-gradient(ellipse 78% 62% at 50% 46%,
                rgba(244, 247, 253, .97) 0%,
                rgba(244, 247, 253, .90) 55%,
                rgba(244, 247, 253, .70) 100%);
    }

    /* 12px uppercase at .14em is the least legible text on the page. The
       darker brand already in the palette carries it from 4.82 to 6.25. */
    .eyebrow { color: var(--brand-dim); }

    /* White on #2563eb is 5.17; on the palette's own darker brand it is 6.70,
       and the button reads as a solid object rather than a bright patch. */
    .btn-primary { background: var(--brand-dim); }

    /* The pane highlight is a wide-screen effect: it lightens exactly the edge
       that now needs to be visible. Kept, but as a hairline rather than a glow. */
    .glass::after { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }

    /* Two outlines that were drawn to be barely there. */
    .scroll-cue { border-color: rgba(13, 21, 38, .40); }
    .step-n { border-color: rgba(37, 99, 235, .50); }
}
}

/* A hint inside a label, for the one rule the field enforces. Said here rather
   than only in the error, so nobody meets it by failing first. */
.field label .muted-note { color: var(--muted); font-weight: 400; }

/* ------------------------------------------------- register, its own page */

/* No hero on this page, so the header is solid from the first pixel and the
   content clears it. */
.page-form { padding-top: 92px; }
.form-page { padding: 44px 0 96px; }
.form-wrap { max-width: 640px; }
.form-page .section-head { margin-bottom: 32px; }

.field-help { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* A file input is unstyleable across browsers; what can be styled is the
   button it draws, which is the part people aim at. */
.field input[type="file"] { padding: 10px 12px; background: rgba(255,255,255,.72); }
.field input[type="file"]::file-selector-button {
    margin-right: 12px; padding: 8px 14px;
    border: 1px solid var(--glass-edge); border-radius: 999px;
    background: #fff; color: var(--ink);
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { border-color: var(--brand); }

/* ------------------------------------------------------------------ contact */

.contact-card { display: block; }
.contact-card:hover { border-color: rgba(37, 99, 235, .45); }
.inline-link { color: var(--brand); font-weight: 600; white-space: nowrap; }
.contact-card.is-unset { opacity: .6; pointer-events: none; }

/* ------------------------------- mobile: overrides that must come last
 *
 * These three lose on source order or specificity where the block above sits,
 * so they are re-stated here at the end of the sheet. Same breakpoint, same
 * intent -- only the position changes.
 */
@media (max-width: 760px) {
    /* THE WORST CONTRAST ON THE PAGE, and it is not a variable.
       `.site-head nav a { color: var(--ink-soft) }` is specificity 0-1-2 and
       `.btn-primary { color: #fff }` is 0-1-0, so the header's "Get started"
       button renders ink on brand blue: MEASURED 1.78:1, against 4.5 for text
       and 3:1 for a control. The other two primary buttons on the page are
       white on the same blue and read correctly; only this one is caught by
       the nav rule. Named explicitly so the button wins its own colour back.

       The desktop has the identical bug (#4a5a75 on #2563eb, ~1.6:1) and is
       deliberately NOT touched here -- this pass is scoped to mobile. */
    .site-head nav a.btn-primary { color: #fff; }

    /* Declared after the block above, so it had to be re-stated to win: .6 on
       a phone reads as broken rather than as inactive. */
    a.contact-card.is-unset { opacity: .85; }

    /* Same reason -- the file input's own rule comes later in the sheet.
       Opaque, so a field is a field and not a lighter patch of the page. */
    .field input, .field textarea,
    .field input[type="file"] { background: #fff; }
}
