/* ==========================================================================
   Home page - chapter strip, full-bleed slabs, faded and angled media
   Additive to style.css and loaded after it. The hero, .eyebrow-rule,
   .eyebrow, .stats/.stat and .definition rules all come from style.css and
   are reused as-is. Desktop treatments are neutralised in the
   (max-width: 900px) block at the bottom, so mobile is unchanged.
   ========================================================================== */

/* One shared left/right offset for the home page: the shell-centred margin
   left too much dead space on wide screens, so everything hangs from this
   edge instead. */
:root {
    --home-edge: clamp(24px, 7vw, 140px);
}

.home .site-header__inner,
.hero__inner,
.definition .shell {
    max-width: none;
    padding-left: var(--home-edge);
    padding-right: var(--home-edge);
}

/* Grain pass, used on every media block */
.grain,
.hero__grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("../img/brand/texture-grain.png");
    background-size: 420px;
    opacity: 0.15;
    mix-blend-mode: overlay;
}

/* The hero keeps style.css's markup and animation; only the grain is new,
   and it sits under the copy. */
.hero__inner {
    z-index: 1;
}

/* --- Chapter strip -------------------------------------------------------- */
.chapters {
    background: var(--black);
    color: var(--white);
    border-top: 1px solid var(--line-dark);
}

.chapters__inner {
    max-width: none;
    margin: 0 auto;
    padding: 34px var(--home-edge) 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.chapters__group {
    display: flex;
    align-items: center;
    gap: 34px;
}

.chapters__tape {
    display: flex;
    gap: 4px;
}

.chapters__tape i {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--white);
}

.chapters__links {
    display: flex;
    align-items: center;
    gap: 30px;
    font-family: var(--font-grotesk);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.chapters__links a {
    color: var(--muted-2);
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.chapters__links a:hover,
.chapters__links a.is-current {
    color: var(--white);
    border-bottom-color: var(--white);
}

.chapters__cue {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-grotesk);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted-2);
}

/* --- Full-bleed slabs (Vision, Why Driven, Impact) ------------------------ */
.slab {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38%;
    min-height: 480px;
}

.slab--flip {
    grid-template-columns: 40% minmax(0, 1fr);
}

.slab--impact {
    grid-template-columns: minmax(0, 1fr) 34%;
    min-height: 500px;
}

.slab--dark {
    background: var(--black);
    color: var(--white);
}

/* The slabs are dark but do not carry .section--dark, so the eyebrow rule
   needs the same white-on-dark treatment here. */
.slab--dark .eyebrow-rule {
    background: var(--line-dark);
}

.slab--dark .eyebrow-rule::before {
    background: var(--white);
}

.slab--dark .eyebrow {
    color: var(--muted-dark);
}

/* Text pads to the centred shell edge, so every eyebrow rule on the page
   shares one left edge even though the slab itself is full-bleed. */
.slab__body {
    padding: 76px 64px 76px max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
}

.slab--flip .slab__body {
    padding: 64px max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter))) 64px 64px;
}

.slab--impact .slab__body {
    padding-bottom: 84px;
}

/* Vision and Impact text hangs from the shared home edge, not the shell */
#vision .slab__body,
.slab--impact .slab__body {
    padding-left: var(--home-edge);
}

.slab__title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
    max-width: 26ch;
    text-wrap: pretty;
}

.slab__lede {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--line-dark);
    font-size: 17px;
    line-height: 1.62;
    color: #d6d6d6;
}

.slab__media {
    position: relative;
    overflow: hidden;
    background: #050505;
    /* Angled inner edge where the photo meets the text */
    clip-path: polygon(84px 0, 100% 0, 100% 100%, 0 100%);
}

.slab--flip .slab__media {
    clip-path: polygon(0 0, 100% 0, calc(100% - 84px) 100%, 0 100%);
}

.slab__media > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.86) contrast(1.04);
    transform: scale(1.03);
    transition: transform 1.3s var(--ease);
}

.slab__media:hover > img {
    transform: scale(1.08);
}

/* Vision: no angle - the photo fades into the section's black instead */
.slab__media--fade {
    clip-path: none;
    background: var(--black);
}

.slab__media--fade > img {
    object-position: 66% 32%;
    filter: brightness(0.86) contrast(1.05);
    transform: none;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 20%, #000 50%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 20%, #000 50%);
}

.slab__media--fade:hover > img {
    transform: none;
}

.slab--impact .slab__media > img {
    object-position: 56% 30%;
}

/* --- Why Driven: cut-out player on the graphic field --------------------- */
.slab__media--field {
    background: var(--black);
}

.field__streaks {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(112deg,
        rgba(255, 255, 255, 0.055) 0px,
        rgba(255, 255, 255, 0.055) 1.5px,
        rgba(0, 0, 0, 0) 1.5px,
        rgba(0, 0, 0, 0) 34px);
    -webkit-mask-image: linear-gradient(270deg, rgba(0, 0, 0, 0) 8%, #000 55%);
    mask-image: linear-gradient(270deg, rgba(0, 0, 0, 0) 8%, #000 55%);
}

.field__ring {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
}

.field__ring--a {
    left: -14%;
    top: 6%;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.field__ring--b {
    left: 2%;
    top: -8%;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.field__glow {
    position: absolute;
    left: -10%;
    top: 2%;
    width: 640px;
    height: 640px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 62%);
}

/* Explicit box (not auto) so object-fit scales the whole figure and it clears
   the 84px angled edge. The selector must outrank the generic
   .slab__media > img rule, which would otherwise cover-crop the cut-out. */
.slab__media > img.field__player,
.slab__media--field:hover > img.field__player {
    position: absolute;
    inset: auto;
    left: 0;
    top: 24px;
    width: calc(100% - 104px);
    height: calc(100% - 24px);
    object-fit: contain;
    object-position: 50% 100%;
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.7)) brightness(0.88) contrast(1.04);
    transform: none;
}

/* --- Philosophy: flat alternating panels -------------------------------- */
.philosophy {
    background: var(--paper);
}

.philosophy__head {
    max-width: none;
    margin: 0 auto;
    padding: 54px var(--home-edge) 24px;
}

.philosophy__head .eyebrow {
    margin-bottom: 0;
}

/* Thin light seam between the Why Driven slab and the definition strip */
.definition {
    border-top: 1px solid rgba(255, 255, 255, 0.55);
}

.panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42%;
    min-height: 470px;
    background: var(--white);
    border-top: 1px solid var(--line);
}

.panel--flip {
    grid-template-columns: 42% minmax(0, 1fr);
    background: var(--paper);
}

.panel__body {
    padding: 60px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel__title {
    font-family: var(--font-grotesk);
    font-weight: 500;
    font-size: clamp(1.4rem, 2.1vw, 1.85rem);
    line-height: 1.2;
    margin-bottom: 28px;
}

.panel__text {
    margin-top: 24px;
    font-size: 17px;
    line-height: 1.6;
    color: #333333;
}

.panel__media {
    position: relative;
    overflow: hidden;
    background: var(--black);
    clip-path: polygon(84px 0, 100% 0, 100% 100%, 0 100%);
}

.panel--flip .panel__media {
    clip-path: polygon(0 0, 100% 0, calc(100% - 84px) 100%, 0 100%);
}

.panel__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 22%;
    transform: scale(1.03);
    transition: transform 1.3s var(--ease);
}

.panel--flip .panel__media img {
    object-position: 50% 30%;
}

.panel:last-child .panel__media img {
    object-position: 50% 24%;
}

.panel__media:hover img {
    transform: scale(1.08);
}

/* Core values, three tape strips each - same cells as the About page */
.values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    background: var(--line);
    border: 1px solid var(--line);
}

.value {
    background: var(--white);
    padding: 22px 18px;
    font-family: var(--font-grotesk);
    font-weight: 700;
    font-size: 15px;
}

.value__tape {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
}

.value__tape i {
    display: block;
    width: 34px;
    height: 3px;
    background: var(--black);
}

@media (prefers-reduced-motion: reduce) {
    .slab__media > img,
    .slab__media:hover > img,
    .panel__media img,
    .panel__media:hover img {
        transform: none;
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Mobile: as the current homepage. Slabs and panels stack, angled edges and
   the fade are dropped, images sit in the existing framed blocks, and the
   chapter strip is hidden.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .chapters {
        display: none;
    }

    .slab,
    .slab--flip,
    .slab--impact,
    .panel,
    .panel--flip {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .slab__body,
    .slab--flip .slab__body,
    .slab--impact .slab__body {
        order: 1;
        padding: var(--sp-section) var(--gutter);
    }

    /* .slab--flip .slab__media has to be named here too: it carries the
       angled clip-path at a higher specificity and would otherwise keep
       slicing the bottom right corner off the Why Driven image. */
    .slab__media,
    .slab--flip .slab__media {
        order: 2;
        clip-path: none;
        border-radius: 14px;
        border: 1px solid var(--line-dark);
        margin: 0 var(--gutter) var(--sp-section);
        min-height: 300px;
        max-height: 380px;
    }

    .slab--impact .slab__media {
        max-width: 340px;
        max-height: none;
        aspect-ratio: 1183 / 1372;
    }

    .slab__media--fade > img {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .slab__media--field {
        min-height: 340px;
    }

    .field__ring,
    .field__glow,
    .field__streaks {
        display: none;
    }

    .slab__media > img.field__player,
    .slab__media--field:hover > img.field__player {
        position: absolute;
        inset: 0;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: 50% 100%;
    }

    .panel__media,
    .panel--flip .panel__media {
        order: 1;
        clip-path: none;
        border-radius: 10px;
        margin: 0 var(--gutter);
        min-height: 260px;
    }

    .panel__body,
    .panel--flip .panel__body {
        order: 2;
        padding: var(--sp-block) var(--gutter);
    }

    .panel {
        padding-bottom: var(--sp-tight);
    }

    .values {
        grid-template-columns: minmax(0, 1fr);
    }

    .philosophy__head {
        padding-top: var(--sp-section);
    }
}
