/* =========================================================================
   Fluted gradient (Brand Guidelines p.17)
   Usage: <div class="fluted">...content...</div>
          <div class="fluted fluted--gold">...</div>
          add .fluted--static to switch the motion off for one block

   Pure CSS - no extra markup. Content inside the div sits above the effect.
   Layers:
     element      dark base colour
     ::before     soft light "blobs" that drift slowly (the moving light)
     ::after      the vertical flutes - repeating shading across each rib
   ========================================================================= */

.fluted {
    --fluted-base: #02030f;
    --fluted-light-1: #3d8bff;
    --fluted-light-2: #1f5fe0;
    --fluted-light-3: #0b1a8c;
    --fluted-rib: 32px;                 /* width of one flute */
    --fluted-speed: 22s;                /* one full drift (alternates, so seamless) */

    position: relative;
    isolation: isolate;                 /* keeps the pseudo layers behind the content */
    overflow: hidden;
    background-color: var(--fluted-base);
    color: var(--clr-white, #fff);
}

.fluted--gold {
    --fluted-base: #120d05;
    --fluted-light-1: #f0d9a0;
    --fluted-light-2: #c6aa76;
    --fluted-light-3: #907542;
}

/* Moving light */
.fluted::before {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: -2;
    background:
        radial-gradient(38% 30% at 30% 35%, var(--fluted-light-1) 0%, transparent 70%),
        radial-gradient(30% 45% at 65% 60%, var(--fluted-light-2) 0%, transparent 70%),
        radial-gradient(45% 35% at 50% 85%, var(--fluted-light-3) 0%, transparent 75%);
    filter: blur(10px);
    animation: fluted-drift var(--fluted-speed) ease-in-out infinite alternate;
    will-change: transform;
}

/* Flutes: each rib goes dark -> light -> dark, like light catching a ridged surface */
.fluted::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        repeating-linear-gradient(90deg,
            rgba(0, 0, 0, .40) 0,
            rgba(0, 0, 0, .10) calc(var(--fluted-rib) * .25),
            rgba(255, 255, 255, .14) calc(var(--fluted-rib) * .55),
            rgba(0, 0, 0, .18) calc(var(--fluted-rib) * .85),
            rgba(0, 0, 0, .40) var(--fluted-rib)),
        /* darken the edges - "dark at the edges, lifting to light in the centre" */
        radial-gradient(120% 90% at 50% 50%, transparent 45%, rgba(0, 0, 0, .55) 100%);
    pointer-events: none;
}

@keyframes fluted-drift {
    0%   { transform: translate3d(-8%, -4%, 0) scale(1); }
    50%  { transform: translate3d(6%, 5%, 0) scale(1.08); }
    100% { transform: translate3d(10%, -6%, 0) scale(1.02); }
}

/* Static option, and honour the OS "reduce motion" setting */
.fluted--static::before {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .fluted::before {
        animation: none;
    }
}
