/* ===========================================================================
   Effects
   Depth framing for heroes, banners and feature imagery, plus the market
   marquee. Kept in one file so the visual language stays consistent and can
   be tuned in a single place.
   =========================================================================== */

:root {
    /* Depth scale — three stacked shadows read as one soft, physical lift. */
    --frame-border: clamp(4px, 0.4vw, 6px);
    --frame-border-sm: clamp(3px, 0.28vw, 4px);
    --frame-lift:
        0 2px 4px rgba(8, 24, 19, 0.04),
        0 14px 28px -10px rgba(8, 24, 19, 0.14),
        0 48px 90px -28px rgba(8, 24, 19, 0.38);
    --frame-lift-sm:
        0 2px 4px rgba(8, 24, 19, 0.05),
        0 10px 20px -8px rgba(8, 24, 19, 0.12),
        0 30px 60px -22px rgba(8, 24, 19, 0.3);
    --frame-hairline: rgba(15, 26, 22, 0.08);
}

/* ---------------------------------------------------------------------------
   Framed surfaces
   A white mat plus a layered drop shadow — the surface reads as a printed
   card resting above the page rather than a flat block of colour.
   --------------------------------------------------------------------------- */

.frame-3d {
    position: relative;
    border: var(--frame-border) solid #fff;
    box-shadow: var(--frame-lift);
    background-clip: padding-box;
    isolation: isolate;
}

/* Hairline so the white mat stays visible against a white page. */
.frame-3d::after {
    content: "";
    position: absolute;
    inset: calc(var(--frame-border) * -1);
    border: 1px solid var(--frame-hairline);
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
}

.frame-3d--sm {
    border-width: var(--frame-border-sm);
    box-shadow: var(--frame-lift-sm);
}

.frame-3d--sm::after {
    inset: calc(var(--frame-border-sm) * -1);
}

/* Banners sit inside content flow, so they carry a slightly tighter lift. */
.frame-3d--banner {
    border-width: var(--frame-border-sm);
    box-shadow: var(--frame-lift-sm);
}

.frame-3d--banner::after {
    inset: calc(var(--frame-border-sm) * -1);
}

/* Dark surfaces get a faint inner highlight along the top edge, which is what
   sells the raised effect on a dark panel. */
.frame-3d--dark::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
}

/* ---------------------------------------------------------------------------
   Framed photography
   The tilted, white-matted photo treatment used beside editorial copy.
   --------------------------------------------------------------------------- */

.frame-photo {
    display: block;
    width: 100%;
    border: var(--frame-border) solid #fff;
    box-shadow:
        0 10px 20px -12px rgba(8, 24, 19, 0.25),
        60px 60px 100px -30px rgba(8, 24, 19, 0.28);
    transform-origin: center;
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 700ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.frame-photo.frame-photo--tilt {
    transform: rotate(3deg);
}

.group:hover .frame-photo.frame-photo--tilt,
.frame-photo.frame-photo--tilt:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow:
        0 16px 30px -14px rgba(8, 24, 19, 0.3),
        70px 70px 120px -30px rgba(8, 24, 19, 0.32);
}

.frame-photo.frame-photo--tilt-left {
    transform: rotate(-3deg);
}

.group:hover .frame-photo.frame-photo--tilt-left,
.frame-photo.frame-photo--tilt-left:hover {
    transform: rotate(0deg) scale(1.02);
}

/* ---------------------------------------------------------------------------
   Market marquee
   Two identical tracks scroll as one continuous belt; translating by exactly
   -50% puts the second copy where the first began, so the loop is seamless.
   --------------------------------------------------------------------------- */

.marquee {
    --marquee-duration: 60s;
    position: relative;
    display: flex;
    overflow: hidden;
    user-select: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6rem, #000 calc(100% - 6rem), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6rem, #000 calc(100% - 6rem), transparent);
}

.marquee__track {
    display: flex;
    flex: none;
    align-items: center;
    gap: 0;
    min-width: 100%;
    animation: marquee-scroll var(--marquee-duration) linear infinite;
}

.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

.marquee__item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1.6rem;
    white-space: nowrap;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-primary, #0c3b2e);
}

.marquee__item + .marquee__item {
    border-left: 1px solid rgba(15, 26, 22, 0.1);
}

.marquee__pair {
    color: rgba(15, 26, 22, 0.45);
    font-weight: 700;
}

.marquee__value {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
}

.marquee__delta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.625rem;
    letter-spacing: 0.06em;
}

.marquee__delta--up {
    color: #157347;
}

.marquee__delta--down {
    color: #b02a37;
}

.marquee__delta--flat {
    color: rgba(15, 26, 22, 0.4);
}

/* Dark placement (e.g. directly under a dark hero). */
.marquee--dark .marquee__item {
    color: rgba(255, 255, 255, 0.86);
}

.marquee--dark .marquee__item + .marquee__item {
    border-left-color: rgba(255, 255, 255, 0.12);
}

.marquee--dark .marquee__pair {
    color: rgba(255, 255, 255, 0.5);
}

.marquee--dark .marquee__delta--flat {
    color: rgba(255, 255, 255, 0.45);
}

.market-strip {
    border-top: 1px solid rgba(15, 26, 22, 0.07);
    border-bottom: 1px solid rgba(15, 26, 22, 0.07);
    background: #fff;
}

.market-strip__label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 1.25rem;
    font-size: 0.5625rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(15, 26, 22, 0.4);
    border-right: 1px solid rgba(15, 26, 22, 0.08);
    white-space: nowrap;
}

.market-strip__pulse {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #157347;
    box-shadow: 0 0 0 0 rgba(21, 115, 71, 0.55);
    animation: market-pulse 2.4s ease-out infinite;
}

@keyframes market-pulse {
    70% {
        box-shadow: 0 0 0 0.45rem rgba(21, 115, 71, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(21, 115, 71, 0);
    }
}

/* ---------------------------------------------------------------------------
   Logo / trust belt — a slower, quieter marquee for partner and badge rows.
   --------------------------------------------------------------------------- */

.marquee--slow {
    --marquee-duration: 90s;
}

/* ---------------------------------------------------------------------------
   Motion preferences
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .marquee__track {
        animation: none;
        transform: none;
        overflow-x: auto;
    }

    .marquee {
        -webkit-mask-image: none;
        mask-image: none;
        overflow-x: auto;
    }

    /* Only one copy should be readable when the belt is not moving. */
    .marquee__track[data-marquee-clone="true"] {
        display: none;
    }

    .frame-photo,
    .frame-photo--tilt,
    .frame-photo--tilt-left {
        transform: none;
        transition: none;
    }

    .market-strip__pulse {
        animation: none;
    }
}

@media (max-width: 640px) {
    .marquee {
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 2rem, #000 calc(100% - 2rem), transparent);
        mask-image: linear-gradient(90deg, transparent, #000 2rem, #000 calc(100% - 2rem), transparent);
    }

    .market-strip__label {
        display: none;
    }
}

/* ---------------------------------------------------------------------------
   Physical objects
   The square-surface policy applies to interface panels, not to depictions of
   real things. A bank card has a 3mm corner radius and a phone has a much
   larger one; drawing either with square corners reads as a mistake. These
   classes are deliberately outside the Tailwind radius scale so the radius
   sweep in tools/strip-radius.py leaves them alone.
   --------------------------------------------------------------------------- */

.payment-card {
    border-radius: 1rem;
    overflow: hidden;
}

/* Larger cards carry a slightly larger corner so the proportion holds. */
@media (min-width: 1024px) {
    .payment-card {
        border-radius: 1.15rem;
    }
}

/* Declared after the media query so the small modifier always wins. */
.payment-card.payment-card--sm {
    border-radius: 0.7rem;
}

.device-frame {
    border-radius: 2.25rem;
    overflow: hidden;
}

/* ------------------------------------------------------------------ *
 * Print / save-as-PDF
 *
 * Document pages carry a "Save as PDF" control that calls window.print().
 * What comes out should read as a report, so the site chrome, the help
 * widget and the navigation aids are dropped and the body is given a
 * readable measure on paper.
 * ------------------------------------------------------------------ */
@media print {
    header,
    footer,
    nav,
    .doc-contents,
    [data-kb-widget],
    [data-print-document],
    .no-print {
        display: none !important;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
    }

    main,
    .doc-body {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        word-break: break-all;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    table,
    figure,
    img {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    h1, h2, h3 {
        break-after: avoid;
        page-break-after: avoid;
    }
}
