:root {
    --company-nav-offset: 86px;
    --company-light-ivory: #fbfaf8;
    --company-light-beige: #f1eee8;
    --company-light-beige-2: #ebe7df;
    --company-dark-1: #121212;
    --company-dark-2: #1a1917;
    --company-dark-3: #22201d;
}

.company-page,
.company-main {
    background: var(--company-light-ivory);
}

.company-hero {
    position: relative;
    margin-top: var(--company-nav-offset);
    min-height: calc(100dvh - var(--company-nav-offset));
    overflow: hidden;
}

.company-hero-media {
    position: absolute;
    inset: 0;
}

.company-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.company-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.2) 0%, rgba(10, 10, 10, 0.42) 100%);
}

.company-hero-content {
    position: relative;
    z-index: 1;
    min-height: calc(100dvh - var(--company-nav-offset));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(24px, 4vw, 52px);
}

.company-word-band-text {
    margin: 0;
    max-width: 36ch;
    color: #f2efeb;
    font-size: clamp(1.3rem, 2.5vw, 2.15rem);
    line-height: 1.12;
    font-weight: 650;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.36);
    transform: translateY(clamp(-170px, -20vh, -100px));
}

.company-word-band-text .company-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.52s ease, transform 0.52s ease;
    transition-delay: var(--word-delay, 0ms);
}

.company-word-band-text.is-visible .company-word {
    opacity: 1;
    transform: translateY(0);
}

.company-story {
    background: var(--company-light-beige);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: clamp(56px, 8vw, 108px) clamp(20px, 4vw, 46px) clamp(64px, 9vw, 116px);
}

.company-story-shell {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(24px, 3.2vw, 48px);
    align-items: center;
}

.company-story-copy {
    position: relative;
    padding: clamp(30px, 3.8vw, 56px);
    border-radius: 20px;
    background: transparent;
}

.company-story-copy p {
    margin: 0;
    color: #5f5b57;
    font-size: clamp(1.35rem, 2.25vw, 2.2rem);
    font-weight: 650;
    line-height: 1.32;
    letter-spacing: 0.01em;
}

.company-story-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    pointer-events: none;
}

.company-story-corner-tl {
    top: 2px;
    left: 2px;
    border-top: 2px solid rgba(95, 91, 87, 0.64);
    border-left: 2px solid rgba(95, 91, 87, 0.64);
    border-top-left-radius: 16px;
}

.company-story-corner-tr {
    top: 2px;
    right: 2px;
    border-top: 2px solid rgba(95, 91, 87, 0.64);
    border-right: 2px solid rgba(95, 91, 87, 0.64);
    border-top-right-radius: 16px;
}

.company-story-corner-bl {
    bottom: 2px;
    left: 2px;
    border-bottom: 2px solid rgba(95, 91, 87, 0.64);
    border-left: 2px solid rgba(95, 91, 87, 0.64);
    border-bottom-left-radius: 16px;
}

.company-story-corner-br {
    bottom: 2px;
    right: 2px;
    border-bottom: 2px solid rgba(95, 91, 87, 0.64);
    border-right: 2px solid rgba(95, 91, 87, 0.64);
    border-bottom-right-radius: 16px;
}

.company-story-media {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
}

.company-story-media img {
    width: 100%;
    height: clamp(320px, 34vw, 520px);
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.32s ease;
}

.company-story:hover .company-story-media img,
.company-story:focus-within .company-story-media img {
    transform: scale(1.03);
}

.company-reveal {
    opacity: 0;
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.company-story-copy.company-reveal {
    transform: translateY(18px);
}

.company-story-media.company-reveal {
    transform: translateY(0);
    transition-duration: 0.95s;
}

.company-reveal.is-visible {
    opacity: 1;
    transform: none;
}

[data-theme="dark"] .company-page,
[data-theme="dark"] .company-main {
    background: linear-gradient(140deg, #050505 0%, #1a1816 48%, #3f3b36 100%);
}

[data-theme="dark"] .company-story {
    background: linear-gradient(135deg, #040404 0%, #1f1d1a 54%, #44403a 100%);
}

[data-theme="dark"] .company-story-copy {
    background: transparent;
    box-shadow: none;
}

[data-theme="dark"] .company-story-copy p {
    color: #d7d1c8;
}

[data-theme="dark"] .company-story-corner-tl,
[data-theme="dark"] .company-story-corner-tr,
[data-theme="dark"] .company-story-corner-bl,
[data-theme="dark"] .company-story-corner-br {
    border-color: rgba(215, 209, 200, 0.62);
}

.company-split {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background: var(--company-light-ivory);
    padding: clamp(44px, 7vw, 90px) clamp(20px, 4vw, 52px);
}

.company-split-shell {
    width: min(1240px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(260px, 25vw) minmax(0, 1.12fr);
    gap: clamp(16px, 2vw, 26px);
    align-items: center;
}

.company-split-text p {
    margin: 0;
    color: #5f5b57;
    font-size: clamp(1.08rem, 1.8vw, 1.85rem);
    line-height: 1.32;
    font-weight: 650;
}

.company-split-text-left {
    text-align: right;
    justify-self: end;
    max-width: 30ch;
}

.company-split-text-right {
    text-align: left;
    justify-self: start;
    max-width: 30ch;
}

.company-split-media {
    margin: 0;
    width: min(100%, 360px);
    justify-self: center;
}

.company-split-media img {
    width: 100%;
    aspect-ratio: 2.9 / 4;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.32s ease, box-shadow 0.32s ease;
}

.company-split:hover .company-split-media img,
.company-split:focus-within .company-split-media img {
    transform: scale(1.025);
}

.company-union-reveal,
.company-rise-reveal {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
    will-change: opacity, transform, filter;
}

.company-split-text-left.company-union-reveal {
    transform: none;
    filter: none;
}

.company-split-text-right.company-union-reveal {
    transform: none;
    filter: none;
}

.company-split-media.company-rise-reveal {
    transform: translateY(32px);
}

.company-union-reveal.is-visible,
.company-rise-reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0);
    filter: blur(0);
}

.company-split-words .company-split-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.52s ease, transform 0.52s ease;
    transition-delay: var(--split-delay, 0ms);
}

.company-split-text.is-visible .company-split-word {
    opacity: 1;
    transform: translateY(0);
}

[data-theme="dark"] .company-split {
    background: linear-gradient(135deg, #060606 0%, #1d1b18 50%, #433f39 100%);
}

[data-theme="dark"] .company-split-text p {
    color: #d7d1c8;
}

.company-foundation-stack {
    position: relative;
    min-height: 200dvh;
}

.company-foundation {
    --foundation-bg: url("bs-service-group-company.png");
}

.company-foundation-panel {
    position: sticky;
    top: 0;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-image: var(--foundation-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 0;
    z-index: 1;
}

.company-foundation-panel-top {
    z-index: 2;
}

.company-foundation-band {
    width: 100%;
    background: linear-gradient(180deg, #f2efea 0%, #ebe7df 100%);
    border-radius: 0;
    padding: calc(var(--company-nav-offset) + clamp(12px, 1.4vw, 18px)) clamp(14px, 3vw, 34px) clamp(2px, 0.4vw, 8px);
    display: grid;
    align-content: start;
    gap: clamp(2px, 0.55vw, 8px);
    justify-items: center;
    text-align: center;
    position: relative;
}

.company-foundation-year,
.company-foundation-title {
    margin: 0;
    font-weight: 800;
    line-height: 1.06;
    background-image: var(--foundation-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.company-foundation-year {
    font-size: clamp(2rem, 7.2vw, 7.2rem);
    letter-spacing: 0.02em;
}

.company-foundation-title {
    font-size: clamp(2rem, 8vw, 9rem);
    letter-spacing: 0.01em;
    text-transform: none;
    line-height: 1.14;
    display: inline-block;
    padding-bottom: 0.08em;
}

[data-theme="dark"] .company-foundation-band {
    background: #050505;
}

html[data-contrast="high"] .company-foundation-band {
    background: #050505 !important;
}

html[data-contrast="high"] .company-foundation-year,
html[data-contrast="high"] .company-foundation-title {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
}

.company-lab {
    background: var(--company-light-beige-2);
    min-height: calc(100dvh - var(--company-nav-offset));
    display: flex;
    align-items: center;
    padding: clamp(40px, 5vw, 72px) clamp(20px, 4vw, 46px);
}

.company-lab-shell {
    width: min(1320px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.72fr);
    gap: clamp(20px, 2.4vw, 32px);
    align-items: center;
}

.company-lab-copy {
    position: relative;
    padding: clamp(30px, 3.8vw, 52px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(4px);
}

.company-lab-copy.company-reveal {
    transform: translateY(40px);
    transition-duration: 0.9s;
}

.company-lab-title {
    margin: 0 0 22px;
    max-width: 15ch;
    color: #1f1c19;
    font-size: clamp(1.55rem, 3vw, 3.9rem);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: 0.01em;
    display: inline-block;
    padding-bottom: 0.08em;
}

.company-lab-copy .company-lab-title,
.company-lab-copy .company-lab-text p {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.62s ease, transform 0.62s ease;
}

.company-lab-copy .company-lab-text p:nth-child(1) {
    transition-delay: 0.14s;
}

.company-lab-copy .company-lab-text p:nth-child(2) {
    transition-delay: 0.24s;
}

.company-lab-copy .company-lab-text p:nth-child(3) {
    transition-delay: 0.34s;
}

.company-lab-copy.is-visible .company-lab-title,
.company-lab-copy.is-visible .company-lab-text p {
    opacity: 1;
    transform: translateY(0);
}

.company-lab-text {
    display: grid;
    gap: 16px;
}

.company-lab-text p {
    margin: 0;
    color: #4d4842;
    font-size: clamp(1.08rem, 1.6vw, 1.34rem);
    line-height: 1.8;
}

.company-lab-media {
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    width: min(100%, 520px);
    justify-self: center;
    align-self: center;
    padding: clamp(12px, 1.8vw, 18px);
    min-height: auto;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 24px 48px rgba(31, 28, 25, 0.14);
}

.company-lab-media.company-reveal {
    transform: translateY(54px) scale(0.965);
    transition: opacity 0.95s ease, transform 0.95s ease, box-shadow 0.95s ease;
}

.company-lab-media.company-reveal.is-visible {
    transform: translateY(0) scale(1);
    box-shadow: 0 28px 56px rgba(31, 28, 25, 0.18);
}

.company-lab-media img {
    width: 100%;
    height: clamp(320px, 42vw, 620px);
    object-fit: contain;
    display: block;
    transition: transform 0.68s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.32s ease;
}

.company-lab:hover .company-lab-media img,
.company-lab:focus-within .company-lab-media img {
    transform: scale(1.03);
}

[data-theme="dark"] .company-lab {
    background: linear-gradient(140deg, #050505 0%, #171513 52%, #3f3a34 100%);
}

[data-theme="dark"] .company-lab-copy {
    background: rgba(10, 10, 10, 0);
}

[data-theme="dark"] .company-lab-title {
    color: #f3ede4;
}

[data-theme="dark"] .company-lab-text p {
    color: #ddd6cc;
}

[data-theme="dark"] .company-lab-media {
    background: rgba(255, 255, 255, 0.04);
}

html[data-contrast="high"] .company-lab,
html[data-contrast="high"] .company-lab-copy,
html[data-contrast="high"] .company-lab-media {
    background: #000000 !important;
    box-shadow: none !important;
}

html[data-contrast="high"] .company-lab-title,
html[data-contrast="high"] .company-lab-text p {
    color: #ffffff !important;
}

@media (max-width: 960px) {
    html,
    body,
    .company-page,
    .company-main {
        overflow-x: clip;
    }

    .company-word-band-text {
        max-width: 18ch;
        transform: none;
    }

    .company-story-shell {
        grid-template-columns: 1fr;
    }

    .company-story-media img {
        height: clamp(260px, 56vw, 420px);
    }

    .company-split {
        min-height: auto;
        padding: clamp(42px, 8vw, 68px) clamp(16px, 4vw, 24px);
    }

    .company-split-shell {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .company-split-text-left,
    .company-split-text-right {
        text-align: left;
        justify-self: stretch;
        max-width: none;
    }

    .company-split-media {
        order: -1;
        width: min(100%, 360px);
    }

    .company-foundation-band {
        padding: calc(var(--company-nav-offset) + clamp(10px, 2.8vw, 14px)) clamp(10px, 3.6vw, 16px) clamp(2px, 0.9vw, 6px);
    }

    .company-foundation-stack {
        min-height: 200svh;
    }

    .company-story,
    .company-split,
    .company-lab {
        min-height: auto;
    }

    .company-lab {
        min-height: auto;
        padding: clamp(42px, 8vw, 68px) clamp(16px, 4vw, 24px);
    }

    .company-lab-shell {
        grid-template-columns: 1fr;
    }

    .company-lab-title {
        max-width: none;
        font-size: clamp(1.9rem, 8vw, 3.7rem);
    }

    .company-lab-media {
        order: -1;
        width: min(100%, 440px);
    }

    .company-lab-media img {
        height: clamp(240px, 68vw, 400px);
    }
}
/* High contrast overrides */
html[data-contrast="high"] body,
html[data-contrast="high"] section,
html[data-contrast="high"] main,
html[data-contrast="high"] header,
html[data-contrast="high"] footer {
    background: #000000 !important;
    color: #ffffff !important;
}

html[data-contrast="high"] a,
html[data-contrast="high"] p,
html[data-contrast="high"] h1,
html[data-contrast="high"] h2,
html[data-contrast="high"] h3,
html[data-contrast="high"] h4,
html[data-contrast="high"] h5,
html[data-contrast="high"] h6,
html[data-contrast="high"] li,
html[data-contrast="high"] span,
html[data-contrast="high"] strong {
    color: #ffffff !important;
}

html[data-contrast="high"] .card,
html[data-contrast="high"] .panel,
html[data-contrast="high"] .box,
html[data-contrast="high"] .table,
html[data-contrast="high"] .table-wrap,
html[data-contrast="high"] .grid,
html[data-contrast="high"] .content {
    background: #0d0d0d !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}
