/* ============================================================================
   Neurogenisys brand system
   ----------------------------------------------------------------------------
   A blue-green palette: deep marine blue for structure and authority, a living
   green for growth and vitality, and a bright cyan that bridges the two and
   carries every call to action.

   Two rules this file keeps throughout:

   1. No inline styles anywhere in the views. The Content-Security-Policy sets
      style-src without 'unsafe-inline', so a style attribute would simply be
      refused by the browser. Anything that varies with data is set from script
      via a custom property (see wwwroot/js/site.js).

   2. Every text/background pair clears WCAG AA — 4.5:1 for body text, 3:1 for
      large text and UI boundaries. Contrast ratios are noted where a colour is
      not obviously safe, because "it looked fine" is how a health site ends up
      with an accessibility complaint.
   ============================================================================ */

:root {
    /* ── Core palette ───────────────────────────────────────────────────────
       Sampled from the Neurogenisys logo rather than chosen alongside it, so
       the site and the mark are the same blue-green rather than two that nearly
       match. --ng-abyss is the wordmark's navy; --ng-teal and --ng-green are the
       two stops of the gradient running through the head-and-brain mark. */
    --ng-abyss: #00284a;          /* the wordmark navy — headings, footer. 15.0:1 on white */
    --ng-deep: #023a5e;           /* primary surface blue */
    --ng-marine: #04598f;
    --ng-teal: #0273c9;           /* brand primary — the logo gradient's blue stop */
    --ng-teal-bright: #16a3dd;
    --ng-cyan: #22d3ee;           /* highlight only — 1.8:1 on white, never text */

    --ng-forest: #0a7a66;         /* deep green */
    --ng-green: #09bea0;          /* brand secondary — the logo gradient's green stop */
    --ng-green-bright: #2fd6b4;   /* highlight only — 2.4:1 on white, never text */

    /* Ink and paper */
    --ng-ink: #10293d;            /* body text — 13.9:1 on --ng-paper */
    --ng-ink-soft: #44637a;       /* secondary text — 5.5:1 on --ng-paper */
    --ng-paper: #ffffff;
    --ng-mist: #f3f8fb;           /* page background */
    --ng-mist-deep: #e4eff6;      /* alternating sections */
    --ng-hairline: #cfe0ea;

    /* Status */
    --ng-success: #0f7a52;
    --ng-warning: #9a5b00;
    --ng-danger: #a52834;

    /* Text-safe variants. The logo's own colours are tuned for a mark on white,
       not for words: the green stop is 2.4:1 and the blue stop only just clears
       4.5:1. These are darkened until they pass comfortably, and are what gets
       used wherever the brand colour has to carry text. */
    --ng-teal-text: #04598f;      /* 7.4:1 on --ng-paper */
    --ng-green-text: #0a7a66;     /* 5.3:1 on --ng-paper */

    /* ── Typography ─────────────────────────────────────────────────────── */
    /* Outfit for headings: geometric, calm, slightly clinical without being
       cold. Inter for body: designed for screen reading at small sizes. */
    --ng-font-display: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --ng-font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* ── Depth ──────────────────────────────────────────────────────────── */
    /* Shadows tinted with the brand blue rather than neutral black — a grey
       shadow over a blue-tinted page reads as dirt. */
    --ng-shadow-sm: 0 1px 2px rgba(0, 40, 74, .06), 0 2px 8px rgba(0, 40, 74, .04);
    --ng-shadow-md: 0 4px 12px rgba(0, 40, 74, .08), 0 12px 28px rgba(0, 40, 74, .06);
    --ng-shadow-lg: 0 12px 32px rgba(0, 40, 74, .12), 0 24px 56px rgba(0, 40, 74, .10);

    --ng-radius: 14px;
    --ng-radius-sm: 9px;
    --ng-radius-lg: 22px;

    /* ── Motion ─────────────────────────────────────────────────────────── */
    /* One easing curve and three durations across the whole site. Motion that
       varies per component reads as several sites stitched together. */
    --ng-ease: cubic-bezier(.22, .61, .36, 1);
    --ng-ease-out-back: cubic-bezier(.34, 1.36, .64, 1);
    --ng-fast: 160ms;
    --ng-base: 300ms;
    --ng-slow: 620ms;

    /* ── Bootstrap overrides ────────────────────────────────────────────── */
    /* Set here so the components not restyled one by one — links, pagination,
       nav tabs, checked boxes, focus rings, form validation — pick up the
       theme instead of Bootstrap's default blue. */
    --bs-primary: #0273c9;
    --bs-primary-rgb: 2, 115, 201;
    --bs-link-color: #04598f;
    --bs-link-color-rgb: 4, 89, 143;
    --bs-link-hover-color: #00284a;
    --bs-link-hover-color-rgb: 0, 40, 74;
    --bs-focus-ring-color: rgba(2, 115, 201, .28);
    --bs-border-color: #cfe0ea;
    --bs-body-color: #10293d;
    --bs-body-bg: #f3f8fb;
    /* Bootstrap's muted grey is 3.9:1 on this background, short of 4.5:1. */
    --bs-secondary-color: #44637a;
    --bs-secondary-color-rgb: 68, 99, 122;
}

/* ============================================================================
   Base
   ============================================================================ */

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* Anchored sections land below the fixed header rather than under it. */
    scroll-padding-top: 86px;
}

body {
    font-family: var(--ng-font-body);
    color: var(--ng-ink);
    background: var(--ng-mist);
    -webkit-font-smoothing: antialiased;

    /* A backstop, not the fix. The rule below is what stops the page being wider than the
       viewport; this stays because one stray wide element should degrade to a clipped edge
       rather than to a sideways-scrolling site. */
    overflow-x: hidden;
}

/* A Bootstrap row carries negative horizontal margins of half its gutter, and only the
   container's own padding absorbs them. .container is padded at half the *default* gutter
   (0.75rem), so a g-5 row — gutter 3rem, margins -1.5rem — reaches 0.75rem past the
   container on each side. On a 375px phone that measured as a 399px-wide row inside a
   375px viewport: 12px of the right-hand column's padding clipped away, and a document
   wider than the screen that only body's overflow-x above was hiding.

   Capping the horizontal gutter below lg fixes it at the cause. The vertical gutter is
   left alone, so stacked columns keep their generous spacing, and from lg up — where
   these rows are actually side by side and the container is far narrower than the
   viewport — the full 3rem returns. */
@media (max-width: 991.98px) {
    .container > .row.g-5,
    .container-fluid > .row.g-5 { --bs-gutter-x: 1.5rem; }
}

h1, h2, h3, h4, h5, h6, .ng-display {
    font-family: var(--ng-font-display);
    font-weight: 600;
    color: var(--ng-abyss);
    letter-spacing: -0.022em;
    line-height: 1.18;
}

h1, .h1 { font-weight: 700; }

p { line-height: 1.68; }

a { color: var(--ng-teal-text); text-decoration-color: rgba(2, 115, 201, .35); text-underline-offset: 2px; }
a:hover { color: var(--ng-abyss); }

::selection { background: rgba(34, 211, 238, .3); color: var(--ng-abyss); }

/* A visible focus ring on everything reachable by keyboard. Bootstrap supplies
   one for its own components; this covers links and custom controls. */
:focus-visible {
    outline: 3px solid var(--ng-teal);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Lets a keyboard user jump the navigation. Off-screen until focused. */
.ng-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: var(--ng-abyss);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--ng-radius-sm) 0;
    font-weight: 600;
}
.ng-skip-link:focus {
    left: 0;
    color: #fff;
}

/* ============================================================================
   Utility
   ============================================================================ */

.ng-eyebrow {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ng-teal-text);
}

.ng-eyebrow-light { color: var(--ng-cyan); }

/* The gradient wordmark treatment. Clipping a gradient to text removes it from
   the accessibility tree in some older engines, so it is only ever used on
   decorative display text that is repeated in a plain form nearby. */
.ng-gradient-text {
    background: linear-gradient(104deg, var(--ng-teal-bright) 0%, var(--ng-green-bright) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ng-lead {
    font-size: 1.1rem;
    line-height: 1.72;
    color: var(--ng-ink-soft);
}

.ng-section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.ng-section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

/* Two sections that share a background have no edge between them, so their two paddings stack
   into one gap with nothing in it to justify the size — 112px on a phone, 208px on a desktop,
   which reads as a block that failed to load rather than as a separation. Dropping the second
   one's top padding leaves a single section's worth of space, which is what the eye expects at
   a join it cannot see.

   Only same-to-same. Where the background actually changes — paper to dark, paper to mist — the
   full gap is doing the work of marking that change and is left alone. */
.ng-section-paper + .ng-section-paper,
.ng-section-mist + .ng-section-mist,
.ng-section-dark + .ng-section-dark { padding-top: 0; }
.ng-section-mist { background: var(--ng-mist-deep); }
.ng-section-paper { background: var(--ng-paper); }

.ng-section-dark {
    background:
        radial-gradient(1100px 520px at 12% -10%, rgba(2, 115, 201, .55) 0%, transparent 62%),
        radial-gradient(900px 460px at 88% 110%, rgba(9, 190, 160, .45) 0%, transparent 60%),
        var(--ng-abyss);
    color: #dceaef;
}
.ng-section-dark h1,
.ng-section-dark h2,
.ng-section-dark h3,
.ng-section-dark h4 { color: #fff; }
.ng-section-dark .ng-lead { color: #b2cdd6; }

.ng-divider {
    height: 3px;
    width: 64px;
    border: 0;
    opacity: 1;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--ng-teal) 0%, var(--ng-green) 100%);
}

.ng-measure { max-width: 62ch; }

/* ============================================================================
   Header
   ============================================================================ */

.ng-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: background var(--ng-base) var(--ng-ease),
                border-color var(--ng-base) var(--ng-ease),
                box-shadow var(--ng-base) var(--ng-ease);
}

/* Added by script once the page scrolls past the hero — see site.js. The class
   is toggled rather than the style set, so nothing inline is needed. */
.ng-header.is-scrolled {
    background: rgba(255, 255, 255, .96);
    border-bottom-color: var(--ng-hairline);
    box-shadow: var(--ng-shadow-sm);
}

.ng-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--ng-font-display);
    font-weight: 700;
    font-size: 1.22rem;
    letter-spacing: -0.03em;
    color: var(--ng-abyss);
    text-decoration: none;
}
.ng-brand:hover { color: var(--ng-teal-text); }

.ng-brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    transition: transform var(--ng-base) var(--ng-ease-out-back);
}
.ng-brand:hover .ng-brand-mark { transform: rotate(-8deg) scale(1.06); }

.ng-nav .nav-link {
    position: relative;
    font-weight: 500;
    color: var(--ng-ink);
    padding: .5rem .9rem;
    border-radius: var(--ng-radius-sm);
    transition: color var(--ng-fast) var(--ng-ease);
}

/* The underline grows from the centre on hover. A pseudo-element rather than a
   border so it can animate without shifting the text. */
.ng-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: .28rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--ng-teal) 0%, var(--ng-green) 100%);
    transition: left var(--ng-base) var(--ng-ease), right var(--ng-base) var(--ng-ease);
}
.ng-nav .nav-link:hover::after,
.ng-nav .nav-link.active::after { left: .9rem; right: .9rem; }

.ng-nav .nav-link:hover,
.ng-nav .nav-link.active { color: var(--ng-teal-text); }

.ng-cart-link { position: relative; }

.ng-cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;

    /* --ng-forest rather than --ng-green, for the reason the palette block gives about the
       logo's own colours: white on the green stop is 2.36:1, and this is 11px text, so it
       needs 4.5:1. The deep green is the same hue at 5.3:1. The badge is small, carries a
       number somebody is meant to read, and is the one place the brand green was being
       asked to hold text. */
    background: var(--ng-forest);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
}

/* Fires when an item is added, so the change is noticed without a page jump. */
.ng-cart-count.is-bumped { animation: ng-bump 520ms var(--ng-ease-out-back); }

@keyframes ng-bump {
    0% { transform: scale(1); }
    35% { transform: scale(1.45); }
    100% { transform: scale(1); }
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    font-weight: 600;
    border-radius: var(--ng-radius-sm);
    padding: .62rem 1.4rem;
    transition: transform var(--ng-fast) var(--ng-ease),
                box-shadow var(--ng-fast) var(--ng-ease),
                background-position var(--ng-base) var(--ng-ease),
                color var(--ng-fast) var(--ng-ease);
}

.btn:active { transform: translateY(1px); }

.btn-ng-primary {
    /* Oversized gradient slid on hover, which reads as a sheen without the
       extra element a true shine effect needs. */
    background: linear-gradient(100deg, var(--ng-teal) 0%, var(--ng-green) 52%, var(--ng-teal) 100%);
    background-size: 220% 100%;
    background-position: 0% 0%;
    color: #fff;

    /* Transparent rather than none, so this and .btn-ng-outline compute to the same height. With
       border: 0 the outline's 1.5px each side made it 3px taller, which is invisible side by side
       and obvious once the two stack on a phone. */
    border: 1.5px solid transparent;

    box-shadow: 0 4px 14px rgba(2, 115, 201, .3);
}
.btn-ng-primary:hover,
.btn-ng-primary:focus {
    color: #fff;
    background-position: 100% 0%;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 115, 201, .38);
}

.btn-ng-outline {
    border: 1.5px solid var(--ng-teal);
    color: var(--ng-teal-text);
    background: transparent;
}
.btn-ng-outline:hover {
    background: var(--ng-teal);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 115, 201, .26);
}

.btn-ng-light {
    background: rgba(255, 255, 255, .12);
    border: 1.5px solid rgba(255, 255, 255, .4);
    color: #fff;
    backdrop-filter: blur(6px);
}
.btn-ng-light:hover {
    background: #fff;
    color: var(--ng-abyss);
    transform: translateY(-2px);
}

.btn-lg { padding: .85rem 1.9rem; font-size: 1.02rem; }

/* ============================================================================
   Hero
   ============================================================================ */

.ng-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 11vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6rem);
    background:
        radial-gradient(1200px 600px at 8% -15%, rgba(20, 162, 184, .22) 0%, transparent 60%),
        radial-gradient(1000px 520px at 95% 5%, rgba(47, 214, 180, .18) 0%, transparent 58%),
        linear-gradient(170deg, var(--ng-paper) 0%, var(--ng-mist) 100%);
}

/* Slow-drifting colour fields behind the hero. Sitting on their own layer with
   a blur, they read as depth rather than as shapes. */
.ng-aurora {
    position: absolute;
    inset: -30% -10% auto -10%;
    height: 150%;
    pointer-events: none;
    z-index: 0;
    filter: blur(70px);
    opacity: .5;
}

.ng-aurora span {
    position: absolute;
    display: block;
    border-radius: 50%;
    will-change: transform;
}

.ng-aurora span:nth-child(1) {
    width: 46vw; height: 46vw; left: -6vw; top: 8vw;
    background: radial-gradient(circle, rgba(20, 162, 184, .62) 0%, transparent 68%);
    animation: ng-drift-a 22s var(--ng-ease) infinite alternate;
}
.ng-aurora span:nth-child(2) {
    width: 38vw; height: 38vw; right: -4vw; top: 2vw;
    background: radial-gradient(circle, rgba(47, 214, 180, .54) 0%, transparent 68%);
    animation: ng-drift-b 27s var(--ng-ease) infinite alternate;
}
.ng-aurora span:nth-child(3) {
    width: 30vw; height: 30vw; left: 38vw; top: 22vw;
    background: radial-gradient(circle, rgba(34, 211, 238, .42) 0%, transparent 70%);
    animation: ng-drift-c 19s var(--ng-ease) infinite alternate;
}

@keyframes ng-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(5vw, -3vw, 0) scale(1.14); }
}
@keyframes ng-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1.08); }
    to   { transform: translate3d(-5vw, 4vw, 0) scale(.94); }
}
@keyframes ng-drift-c {
    from { transform: translate3d(0, 0, 0) scale(.92); }
    to   { transform: translate3d(3vw, 5vw, 0) scale(1.16); }
}

.ng-hero > .container { position: relative; z-index: 1; }

.ng-hero-title {
    font-size: clamp(2.3rem, 5.6vw, 4.1rem);
    line-height: 1.07;
    letter-spacing: -0.035em;
}

/* A pill that sits above the headline. */
.ng-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .42rem 1rem .42rem .55rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--ng-hairline);
    box-shadow: var(--ng-shadow-sm);
    font-size: .85rem;
    font-weight: 500;
    color: var(--ng-ink-soft);
}

.ng-pill .ng-pill-badge {
    display: inline-flex;
    align-items: center;
    padding: .18rem .55rem;
    border-radius: 100px;
    background: linear-gradient(100deg, var(--ng-teal) 0%, var(--ng-green) 100%);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* A soft pulse marking something live. */
.ng-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ng-green-bright);
    box-shadow: 0 0 0 0 rgba(47, 214, 180, .7);
    animation: ng-pulse 2.4s var(--ng-ease) infinite;
}

@keyframes ng-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(47, 214, 180, .7); }
    70%  { box-shadow: 0 0 0 11px rgba(47, 214, 180, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 214, 180, 0); }
}

/* ============================================================================
   Cards
   ============================================================================ */

/* Deliberately no height: 100% here, and it is worth saying why, because adding it back
   looks like an improvement.

   It was here to make cards sitting side by side in a grid row finish level. It does do
   that — but it applies to every card on the site, including the two stacked inside one
   column on the shop sidebar, the contact page and most of the account area. A grid
   column is a flex item stretched to its row's height, so each stacked card then claimed
   that whole height: the shop's search card rendered 559px tall around 140px of content
   and pushed the category navigation off the page entirely.

   The call sites that genuinely want the stretch already ask for it with Bootstrap's
   h-100 — see the category cards on the homepage and the cards on /Approach. So this
   declaration was redundant where it was wanted and destructive everywhere else. */
.ng-card {
    position: relative;
    background: var(--ng-paper);
    border: 1px solid var(--ng-hairline);
    border-radius: var(--ng-radius);
    box-shadow: var(--ng-shadow-sm);
    transition: transform var(--ng-base) var(--ng-ease),
                box-shadow var(--ng-base) var(--ng-ease),
                border-color var(--ng-base) var(--ng-ease);
}

.ng-card-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--ng-shadow-lg);
    border-color: rgba(2, 115, 201, .35);
}

.ng-card-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: var(--ng-radius-sm);
    background: linear-gradient(135deg, rgba(2, 115, 201, .12) 0%, rgba(9, 190, 160, .14) 100%);
    color: var(--ng-teal-text);
    font-size: 1.5rem;
    transition: transform var(--ng-base) var(--ng-ease-out-back);
}
.ng-card-hover:hover .ng-card-icon { transform: scale(1.1) rotate(-5deg); }

/* ── Product card ──────────────────────────────────────────────────────── */

.ng-product-card { display: flex; flex-direction: column; overflow: hidden; }

.ng-product-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--ng-mist-deep);
}

.ng-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ng-slow) var(--ng-ease);
}
.ng-card-hover:hover .ng-product-media img { transform: scale(1.06); }

.ng-product-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(2, 115, 201, .35);
    font-size: 2.4rem;
    background: linear-gradient(135deg, var(--ng-mist) 0%, var(--ng-mist-deep) 100%);
}

.ng-product-body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; flex: 1; }

.ng-product-title {
    font-size: 1.02rem;
    font-weight: 600;
    margin: 0 0 .3rem;
    line-height: 1.34;
}
.ng-product-title a { color: var(--ng-abyss); text-decoration: none; }
.ng-product-title a:hover { color: var(--ng-teal-text); }

.ng-price { font-family: var(--ng-font-display); font-size: 1.18rem; font-weight: 700; color: var(--ng-abyss); }
.ng-price-was { font-size: .9rem; color: var(--ng-ink-soft); text-decoration: line-through; margin-left: .4rem; font-weight: 400; }

.ng-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .24rem .6rem;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.ng-badge-sale { background: rgba(165, 40, 52, .1); color: var(--ng-danger); }
.ng-badge-sub { background: rgba(9, 190, 160, .12); color: var(--ng-green-text); }
.ng-badge-out { background: rgba(68, 99, 122, .12); color: var(--ng-ink-soft); }

.ng-media-badges { position: absolute; top: .7rem; left: .7rem; display: flex; gap: .35rem; flex-wrap: wrap; z-index: 1; }

/* ============================================================================
   Scroll-triggered reveal
   ----------------------------------------------------------------------------
   Elements marked data-ng-reveal start slightly down and transparent, and are
   given .is-visible by an IntersectionObserver. If script never runs, the
   no-js fallback at the bottom of this file leaves them fully visible — the
   content must never depend on JavaScript to be readable.
   ============================================================================ */

[data-ng-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity var(--ng-slow) var(--ng-ease), transform var(--ng-slow) var(--ng-ease);
    /* Set per element from script, so a row of cards arrives in sequence. */
    transition-delay: var(--ng-reveal-delay, 0ms);
}

[data-ng-reveal].is-visible { opacity: 1; transform: none; }

[data-ng-reveal="left"]  { transform: translateX(-32px); }
[data-ng-reveal="right"] { transform: translateX(32px); }
[data-ng-reveal="scale"] { transform: scale(.94); }

/* ============================================================================
   Stats
   ============================================================================ */

.ng-stat { text-align: center; padding: 1rem .5rem; }

.ng-stat-value {
    font-family: var(--ng-font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1;
    /* Tabular figures stop the number jittering as it counts up. */
    font-variant-numeric: tabular-nums;
}

.ng-stat-label {
    margin-top: .45rem;
    font-size: .82rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ng-ink-soft);
}
.ng-section-dark .ng-stat-label { color: #9ec0cb; }

/* ============================================================================
   Steps
   ============================================================================ */

.ng-steps { counter-reset: ng-step; list-style: none; padding: 0; margin: 0; }

.ng-step { position: relative; padding-left: 4.2rem; padding-bottom: 2.4rem; }

.ng-step::before {
    counter-increment: ng-step;
    content: counter(ng-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.7rem;
    height: 2.7rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ng-teal) 0%, var(--ng-green) 100%);
    color: #fff;
    font-family: var(--ng-font-display);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(2, 115, 201, .28);
}

/* The connecting line, stopped before the last step. */
.ng-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 1.33rem;
    top: 3rem;
    bottom: .4rem;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(2, 115, 201, .4) 0%, rgba(9, 190, 160, .06) 100%);
}

/* ============================================================================
   Forms
   ============================================================================ */

.form-control, .form-select {
    border-radius: var(--ng-radius-sm);
    border: 1.5px solid var(--ng-hairline);
    padding: .68rem .9rem;
    transition: border-color var(--ng-fast) var(--ng-ease), box-shadow var(--ng-fast) var(--ng-ease);
}
.form-control:focus, .form-select:focus {
    border-color: var(--ng-teal);
    box-shadow: 0 0 0 4px var(--bs-focus-ring-color);
}

.form-label { font-weight: 600; font-size: .9rem; color: var(--ng-abyss); margin-bottom: .35rem; }

.ng-form-card {
    background: var(--ng-paper);
    border: 1px solid var(--ng-hairline);
    border-radius: var(--ng-radius-lg);
    box-shadow: var(--ng-shadow-md);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

/* ============================================================================
   Footer
   ============================================================================ */

.ng-footer {
    background: var(--ng-abyss);
    color: #a9c6d0;
    padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
}
.ng-footer h5 { color: #fff; font-size: .88rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.ng-footer a { color: #a9c6d0; text-decoration: none; transition: color var(--ng-fast) var(--ng-ease); }
.ng-footer a:hover { color: #fff; }

/* The footer's navigation links sat at 19px tall, under the 24px WCAG 2.2 asks for a target that
   is not an inline link inside a sentence — and these are not, they are a list of destinations.
   Padding rather than a fixed height, so the target grows with the text rather than clipping it
   if the label ever wraps.

   inline-block because the padding on an inline element would be painted but not counted, which
   makes the link look bigger without being any easier to hit. */
.ng-footer li > a {
    display: inline-block;
    padding: .2rem 0;
    min-height: 24px;
}
.ng-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .84rem; }

/* The FDA structure/function statement. Small, quiet, and always present —
   it is a legal requirement, not a design element to be tucked away. */
.ng-disclaimer {
    font-size: .78rem;
    line-height: 1.6;
    color: #85a7b3;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--ng-radius-sm);
    padding: .85rem 1rem;
}

/* ============================================================================
   Cart and checkout
   ============================================================================ */

.ng-cart-row {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--ng-hairline);
}
.ng-cart-row:last-of-type { border-bottom: 0; }

.ng-cart-thumb { width: 92px; height: 92px; border-radius: var(--ng-radius-sm); object-fit: cover; background: var(--ng-mist-deep); }

.ng-summary {
    position: sticky;
    top: 100px;
    background: var(--ng-paper);
    border: 1px solid var(--ng-hairline);
    border-radius: var(--ng-radius);
    box-shadow: var(--ng-shadow-md);
    padding: 1.5rem;
}

.ng-summary-line { display: flex; justify-content: space-between; padding: .4rem 0; color: var(--ng-ink-soft); }
.ng-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: .85rem;
    margin-top: .5rem;
    border-top: 1.5px solid var(--ng-hairline);
    font-family: var(--ng-font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ng-abyss);
}

/* Progress toward free shipping. The width is set from script via a custom
   property, because a style attribute would be refused by the CSP. */
.ng-progress { height: 7px; border-radius: 7px; background: var(--ng-mist-deep); overflow: hidden; }
.ng-progress-bar {
    height: 100%;
    width: var(--ng-progress, 0%);
    border-radius: 7px;
    background: linear-gradient(90deg, var(--ng-teal) 0%, var(--ng-green-bright) 100%);
    transition: width var(--ng-slow) var(--ng-ease);
}

.ng-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ng-hairline); border-radius: var(--ng-radius-sm); overflow: hidden; }
.ng-qty button {
    border: 0;
    background: transparent;
    width: 34px;
    height: 38px;
    color: var(--ng-teal-text);
    font-size: 1.1rem;
    line-height: 1;
    transition: background var(--ng-fast) var(--ng-ease);
}
.ng-qty button:hover { background: var(--ng-mist-deep); }
.ng-qty input {
    width: 46px;
    height: 38px;
    border: 0;
    border-left: 1.5px solid var(--ng-hairline);
    border-right: 1.5px solid var(--ng-hairline);
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ng-abyss);
}
/* The spinner duplicates the buttons either side of it. */
.ng-qty input::-webkit-outer-spin-button,
.ng-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ng-qty input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ============================================================================
   Trust strip
   ============================================================================ */

.ng-trust {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .88rem;
    font-weight: 500;
    color: var(--ng-ink-soft);
}
.ng-trust i { color: var(--ng-green-text); font-size: 1.15rem; }

/* The three trust lines need 527px to sit on one row. Below that they wrap, and the wrap that
   falls out of their widths is 1 then 2 — one item alone above two sharing a line, which reads
   as something having broken rather than as a choice. (Two then one would be fine; the order of
   the labels is what decides it, which is not a thing to leave to chance.)

   So: one per line until there is room for all three, and never an in-between state. The tighter
   row gap is because a stacked list wants less air between items than a row does. */
@media (max-width: 575.98px) {
    .ng-trust-row {
        flex-direction: column;
        gap: .6rem !important;
    }

    /* Stacked, the two actions are read as a pair, and a pair of different widths looks like a
       mistake. Full width also gives each a target the width of the screen. */
    .ng-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ng-hero-actions .btn { width: 100%; }
}

/* ============================================================================
   Admin
   ============================================================================ */

.ng-admin-shell { min-height: 100vh; background: var(--ng-mist); }

.ng-admin-sidebar {
    background: var(--ng-abyss);
    color: #a9c6d0;
    min-height: 100vh;
    padding: 1.25rem 0;
}
.ng-admin-sidebar .nav-link {
    color: #a9c6d0;
    border-radius: var(--ng-radius-sm);
    margin: .12rem .6rem;
    padding: .56rem .9rem;
    font-size: .93rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .65rem;
    transition: background var(--ng-fast) var(--ng-ease), color var(--ng-fast) var(--ng-ease);
}
.ng-admin-sidebar .nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ng-admin-sidebar .nav-link.active { background: linear-gradient(100deg, var(--ng-teal) 0%, var(--ng-green) 100%); color: #fff; }

.ng-admin-section {
    font-size: .68rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    font-weight: 700;
    color: #5d8695;
    padding: 1.1rem 1.5rem .35rem;
}

/* An unmissable warning when the Stripe key in use is a live one. The expensive
   mistake is not knowing you are taking real money. */
.ng-live-banner {
    background: linear-gradient(100deg, var(--ng-danger) 0%, #c7414e 100%);
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .04em;
    padding: .5rem 1rem;
    text-align: center;
}

.ng-stat-tile {
    background: var(--ng-paper);
    border: 1px solid var(--ng-hairline);
    border-radius: var(--ng-radius);
    padding: 1.2rem 1.35rem;
    box-shadow: var(--ng-shadow-sm);
}
.ng-stat-tile .ng-stat-tile-value {
    font-family: var(--ng-font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--ng-abyss);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.ng-stat-tile .ng-stat-tile-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ng-ink-soft); }

.table > :not(caption) > * > * { padding: .8rem .75rem; }
.table thead th {
    font-size: .74rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ng-ink-soft);
    border-bottom: 1.5px solid var(--ng-hairline);
    font-weight: 700;
}

/* Audit severity, carried as a left border so it reads down a dense table. */
.ng-audit-row { border-left: 3px solid transparent; }
.ng-audit-row.is-notable { border-left-color: var(--ng-warning); }
.ng-audit-row.is-warning { border-left-color: var(--ng-danger); }

/* ============================================================================
   Status pages
   ============================================================================ */

.ng-status-code {
    font-family: var(--ng-font-display);
    font-size: clamp(5rem, 16vw, 10rem);
    font-weight: 700;
    line-height: .9;
    letter-spacing: -0.05em;
}

/* ============================================================================
   Reduced motion
   ----------------------------------------------------------------------------
   Not a token gesture. Vestibular disorders are common, and this is a health
   site — the drifting aurora and the parallax are exactly the kind of movement
   that triggers symptoms. Everything becomes still; nothing becomes invisible.
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    [data-ng-reveal] { opacity: 1 !important; transform: none !important; }

    .ng-aurora { animation: none; opacity: .32; }
    .ng-aurora span { animation: none; }

    .ng-card-hover:hover { transform: none; }
    .btn-ng-primary:hover, .btn-ng-outline:hover, .btn-ng-light:hover { transform: none; }
}

/* Without script the reveal animation never runs, so the content it hides would
   never appear. This makes the page fully readable with JavaScript switched
   off — the class is removed from <html> by site.js the moment it runs. */
.no-js [data-ng-reveal] { opacity: 1; transform: none; }

/* ============================================================================
   Print
   ============================================================================ */

@media print {
    .ng-header, .ng-footer, .btn, .ng-admin-sidebar { display: none !important; }
    body { background: #fff; }
    .ng-card, .ng-summary { box-shadow: none; border-color: #ccc; }
}

/* ============================================================================
   Admin calendar
   ----------------------------------------------------------------------------
   A seven-day grid with an hour gutter. Events are absolutely positioned inside
   their day column from two custom properties that calendar.js sets, because the
   Content-Security-Policy allows no inline styles — the server knows where each
   event goes, and this is how that number reaches the stylesheet.

   Without script the events keep their default position at the top of the day
   and simply stack: the week is still readable, it is just not laid out by time.
   ============================================================================ */

.ng-cal {
    --ng-cal-gutter-width: 58px;
    --ng-cal-hour-height: 52px;
    display: flex;
    flex-direction: column;
    background: var(--ng-paper);
}

.ng-cal-head {
    display: grid;
    grid-template-columns: var(--ng-cal-gutter-width) repeat(7, 1fr);
    border-bottom: 1.5px solid var(--ng-hairline);
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--ng-paper);
}

.ng-cal-day-head {
    padding: .6rem .4rem;
    text-align: center;
    border-left: 1px solid var(--ng-hairline);
}

.ng-cal-day-head.is-today { background: rgba(2, 115, 201, .07); }

.ng-cal-dow {
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ng-ink-soft);
}

.ng-cal-date {
    font-family: var(--ng-font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ng-abyss);
    line-height: 1.2;
}

.ng-cal-day-head.is-today .ng-cal-date { color: var(--ng-teal-text); }

.ng-cal-body {
    display: grid;
    grid-template-columns: var(--ng-cal-gutter-width) repeat(7, 1fr);
    /* A viewport-relative cap so a long day scrolls inside the card rather than
       pushing the page to an unusable length. */
    max-height: min(70vh, 760px);
    overflow-y: auto;
}

.ng-cal-gutter { border-right: 1px solid var(--ng-hairline); }

.ng-cal-hour {
    height: var(--ng-cal-hour-height);
    position: relative;
    border-bottom: 1px solid var(--ng-mist-deep);
}

.ng-cal-hour span {
    position: absolute;
    top: -.55rem;
    right: .4rem;
    font-size: .68rem;
    font-weight: 600;
    color: var(--ng-ink-soft);
    background: var(--ng-paper);
    padding: 0 .2rem;
}

.ng-cal-day {
    position: relative;
    border-left: 1px solid var(--ng-hairline);
}

.ng-cal-slot {
    height: var(--ng-cal-hour-height);
    border-bottom: 1px solid var(--ng-mist-deep);
}

.ng-cal-event {
    /* Static until positioned, so a blocked script leaves readable stacked
       blocks rather than a pile on top of each other at the same coordinates. */
    position: relative;
    display: block;
    width: calc(100% - .5rem);
    margin: 0 .25rem .25rem;
    padding: .3rem .45rem;
    border: 0;
    border-left: 3px solid var(--ng-teal);
    border-radius: var(--ng-radius-sm);
    background: rgba(2, 115, 201, .12);
    color: var(--ng-abyss);
    text-align: left;
    font-size: .74rem;
    line-height: 1.25;
    overflow: hidden;
    transition: background var(--ng-fast) var(--ng-ease), transform var(--ng-fast) var(--ng-ease);
}

.ng-cal-event.is-positioned {
    position: absolute;
    top: var(--ng-cal-top, 0);
    height: var(--ng-cal-height, 6%);
    left: 0;
    right: 0;
    margin: 0 .25rem;
    min-height: 1.6rem;
}

.ng-cal-event:hover {
    background: rgba(2, 115, 201, .2);
    transform: translateY(-1px);
    z-index: 1;
}

.ng-cal-event-time { font-weight: 700; display: block; font-variant-numeric: tabular-nums; }
.ng-cal-event-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Awaiting payment: the slot is held but not paid for. Hatched so it reads as
   provisional at a glance rather than needing the legend. */
.ng-cal-event.is-pending {
    border-left-color: var(--ng-warning);
    background: repeating-linear-gradient(
        45deg,
        rgba(154, 91, 0, .10) 0 6px,
        rgba(154, 91, 0, .18) 6px 12px);
}

.ng-cal-event.is-cancelled {
    border-left-color: var(--ng-ink-soft);
    background: rgba(68, 99, 122, .1);
    color: var(--ng-ink-soft);
    text-decoration: line-through;
}

/* The grid does not fit a phone. Below large, it scrolls sideways as a unit so
   the columns keep their meaning instead of collapsing into an unreadable mush. */
@media (max-width: 991.98px) {
    .ng-cal { overflow-x: auto; }
    .ng-cal-head, .ng-cal-body { min-width: 720px; }
}
