/* ═══════════════════════════════════════════════════════════════════════════
   Sigma-Aldrich — hero layer.

   Loaded after public/css/sigmaaldrich.css (regenerated identity) and
   public/css/sigmaaldrich-brand.css (per-shop corrections). This file owns the
   homepage hero only; it deliberately uses its own `sig-` namespace so none of
   the template's `.hero-section` / `.deal-card` rules apply to it and nothing
   here leaks onto another page.

   Direction — ANALYTICAL INSTRUMENT. The shop's actual product is verified
   purity, so the hero reads like an instrument panel: mono metadata, hairline
   rules, tabular figures, and a real HPLC chromatogram drawing itself along
   the baseline. Merck purple is the ink, the vibrant blue is the one sharp
   accent, and there is no purple-on-white gradient anywhere.

   MOBILE FIRST. Every rule outside a media query is the phone layout. The two
   breakpoints only add: 720px widens the spec strip and inlines the buttons,
   1024px introduces the two-column grid. Nothing is ever "undone" at a
   smaller width.
   ═══════════════════════════════════════════════════════════════════════════ */

.sig-hero {
    --sig-ink: var(--ink, #18151e);
    --sig-purple: var(--primary, #503191);
    --sig-purple-deep: #2e1c54;
    --sig-blue: #0f69af;
    --sig-line: rgba(46, 28, 84, 0.14);
    --sig-line-soft: rgba(46, 28, 84, 0.08);
    --sig-paper: #fbfafd;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 28px 0 34px;
    background:
        linear-gradient(180deg, #ffffff 0%, var(--sig-paper) 62%, #f4f2f8 100%);
}

/* Engineering-paper grid. Very low contrast — it should register as texture,
   not as a visible grid. */
.sig-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(to right, var(--sig-line-soft) 1px, transparent 1px),
        linear-gradient(to bottom, var(--sig-line-soft) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(115% 85% at 18% 0%, #000 0%, transparent 72%);
            mask-image: radial-gradient(115% 85% at 18% 0%, #000 0%, transparent 72%);
}

/* ── The chromatogram ──────────────────────────────────────────────────────
   Sits at the foot of the hero and draws once on load. On phones it is short
   and quiet; it grows with the viewport. */
.sig-hero__field {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    height: 96px;
    pointer-events: none;
}

.sig-hero__trace {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.5;
}

.sig-hero__baseline {
    fill: none;
    stroke: var(--sig-line);
    stroke-width: 1;
    stroke-dasharray: 3 5;
}

.sig-hero__peaks {
    fill: none;
    stroke: var(--sig-purple);
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    animation: sig-elute 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s forwards;
}

@keyframes sig-elute {
    to { stroke-dashoffset: 0; }
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.sig-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: start;
}

.sig-hero__lede { min-width: 0; }

/* ── Eyebrow ───────────────────────────────────────────────────────────── */
.sig-hero__eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    font-family: var(--font-mono, 'Space Mono', monospace);
    font-size: 0.7rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--gray-500, #5d5275);
}

.sig-hero__chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid var(--sig-purple);
    border-radius: 3px;
    color: var(--sig-purple);
    font-weight: 700;
    letter-spacing: 0.16em;
    background: rgba(80, 49, 145, 0.05);
}

.sig-hero__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--gray-400, #8578a0);
}

.sig-hero__han {
    font-family: 'Noto Sans SC', var(--font-family), sans-serif;
    letter-spacing: 0.04em;
    color: var(--sig-purple);
}

/* ── Headline ──────────────────────────────────────────────────────────── */
.sig-hero__title {
    margin: 0 0 14px;
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    /* Fluid from phone to desktop — no fixed step, no overflow at 320px. */
    font-size: clamp(2rem, 8.2vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: -0.028em;
    font-weight: 700;
    color: var(--sig-ink);
    text-wrap: balance;
}

/* The accent is a drawn underline in the vibrant blue, not a gradient fill —
   it reads as an instrument annotation rather than decoration. */
.sig-hero__accent {
    position: relative;
    display: inline-block;
    /* Room under the descenders so the rule below clears the "y" tail instead
       of striking through it. */
    padding-bottom: 0.16em;
    color: var(--sig-purple);
    white-space: nowrap;
}

.sig-hero__accent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.01em;
    height: 0.1em;
    background: var(--sig-blue);
    opacity: 0.9;
    transform: scaleX(0);
    transform-origin: left center;
    animation: sig-underline 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) 1.1s forwards;
}

@keyframes sig-underline {
    to { transform: scaleX(1); }
}

.sig-hero__sub {
    margin: 0 0 22px;
    max-width: 56ch;
    font-size: clamp(0.95rem, 3.7vw, 1.06rem);
    line-height: 1.62;
    color: var(--gray-600, #453d57);
}

/* ── Spec strip ────────────────────────────────────────────────────────────
   2x2 on a phone, 4 across from 720px. Hairlines are drawn with gap+outline so
   there are no double borders and no last-child exceptions. */
.sig-spec {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 24px;
    padding: 0;
    background: var(--sig-line-soft);
    border: 1px solid var(--sig-line-soft);
    border-radius: 8px;
    overflow: hidden;
}

.sig-spec__cell {
    padding: 12px 12px 11px;
    background: #fff;
    min-width: 0;
}

.sig-spec__k {
    margin: 0 0 5px;
    font-family: var(--font-mono, 'Space Mono', monospace);
    font-size: 0.7rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--gray-400, #8578a0);
}

.sig-spec__v {
    margin: 0;
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: clamp(1.32rem, 5.4vw, 1.6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--sig-purple-deep);
    font-variant-numeric: tabular-nums;
}

.sig-spec__u {
    font-size: 0.62em;
    font-weight: 600;
    color: var(--sig-blue);
}

.sig-spec__n {
    margin: 3px 0 0;
    font-size: 0.72rem;
    line-height: 1.3;
    color: var(--gray-500, #5d5275);
}

/* ── Buttons ───────────────────────────────────────────────────────────────
   44px floor everywhere. On a phone the primary takes the full width and the
   two ghosts split the next row — no horizontal scrolling, no squeezed labels. */
.sig-hero__cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 20px;
}

.sig-hero__cta .sig-btn:first-child {
    grid-column: 1 / -1;
}

.sig-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 8px;
    font-family: var(--font-family, sans-serif);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: transform 0.16s ease, box-shadow 0.16s ease,
                background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.sig-btn i { font-size: 0.9em; }

.sig-btn--solid {
    background: var(--sig-purple);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
                0 6px 16px -8px rgba(46, 28, 84, 0.6);
}

.sig-btn--solid:hover,
.sig-btn--solid:focus-visible {
    background: var(--sig-purple-deep);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset,
                0 10px 22px -10px rgba(46, 28, 84, 0.7);
}

.sig-btn--ghost {
    background: #fff;
    color: var(--sig-purple-deep);
    border-color: var(--sig-line);
}

.sig-btn--ghost:hover,
.sig-btn--ghost:focus-visible {
    border-color: var(--sig-purple);
    color: var(--sig-purple);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -10px rgba(46, 28, 84, 0.5);
}

.sig-btn--block { width: 100%; }

.sig-btn:active { transform: translateY(0); }

/* ── Trust row ─────────────────────────────────────────────────────────── */
.sig-hero__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sig-hero__trust .hero-trust-item,
.sig-hero__trust .hero-trust-item > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    /* Touch floor without moving the text — the box grows, the label does not. */
    min-height: 44px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600, #453d57);
    text-decoration: none;
}

.sig-hero__trust .hero-trust-item i { color: var(--sig-purple); }

.sig-hero__trust .hero-trust-item > a:hover,
.sig-hero__trust .hero-trust-item > a:focus-visible {
    color: var(--sig-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sig-hero__trust .hero-trust-item > a:hover i { color: var(--sig-blue); }

/* ── Volume rate card ──────────────────────────────────────────────────────
   A rate card, not a promo blob: the ladder is a list of bands with tabular
   figures, and the timer reads as a live instrument value. */
.sig-rate {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--sig-line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 40px -28px rgba(46, 28, 84, 0.45);
}

.sig-rate__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--sig-purple-deep);
    color: #fff;
}

.sig-rate__title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display, sans-serif);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    min-width: 0;
}

.sig-rate__han {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.78rem;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    color: #fff;
    flex: 0 0 auto;
}

/* Pulsing "Live" flag — the only motion after load, and it stops for anyone
   who has asked for reduced motion. */
.sig-rate__flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #d9cff0;
}

.sig-rate__flag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7a8;
    box-shadow: 0 0 0 0 rgba(110, 231, 168, 0.6);
    animation: sig-pulse 2.4s ease-out infinite;
}

@keyframes sig-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(110, 231, 168, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(110, 231, 168, 0); }
    100% { box-shadow: 0 0 0 0 rgba(110, 231, 168, 0); }
}

.sig-rate__ladder {
    margin: 0;
    padding: 4px 0 0;
    list-style: none;
    counter-reset: none;
}

.sig-rate__row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 4px 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--sig-line-soft);
}

.sig-rate__row:last-child { border-bottom: 0; }

.sig-rate__band {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--gray-700, #322c3f);
    font-variant-numeric: tabular-nums;
    min-width: 0;
}

.sig-rate__off {
    font-family: var(--font-display, sans-serif);
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--sig-purple);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sig-rate__off span {
    font-family: var(--font-mono, monospace);
    font-size: 0.66em;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-400, #8578a0);
}

.sig-rate__note {
    grid-column: 1 / -1;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sig-blue);
}

/* Top band gets the emphasis — it is the one the page is selling. */
.sig-rate__row--peak {
    background: linear-gradient(90deg, rgba(80, 49, 145, 0.055), rgba(15, 105, 175, 0.045));
}

.sig-rate__row--peak .sig-rate__off { color: var(--sig-purple-deep); }

.sig-rate__clock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 16px;
    border-top: 1px solid var(--sig-line-soft);
    background: var(--sig-paper);
}

.sig-rate__clock-k {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--gray-500, #5d5275);
}

/* global.js injects .timer-num / .timer-unit / .timer-sep in here. */
.sig-rate__clock-v {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-mono, monospace);
    font-variant-numeric: tabular-nums;
    color: var(--sig-purple-deep);
}

.sig-rate__clock-v .timer-num {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.sig-rate__clock-v .timer-unit {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-400, #8578a0);
    margin: 0 5px 0 1px;
}

.sig-rate__clock-v .timer-sep {
    font-size: 0.86rem;
    color: var(--gray-300, #b8b0ca);
    margin: 0 1px;
}

.sig-rate .sig-btn--block {
    border-radius: 0;
    min-height: 52px;
}

.sig-rate__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0;
    padding: 11px 14px;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--gray-400, #8578a0);
    border-top: 1px solid var(--sig-line-soft);
}

.sig-rate__foot a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--sig-blue);
    text-decoration: none;
    text-transform: none;
    /* Body face, not mono: at this size the Space Mono "@" reads as an "a",
       and this is an address people copy by eye. */
    font-family: var(--font-family, sans-serif);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0;
}

.sig-rate__foot a:hover,
.sig-rate__foot a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* ══ 720px — the strip opens to four, the buttons go inline ══════════════ */
@media (min-width: 720px) {
    .sig-hero { padding: 40px 0 46px; }

    .sig-hero__field { height: 128px; }

    .sig-spec { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .sig-spec__cell { padding: 14px 15px 13px; }

    .sig-hero__cta {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .sig-hero__cta .sig-btn:first-child { grid-column: auto; }

    .sig-hero__sub { font-size: 1.06rem; }
}

/* ══ 1024px — two columns ═══════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .sig-hero { padding: 56px 0 64px; }

    .sig-hero__field { height: 170px; }

    .sig-hero__grid {
        grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.68fr);
        gap: 48px;
        align-items: center;
    }

    .sig-hero__title { margin-bottom: 18px; }

    .sig-hero__sub { margin-bottom: 28px; }

    .sig-spec { margin-bottom: 30px; }
}

/* ══ Accessibility ══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .sig-hero__peaks {
        animation: none;
        stroke-dashoffset: 0;
    }
    .sig-hero__accent::after {
        animation: none;
        transform: scaleX(1);
    }
    .sig-rate__flag::before { animation: none; }
    .sig-btn { transition: none; }
    .sig-btn:hover { transform: none; }
}

.sig-hero a:focus-visible,
.sig-hero .sig-btn:focus-visible {
    outline: 2px solid var(--sig-blue);
    outline-offset: 3px;
}

/* Windows high-contrast / forced colours: keep the structure legible. */
@media (forced-colors: active) {
    .sig-rate,
    .sig-spec,
    .sig-btn--ghost { border: 1px solid CanvasText; }
    .sig-hero__peaks { stroke: CanvasText; }
}

/* ══ Floating-widget safe areas ═════════════════════════════════════════════
   The shared chrome injects fixed messenger buttons (.msgr-fab). Measured:

     390px   two 44px buttons in a horizontal row from x=220 (right 170px)
     820px   vertical column, 48px wide, 74px gutter from the right edge
    1440px   same column — but the 1200px container ends at x=1320 and the
             column starts at x=1366, so desktop never collides

   So the collision only exists below 1024px, and it was real: at 820px the
   column sat over the rate card's discount figures, and at 390px over the
   "PeptideMeter verified" trust item. Neither audit catches this — overflow
   and tap-size checks are blind to occlusion (runbook trap 9.5), which is why
   this was found by screenshotting the phone viewport and looking at it. */

/* Mobile: stack the trust row so each item ends well left of the button row
   instead of running underneath it. It also simply reads better stacked. */
@media (max-width: 600px) {
    .sig-hero__trust {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-width: 210px;
    }

    /* Keep the 44px touch floor — tighten the stack with the row gap, never
       by shrinking the targets. */
    .sig-hero__trust .hero-trust-item,
    .sig-hero__trust .hero-trust-item > a {
        min-height: 44px;
    }
}

/* Tablet / small laptop: hold the rate card clear of the 48px button column
   plus its gutter, so the discount figures are never sat on. */
@media (min-width: 601px) and (max-width: 1023px) {
    .sig-rate { margin-right: 62px; }
}
