/* ==========================================================================
   CLIENT COINS — orbiting client discs
   Coins ride a circular orbit driven by client-coins.js, which positions each
   one in 2D (no 3D ring). That keeps every disc perfectly round and readable —
   depth comes from scale and opacity instead of perspective, so coins can never
   foreshorten into slivers or overlap unpredictably.
   Hovering the stage pauses the orbit; hovering a coin pops it forward.
   ========================================================================== */
.coins-section {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 4rem 0 2.5rem;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 55% at 50% 0%, rgba(94, 179, 70, 0.10), transparent 62%),
        linear-gradient(to right, #f1f6f7, #d5f1f1);
}

.coins-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.16;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1L54 16v32L28 63 2 48V16z M28 63l26 15v18M28 63L2 78v18' fill='none' stroke='%235eb346' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 56px 97px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 5%, transparent 80%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 5%, transparent 80%);
}

.coins-section .container {
    position: relative;
    z-index: 2;
}

.coins-subheading {
    display: inline-block;
    margin-bottom: 0.6rem;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gf-green);
}

.coins-heading {
    margin: 0 0 1rem;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.2;
    color: var(--gf-navy);
}

.coins-intro {
    max-width: 40rem;
    margin: 0 auto;
    font-family: "Poppins", sans-serif;
    font-size: 0.98rem;
    line-height: 1.7;
    color: rgba(48, 68, 79, 0.78);
}

/* ---------- logo marquee ---------- */
.cl-rows {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    max-width: 72rem;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.cl-row {
    display: grid;
    grid-template-columns: 210px 1fr;
    align-items: center;
    overflow: hidden;
    padding: 0.9rem 0;
    background: #ffffff;
    border: 1px solid rgba(94, 179, 70, 0.28);
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(48, 68, 79, 0.1);
}

.cl-row__label {
    padding-inline: 1.5rem;
    border-right: 1px solid rgba(94, 179, 70, 0.22);
    font-family: "Poppins", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gf-green-dark);
}

.cl-marquee {
    position: relative;
    overflow: hidden;
    padding-block: 14px;
    /* Fade the logos in and out at the edges instead of clipping them hard */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.cl-track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: max-content;
    padding-inline: 1.5rem;
    /* The markup renders the logo list twice, so scrolling exactly -50% lands
       on an identical frame and the loop is invisible. */
    animation: clScroll 38s linear infinite;
}

.cl-row--rtl .cl-track {
    animation-direction: reverse;
}

.cl-marquee:hover .cl-track {
    animation-play-state: paused;
}

@keyframes clScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.cl-logo {
    flex: none;
    display: grid;
    place-items: center;
    width: 130px;
    height: 56px;
}

/* Keep a popped logo above its neighbours */
.cl-logo:hover {
    position: relative;
    z-index: 3;
}

.cl-logo img {
    max-width: 120px;
    max-height: 46px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.92;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease,
        filter 0.35s ease;
}

.cl-logo:hover img {
    opacity: 1;
    transform: scale(1.28) translateY(-4px);
    filter: drop-shadow(0 10px 18px rgba(48, 68, 79, 0.28));
}

@media only screen and (max-width: 991px) {
    .cl-rows { gap: 1.1rem; }
}

@media only screen and (max-width: 720px) {
    .cl-row { grid-template-columns: 1fr; gap: 0.5rem; }
    .cl-row__label {
        border-right: none;
        border-bottom: 1px solid rgba(94, 179, 70, 0.22);
        padding-bottom: 0.7rem;
    }
}

@media only screen and (max-width: 575px) {
    .coins-section { padding: 3rem 0 2rem; }
    .cl-logo { width: 132px; height: 58px; }
    .cl-logo img { max-width: 118px; max-height: 46px; }
    .cl-track { gap: 1.6rem; }
}

/* Touch keeps the marquee. A wrapped static grid was tried here and read as a
   broken layout — two ragged columns of small marks with no rhythm. Instead the
   scroll slows down and the logos get bigger, so each one is legible on its way
   past. prefers-reduced-motion still stops it outright, below. */
@media (hover: none) {
    .cl-track {
        animation-duration: 58s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cl-track { animation: none !important; }
    .cl-logo img { transition: none !important; }
}

/* ==========================================================================
   TRUST GLOBE — clients hero
   Two columns: copy on the left, globe on the right. The canvas is injected by
   client-globe.js; until it reports `is-live` the poster carries the slot.
   ========================================================================== */
.cg-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem) 1rem 1rem;
}

.cg-hero__eyebrow {
    display: inline-block;
    margin-bottom: 0.9rem;
    padding: 0.38rem 1rem;
    border-radius: 100px;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gf-green-dark);
    background: rgba(94, 179, 70, 0.1);
    border: 1px solid rgba(94, 179, 70, 0.3);
}

.cg-hero__title {
    margin: 0 0 1.1rem;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    line-height: 1.16;
    letter-spacing: -0.02em;
    color: var(--gf-navy);
}

.cg-hero__title span {
    color: var(--gf-green);
}

.cg-hero__lead {
    max-width: 30rem;
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    line-height: 1.72;
    color: rgba(48, 68, 79, 0.78);
}

.cg-stage {
    position: relative;
    /* Wider than the old disc: the globe only occupies about 59% of its canvas
       — the flag pins need the rest as headroom — so dropping the disc without
       growing the stage would have left a smaller object, not a cleaner one.
       The column is ~33rem at the 72rem hero max, so 30rem still clears it. */
    width: min(100%, 30rem);
    aspect-ratio: 1 / 1;
    margin-inline: auto;
    /* overflow stays: .cg-stage.is-static below rounds its corners and needs
       something to clip the poster against. */
    overflow: hidden;
    /* No disc. The core is dark glass with an emerald limb, so it reads on the
       pale hero field by itself — the backdrop was only boxing it in. */
    background: none;
}

/* Until the globe is live this poster carries the slot, so on the WebGL path it
   keeps the round silhouette the scene will replace. The static card below is a
   16/10 photo tile and must stay square-cornered-ish, hence the :not(). */
.cg-stage:not(.is-static) .cg-poster {
    border-radius: 50%;
}

.cg-stage canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.cg-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.8s ease;
}

/* Once WebGL is running the poster fades out from under the canvas */
.cg-stage.is-live .cg-poster {
    opacity: 0;
}

/* No WebGL / small screen: poster stays and carries the slot */
.cg-stage.is-static {
    aspect-ratio: 16 / 10;
    border-radius: 20px;
    background: none;
}

.cg-stage.is-static .cg-poster {
    opacity: 1;
}

@media only screen and (max-width: 860px) {
    .cg-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
    }
    .cg-hero__lead { margin-inline: auto; }
    .cg-stage { order: -1; max-width: 21rem; margin: 0 auto; }
}

@media only screen and (max-width: 575px) {
    .cg-stage { max-width: 17rem; }
}
