/* ==========================================================================
   Why BYC? — dedicated subpage
   Hero -> Capabilities -> Where do you fit in -> Connected ecosystem.
   Uses the shared tokens and .audience-fit component defined in home.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared heading block
   -------------------------------------------------------------------------- */

.wb-heading {
    position: relative;
    z-index: 1;
    max-width: 940px;
    margin: 0 0 clamp(38px, calc(var(--public-layout-vw, 1vw) * 5), 64px);
}

.wb-heading--centred {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

/* Type comes from home.css (global h2). Only spacing is set here. */
.wb-heading h2 {
    margin: 0 0 20px;
}

/* Matches the section paragraph scale used by .connected-ecosystem__copy p. */
.wb-heading__copy {
    max-width: 66ch;
    margin: 0;
    color: rgba(244, 241, 232, 0.82);
    font-size: clamp(1.06rem, calc(var(--public-layout-vw, 1vw) * 1.08), 1.28rem);
    font-weight: 750;
    line-height: 1.58;
}

.wb-heading--centred .wb-heading__copy {
    margin-right: auto;
    margin-left: auto;
}

/* --------------------------------------------------------------------------
   1. Hero
   -------------------------------------------------------------------------- */

.wb-hero {
    position: relative;
    display: grid;
    align-items: center;
    overflow: hidden;
    min-height: clamp(460px, 58vh, 620px);
    padding: clamp(150px, 16vh, 186px) clamp(22px, calc(var(--public-layout-vw, 1vw) * 6), 92px) clamp(74px, calc(var(--public-layout-vw, 1vw) * 9), 104px);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(
            120% 90% at 12% 0%,
            rgba(75, 158, 199, 0.2),
            transparent 58%
        ),
        linear-gradient(160deg, #081521 0%, #07121b 52%, #05090d 100%);
    isolation: isolate;
}

.wb-hero__grid {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(rgba(116, 184, 215, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 184, 215, 0.05) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 88%);
}

/* Same measure as .hero-content on the home page. */
.wb-hero__content {
    max-width: 820px;
    min-width: 0;
}

/* h1 type comes from home.css. Only the bottom margin is adjusted. */
.wb-hero h1 {
    margin-bottom: 22px;
}

/* Supporting headline: sits between the global h1 and .hero-copy. */
.wb-hero__standfirst {
    margin: 0 0 26px;
    max-width: 820px;
    color: var(--amber);
    font-size: clamp(1.75rem, calc(var(--public-layout-vw, 1vw) * 1.9), 2.35rem);
    font-weight: 950;
    line-height: 1.22;
}

.wb-hero__actions {
    margin-bottom: 0;
}

.wb-scroll-cue {
    gap: 12px;
}

.wb-scroll-cue__arrow {
    display: inline-block;
    animation: wb-nudge 2.2s ease-in-out infinite;
}

@keyframes wb-nudge {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(4px);
    }
}

/* --------------------------------------------------------------------------
   2. Capabilities — alternating text / visual rows
   -------------------------------------------------------------------------- */

.wb-capabilities {
    position: relative;
    overflow: hidden;
    padding: clamp(60px, calc(var(--public-layout-vw, 1vw) * 7), 96px) clamp(22px, calc(var(--public-layout-vw, 1vw) * 6), 92px) clamp(70px, calc(var(--public-layout-vw, 1vw) * 8), 110px);
    background:
        linear-gradient(rgba(116, 184, 215, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 184, 215, 0.035) 1px, transparent 1px),
        var(--bg);
    background-size: 88px 88px;
}

/* Sits on its own row beneath the eyebrow / h2 pair of .section-heading.
   Matches the section paragraph scale used elsewhere on the page. */
.wb-capabilities__standfirst {
    grid-column: 1 / -1;
    max-width: 66ch;
    margin: 0;
    color: rgba(244, 241, 232, 0.82);
    font-size: clamp(1.06rem, calc(var(--public-layout-vw, 1vw) * 1.08), 1.28rem);
    font-weight: 750;
    line-height: 1.58;
}

.wb-capability-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: clamp(64px, calc(var(--public-layout-vw, 1vw) * 8), 132px);
}

.wb-capability {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, calc(var(--public-layout-vw, 1vw) * 5), 76px);
    align-items: center;
}

/* Alternating rows flip on desktop only. The copy always comes first in the
   DOM, so the reading and tab order stays text -> visual at every width. */
.wb-capability--reversed .wb-capability__copy {
    order: 2;
}

.wb-capability--reversed .wb-capability__media {
    order: 1;
}

.wb-capability__copy {
    display: grid;
    min-width: 0;
    justify-items: start;
    gap: 18px;
}

/* Matches .challenge-visual figcaption span in home.css. */
.wb-capability__label {
    margin: 0;
    color: var(--amber);
    font-size: clamp(0.9rem, calc(var(--public-layout-vw, 1vw) * 0.9), 1.1rem);
    font-weight: 950;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

/* A step below the global h2, so the section heading stays dominant. */
.wb-capability__title {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.85rem, calc(var(--public-layout-vw, 1vw) * 2.1), 2.85rem);
    font-weight: 950;
    line-height: 1.06;
    text-transform: uppercase;
}

.wb-capability__lede {
    max-width: 58ch;
    margin: 0;
    color: rgba(244, 241, 232, 0.82);
    font-size: clamp(1.02rem, calc(var(--public-layout-vw, 1vw) * 1.02), 1.18rem);
    font-weight: 750;
    line-height: 1.58;
}

/* Diamond markers mirror .audience-fit-panel__topics in home.css. */
.wb-capability__points {
    display: grid;
    max-width: 56ch;
    gap: 14px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.wb-capability__points li {
    position: relative;
    padding-left: 30px;
    color: rgba(244, 241, 232, 0.72);
    font-size: clamp(0.94rem, calc(var(--public-layout-vw, 1vw) * 0.96), 1.08rem);
    font-weight: 500;
    line-height: 1.5;
}

.wb-capability__points li::before {
    position: absolute;
    top: 0.75em;
    left: 2px;
    width: 12px;
    height: 12px;
    border: 1px solid var(--amber);
    content: "";
    transform: translateY(-50%) rotate(45deg);
}

/* Visual frame. Carries either artwork (--image) or the styled placeholder,
   so both variants share the same border, ratio and inset hairline grid. */
.wb-capability__media {
    min-width: 0;
    margin: 0;
}

.wb-capability__frame {
    position: relative;
    display: grid;
    aspect-ratio: 16 / 10;
    align-content: center;
    justify-items: center;
    gap: 14px;
    overflow: hidden;
    padding: clamp(24px, calc(var(--public-layout-vw, 1vw) * 3), 44px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(
        140deg,
        rgba(19, 40, 56, 0.96),
        rgba(13, 29, 41, 0.96) 62%,
        rgba(9, 22, 32, 0.96)
    );
    box-shadow: 0 24px 82px rgba(2, 10, 16, 0.34);
    text-align: center;
    transition: border-color 220ms ease;
}

.wb-capability__frame:hover {
    border-color: rgba(199, 162, 83, 0.5);
}

/* Inset hairline grid, matching the framing used across the site visuals. */
.wb-capability__frame::after {
    position: absolute;
    z-index: 0;
    inset: 18px;
    content: "";
    pointer-events: none;
    border: 1px solid rgba(116, 184, 215, 0.2);
    background:
        linear-gradient(rgba(116, 184, 215, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 184, 215, 0.05) 1px, transparent 1px);
    background-size: 42px 42px;
}

.wb-capability__frame-tag,
.wb-capability__frame-title {
    position: relative;
    z-index: 1;
}

.wb-capability__frame-tag {
    color: rgba(167, 189, 196, 0.9);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.wb-capability__frame-title {
    max-width: 24ch;
    color: var(--text);
    font-size: clamp(1.05rem, calc(var(--public-layout-vw, 1vw) * 1.25), 1.5rem);
    font-weight: 950;
    letter-spacing: 0.16em;
    line-height: 1.3;
    text-transform: uppercase;
}

/* Artwork variant — the image fills the frame the placeholder would occupy. */
.wb-capability__frame--image {
    display: block;
    padding: 0;
}

.wb-capability__frame--image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* Portrait sources set --wb-focus inline to pick their crop band. */
    object-position: var(--wb-focus, center);
}

/* Scrim settles photography into the page's dark palette, following the
   treatment .audience-fit-panel uses in home.css. */
.wb-capability__frame--image::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(
        0deg,
        rgba(7, 18, 27, 0.6) 0%,
        rgba(7, 18, 27, 0.14) 52%,
        rgba(7, 18, 27, 0.36) 100%
    );
}

/* Lift the hairline grid over the artwork and warm it so it reads on photos. */
.wb-capability__frame--image::after {
    z-index: 2;
    border-color: rgba(173, 209, 224, 0.28);
    background-image:
        linear-gradient(rgba(244, 241, 232, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 241, 232, 0.05) 1px, transparent 1px);
}

/* --------------------------------------------------------------------------
   3. Where do you fit in? — extends the .audience-fit component in home.css
   -------------------------------------------------------------------------- */

.wb-audience-detail[hidden] {
    display: none;
}

/* The shared .audience-fit-panel scrim in home.css fades out by 42%, which is
   where this page's benefit descriptions sit. Hold the dark further right so
   the copy stays legible, then release it over the photo. */
#wb-audience .audience-fit-panel::before {
    background:
        linear-gradient(
            90deg,
            rgba(7, 18, 27, 0.94) 0%,
            rgba(7, 18, 27, 0.9) 44%,
            rgba(7, 18, 27, 0.74) 58%,
            rgba(7, 18, 27, 0.4) 72%,
            rgba(7, 18, 27, 0.14) 86%,
            rgba(7, 18, 27, 0.06) 100%
        ),
        linear-gradient(
            0deg,
            rgba(7, 18, 27, 0.54) 0%,
            rgba(7, 18, 27, 0.04) 50%,
            rgba(7, 18, 27, 0.34) 100%
        );
}

.wb-audience-tagline {
    margin: 0 0 24px;
    color: var(--amber);
    font-size: clamp(0.9rem, calc(var(--public-layout-vw, 1vw) * 0.9), 1.1rem);
    font-weight: 950;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

#wb-audience .audience-fit-panel__topics {
    gap: 20px;
}

#wb-audience .audience-fit-panel__topics li {
    display: grid;
    gap: 6px;
}

.wb-topic__title {
    display: block;
}

.wb-topic__copy {
    display: block;
    max-width: 48ch;
    color: rgba(244, 241, 232, 0.72);
    font-size: clamp(0.94rem, calc(var(--public-layout-vw, 1vw) * 0.96), 1.08rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.5;
    text-transform: none;
}

/* --------------------------------------------------------------------------
   4. Closing band
   -------------------------------------------------------------------------- */

.wb-closing {
    position: relative;
    overflow: hidden;
    padding: clamp(70px, calc(var(--public-layout-vw, 1vw) * 8), 116px) clamp(22px, calc(var(--public-layout-vw, 1vw) * 6), 92px) clamp(80px, calc(var(--public-layout-vw, 1vw) * 9), 120px);
    border-top: 1px solid var(--line);
    background:
        radial-gradient(
            85% 65% at 50% 8%,
            rgba(75, 158, 199, 0.14),
            transparent 60%
        ),
        var(--bg);
    text-align: center;
}

/* Matches .final-cta h2 in home.css. */
.wb-closing__line {
    margin: 0 0 30px;
    font-size: 3.2rem;
    font-weight: 500;
    line-height: 1.2;
    word-wrap: break-word;
}

.wb-closing__highlight {
    color: var(--amber);
}

.wb-closing__actions {
    justify-content: center;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
    /* Mirrors the .section-heading h2 step in home.css. */
    .wb-heading h2 {
        font-size: clamp(2.7rem, 5.4vw, 3.55rem);
    }

    /* Single column from tablet down; the DOM order already puts text first,
       so the reversed row simply falls back into source order. */
    .wb-capability {
        grid-template-columns: 1fr;
        gap: clamp(26px, 4vw, 40px);
    }

    .wb-capability--reversed .wb-capability__copy,
    .wb-capability--reversed .wb-capability__media {
        order: 0;
    }

    /* Placeholders gain height on one column; artwork keeps a single ratio at
       every width so each photo's chosen crop band stays predictable. */
    .wb-capability__frame {
        aspect-ratio: 16 / 9;
    }

    .wb-capability__frame--image {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 620px) {
    /* Mirrors the .section-heading h2 step in home.css. The hero h1 is left
       alone so home.css's own mobile h1 rule governs it. */
    .wb-heading h2 {
        font-size: clamp(1.28rem, 5.6vw, 2.48rem);
    }

    /* One column on mobile, so hand the scrim back to home.css's vertical
       treatment instead of the horizontal one set above. */
    #wb-audience .audience-fit-panel::before {
        background: linear-gradient(
            0deg,
            rgba(7, 18, 27, 0.8) 0%,
            rgba(7, 18, 27, 0.42) 54%,
            rgba(7, 18, 27, 0.24) 100%
        );
    }

    .wb-hero {
        min-height: 0;
        padding-top: clamp(128px, 20vh, 156px);
    }

    .wb-capabilities {
        padding-right: 16px;
        padding-left: 16px;
    }

    .wb-capability-list {
        gap: clamp(48px, 12vw, 64px);
    }

    .wb-capability__title {
        font-size: clamp(1.42rem, 6.4vw, 2rem);
    }

    .wb-capability__lede,
    .wb-capability__points {
        max-width: none;
    }

    .wb-capability__frame {
        aspect-ratio: 4 / 3;
    }

    .wb-capability__frame--image {
        aspect-ratio: 16 / 10;
    }

    .wb-capability__frame::after {
        inset: 10px;
    }

    .wb-capability__frame-tag {
        font-size: 0.68rem;
        letter-spacing: 0.24em;
    }

    .wb-capability__frame-title {
        letter-spacing: 0.1em;
    }

    .wb-topic__copy {
        max-width: none;
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wb-scroll-cue__arrow {
        animation: none;
    }

    .wb-capability__frame {
        transition: none;
    }
}
