/* =====================================================================
   ASK SUMIT - Editorial 3D hero
   Layers (back to front):
   0 photo · 1 3D gold halo · 2 headline · 3 person cut-out · 4 shade
   5 stats + engagement block · 6 scrolling logo strip
   Photo, halo, headline and cut-out share one "frame" so they always line up.
   ===================================================================== */
.hero3d {
    --h: clamp(700px, 100svh, 1000px);
    --bw: max(100vw, calc(var(--h) * 1.5));
    --left: clamp(calc(100vw - var(--bw)), calc(50vw - var(--bw) * .40), 0px);
    --top: 0px;
    --logos-h: 92px;
    --ivory: #f4f6f7; --gold: #c7cf15;
    position: relative; width: 100%; height: var(--h); overflow: hidden;
    background: #030303; isolation: isolate; padding: 0;
}

/* ---------- shared frame ---------- */
.h3-frame {
    position: absolute; top: var(--top); left: var(--left); width: var(--bw); aspect-ratio: 3 / 2;
    container-type: inline-size; pointer-events: none; transform-origin: 0 0;
    transform: translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px), 0) scale(1.04);
    transition: transform .3s ease-out; will-change: transform;
}
.h3-bg { z-index: 0; }
.h3-bg img, .h3-cut img { filter: saturate(.9) contrast(1.06) brightness(.84); }
.h3-bg img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ---------- 1. halo ---------- */
.h3-halo-frame { z-index: 1; }
.h3-halo { position: absolute; left: 38.5%; top: 16cqw; width: 42cqw; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .9; }
.h3-halo canvas { width: 100% !important; height: 100% !important; display: block; }

/* ---------- 2. headline ---------- */
.h3-text { z-index: 2; transform: translate3d(calc(var(--px, 0) * -1.6px), calc(var(--py, 0) * -1.2px), 0) scale(1.04); }
.h3-title { position: static; margin: 0; max-width: none; font-weight: 400; line-height: 1; }
.h3-title > span { position: absolute; display: block; white-space: nowrap; }

/* small italic serif, like "Focus" in the reference */
.h3-pre {
    left: 4.5cqw; top: 13.2cqw; font-family: 'Instrument Serif', serif; font-style: italic;
    font-size: 3.5cqw; letter-spacing: -.01em; color: var(--ivory); text-shadow: 0 4px 24px rgba(0,0,0,.5);
}
/* giant high-contrast serif word across the neck/shoulders */
.h3-giant, .h3-giant-echo {
    left: 50%; top: 15.2cqw; transform: translateX(-50%);
    font-family: 'Instrument Serif', serif; font-size: 19.5cqw; letter-spacing: -.035em; line-height: 1;
}
.h3-giant {
    background: linear-gradient(180deg, #ffffff 0%, var(--ivory) 55%, #cfd8dc 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1.6cqw 2.6cqw rgba(0,0,0,.45));
}
/* thin gold outline offset behind = extruded 3D edge */
.h3-giant-echo {
    color: transparent; -webkit-text-fill-color: transparent; -webkit-text-stroke: 1px rgba(32,156,207,.55);
    transform: translateX(-50%) translate(.9cqw, .9cqw);
}
/* top-right italic, like "Goal" */
.h3-post {
    right: 5cqw; top: 9.6cqw; font-family: 'Instrument Serif', serif; font-style: italic;
    font-size: 5.4cqw; color: var(--ivory); text-shadow: 0 4px 24px rgba(0,0,0,.5);
}

/* ---------- 3. cut-out ---------- */
.h3-cut { z-index: 3; }
.h3-cut img {
    position: absolute; left: 24.74%; top: 0; width: 46.875%; height: auto; display: block;
    -webkit-mask-image: linear-gradient(180deg, #000 90%, transparent 100%); mask-image: linear-gradient(180deg, #000 90%, transparent 100%);
}

/* ---------- 4. shade ---------- */
.h3-shade {
    position: absolute; inset: 0; z-index: 4; pointer-events: none;
    background:
        radial-gradient(110% 85% at 40% 28%, rgba(3,3,3,0) 50%, rgba(3,3,3,.55) 100%),
        linear-gradient(180deg, rgba(3,3,3,.35) 0%, rgba(3,3,3,0) 14%, rgba(3,3,3,0) 60%, rgba(3,3,3,.78) 78%, #030303 96%);
}

/* ---------- 5. stats + engagement block ---------- */
.h3-ui {
    position: absolute; z-index: 5; left: 0; right: 0; bottom: calc(var(--logos-h) + 26px);
    display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; pointer-events: none;
}
.h3-ui > * { pointer-events: auto; }
.h3-stats { display: flex; gap: clamp(28px, 4vw, 64px); }
.h3-stat { display: grid; gap: 6px; min-width: 150px; }
.h3-stat strong {
    font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(2.4rem, 3.6vw, 3.6rem); line-height: 1; color: #fff; letter-spacing: -.01em;
}
.h3-stat sup { font-size: .5em; vertical-align: super; color: var(--gold); margin-left: 2px; }
.h3-stat span { font-size: .86rem; color: rgba(255,255,255,.72); letter-spacing: .01em; }
.h3-bar-line { display: block; height: 3px; width: 100%; max-width: 170px; border-radius: 3px; margin-top: 8px; transform-origin: left; animation: h3bar 1.4s cubic-bezier(.2,.8,.2,1) .6s both; }
.h3-bar-line.g1 { background: linear-gradient(90deg, #e3ea6e, #c7cf15, #209ccf); }
.h3-bar-line.g2 { background: linear-gradient(90deg, #7fd0ef, #209ccf, #15729a); animation-delay: .75s; }
.h3-bar-line.g3 { background: linear-gradient(90deg, #e3ea6e, #c7cf15, #c7cf15); animation-delay: .9s; }
@keyframes h3bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.h3-side { max-width: 380px; display: grid; gap: 12px; margin-bottom: 6px; }
.h3-eyebrow { font-size: .78rem; letter-spacing: .08em; color: var(--gold); }
.h3-side-title { margin: 0; font-size: clamp(1.15rem, 1.55vw, 1.6rem); line-height: 1.3; color: #fff; font-weight: 500; letter-spacing: -.01em; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.h3-cta { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.h3-pill {
    border: 0; cursor: pointer; padding: 14px 26px; border-radius: 999px; background: #fff; color: #050505;
    font: 600 .92rem 'Plus Jakarta Sans', sans-serif; box-shadow: 0 12px 30px -10px rgba(255,255,255,.35); transition: transform .25s, background .25s;
}
.h3-pill:hover { background: #209ccf; transform: translateY(-2px); }
.h3-circle {
    width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); background: transparent; color: #fff; cursor: pointer;
    display: grid; place-items: center; transition: .25s;
}
.h3-circle i { transform: rotate(-45deg); transition: transform .25s; }
.h3-circle:hover { background: #fff; color: #050505; }
.h3-circle:hover i { transform: rotate(0deg); }

/* ---------- 6. scrolling logo strip ---------- */
.h3-logos {
    position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: var(--logos-h);
    display: flex; align-items: center; gap: 28px; padding-left: max(24px, calc((100vw - 1240px) / 2));
    border-top: 1px solid rgba(255,255,255,.1); background: linear-gradient(180deg, rgba(3,3,3,.4), #030303);
}
.h3-logos-label { flex: none; font-size: .7rem; line-height: 1.35; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.5); padding-right: 28px; border-right: 1px solid rgba(255,255,255,.14); }
.h3-logos-track {
    flex: 1; overflow: hidden; display: flex; gap: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 90%, transparent);
}
.h3-logos-row { flex: none; display: flex; align-items: center; gap: 56px; padding-right: 56px; animation: h3logos 42s linear infinite; }
.h3-logos:hover .h3-logos-row { animation-play-state: paused; }
@keyframes h3logos { to { transform: translateX(-100%); } }
/* wordmarks: each name set in its own type style (names only, no brand logos) */
.h3-logo { white-space: nowrap; color: rgba(255,255,255,.62); transition: color .3s; }
.h3-logo:hover { color: #fff; }
.lg-a { font: 600 1.05rem 'Plus Jakarta Sans', sans-serif; letter-spacing: -.01em; }
.lg-b { font: 700 .95rem 'Space Grotesk', sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.lg-c { font: italic 400 1.35rem 'Instrument Serif', serif; }
.lg-d { font: 800 1.05rem 'Plus Jakarta Sans', sans-serif; letter-spacing: .02em; }
.lg-e { font: 700 1.35rem 'Space Grotesk', sans-serif; letter-spacing: .2em; }
.lg-f { font: 400 1.35rem 'Instrument Serif', serif; letter-spacing: .02em; }
.lg-g { font: 600 1rem 'Space Grotesk', sans-serif; letter-spacing: .26em; text-transform: uppercase; }
.lg-h { font: 500 .95rem 'Plus Jakarta Sans', sans-serif; letter-spacing: .06em; }
.lg-i { font: italic 400 1.3rem 'Instrument Serif', serif; }
.lg-j { font: 700 .9rem 'Space Grotesk', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.lg-k { font: 300 1.1rem 'Plus Jakarta Sans', sans-serif; letter-spacing: .04em; }
.lg-l { font: 700 1.2rem 'Space Grotesk', sans-serif; letter-spacing: .04em; }
.lg-m { font: 400 1.25rem 'Instrument Serif', serif; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
    .h3-side { display: none; }
    .h3-stat { min-width: 0; }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
    .hero3d { --bw: 175vw; --top: 60px; --logos-h: 72px; --h: calc(var(--top) + 96vw + 330px); }
    .h3-bg img { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 36px); mask-image: linear-gradient(180deg, transparent 0, #000 36px); }
    .h3-text { left: 0; width: 100vw; aspect-ratio: auto; height: 100vw; transform: none; }
    .h3-pre { left: 5vw; top: 30vw; font-size: 5.6vw; }
    .h3-giant, .h3-giant-echo { left: 50%; top: 35vw; font-size: 21vw; }
    .h3-post { right: 5vw; top: 6vw; font-size: 7.5vw; }
    .h3-shade { background: linear-gradient(180deg, rgba(3,3,3,.3) 0%, rgba(3,3,3,0) 12%, rgba(3,3,3,0) 42%, rgba(3,3,3,.9) 62%, #030303 72%); }
    .h3-ui { flex-direction: column-reverse; align-items: stretch; gap: 24px; bottom: calc(var(--logos-h) + 18px); padding: 0 20px; }
    .h3-side { display: grid; max-width: none; }
    .h3-side-title { font-size: 1.15rem; }
    .h3-cta .h3-pill { flex: 1; }
    .h3-stats { gap: 16px; justify-content: space-between; }
    .h3-stat strong { font-size: 1.9rem; }
    .h3-stat span { font-size: .72rem; }
    .h3-logos { padding-left: 0; gap: 0; }
    .h3-logos-label { display: none; }
    .h3-logos-row { gap: 36px; padding-right: 36px; animation-duration: 32s; }
}

@media (prefers-reduced-motion: reduce) {
    .h3-frame { transition: none; transform: scale(1.04); }
    .h3-logos-row { animation: none; }
    .h3-bar-line { animation: none; }
}

/* fit: keep "Inclusive organisations are" clear of the hair, and DESIGNED inside the frame */
@media (min-width: 761px) {
    .h3-pre { top: 11.4cqw; width: 24cqw; white-space: normal !important; font-size: 3.2cqw; line-height: 1.05; }
    .h3-giant, .h3-giant-echo { font-size: 17.5cqw; }
}

/* ===== readability: the right-hand block sits over the white "DESIGNED" letters.
   Same layout, just a dark frosted backing so the text always reads. ===== */
.h3-side {
    position: relative; padding: 22px 24px 24px; margin-right: -24px; border-radius: 22px;
    background: linear-gradient(145deg, rgba(4,4,5,.78), rgba(4,4,5,.62));
    backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 30px 60px -24px rgba(0,0,0,.9);
}
.h3-eyebrow { color: #c7cf15; text-shadow: none; }
.h3-side-title { text-shadow: none; }
@media (max-width: 760px) { .h3-side { margin-right: 0; padding: 18px; } }

/* ===== back to the original (no card): the right-hand block has no box.
   Instead the hero's shade layer darkens the area behind it, so the white
   "DESIGNED" letters fade there and the text reads clearly. ===== */
.h3-side {
    padding: 0 !important; margin-right: 0 !important; border-radius: 0 !important;
    background: none !important; border: 0 !important; box-shadow: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
.h3-eyebrow, .h3-side-title { text-shadow: 0 2px 18px rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,.8) !important; }
@media (min-width: 1101px) {
    .h3-shade {
        background:
            /* overlay behind the right-hand text block */
            radial-gradient(38% 42% at 84% 74%, rgba(0,0,0,.88) 0%, rgba(0,0,0,.7) 45%, rgba(0,0,0,0) 100%),
            radial-gradient(110% 85% at 40% 28%, rgba(3,3,3,0) 50%, rgba(3,3,3,.55) 100%),
            linear-gradient(180deg, rgba(3,3,3,.35) 0%, rgba(3,3,3,0) 14%, rgba(3,3,3,0) 60%, rgba(3,3,3,.78) 78%, #030303 96%) !important;
    }
}
