/* ==========================================================================
   QAF landing page — public (unauthenticated) home only.
   Loaded from templates/main/home.html. The other public pages use
   qaf-public.css via public_base.html; the two files share the same tokens,
   type scale and motion vocabulary, so changes to one usually belong in both.
   ========================================================================== */

:root {
    --qaf-black: #0F0F0F;
    --qaf-black-deep: #070708;
    --qaf-lime: #C6F135;
    --qaf-lime-dim: #93b02a;
    --qaf-paper: #FBFBF9;
    --qaf-rule: #E4E4DE;
    --qaf-ink: #111112;
    --qaf-ink-2: #55554F;

    --lp-shell: 1280px;
    --lp-gutter: 3rem;
    --lp-nav-h: 72px;

    --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --lp-display: 'Archivo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --lp-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --lp-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Reset the app chrome that base.html applies to every page ──────────── */
body {
    background: var(--qaf-paper);
    color: var(--qaf-ink);
    font-family: var(--lp-body);
    -webkit-font-smoothing: antialiased;
}
body .guest-header,
body .footer { display: none !important; }
body .main-content { padding: 0 !important; margin: 0 !important; }
body .main-content > .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Utility face for anything that reads as an instrument readout */
.lp-mono {
    font-family: var(--lp-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════════════════════════ */
.lp-nav {
    position: fixed; top: 0; left: 0; right: 0; height: var(--lp-nav-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--lp-gutter);
    background: rgba(15, 15, 15, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 10000;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.lp-nav.is-scrolled {
    background: rgba(10, 10, 11, 0.92);
    border-bottom-color: rgba(198, 241, 53, 0.16);
}

/* Reading-progress hairline sits on the nav's bottom edge */
.lp-nav-progress {
    position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
    transform: scaleX(var(--lp-progress, 0));
    transform-origin: left center;
    background: linear-gradient(90deg, var(--qaf-lime-dim), var(--qaf-lime));
    pointer-events: none;
}

.lp-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.lp-nav-logo {
    display: flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
    flex-shrink: 0;
}
.lp-nav-logo:hover { text-decoration: none; opacity: 0.92; }
.lp-nav-logo img {
    height: 36px !important;
    max-height: 36px !important;
    width: auto !important;
    max-width: 140px !important;
    display: block;
    border-radius: 3px;
    object-fit: contain;
}

.lp-made-uae {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1;
}

.lp-uae-flag {
    display: inline-block;
    width: 22px;
    height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background:
        linear-gradient(#00732f 0 33.33%, #fff 33.33% 66.66%, #000 66.66% 100%);
    box-shadow: inset 6px 0 0 0 #ff0000;
    flex-shrink: 0;
}

.lp-nav-links { display: flex; gap: 2rem; align-items: center; }
.lp-nav-links a {
    position: relative;
    color: rgba(255, 255, 255, 0.66);
    text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: color 0.2s ease;
}
.lp-nav-links a:hover,
.lp-nav-links a.active { color: #fff; text-decoration: none; }
.lp-nav-links a::after {
    content: ''; position: absolute; left: 0; bottom: -6px;
    width: 100%; height: 1.5px; background: var(--qaf-lime);
    transform: scaleX(0); transform-origin: left center;
    transition: transform 0.28s var(--lp-ease);
}
.lp-nav-links a:hover::after,
.lp-nav-links a.active::after { transform: scaleX(1); }

.lp-nav-auth {
    padding: 0.55rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 4px;
    color: #fff; text-decoration: none; font-weight: 600; font-size: 0.875rem;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.lp-nav-auth:hover {
    background: var(--qaf-lime); border-color: var(--qaf-lime);
    color: var(--qaf-black); text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════════════ */
.lp-hero {
    position: relative;
    background: var(--qaf-black);
    padding: calc(var(--lp-nav-h) + 4.5rem) var(--lp-gutter) 4.5rem;
    overflow: hidden;
    isolation: isolate;
}

/* Signature: photon-counting energy-bin spectrum, drawn in qaf-landing.js */
.lp-spectrum {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s ease 0.35s;
    /* Fade the spectrum out at both edges so it reads as atmosphere, not a chart */
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.lp-spectrum.is-live { opacity: 1; }

/* Detector-grid wash — faint, sits between canvas and content */
.lp-hero::before {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 78%);
}

.lp-hero-inner {
    position: relative; z-index: 2;
    max-width: var(--lp-shell); margin: 0 auto; width: 100%;
}

.lp-hero-top {
    display: grid; grid-template-columns: 1.7fr 1fr;
    gap: 4rem; align-items: end;
    /* Clear separation from the scanner block below — the spectrum's baseline
       sits on this element's bottom edge, so the glow stays in the headline zone */
    padding-bottom: 7rem;
}

/* Readout strip + scanner plate read as one block */
.lp-hero-plate { position: relative; }

.lp-hero-label {
    display: flex; align-items: center; gap: 0.7rem;
    font-family: var(--lp-mono);
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em;
    color: var(--qaf-lime); text-transform: uppercase;
    margin-bottom: 1.75rem;
}
.lp-hero-label::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--qaf-lime); flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(198, 241, 53, 0.6);
    animation: lpCount 2.6s ease-out infinite;
}
@keyframes lpCount {
    0%   { box-shadow: 0 0 0 0 rgba(198, 241, 53, 0.55); }
    70%  { box-shadow: 0 0 0 11px rgba(198, 241, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(198, 241, 53, 0); }
}

/* Sized so the three lines never wrap inside their masks: the longest line
   ("QUALITY ASSESSMENT") measures ~12.6x the font size at this width. */
.lp-hero-title {
    font-family: var(--lp-display);
    font-size: clamp(2.1rem, 4.2vw, 3.75rem);
    font-weight: 800;
    font-stretch: 104%;
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin: 0;
}
.lp-hero-title .green { color: var(--qaf-lime); }
.lp-hero-title .white { color: #fff; }

/* Line-by-line mask reveal */
.lp-line {
    display: block; overflow: hidden;
    padding-bottom: 0.06em;   /* room for descenders inside the mask */
}
.lp-line-in { display: block; }

.lp-hero-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.92rem; line-height: 1.8;
    margin: 0 0 2rem;
    max-width: 46ch;
}

.lp-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.lp-btn-explore {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: var(--qaf-lime); color: var(--qaf-black);
    padding: 0.8rem 1.75rem; border-radius: 4px;
    font-weight: 700; font-size: 0.9rem; text-decoration: none;
    transition: transform 0.25s var(--lp-ease), box-shadow 0.25s ease;
}
.lp-btn-explore:hover {
    color: var(--qaf-black); text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(198, 241, 53, 0.26);
}
.lp-btn-explore .lp-arrow { transition: transform 0.25s var(--lp-ease); }
.lp-btn-explore:hover .lp-arrow { transform: translate(3px, -3px); }

.lp-btn-ghost {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.8rem 1.5rem; border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600; font-size: 0.9rem; text-decoration: none;
    transition: border-color 0.22s ease, color 0.22s ease, background 0.22s ease;
}
.lp-btn-ghost:hover {
    border-color: rgba(198, 241, 53, 0.55);
    background: rgba(198, 241, 53, 0.06);
    color: #fff; text-decoration: none;
}

/* ── Instrument readout strip ─────────────────────────────────────────────
   Deliberately not big-number stat cards: this reads like a console status
   bar, and every value is stated elsewhere on the page. */
.lp-readout {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lp-readout-cell {
    position: relative;
    padding: 1.15rem 1.5rem 1.15rem 0;
    display: flex; flex-direction: column; gap: 0.4rem;
}
.lp-readout-cell + .lp-readout-cell { padding-left: 1.5rem; }
.lp-readout-cell + .lp-readout-cell::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%); width: 1px; height: 34px;
    background: rgba(255, 255, 255, 0.1);
}
.lp-readout-key {
    font-family: var(--lp-mono);
    font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.34);
}
.lp-readout-val {
    font-family: var(--lp-mono);
    font-size: 0.94rem; font-weight: 500; letter-spacing: 0.02em;
    color: #fff;
}
.lp-readout-val em {
    font-style: normal; color: var(--qaf-lime);
}

/* ── Scanner plate ───────────────────────────────────────────────────────── */
.lp-hero-image {
    position: relative;
    width: 100%;
    margin: 1.1rem 0 0;    /* tight to the readout strip it belongs with */
    padding: 2rem 2rem 3rem;
    background: #fff;
    border-radius: 14px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.lp-hero-image img {
    width: 100%; height: auto; max-height: 460px;
    object-fit: contain; display: block;
    will-change: transform;
}
/* Single lime sweep across the plate, once, as the plate settles in */
.lp-hero-image::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 42%;
    left: -45%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(198, 241, 53, 0.16) 45%,
        rgba(198, 241, 53, 0.34) 50%,
        rgba(198, 241, 53, 0.16) 55%,
        transparent
    );
    pointer-events: none;
}
.lp-hero-image.is-swept::after {
    animation: lpSweep 1.5s cubic-bezier(0.45, 0, 0.3, 1) 0.15s 1 both;
}
@keyframes lpSweep {
    from { left: -45%; }
    to   { left: 105%; }
}

/* ══════════════════════════════════════════════════════════════════════════
   SHARED SECTION FURNITURE (light sections)
   ══════════════════════════════════════════════════════════════════════════ */
.lp-eyebrow {
    display: flex; align-items: center; gap: 0.6rem;
    font-family: var(--lp-mono);
    font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--qaf-ink-2);
    margin-bottom: 1.1rem;
}
.lp-eyebrow::before {
    content: ''; width: 22px; height: 1px; background: var(--qaf-lime-dim);
    flex-shrink: 0;
}

/* ── About / Capabilities split ───────────────────────────────────────────── */
.lp-section-split {
    display: grid; grid-template-columns: 1fr 1.15fr; gap: 4.5rem;
    max-width: var(--lp-shell); margin: 0 auto;
    padding: 6rem var(--lp-gutter) 4.5rem;
    align-items: start;
}
.lp-about-title,
.lp-cap-title {
    font-family: var(--lp-display);
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-weight: 800; font-stretch: 108%;
    letter-spacing: -0.02em; line-height: 1.06;
    color: var(--qaf-ink);
    margin: 0 0 1.35rem;
}
.lp-about-title .dot { color: var(--qaf-lime-dim); }

.lp-tags { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.lp-tag {
    padding: 0.5rem 1.15rem;
    border: 1px solid var(--qaf-rule); border-radius: 40px;
    background: #fff; color: var(--qaf-ink-2);
    font-size: 0.855rem; font-weight: 500; text-decoration: none;
    transition: transform 0.22s var(--lp-ease), border-color 0.22s ease,
                color 0.22s ease, box-shadow 0.22s ease;
}
.lp-tag:hover {
    border-color: var(--qaf-ink); color: var(--qaf-ink);
    text-decoration: none; transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.lp-cap-desc {
    font-size: 0.98rem; line-height: 1.8; color: var(--qaf-ink-2);
    margin: 0;
    max-width: 58ch;
}
.lp-btn-scroll {
    display: inline-flex; align-items: center; gap: 0.55rem;
    background: var(--qaf-ink); color: #fff;
    padding: 0.75rem 1.6rem; border-radius: 4px;
    font-weight: 600; font-size: 0.875rem; text-decoration: none;
    margin-top: 2rem;
    transition: background 0.25s ease, transform 0.25s var(--lp-ease);
}
.lp-btn-scroll:hover { background: #2c2c2c; color: #fff; text-decoration: none; }
.lp-btn-scroll .lp-chevron { display: inline-block; animation: lpNudge 1.8s ease-in-out infinite; }
@keyframes lpNudge {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(3px); }
}

/* ══════════════════════════════════════════════════════════════════════════
   METRIC ACCORDION
   Rows are labelled with the metric's own notation, not an index — these are
   eight independent measurements, not a sequence.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-accordion-section {
    max-width: var(--lp-shell); margin: 0 auto;
    padding: 0 var(--lp-gutter) 6rem;
}
.lp-acc-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
    padding-bottom: 1.25rem; margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--qaf-rule);
}
.lp-acc-head h2 {
    font-family: var(--lp-display);
    font-size: clamp(1.6rem, 2.4vw, 2.05rem);
    font-weight: 800; font-stretch: 108%; letter-spacing: -0.02em;
    color: var(--qaf-ink); margin: 0;
}
.lp-acc-head .lp-mono { color: var(--qaf-ink-2); }

.lp-acc-item {
    position: relative;
    background: #fff;
    border: 1px solid var(--qaf-rule); border-radius: 12px;
    margin-bottom: 0.7rem; overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.35s ease,
                transform 0.35s var(--lp-ease);
}
.lp-acc-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
    background: var(--qaf-lime);
    transform: scaleY(0); transform-origin: top center;
    transition: transform 0.4s var(--lp-ease);
}
.lp-acc-item.open::before { transform: scaleY(1); }
.lp-acc-item:hover { border-color: #c9c9c2; }
.lp-acc-item.open {
    border-color: #cfcfc7;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.07);
}

.lp-acc-header {
    display: grid; grid-template-columns: 82px 1fr 1fr auto;
    align-items: center; gap: 1.5rem;
    width: 100%; padding: 1.35rem 1.6rem;
    background: none; border: none; text-align: left;
    font: inherit; color: inherit; cursor: pointer;
}
.lp-acc-notation {
    font-family: var(--lp-mono);
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em;
    color: var(--qaf-ink-2);
    padding: 0.28rem 0.5rem;
    border: 1px solid var(--qaf-rule); border-radius: 3px;
    text-align: center; white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.lp-acc-item.open .lp-acc-notation {
    background: var(--qaf-lime); border-color: var(--qaf-lime);
    color: var(--qaf-black); font-weight: 600;
}
.lp-acc-title {
    font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em;
    color: var(--qaf-ink);
}
.lp-acc-subtitle { font-size: 0.9rem; font-weight: 500; color: var(--qaf-ink-2); }
/* Plus/minus drawn in CSS so the vertical stroke can rotate into the
   horizontal one when the panel opens */
.lp-acc-toggle {
    position: relative;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--qaf-rule); background: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--qaf-ink-2);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.lp-acc-toggle::before,
.lp-acc-toggle::after {
    content: ''; position: absolute; background: currentColor;
    border-radius: 1px;
    transition: transform 0.4s var(--lp-ease);
}
.lp-acc-toggle::before { width: 12px; height: 1.5px; }
.lp-acc-toggle::after  { width: 1.5px; height: 12px; }
.lp-acc-item.open .lp-acc-toggle {
    background: var(--qaf-ink); border-color: var(--qaf-ink); color: #fff;
}
.lp-acc-item.open .lp-acc-toggle::after { transform: rotate(90deg); }

.lp-acc-body {
    max-height: 0; overflow: hidden;
    transition: max-height 0.45s var(--lp-ease);
}
.lp-acc-inner { padding: 0 1.6rem 1.75rem; }

.lp-acc-content {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
    align-items: center;
}
.lp-acc-content.lp-acc-dual { align-items: start; }

.lp-acc-figure { text-align: center; }
.lp-acc-img {
    width: 100%; height: 270px; object-fit: contain;
    background: #F4F4F0;
    border: 1px solid var(--qaf-rule); border-radius: 8px;
    padding: 12px;
}
.lp-acc-caption {
    font-family: var(--lp-mono);
    font-size: 0.72rem; line-height: 1.55; letter-spacing: 0.01em;
    color: var(--qaf-ink-2);
    margin-top: 0.7rem;
}
.lp-acc-info-title {
    font-size: 1.02rem; font-weight: 650; color: var(--qaf-ink);
    margin-bottom: 0.5rem;
}
.lp-acc-info-desc {
    font-size: 0.93rem; line-height: 1.75; color: var(--qaf-ink-2);
    max-width: 76ch;
}
.lp-acc-link {
    display: inline-flex; align-items: center; gap: 0.45rem;
    margin-top: 1rem;
    font-family: var(--lp-mono);
    font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
    font-weight: 500;
    color: var(--qaf-ink); text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--qaf-rule);
    transition: border-color 0.25s ease, gap 0.25s var(--lp-ease);
}
.lp-acc-link:hover {
    color: var(--qaf-ink); text-decoration: none;
    border-bottom-color: var(--qaf-lime); gap: 0.7rem;
}
.lp-acc-dual + .lp-acc-info { padding-top: 1.5rem; }

/* ══════════════════════════════════════════════════════════════════════════
   PLATFORM FEATURES (dark band)
   ══════════════════════════════════════════════════════════════════════════ */
.lp-features {
    background: var(--qaf-black);
    padding: 5.5rem var(--lp-gutter);
}
.lp-features-inner { max-width: var(--lp-shell); margin: 0 auto; }
.lp-features-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
    padding-bottom: 1.5rem; margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lp-features-title {
    font-family: var(--lp-display);
    font-size: clamp(1.7rem, 2.6vw, 2.3rem);
    font-weight: 800; font-stretch: 108%; letter-spacing: -0.02em;
    color: #fff; margin: 0;
}
.lp-features-title .green { color: var(--qaf-lime); }
.lp-features-head .lp-mono { color: rgba(255, 255, 255, 0.34); }

.lp-features-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.lp-feat-card {
    position: relative; overflow: hidden;
    background: #171718;
    border: 1px solid #262627; border-radius: 12px;
    padding: 1.9rem 1.5rem 1.75rem;
    transition: transform 0.35s var(--lp-ease), border-color 0.3s ease;
}
/* Cursor-tracked spotlight; --mx/--my are set in qaf-landing.js */
.lp-feat-card::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(
        260px circle at var(--mx, 50%) var(--my, 0%),
        rgba(198, 241, 53, 0.1),
        transparent 70%
    );
    opacity: 0; transition: opacity 0.3s ease;
}
.lp-feat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(198, 241, 53, 0.4);
}
.lp-feat-card:hover::before { opacity: 1; }

.lp-feat-icon {
    position: relative;
    width: 42px; height: 42px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    background: rgba(198, 241, 53, 0.1);
    border: 1px solid rgba(198, 241, 53, 0.24);
    color: var(--qaf-lime);
    margin-bottom: 1.35rem;
    transition: background 0.3s ease, color 0.3s ease, transform 0.35s var(--lp-ease);
}
.lp-feat-card:hover .lp-feat-icon {
    background: var(--qaf-lime); color: var(--qaf-black);
    transform: translateY(-2px);
}
.lp-feat-name {
    position: relative;
    font-size: 1.02rem; font-weight: 650; color: #fff;
    margin-bottom: 0.45rem;
}
.lp-feat-desc {
    position: relative;
    font-size: 0.855rem; line-height: 1.6; color: rgba(255, 255, 255, 0.5);
}

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════ */
.lp-footer {
    background: var(--qaf-black-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 3.5rem var(--lp-gutter) 1.5rem;
}
.lp-footer-inner {
    max-width: var(--lp-shell); margin: 0 auto 2.5rem;
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem;
}
.lp-footer-brand {
    font-family: var(--lp-display);
    font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 0.7rem;
}
.lp-footer-brand .dot { color: var(--qaf-lime); }
.lp-footer-tagline {
    font-size: 0.855rem; line-height: 1.65; color: rgba(255, 255, 255, 0.4);
}
.lp-footer-heading {
    font-family: var(--lp-mono);
    font-size: 0.64rem; font-weight: 500; letter-spacing: 0.2em;
    text-transform: uppercase; color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}
.lp-footer a {
    display: block; color: rgba(255, 255, 255, 0.58);
    text-decoration: none; font-size: 0.875rem; margin-bottom: 0.5rem;
    transition: color 0.2s ease, transform 0.2s ease;
}
.lp-footer a:hover {
    color: var(--qaf-lime); text-decoration: none; transform: translateX(2px);
}
.lp-footer-copy {
    max-width: var(--lp-shell); margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 1.5rem;
    font-family: var(--lp-mono);
    font-size: 0.68rem; letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.28); text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════════
   MOTION — load sequence + scroll reveals
   ══════════════════════════════════════════════════════════════════════════ */
.lp-nav.is-ready { animation: lpNavIn 0.6s var(--lp-ease) both; }
@keyframes lpNavIn {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: none; }
}

/* Masked line reveal for the headline */
.lp-in-mask .lp-line-in {
    transform: translateY(110%);
    animation: lpMaskIn 0.9s var(--lp-ease) forwards;
    animation-delay: var(--lp-delay, 0ms);
}
@keyframes lpMaskIn {
    to { transform: none; }
}

/* Generic load-in for hero copy blocks */
.lp-in {
    opacity: 0; transform: translateY(18px);
    animation: lpFadeUp 0.8s var(--lp-ease) forwards;
    animation-delay: var(--lp-delay, 0ms);
}
@keyframes lpFadeUp {
    to { opacity: 1; transform: none; }
}

/* Scroll reveals */
.lp-reveal {
    opacity: 0; transform: translateY(24px);
    transition:
        opacity 0.75s var(--lp-ease),
        transform 0.75s var(--lp-ease);
    transition-delay: var(--lp-delay, 0ms);
}
.lp-reveal.lp-reveal-left  { transform: translateX(-24px); }
.lp-reveal.lp-reveal-right { transform: translateX(24px); }
.lp-reveal.lp-reveal-scale { transform: translateY(14px) scale(0.975); }
.lp-reveal.is-visible { opacity: 1; transform: none; }

/* Keyboard focus — visible on both dark and light sections */
.lp-nav a:focus-visible,
.lp-acc-header:focus-visible,
.lp-tag:focus-visible,
.lp-btn-explore:focus-visible,
.lp-btn-ghost:focus-visible,
.lp-btn-scroll:focus-visible,
.lp-acc-link:focus-visible,
.lp-footer a:focus-visible {
    outline: 2px solid var(--qaf-lime);
    outline-offset: 3px;
    border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .lp-nav.is-ready,
    .lp-in-mask .lp-line-in,
    .lp-in,
    .lp-hero-image.is-swept::after,
    .lp-hero-label::before,
    .lp-btn-scroll .lp-chevron {
        animation: none !important;
    }
    .lp-reveal,
    .lp-in,
    .lp-in-mask .lp-line-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .lp-spectrum { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
    .lp-hero-top { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
    .lp-hero-desc { max-width: 60ch; }
    .lp-section-split { grid-template-columns: 1fr; gap: 3rem; }
    .lp-features-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-footer-inner { grid-template-columns: 1fr 1fr; }
    .lp-acc-header { grid-template-columns: 76px 1fr auto; gap: 1.1rem; }
    .lp-acc-subtitle { display: none; }
    .lp-acc-content { grid-template-columns: 1fr; }
    .lp-acc-img { height: 240px; }
}

@media (max-width: 768px) {
    :root { --lp-gutter: 1.35rem; --lp-nav-h: 60px; }

    .lp-nav-links { display: none; }
    .lp-hero { padding-top: calc(var(--lp-nav-h) + 2.5rem); padding-bottom: 2.5rem; }
    /* Keeps "QUALITY ASSESSMENT" on one line down to a 320px viewport */
    .lp-hero-title { font-size: clamp(1.4rem, 6.9vw, 2.4rem); font-stretch: 100%; }
    .lp-hero-image { margin-top: 2rem; padding: 1.1rem 1.1rem 2rem; }
    .lp-hero-image img { max-height: 280px; }

    .lp-readout { grid-template-columns: repeat(2, 1fr); }
    .lp-readout-val { font-size: 0.82rem; }
    .lp-readout-cell,
    .lp-readout-cell + .lp-readout-cell { padding: 0.95rem 1rem 0.95rem 0; }
    .lp-readout-cell:nth-child(even) { padding-left: 1rem; }
    .lp-readout-cell:nth-child(odd)::before { display: none; }
    .lp-readout-cell:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.1); }

    .lp-section-split { padding: 3.5rem var(--lp-gutter) 2.5rem; }
    .lp-accordion-section { padding: 0 var(--lp-gutter) 3.5rem; }
    .lp-acc-header { padding: 1.1rem 1.1rem; grid-template-columns: 68px 1fr auto; }
    .lp-acc-title { font-size: 1rem; }
    .lp-acc-inner { padding: 0 1.1rem 1.4rem; }
    .lp-features { padding: 3.5rem var(--lp-gutter); }
    .lp-features-grid { grid-template-columns: 1fr; }
    .lp-footer { padding: 2.5rem var(--lp-gutter) 1.25rem; }
    .lp-footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   FEATURES — QC PROGRAMME LEAD CARD + ANIMATED BOARD
   ══════════════════════════════════════════════════════════════════════════ */
.lp-feat-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1.15fr 1fr;
    gap: 2.5rem; align-items: center;
    background: linear-gradient(135deg, #17171a 0%, #131315 100%);
    border: 1px solid rgba(198, 241, 53, 0.28);
    border-radius: 14px;
    padding: 2.4rem 2.2rem;
    margin-bottom: 1rem;
}
.lp-feat-hero::after {
    content: ''; position: absolute; top: -40%; right: -10%;
    width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(198,241,53,.07), transparent 65%);
    pointer-events: none;
}
.lp-feat-flag {
    display: inline-block; font-family: var(--lp-mono, monospace);
    font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--qaf-black); background: var(--qaf-lime);
    padding: 0.25rem 0.7rem; border-radius: 20px; margin-bottom: 1rem;
}
.lp-feat-hero-title {
    font-family: var(--lp-display); font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 800; letter-spacing: -0.02em; color: #fff;
    margin: 0 0 0.85rem; line-height: 1.15;
}
.lp-feat-hero-desc {
    font-size: 0.93rem; line-height: 1.65;
    color: rgba(255,255,255,0.56); margin: 0 0 1.35rem; max-width: 46ch;
}
.lp-feat-list { list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.4rem; }
.lp-feat-list li {
    position: relative; padding-left: 1.05rem;
    font-size: 0.83rem; line-height: 1.5; color: rgba(255,255,255,0.48);
}
.lp-feat-list li::before {
    content: ''; position: absolute; left: 0; top: 0.52em;
    width: 5px; height: 5px; border-radius: 50%; background: var(--qaf-lime);
}
.lp-feat-list li span { color: #fff; font-weight: 600; }

.lp-feat-hero-viz { position: relative; }
.lp-qcboard { width: 100%; height: auto; display: block;
    filter: drop-shadow(0 18px 40px rgba(0,0,0,0.45)); }
.lp-qc-h { fill: rgba(255,255,255,.62); font-size: 8px;
    font-family: var(--lp-mono, monospace); letter-spacing: .08em; }
.lp-qc-t { fill: rgba(255,255,255,.72); font-size: 8.5px;
    font-family: 'Inter', sans-serif; }
.lp-qc-b { fill: #fff; font-size: 7px; font-weight: 700;
    font-family: 'Inter', sans-serif; letter-spacing: .06em; }

/* Rows slide in on reveal; the sparkline draws itself */
.lp-qc-row { opacity: 0; transform: translateX(14px); }
.lp-feat-hero.is-in .lp-qc-row {
    animation: lpQcRow .55s var(--lp-ease, cubic-bezier(.22,1,.36,1)) forwards;
    animation-delay: var(--d, 0s);
}
@keyframes lpQcRow { to { opacity: 1; transform: translateX(0); } }

.lp-qc-spark { stroke-dasharray: 260; stroke-dashoffset: 260; }
.lp-feat-hero.is-in .lp-qc-spark {
    animation: lpQcDraw 1.5s ease-out forwards; animation-delay: 1.5s;
}
@keyframes lpQcDraw { to { stroke-dashoffset: 0; } }

/* Status pills pulse once after arriving */
.lp-feat-hero.is-in .lp-qc-row rect[fill="#b9770e"],
.lp-feat-hero.is-in .lp-qc-row rect[fill="#c0392b"] {
    animation: lpQcPulse 2.4s ease-in-out 1.9s infinite;
}
@keyframes lpQcPulse {
    0%, 100% { opacity: 1; } 50% { opacity: .55; }
}

/* Feature cards reveal in sequence */
.lp-feat-card[data-lpfeat] { opacity: 0; transform: translateY(16px); }
.lp-feat-card[data-lpfeat].is-in {
    animation: lpFeatIn .5s var(--lp-ease, cubic-bezier(.22,1,.36,1)) forwards;
}
@keyframes lpFeatIn { to { opacity: 1; transform: translateY(0); } }

/* Icon gets a subtle idle float so the grid feels alive */
.lp-feat-card .lp-feat-icon i { display: block; }
.lp-feat-card:hover .lp-feat-icon i { animation: lpIcon .6s ease; }
@keyframes lpIcon {
    0% { transform: scale(1); } 45% { transform: scale(1.18) rotate(-6deg); }
    100% { transform: scale(1); }
}

.lp-features-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .lp-feat-hero { grid-template-columns: 1fr; gap: 1.8rem; }
    .lp-feat-hero-viz { max-width: 460px; }
}
@media (max-width: 620px) {
    .lp-feat-hero { padding: 1.8rem 1.4rem; }
    .lp-feat-list { grid-template-columns: 1fr; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lp-qc-row, .lp-feat-card[data-lpfeat] { opacity: 1 !important; transform: none !important; animation: none !important; }
    .lp-qc-spark { stroke-dashoffset: 0 !important; animation: none !important; }
    .lp-feat-hero.is-in .lp-qc-row rect { animation: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   ANALYSIS MODULES — HORIZONTAL RAIL
   ══════════════════════════════════════════════════════════════════════════ */
.lp-modrail-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap; margin: 2.75rem 0 1.25rem;
}
.lp-modrail-title {
    font-family: var(--lp-display); font-size: clamp(1.2rem, 1.7vw, 1.5rem);
    font-weight: 800; letter-spacing: -0.02em; color: #fff; margin: 0 0 0.2rem;
}
.lp-modrail-sub {
    font-size: 0.85rem; color: rgba(255,255,255,0.42); margin: 0;
}
.lp-modrail-nav { display: flex; gap: 0.5rem; }
.lp-rail-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: #17171a; border: 1px solid #2b2b2e; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer;
    transition: background .25s ease, border-color .25s ease, color .25s ease, opacity .25s ease;
}
.lp-rail-btn:hover:not(:disabled) {
    background: var(--qaf-lime); border-color: var(--qaf-lime); color: var(--qaf-black);
}
.lp-rail-btn:disabled { opacity: .3; cursor: default; }

.lp-modrail {
    position: relative;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; -ms-overflow-style: none;
    margin: 0 calc(var(--lp-gutter) * -1); padding: 0.5rem var(--lp-gutter) 1.25rem;
    cursor: grab;
}
.lp-modrail::-webkit-scrollbar { display: none; }
.lp-modrail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.lp-modrail-track { display: flex; gap: 1.1rem; width: max-content; }

.lp-mod-card {
    scroll-snap-align: start;
    flex: 0 0 380px; width: 380px;
    background: #161618; border: 1px solid #262627; border-radius: 14px;
    padding: 0; overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .35s var(--lp-ease), border-color .3s ease;
}
.lp-mod-card:hover {
    transform: translateY(-5px);
    border-color: rgba(198, 241, 53, 0.45);
}
.lp-mod-media {
    position: relative; width: 100%; aspect-ratio: 300 / 170;
    background: #0e0e10; border-bottom: 1px solid #232325; overflow: hidden;
}
.lp-mod-media img,
.lp-mod-media .lp-mod-ph { width: 100%; height: 100%; display: block; object-fit: cover; }
.lp-mod-num {
    font-family: var(--lp-mono, monospace); font-size: 0.7rem; letter-spacing: .12em;
    color: var(--qaf-lime); padding: 1.15rem 1.35rem 0;
}
.lp-mod-name {
    font-size: 1.12rem; font-weight: 700; color: #fff;
    margin: 0.3rem 0 0.5rem; padding: 0 1.35rem;
}
.lp-mod-desc {
    font-size: 0.87rem; line-height: 1.62; color: rgba(255,255,255,0.5);
    margin: 0; padding: 0 1.35rem 1.5rem;
}

/* Scroll progress bar under the rail */
.lp-rail-progress {
    height: 2px; background: #232325; border-radius: 2px; overflow: hidden;
    max-width: 240px; margin: 0.25rem 0 0;
}
.lp-rail-progress span {
    display: block; height: 100%; width: 25%;
    background: var(--qaf-lime); border-radius: 2px;
    transition: transform .15s linear; transform-origin: left;
}

/* Supporting grid sits below, slightly quieter */
.lp-features-grid--sub { margin-top: 2.5rem; }

/* ── Placeholder animations (replaced when real images are added) ───────── */
.lp-ph-b { opacity: 0; animation: lpPhPop .5s ease forwards; animation-delay: var(--d, 0s); }
@keyframes lpPhPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

.lp-ph-ring { transform-origin: 150px 85px; animation: lpPhRing 3.2s ease-out infinite; animation-delay: var(--d, 0s); }
@keyframes lpPhRing {
    0% { transform: scale(.75); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: scale(1.15); opacity: 0; }
}

.lp-ph-bars rect { transform-origin: 50% 100%; animation: lpPhBar 2.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes lpPhBar { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.72); } }

.lp-ph-line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: lpPhDraw 2.4s ease-out infinite; }
@keyframes lpPhDraw {
    0% { stroke-dashoffset: 400; } 55% { stroke-dashoffset: 0; }
    90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: .25; }
}
.lp-ph-dot { animation: lpPhBlink 2.4s ease-in-out infinite; }
@keyframes lpPhBlink { 0%,40% { opacity: 0; } 60%,100% { opacity: 1; } }

.lp-ph-pts circle { opacity: 0; animation: lpPhPop .45s ease forwards; animation-delay: var(--d, 0s); }

.lp-ph-orbit { transform-origin: 150px 85px; animation: lpPhSpin 14s linear infinite; }
@keyframes lpPhSpin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
    .lp-mod-card { flex: 0 0 78vw; width: 78vw; }
    .lp-modrail-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-ph-b, .lp-ph-ring, .lp-ph-bars rect, .lp-ph-line, .lp-ph-dot,
    .lp-ph-pts circle, .lp-ph-orbit { animation: none !important; opacity: 1 !important;
        stroke-dashoffset: 0 !important; transform: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   FEATURES ON LIGHT — overrides the dark treatment above
   ══════════════════════════════════════════════════════════════════════════ */
.lp-features { background: #ffffff; }
.lp-features-head { border-bottom-color: #e6e6e8; }
.lp-features-title { color: #0F0F0F; }
.lp-features-head .lp-mono { color: #8a8a90; }

/* QC programme lead card */
.lp-feat-hero {
    background: linear-gradient(135deg, #fbfcf6 0%, #f6f7f2 100%);
    border-color: #dfe6c8;
    box-shadow: 0 10px 34px rgba(15, 15, 15, 0.05);
}
.lp-feat-hero::after {
    background: radial-gradient(circle, rgba(150, 190, 20, .10), transparent 65%);
}
.lp-feat-hero-title { color: #0F0F0F; }
.lp-feat-hero-desc { color: #5a5a60; }
.lp-feat-list li { color: #6a6a70; }
.lp-feat-list li span { color: #0F0F0F; }
.lp-feat-list li::before { background: #8fbf12; }
.lp-feat-flag { background: #0F0F0F; color: var(--qaf-lime); }

/* The QC board stays dark — it is a screen, and reads as one */
.lp-qcboard { filter: drop-shadow(0 14px 32px rgba(15, 15, 15, 0.18)); }

/* Module rail */
.lp-modrail-title { color: #0F0F0F; }
.lp-modrail-sub { color: #8a8a90; }
.lp-rail-btn { background: #fff; border-color: #dcdce0; color: #0F0F0F; }
.lp-rail-btn:hover:not(:disabled) {
    background: #0F0F0F; border-color: #0F0F0F; color: var(--qaf-lime);
}
.lp-rail-progress { background: #e6e6e8; }
.lp-rail-progress span { background: #0F0F0F; }

.lp-mod-card {
    background: #fff; border-color: #e6e6e8;
    box-shadow: 0 2px 10px rgba(15, 15, 15, 0.04);
}
.lp-mod-card:hover {
    border-color: #b9d94a;
    box-shadow: 0 14px 34px rgba(15, 15, 15, 0.10);
}
.lp-mod-media { border-bottom-color: #ececee; }
.lp-mod-num { color: #7ea60d; }
.lp-mod-name { color: #0F0F0F; }
.lp-mod-desc { color: #6a6a70; }

/* Supporting capability cards */
.lp-feat-card {
    background: #fff; border-color: #e6e6e8;
    box-shadow: 0 2px 10px rgba(15, 15, 15, 0.04);
}
.lp-feat-card:hover {
    border-color: #b9d94a;
    box-shadow: 0 12px 28px rgba(15, 15, 15, 0.09);
}
.lp-feat-card::before {
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%),
                rgba(150, 190, 20, .09), transparent 70%);
}
.lp-feat-icon {
    background: rgba(150, 190, 20, .14);
    border-color: rgba(150, 190, 20, .3);
    color: #6f9a0b;
}
.lp-feat-card:hover .lp-feat-icon { background: #0F0F0F; color: var(--qaf-lime); }
.lp-feat-name { color: #0F0F0F; }
.lp-feat-desc { color: #6a6a70; }

/* ══════════════════════════════════════════════════════════════════════════
   REAL RESULT IMAGES — ANIMATED OVERLAYS
   Cards that use screenshots instead of SVG placeholders. Animations run
   only while the card is on screen (.is-seen) so they do not burn cycles.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-mod-media--light { background: #fff; }
.lp-mod-media img { transition: transform .5s var(--lp-ease); }
.lp-mod-card:hover .lp-mod-media img { transform: scale(1.03); }

/* ── Histogram: bars rise from the axis, then a marker sweeps across ───── */
.lp-anim-hist { position: relative; overflow: hidden; }
.lp-anim-hist .lp-anim-wipe {
    position: absolute; left: 0; right: 0; bottom: 0; top: 0;
    background: #fff; transform-origin: bottom;
    pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-hist .lp-anim-wipe {
    animation: lpHistWipe 1.15s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes lpHistWipe {
    from { transform: scaleY(1); }
    to   { transform: scaleY(0); }
}
.lp-anim-hist .lp-anim-scan {
    position: absolute; top: 8%; bottom: 14%; width: 2px;
    background: linear-gradient(180deg, rgba(198,241,53,0), #8fbf12, rgba(198,241,53,0));
    left: 8%; opacity: 0; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-hist .lp-anim-scan {
    animation: lpScanX 3.4s ease-in-out 1.2s infinite;
}
@keyframes lpScanX {
    0%   { left: 8%;  opacity: 0; }
    12%  { opacity: .95; }
    88%  { opacity: .95; }
    100% { left: 92%; opacity: 0; }
}

/* ── Line profile: specimen first, profile revealed alongside ─────────── */
.lp-mod-media--split {
    position: relative; display: grid; grid-template-columns: 42% 58%;
    background: #fff; overflow: hidden;
}
.lp-mod-media--split img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-mod-media--split .lp-mod-img-b { object-fit: contain; background: #fff; }
.lp-anim-line .lp-anim-reveal {
    position: absolute; top: 0; bottom: 0; right: 0; width: 58%;
    background: #fff; transform-origin: right; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-line .lp-anim-reveal {
    animation: lpRevealX 1s cubic-bezier(.22,1,.36,1) .35s forwards;
}
@keyframes lpRevealX { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* The green trace line sweeping over the specimen half */
.lp-anim-line .lp-anim-scan {
    position: absolute; left: 6%; width: 30%; height: 2px;
    background: linear-gradient(90deg, rgba(120,220,60,0), #63d827, rgba(120,220,60,0));
    top: 30%; opacity: 0; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-line .lp-anim-scan {
    animation: lpScanY 3.6s ease-in-out 1.4s infinite;
}
@keyframes lpScanY {
    0%   { top: 26%; opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { top: 72%; opacity: 0; }
}

/* ── ROI: a soft pulse over the measured region ───────────────────────── */
.lp-anim-roi { position: relative; overflow: hidden; }
.lp-anim-roi .lp-anim-pulse {
    position: absolute; left: 50%; top: 50%;
    width: 30%; aspect-ratio: 1; border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(198, 241, 53, .85);
    opacity: 0; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-roi .lp-anim-pulse {
    animation: lpRoiPulse 3s ease-out infinite;
}
@keyframes lpRoiPulse {
    0%   { transform: translate(-50%,-50%) scale(.55); opacity: 0; }
    25%  { opacity: .9; }
    100% { transform: translate(-50%,-50%) scale(1.5); opacity: 0; }
}

/* ── HU conversion: a light sweep, as if values are being re-mapped ───── */
.lp-anim-hu { position: relative; overflow: hidden; }
.lp-anim-hu .lp-anim-sweep {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg,
        rgba(255,255,255,0) 38%,
        rgba(198,241,53,.30) 50%,
        rgba(255,255,255,0) 62%);
    transform: translateX(-100%);
}
.lp-mod-card.is-seen .lp-anim-hu .lp-anim-sweep {
    animation: lpSweep 3.6s ease-in-out 0.6s infinite;
}
@keyframes lpSweep {
    0%   { transform: translateX(-100%); }
    55%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

@media (max-width: 620px) {
    .lp-mod-media--split { grid-template-columns: 40% 60%; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-anim-wipe, .lp-anim-reveal { transform: scaleY(0) scaleX(0) !important; display: none !important; }
    .lp-anim-scan, .lp-anim-pulse, .lp-anim-sweep { display: none !important; }
    .lp-mod-card:hover .lp-mod-media img { transform: none; }
}

/* Screenshots that must be seen whole (near-square or very wide) are
   contained rather than cropped, on a white plate. */
.lp-mod-media--fit {
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 0.5rem;
}
.lp-mod-media--fit img {
    width: 100%; height: 100%;
    object-fit: contain;
}
/* Give the near-square screenshots more room to breathe */
.lp-mod-media--tall { aspect-ratio: 300 / 210; }

/* Box-and-whisker sample plot: each box rises from the axis in sequence */
.lp-boxplot .lp-box {
    opacity: 0;
    transform-origin: 50% 138px;
    animation: lpBoxIn .5s cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: var(--d, 0s);
}
@keyframes lpBoxIn {
    from { opacity: 0; transform: translateY(14px) scaleY(.4); }
    to   { opacity: 1; transform: translateY(0) scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
    .lp-boxplot .lp-box { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   CONSISTENT MEDIA CANVAS ACROSS EVERY MODULE CARD
   One aspect ratio everywhere; SVG placeholders scale to fit rather than
   crop, so no diagram is clipped or oversized relative to its frame.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-mod-media,
.lp-mod-media--fit,
.lp-mod-media--split { aspect-ratio: 300 / 180; }

.lp-mod-media .lp-mod-ph {
    width: 100%; height: 100%;
    object-fit: contain;              /* SVG never crops */
    padding: 0.35rem;
    box-sizing: border-box;
}

/* Diagram placeholders keep a dark plate; photographic screenshots get white */
.lp-mod-media:not(.lp-mod-media--fit):not(.lp-mod-media--split) { background: #0e0e10; }

/* Box plot and identification map need a touch more breathing room */
.lp-boxplot, .lp-idmap { padding: 0.15rem !important; }

/* Identification map: inserts appear one by one, then labels settle */
.lp-idmap .lp-id {
    opacity: 0;
    animation: lpIdIn .45s cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: var(--d, 0s);
}
@keyframes lpIdIn {
    from { opacity: 0; transform: scale(.82); }
    to   { opacity: 1; transform: scale(1); }
}
.lp-idmap .lp-id { transform-origin: 150px 85px; }

@media (prefers-reduced-motion: reduce) {
    .lp-idmap .lp-id { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MEDIA FIT — final pass
   SVG diagrams are 300x170; the frame is 300x180. Let the SVG letterbox
   inside the frame rather than filling and clipping.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-mod-media {
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.lp-mod-media > svg.lp-mod-ph {
    width: 100%; height: 100%;
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    display: block;
}
/* SVGs honour preserveAspectRatio by default, so nothing is cropped */
.lp-boxplot, .lp-idmap { padding: 0 !important; }

/* Screenshot cards: contain, centred, on white */
.lp-mod-media--fit { padding: 0.4rem; }
.lp-mod-media--fit img { object-fit: contain; width: 100%; height: 100%; }

/* Line-profile split card must stay a grid, not a flex box */
.lp-mod-media--split { display: grid !important; padding: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   UNIFORM MEDIA HEIGHT + WIDE CARD VARIANT
   A fixed media height keeps every card's title on the same line, whatever
   the card's width or the image's aspect ratio.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-mod-media,
.lp-mod-media--fit,
.lp-mod-media--split {
    aspect-ratio: auto;
    height: 226px;
    width: 100%;
}

/* Panoramic figures get a double-width card */
.lp-mod-card--wide { flex: 0 0 792px; width: 792px; }
.lp-mod-card--wide .lp-mod-media--fit { padding: 0.5rem 0.75rem; }

/* Identification: the figure wipes in from the left, ending on the metrics */
.lp-anim-ident { position: relative; overflow: hidden; }
.lp-anim-ident .lp-anim-reveal-r {
    position: absolute; inset: 0; background: #fff;
    transform-origin: right; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-ident .lp-anim-reveal-r {
    animation: lpRevealFromLeft 1.3s cubic-bezier(.22,1,.36,1) .2s forwards;
}
@keyframes lpRevealFromLeft { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Quantification: box plots rise as the curtain lifts */
.lp-anim-quant { position: relative; overflow: hidden; }
.lp-anim-quant .lp-anim-wipe {
    position: absolute; inset: 0; background: #fff;
    transform-origin: bottom; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-quant .lp-anim-wipe {
    animation: lpHistWipe 1.1s cubic-bezier(.22,1,.36,1) .15s forwards;
}

@media (max-width: 900px) {
    .lp-mod-card--wide { flex: 0 0 88vw; width: 88vw; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-anim-reveal-r, .lp-anim-quant .lp-anim-wipe { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   PANORAMIC CARD — canvas matched to the figure's own aspect ratio
   The identification figure is 5000x967. Sizing the frame to that ratio
   removes the letterboxing entirely; the card body simply grows taller.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-mod-card--wide .lp-mod-media {
    height: auto;
    aspect-ratio: 5000 / 967;
    padding: 0;
    background: #fff;
}
.lp-mod-card--wide .lp-mod-media img {
    width: 100%; height: 100%;
    object-fit: cover;          /* frame matches the image, so nothing is cut */
    object-position: center;
}
/* Cards in a rail stretch to equal height; keep the text block aligned */
.lp-modrail-track { align-items: stretch; }
.lp-mod-card { justify-content: flex-start; }

/* ══════════════════════════════════════════════════════════════════════════
   EQUAL CANVAS FOR EVERY CARD  (final)
   One card width, one media size, images contained so nothing is ever
   cropped. Supply artwork at 1140 x 684 (ratio 5:3) for a perfect fill.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-mod-card,
.lp-mod-card--wide {
    flex: 0 0 380px !important;
    width: 380px !important;
}

.lp-mod-media,
.lp-mod-media--fit,
.lp-mod-media--split,
.lp-mod-card--wide .lp-mod-media {
    height: 228px !important;
    aspect-ratio: auto !important;
    width: 100%;
    background: #fff;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

/* Never crop: the whole figure is always visible */
.lp-mod-media img,
.lp-mod-card--wide .lp-mod-media img {
    width: 100%; height: 100%;
    object-fit: contain !important;
    object-position: center;
}

/* Diagram placeholders keep their dark plate */
.lp-mod-media:not(.lp-mod-media--fit):not(.lp-mod-media--split):not(.lp-anim-ident):not(.lp-anim-quant) {
    background: #0e0e10;
}

/* The line-profile card keeps its two-up layout */
.lp-mod-media--split { display: grid !important; }

@media (max-width: 620px) {
    .lp-mod-card, .lp-mod-card--wide { flex: 0 0 78vw !important; width: 78vw !important; }
    .lp-mod-media, .lp-mod-card--wide .lp-mod-media { height: 190px !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   AUTO-SCROLLING RAILS
   Snap points fight continuous motion, so they are disabled; the arrows
   still advance by exactly one card. Cloned cards fill the loop.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-modrail { scroll-snap-type: none; scroll-behavior: auto; }
.lp-mod-card { scroll-snap-align: none; }

/* Clones are decorative duplicates used to make the loop seamless */
.lp-mod-card.is-clone { pointer-events: auto; }

/* Soft edge fades hint that the row continues in both directions */
.lp-modrail {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}

/* Movement stops on hover; a gentle lift confirms the pause */
.lp-modrail:hover .lp-mod-card { transition: transform .35s var(--lp-ease), border-color .3s ease; }

@media (prefers-reduced-motion: reduce) {
    .lp-modrail { -webkit-mask-image: none; mask-image: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO READOUT — five cells, larger type
   ══════════════════════════════════════════════════════════════════════════ */
.lp-readout { grid-template-columns: repeat(5, 1fr); }
.lp-readout-cell { padding: 1.35rem 1.25rem 1.35rem 0; gap: 0.5rem; }
.lp-readout-cell + .lp-readout-cell { padding-left: 1.25rem; }
.lp-readout-key {
    font-size: 0.72rem;                 /* was 0.62 */
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.45);
}
.lp-readout-val {
    font-size: 1.12rem;                 /* was 0.94 */
    font-weight: 600;
    line-height: 1.35;
}
.lp-readout-val em { font-size: 1.3rem; font-weight: 700; }

@media (max-width: 1100px) {
    .lp-readout { grid-template-columns: repeat(3, 1fr); }
    .lp-readout-cell:nth-child(3n+1) { padding-left: 0; }
    .lp-readout-cell:nth-child(3n+1)::before { display: none; }
}
@media (max-width: 700px) {
    .lp-readout { grid-template-columns: repeat(2, 1fr); }
    .lp-readout-cell:nth-child(odd) { padding-left: 0; }
    .lp-readout-cell:nth-child(odd)::before { display: none; }
    .lp-readout-val { font-size: 1rem; }
}

/* Readout: dial the type back a touch */
.lp-readout-key { font-size: 0.66rem; }
.lp-readout-val { font-size: 0.98rem; font-weight: 550; }
.lp-readout-val em { font-size: 1.12rem; }
.lp-readout-cell { padding: 1.2rem 1.15rem 1.2rem 0; }
.lp-readout-cell + .lp-readout-cell { padding-left: 1.15rem; }
@media (max-width: 700px) { .lp-readout-val { font-size: 0.92rem; } }

/* ══════════════════════════════════════════════════════════════════════════
   PLATFORM FEATURES — BACK TO BLACK
   Reverts the light treatment: the whole section runs dark again.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-features { background: var(--qaf-black, #0F0F0F); }
.lp-features-head { border-bottom-color: rgba(255,255,255,0.1); }
.lp-features-title { color: #fff; }
.lp-features-head .lp-mono { color: rgba(255,255,255,0.34); }

/* QC programme lead card */
.lp-feat-hero {
    background: linear-gradient(135deg, #17171a 0%, #131315 100%);
    border-color: rgba(198, 241, 53, 0.28);
    box-shadow: none;
}
.lp-feat-hero::after {
    background: radial-gradient(circle, rgba(198,241,53,.07), transparent 65%);
}
.lp-feat-hero-title { color: #fff; }
.lp-feat-hero-desc { color: rgba(255,255,255,0.56); }
.lp-feat-list li { color: rgba(255,255,255,0.48); }
.lp-feat-list li span { color: #fff; }
.lp-feat-list li::before { background: var(--qaf-lime); }
.lp-feat-flag { background: var(--qaf-lime); color: var(--qaf-black); }
.lp-qcboard { filter: drop-shadow(0 18px 40px rgba(0,0,0,0.45)); }

/* Rails */
.lp-modrail-title { color: #fff; }
.lp-modrail-sub { color: rgba(255,255,255,0.42); }
.lp-rail-btn { background: #17171a; border-color: #2b2b2e; color: #fff; }
.lp-rail-btn:hover:not(:disabled) {
    background: var(--qaf-lime); border-color: var(--qaf-lime); color: var(--qaf-black);
}
.lp-rail-progress { background: #232325; }
.lp-rail-progress span { background: var(--qaf-lime); }

/* Cards */
.lp-mod-card {
    background: #161618; border-color: #262627; box-shadow: none;
}
.lp-mod-card:hover {
    border-color: rgba(198, 241, 53, 0.45);
    box-shadow: 0 14px 34px rgba(0,0,0,0.4);
}
.lp-mod-media { border-bottom-color: #232325; }
.lp-mod-num { color: var(--qaf-lime); }
.lp-mod-name { color: #fff; }
.lp-mod-desc { color: rgba(255,255,255,0.5); }

.lp-feat-card {
    background: #171718; border-color: #262627; box-shadow: none;
}
.lp-feat-card:hover {
    border-color: rgba(198, 241, 53, 0.4);
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}
.lp-feat-card::before {
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%),
                rgba(198, 241, 53, 0.1), transparent 70%);
}
.lp-feat-icon {
    background: rgba(198, 241, 53, 0.1);
    border-color: rgba(198, 241, 53, 0.24);
    color: var(--qaf-lime);
}
.lp-feat-card:hover .lp-feat-icon { background: var(--qaf-lime); color: var(--qaf-black); }
.lp-feat-name { color: #fff; }
.lp-feat-desc { color: rgba(255,255,255,0.5); }

/* Screenshots keep a white plate so the figures stay legible on the dark card */
.lp-mod-media--fit,
.lp-mod-media--split,
.lp-anim-ident,
.lp-anim-quant { background: #fff; }
.lp-anim-hist .lp-anim-wipe,
.lp-anim-line .lp-anim-reveal,
.lp-anim-ident .lp-anim-reveal-r,
.lp-anim-quant .lp-anim-wipe { background: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   UNIFORMITY · NPS · LINEARITY — REAL FIGURES WITH MOTION
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Image uniformity: a ring expands from the centre to the periphery,
      echoing how the five regions are placed. ─────────────────────────── */
.lp-anim-unif { position: relative; overflow: hidden; }
.lp-anim-unif .lp-anim-wipe {
    position: absolute; inset: 0; background: #fff;
    transform-origin: center; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-unif .lp-anim-wipe {
    animation: lpFadeOut .9s ease forwards;
}
@keyframes lpFadeOut { to { opacity: 0; } }

.lp-anim-unif .lp-anim-ring {
    position: absolute; left: 50%; top: 50%;
    width: 22%; aspect-ratio: 1; border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(198, 241, 53, .9);
    box-shadow: 0 0 12px rgba(198, 241, 53, .35);
    opacity: 0; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-unif .lp-anim-ring {
    animation: lpUnifRing 3.4s ease-out 0.7s infinite;
}
@keyframes lpUnifRing {
    0%   { transform: translate(-50%,-50%) scale(.5);  opacity: 0; }
    18%  { opacity: .95; }
    75%  { opacity: .35; }
    100% { transform: translate(-50%,-50%) scale(3.1); opacity: 0; }
}

/* ── NPS: cross-fades between the 2D and 3D views ─────────────────────── */
.lp-anim-nps { position: relative; overflow: hidden; }
.lp-anim-nps img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
    padding: 0.4rem; box-sizing: border-box;
}
.lp-anim-nps .lp-nps-a { opacity: 1; }
.lp-anim-nps .lp-nps-b { opacity: 0; }
.lp-mod-card.is-seen .lp-anim-nps .lp-nps-a { animation: lpNpsA 7s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-nps .lp-nps-b { animation: lpNpsB 7s ease-in-out infinite; }
@keyframes lpNpsA {
    0%, 40% { opacity: 1; transform: scale(1); }
    50%, 90% { opacity: 0; transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes lpNpsB {
    0%, 40% { opacity: 0; transform: scale(1.04); }
    50%, 90% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.04); }
}
/* Small caption showing which view is on screen */
.lp-anim-nps::after {
    content: '2D  ·  3D';
    position: absolute; right: 8px; bottom: 6px;
    font-family: var(--lp-mono, monospace); font-size: 0.6rem;
    letter-spacing: .1em; color: rgba(15,15,15,.45);
    background: rgba(255,255,255,.75); padding: 1px 6px; border-radius: 10px;
    pointer-events: none;
}

/* ── Spectral linearity: curtain lifts, then a marker sweeps the energies ─ */
.lp-anim-lin { position: relative; overflow: hidden; }
.lp-anim-lin .lp-anim-wipe {
    position: absolute; inset: 0; background: #fff;
    transform-origin: left; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-lin .lp-anim-wipe {
    animation: lpRevealFromLeft 1.2s cubic-bezier(.22,1,.36,1) .2s forwards;
}
.lp-anim-lin .lp-anim-scan {
    position: absolute; top: 6%; bottom: 12%; width: 2px;
    background: linear-gradient(180deg, rgba(198,241,53,0), #8fbf12, rgba(198,241,53,0));
    left: 10%; opacity: 0; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-lin .lp-anim-scan {
    animation: lpScanX 4s ease-in-out 1.4s infinite;
}

@media (prefers-reduced-motion: reduce) {
    .lp-anim-unif .lp-anim-ring, .lp-anim-unif .lp-anim-wipe,
    .lp-anim-lin .lp-anim-scan, .lp-anim-lin .lp-anim-wipe { display: none !important; }
    .lp-anim-nps .lp-nps-b { display: none !important; }
    .lp-anim-nps img { animation: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   NPS — 1D → 2D → 3D auto-rotation with labels
   Each view holds for ~2.4s of a 7.2s cycle, cross-fading between them.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-anim-nps { position: relative; overflow: hidden; background: #fff; }
.lp-anim-nps img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
    padding: 0.45rem 0.45rem 1.5rem; box-sizing: border-box;
    opacity: 0;
}
.lp-mod-card.is-seen .lp-anim-nps .lp-nps-1 { animation: lpNps1 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-nps .lp-nps-2 { animation: lpNps2 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-nps .lp-nps-3 { animation: lpNps3 7.2s ease-in-out infinite; }

/* 0-33% first, 33-66% second, 66-100% third, with short cross-fades */
@keyframes lpNps1 {
    0%, 28%   { opacity: 1; transform: scale(1); }
    34%, 94%  { opacity: 0; transform: scale(1.03); }
    100%      { opacity: 1; transform: scale(1); }
}
@keyframes lpNps2 {
    0%, 28%   { opacity: 0; transform: scale(1.03); }
    34%, 61%  { opacity: 1; transform: scale(1); }
    67%, 100% { opacity: 0; transform: scale(1.03); }
}
@keyframes lpNps3 {
    0%, 61%   { opacity: 0; transform: scale(1.03); }
    67%, 94%  { opacity: 1; transform: scale(1); }
    100%      { opacity: 0; transform: scale(1.03); }
}

/* Label pill, one per view */
.lp-nps-tag {
    position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
    display: grid; place-items: center;
    pointer-events: none;
}
.lp-nps-tag b {
    grid-area: 1 / 1;
    font-family: var(--lp-mono, monospace); font-size: 0.62rem; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
    color: #0F0F0F; background: var(--qaf-lime, #c6f135);
    padding: 2px 9px; border-radius: 10px; opacity: 0;
}
.lp-mod-card.is-seen .lp-anim-nps .lp-nps-t1 { animation: lpNps1 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-nps .lp-nps-t2 { animation: lpNps2 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-nps .lp-nps-t3 { animation: lpNps3 7.2s ease-in-out infinite; }

/* Progress dots */
.lp-nps-dots {
    position: absolute; right: 10px; bottom: 11px;
    display: flex; gap: 4px; pointer-events: none;
}
.lp-nps-dots i {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(15,15,15,.18);
}
.lp-mod-card.is-seen .lp-nps-dots i:nth-child(1) { animation: lpDot 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-nps-dots i:nth-child(2) { animation: lpDot 7.2s ease-in-out infinite 2.4s; }
.lp-mod-card.is-seen .lp-nps-dots i:nth-child(3) { animation: lpDot 7.2s ease-in-out infinite 4.8s; }
@keyframes lpDot {
    0%, 30%  { background: #8fbf12; transform: scale(1.25); }
    34%,100% { background: rgba(15,15,15,.18); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .lp-anim-nps .lp-nps-1 { opacity: 1 !important; }
    .lp-anim-nps .lp-nps-2, .lp-anim-nps .lp-nps-3 { display: none !important; }
    .lp-anim-nps img, .lp-nps-tag b, .lp-nps-dots i { animation: none !important; }
    .lp-nps-tag .lp-nps-t1 { opacity: 1 !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MTF — wire phantom → point spread function → modulation transfer function
   Same 7.2s three-step rotation used by the NPS card.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-anim-mtf { position: relative; overflow: hidden; background: #fff; }
.lp-anim-mtf img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
    padding: 0.45rem 0.45rem 1.5rem; box-sizing: border-box;
    opacity: 0;
}
.lp-mod-card.is-seen .lp-anim-mtf .lp-mtf-1 { animation: lpNps1 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-mtf .lp-mtf-2 { animation: lpNps2 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-mtf .lp-mtf-3 { animation: lpNps3 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-mtf .lp-mtf-t1 { animation: lpNps1 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-mtf .lp-mtf-t2 { animation: lpNps2 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-mtf .lp-mtf-t3 { animation: lpNps3 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-mtf-dots i:nth-child(1) { animation: lpDot 7.2s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-mtf-dots i:nth-child(2) { animation: lpDot 7.2s ease-in-out infinite 2.4s; }
.lp-mod-card.is-seen .lp-mtf-dots i:nth-child(3) { animation: lpDot 7.2s ease-in-out infinite 4.8s; }

@media (prefers-reduced-motion: reduce) {
    .lp-anim-mtf .lp-mtf-1 { opacity: 1 !important; }
    .lp-anim-mtf .lp-mtf-2, .lp-anim-mtf .lp-mtf-3 { display: none !important; }
    .lp-anim-mtf img, .lp-anim-mtf .lp-nps-tag b, .lp-mtf-dots i { animation: none !important; }
    .lp-anim-mtf .lp-mtf-t1 { opacity: 1 !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   SPECTRAL LINEARITY — four-step sequence
   Phantom → spectral response → across concentration → across energy bin.
   9.6s cycle, 2.4s per view, matching the pace of the NPS and MTF cards.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-anim-lin { position: relative; overflow: hidden; background: #fff; }
.lp-anim-lin img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
    padding: 0.45rem 0.45rem 1.5rem; box-sizing: border-box;
    opacity: 0;
}
.lp-mod-card.is-seen .lp-anim-lin .lp-lin-1,
.lp-mod-card.is-seen .lp-anim-lin .lp-lin-t1 { animation: lpLin1 9.6s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-lin .lp-lin-2,
.lp-mod-card.is-seen .lp-anim-lin .lp-lin-t2 { animation: lpLin2 9.6s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-lin .lp-lin-3,
.lp-mod-card.is-seen .lp-anim-lin .lp-lin-t3 { animation: lpLin3 9.6s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-lin .lp-lin-4,
.lp-mod-card.is-seen .lp-anim-lin .lp-lin-t4 { animation: lpLin4 9.6s ease-in-out infinite; }

@keyframes lpLin1 {
    0%, 21%   { opacity: 1; transform: scale(1); }
    25%, 96%  { opacity: 0; transform: scale(1.03); }
    100%      { opacity: 1; transform: scale(1); }
}
@keyframes lpLin2 {
    0%, 21%   { opacity: 0; transform: scale(1.03); }
    25%, 46%  { opacity: 1; transform: scale(1); }
    50%, 100% { opacity: 0; transform: scale(1.03); }
}
@keyframes lpLin3 {
    0%, 46%   { opacity: 0; transform: scale(1.03); }
    50%, 71%  { opacity: 1; transform: scale(1); }
    75%, 100% { opacity: 0; transform: scale(1.03); }
}
@keyframes lpLin4 {
    0%, 71%   { opacity: 0; transform: scale(1.03); }
    75%, 96%  { opacity: 1; transform: scale(1); }
    100%      { opacity: 0; transform: scale(1.03); }
}

.lp-mod-card.is-seen .lp-lin-dots i:nth-child(1) { animation: lpDot4 9.6s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-lin-dots i:nth-child(2) { animation: lpDot4 9.6s ease-in-out infinite 2.4s; }
.lp-mod-card.is-seen .lp-lin-dots i:nth-child(3) { animation: lpDot4 9.6s ease-in-out infinite 4.8s; }
.lp-mod-card.is-seen .lp-lin-dots i:nth-child(4) { animation: lpDot4 9.6s ease-in-out infinite 7.2s; }
@keyframes lpDot4 {
    0%, 22%  { background: #8fbf12; transform: scale(1.25); }
    26%,100% { background: rgba(15,15,15,.18); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .lp-anim-lin .lp-lin-1 { opacity: 1 !important; }
    .lp-anim-lin .lp-lin-2, .lp-anim-lin .lp-lin-3, .lp-anim-lin .lp-lin-4 { display: none !important; }
    .lp-anim-lin img, .lp-anim-lin .lp-nps-tag b, .lp-lin-dots i { animation: none !important; }
    .lp-anim-lin .lp-lin-t1 { opacity: 1 !important; }
}

/* SNR and CNR: figure lifts in from the axis */
.lp-anim-snr, .lp-anim-cnr { position: relative; overflow: hidden; background: #fff; }
.lp-anim-snr .lp-anim-wipe,
.lp-anim-cnr .lp-anim-wipe {
    position: absolute; inset: 0; background: #fff;
    transform-origin: bottom; pointer-events: none;
}
.lp-mod-card.is-seen .lp-anim-snr .lp-anim-wipe {
    animation: lpHistWipe 1.05s cubic-bezier(.22,1,.36,1) .15s forwards;
}
.lp-mod-card.is-seen .lp-anim-cnr .lp-anim-wipe {
    animation: lpHistWipe 1.05s cubic-bezier(.22,1,.36,1) .3s forwards;
}
@media (prefers-reduced-motion: reduce) {
    .lp-anim-snr .lp-anim-wipe, .lp-anim-cnr .lp-anim-wipe { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   THEME TOGGLE — dark (default) / light
   The switch lives in the nav; `.lp-light` on <html> flips the page.
   ══════════════════════════════════════════════════════════════════════════ */
.lp-nav-right { display: flex; align-items: center; gap: 0.9rem; }

.lp-theme-toggle {
    position: relative; display: inline-flex; align-items: center;
    gap: 0.15rem; padding: 3px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px; cursor: pointer;
}
.lp-theme-opt {
    position: relative; z-index: 1;
    width: 28px; height: 24px; border-radius: 16px;
    display: grid; place-items: center;
    font-size: 0.78rem; color: rgba(255,255,255,0.45);
    transition: color .25s ease;
}
.lp-theme-opt.is-on { color: var(--qaf-black, #0F0F0F); }
.lp-theme-knob {
    position: absolute; top: 3px; left: 3px;
    width: 28px; height: 24px; border-radius: 16px;
    background: var(--qaf-lime, #c6f135);
    transition: transform .28s cubic-bezier(.22,1,.36,1);
}
html.lp-light .lp-theme-knob { transform: translateX(31px); }

/* ── LIGHT THEME ──────────────────────────────────────────────────────── */
html.lp-light body { background: #fafafa; color: #0F0F0F; }

html.lp-light .lp-nav {
    background: rgba(255,255,255,0.92);
    border-bottom: 1px solid #e6e6e8;
}
html.lp-light .lp-nav-links a { color: rgba(15,15,15,0.62); }
html.lp-light .lp-nav-links a:hover,
html.lp-light .lp-nav-links a.active { color: #0F0F0F; }
html.lp-light .lp-nav-logo img { filter: invert(1) brightness(0.15); }
html.lp-light .lp-made-uae { color: rgba(15,15,15,0.55); }
html.lp-light .lp-nav-auth { color: #0F0F0F; border-color: rgba(15,15,15,0.2); }
html.lp-light .lp-nav-auth:hover { background: #0F0F0F; color: #fff; }
html.lp-light .lp-theme-toggle {
    background: rgba(15,15,15,0.06); border-color: rgba(15,15,15,0.14);
}
html.lp-light .lp-theme-opt { color: rgba(15,15,15,0.45); }
html.lp-light .lp-theme-opt.is-on { color: #0F0F0F; }

/* Hero */
html.lp-light .lp-hero { background: #fafafa; }
html.lp-light .lp-hero-title .white { color: #0F0F0F; }
html.lp-light .lp-hero-desc { color: rgba(15,15,15,0.6); }
html.lp-light .lp-spectrum { opacity: 0.28; }
html.lp-light .lp-readout { border-color: rgba(15,15,15,0.12); }
html.lp-light .lp-readout-cell + .lp-readout-cell::before { background: rgba(15,15,15,0.12); }
html.lp-light .lp-readout-key { color: rgba(15,15,15,0.5); }
html.lp-light .lp-readout-val { color: #0F0F0F; }
html.lp-light .lp-btn-ghost { color: #0F0F0F; border-color: rgba(15,15,15,0.25); }
html.lp-light .lp-btn-ghost:hover { background: #0F0F0F; color: #fff; }

/* Features */
html.lp-light .lp-features { background: #fff; }
html.lp-light .lp-features-head { border-bottom-color: #e6e6e8; }
html.lp-light .lp-features-title { color: #0F0F0F; }
html.lp-light .lp-features-head .lp-mono { color: #8a8a90; }

html.lp-light .lp-feat-hero {
    background: linear-gradient(135deg, #fbfcf6 0%, #f6f7f2 100%);
    border-color: #dfe6c8; box-shadow: 0 10px 34px rgba(15,15,15,0.05);
}
html.lp-light .lp-feat-hero-title { color: #0F0F0F; }
html.lp-light .lp-feat-hero-desc { color: #5a5a60; }
html.lp-light .lp-feat-list li { color: #6a6a70; }
html.lp-light .lp-feat-list li span { color: #0F0F0F; }
html.lp-light .lp-feat-flag { background: #0F0F0F; color: var(--qaf-lime); }

html.lp-light .lp-modrail-title { color: #0F0F0F; }
html.lp-light .lp-modrail-sub { color: #8a8a90; }
html.lp-light .lp-rail-btn { background: #fff; border-color: #dcdce0; color: #0F0F0F; }
html.lp-light .lp-rail-btn:hover:not(:disabled) { background: #0F0F0F; color: var(--qaf-lime); border-color: #0F0F0F; }
html.lp-light .lp-rail-progress { background: #e6e6e8; }
html.lp-light .lp-rail-progress span { background: #0F0F0F; }

html.lp-light .lp-mod-card {
    background: #fff; border-color: #e6e6e8; box-shadow: 0 2px 10px rgba(15,15,15,0.04);
}
html.lp-light .lp-mod-card:hover { border-color: #b9d94a; box-shadow: 0 14px 34px rgba(15,15,15,0.1); }
html.lp-light .lp-mod-media { border-bottom-color: #ececee; }
html.lp-light .lp-mod-num { color: #7ea60d; }
html.lp-light .lp-mod-name { color: #0F0F0F; }
html.lp-light .lp-mod-desc { color: #6a6a70; }

html.lp-light .lp-feat-card {
    background: #fff; border-color: #e6e6e8; box-shadow: 0 2px 10px rgba(15,15,15,0.04);
}
html.lp-light .lp-feat-card:hover { border-color: #b9d94a; box-shadow: 0 12px 28px rgba(15,15,15,0.09); }
html.lp-light .lp-feat-icon {
    background: rgba(150,190,20,.14); border-color: rgba(150,190,20,.3); color: #6f9a0b;
}
html.lp-light .lp-feat-card:hover .lp-feat-icon { background: #0F0F0F; color: var(--qaf-lime); }
html.lp-light .lp-feat-name { color: #0F0F0F; }
html.lp-light .lp-feat-desc { color: #6a6a70; }

/* Footer stays dark for contrast, but softens its top edge */
html.lp-light .lp-footer { border-top: 1px solid #e6e6e8; }

/* Smooth the switch */
html.lp-light body, html.lp-light .lp-features, html.lp-light .lp-hero,
html.lp-light .lp-mod-card, html.lp-light .lp-feat-card {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

/* Footer brand mark */
.lp-footer-brand img { height: 34px; width: auto; display: block; }

/* ══════════════════════════════════════════════════════════════════════════
   ELECTRON DENSITY / EFFECTIVE ATOMIC NUMBER — two-view rotation
   ══════════════════════════════════════════════════════════════════════════ */
.lp-anim-rhoz { position: relative; overflow: hidden; background: #fff; }
.lp-anim-rhoz img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
    padding: 0.45rem 0.45rem 1.5rem; box-sizing: border-box;
    opacity: 0;
}
.lp-mod-card.is-seen .lp-anim-rhoz .lp-rhoz-1,
.lp-mod-card.is-seen .lp-anim-rhoz .lp-rhoz-t1 { animation: lpRhoA 5.6s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-anim-rhoz .lp-rhoz-2,
.lp-mod-card.is-seen .lp-anim-rhoz .lp-rhoz-t2 { animation: lpRhoB 5.6s ease-in-out infinite; }

@keyframes lpRhoA {
    0%, 42%   { opacity: 1; transform: scale(1); }
    50%, 92%  { opacity: 0; transform: scale(1.03); }
    100%      { opacity: 1; transform: scale(1); }
}
@keyframes lpRhoB {
    0%, 42%   { opacity: 0; transform: scale(1.03); }
    50%, 92%  { opacity: 1; transform: scale(1); }
    100%      { opacity: 0; transform: scale(1.03); }
}

.lp-mod-card.is-seen .lp-rhoz-dots i:nth-child(1) { animation: lpDot2 5.6s ease-in-out infinite; }
.lp-mod-card.is-seen .lp-rhoz-dots i:nth-child(2) { animation: lpDot2 5.6s ease-in-out infinite 2.8s; }
@keyframes lpDot2 {
    0%, 44%  { background: #8fbf12; transform: scale(1.25); }
    50%,100% { background: rgba(15,15,15,.18); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .lp-anim-rhoz .lp-rhoz-1 { opacity: 1 !important; }
    .lp-anim-rhoz .lp-rhoz-2 { display: none !important; }
    .lp-anim-rhoz img, .lp-anim-rhoz .lp-nps-tag b, .lp-rhoz-dots i { animation: none !important; }
    .lp-anim-rhoz .lp-rhoz-t1 { opacity: 1 !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER & FOOTER — larger scale
   ══════════════════════════════════════════════════════════════════════════ */
:root { --lp-nav-h: 84px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.lp-nav { padding: 0 calc(var(--lp-gutter) + 0.25rem); }
.lp-nav-links { gap: 2.4rem; }
.lp-nav-links a { font-size: 1.06rem; font-weight: 550; }
.lp-nav-auth {
    padding: 0.72rem 1.85rem;
    font-size: 1.02rem; border-radius: 5px;
}
.lp-nav-logo img { height: 46px; }
.lp-made-uae { font-size: 0.78rem; }
.lp-nav-right { gap: 1.15rem; }
.lp-theme-toggle { padding: 4px; }
.lp-theme-opt { width: 32px; height: 28px; font-size: 0.92rem; }
.lp-theme-knob { width: 32px; height: 28px; top: 4px; left: 4px; }
html.lp-light .lp-theme-knob { transform: translateX(35px); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.lp-footer { padding: 4.5rem var(--lp-gutter) 2rem; }
.lp-footer-brand img { height: 46px; }
.lp-footer-tagline { font-size: 1.02rem; line-height: 1.7; }
.lp-footer-heading { font-size: 0.78rem; letter-spacing: 0.18em; margin-bottom: 1.15rem; }
.lp-footer a { font-size: 1.02rem; margin-bottom: 0.68rem; }
.lp-footer-copy { font-size: 0.82rem; padding-top: 1.9rem; }
.lp-footer-inner { margin-bottom: 3rem; }

@media (max-width: 900px) {
    :root { --lp-nav-h: 72px; }
    .lp-nav-links a { font-size: 0.98rem; }
    .lp-nav-auth { font-size: 0.95rem; padding: 0.6rem 1.4rem; }
    .lp-footer-tagline, .lp-footer a { font-size: 0.95rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO STAYS DARK IN BOTH THEMES
   The hero is the signature block; only the rest of the page switches.
   ══════════════════════════════════════════════════════════════════════════ */
html.lp-light .lp-hero { background: var(--qaf-black, #0F0F0F); }
html.lp-light .lp-hero-title .white { color: #fff; }
html.lp-light .lp-hero-desc { color: rgba(255, 255, 255, 0.62); }
html.lp-light .lp-spectrum { opacity: 1; }
html.lp-light .lp-readout { border-color: rgba(255, 255, 255, 0.1); }
html.lp-light .lp-readout-cell + .lp-readout-cell::before { background: rgba(255, 255, 255, 0.1); }
html.lp-light .lp-readout-key { color: rgba(255, 255, 255, 0.45); }
html.lp-light .lp-readout-val { color: #fff; }
html.lp-light .lp-btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
html.lp-light .lp-btn-ghost:hover { background: #fff; color: var(--qaf-black, #0F0F0F); }
