/* company-history.html: page-specific styles. Everything is scoped under #ch.
   Palette = the site's: navy #2b5088 / #1a3560, gold #e4b04e, sky #a9c0ec,
   cloud #f1f1f1, line #e0e4ea. */
#ch {
    --c-navy: #2b5088;
    --c-deep: #1a3560;
    --c-gold: #e4b04e;
    --c-sky: #a9c0ec;
    --c-cloud: #f1f1f1;
    --c-line: #e0e4ea;
    --c-text: #2a2f38;
    --c-mut: #5b6470;
    color: #000;
    font-family: var(--fb);
    overflow-x: clip;
    background: #fff
}

#ch *,
#ch *::before,
#ch *::after {
    box-sizing: border-box
}

#ch img {
    display: block;
    max-width: 100%
}

.ch-wrap {
    width: min(1280px, 100% - 2 * var(--pad));
    margin-inline: auto
}

/* masked lines / words used by the GSAP reveals */
#ch .ln {
    display: block;
    overflow: hidden;
    padding-bottom: .08em;
    margin-bottom: -.08em
}

#ch .ln>span {
    display: block
}

#ch .cw {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: .08em;
    margin-bottom: -.08em
}

#ch .ci {
    display: inline-block
}

/* ---------- 1. intro ---------- */
#ch-intro {
    padding: clamp(64px, 9vw, 140px) 0 clamp(56px, 7vw, 110px);
    background:
        radial-gradient(circle at 100% 0, rgba(169, 192, 236, .35), transparent 40%),
        radial-gradient(rgba(43, 80, 136, .08) 1px, transparent 1.5px) 0 0/26px 26px,
        #fff
}

.ch-intro-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: clamp(28px, 6vw, 96px);
    align-items: end
}

#ch .ch-tag {
    margin: 0;
    font-family: var(--fd);
    font-weight: 500;
    font-size: clamp(2rem, 4.4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -.03em;
    color: #000
}

#ch .ch-tag .ln:nth-child(2) {
    color: var(--c-navy)
}

#ch .ch-tag .ln:nth-child(3) {
    color: var(--c-sky)
}

#ch .ch-lead {
    margin: 0;
    padding-left: 1.4rem;
    border-left: 3px solid var(--c-gold);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    color: var(--c-text)
}

/* ---------- 2. timeline ---------- */
#ch-time {
    position: relative;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0, rgba(169, 192, 236, .22), transparent 40%),
        radial-gradient(circle at 0 100%, rgba(228, 176, 78, .12), transparent 38%),
        radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.5px) 0 0/26px 26px,
        linear-gradient(160deg, #2b5088, #1a3560 60%, #142a4d)
}

/* --- default (stacked) layout: mobile, short screens, no JS --- */
.ch-stage {
    padding: clamp(56px, 8vw, 110px) 0
}

.ch-panels {
    display: grid;
    gap: clamp(48px, 7vw, 90px)
}

.ch-panel {
    scroll-margin-top: 100px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: center
}

.ch-media {
    position: relative;
    overflow: hidden;
    border-radius: clamp(20px, 2.4vw, 32px);
    aspect-ratio: 1/1;
    background: #14284a;
    box-shadow: 0 40px 70px -35px rgba(0, 0, 0, .65)
}

.ch-media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
    background: linear-gradient(0deg, rgba(20, 42, 77, .45), transparent 45%);
    pointer-events: none
}

.ch-media img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.ch-yr {
    position: relative;
    display: block;
    padding-left: 50px;
    font-family: var(--fd);
    font-weight: 600;
    font-size: clamp(.95rem, 1.15vw, 1.1rem);
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--c-gold);
    white-space: nowrap
}

/* short gold rule before the year, like the site's eyebrow labels */
.ch-yr::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 38px;
    height: 2px;
    background: currentColor
}

#ch .ch-panel h2 {
    margin: .8rem 0 0;
    font-family: var(--fd);
    font-weight: 500;
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -.02em;
    color: #fff
}

.ch-pts {
    list-style: none;
    counter-reset: p;
    margin: clamp(16px, 2vw, 26px) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(16px, 2vw, 32px)
}

.ch-pts li {
    counter-increment: p;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 8px;
    padding: .8rem 0;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: .94rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .84)
}

.ch-pts li::before {
    content: counter(p, decimal-leading-zero);
    font-family: var(--fd);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 2;
    color: var(--c-gold)
}

/* era progress bar: only used by the pinned stage */
.ch-prog {
    display: none
}

/* --- pinned stage (desktop, set by company-history.js) --- */
.ch-stage.is-pinned {
    height: 100vh;
    padding: 0
}

.is-pinned .ch-stage-in {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: clamp(96px, 13vh, 130px) 0 clamp(20px, 4vh, 40px)
}

.is-pinned .ch-panels {
    position: relative;
    flex: 1;
    min-height: 0;
    display: block
}

.is-pinned .ch-panel {
    position: absolute;
    inset: 0;
    visibility: hidden;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr);
    align-items: center
}

.is-pinned .ch-panel:first-child {
    visibility: visible
}

.is-pinned .ch-media {
    aspect-ratio: auto;
    height: 100%;
    max-height: 640px
}

.is-pinned .ch-prog {
    display: block;
    position: relative;
    margin-top: clamp(18px, 3.5vh, 36px)
}

.ch-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 7px;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .16);
    overflow: hidden
}

.ch-track i {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--c-gold), #fff);
    transform: scaleX(0);
    transform-origin: left
}

.ch-prog ol {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between
}

.ch-prog a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, .5);
    font-size: .82rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color .35s
}

.ch-prog li:first-child a {
    align-items: flex-start
}

.ch-prog li:last-child a {
    align-items: flex-end
}

.ch-prog .d {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1a3560;
    border: 2px solid rgba(255, 255, 255, .35);
    transition: background .35s, border-color .35s, transform .45s var(--ease), box-shadow .45s
}

.ch-prog a:hover {
    color: #fff
}

.ch-prog a.on {
    color: #fff
}

.ch-prog a.on .d {
    background: var(--c-gold);
    border-color: var(--c-gold);
    transform: scale(1.25);
    box-shadow: 0 0 0 6px rgba(228, 176, 78, .2)
}

.ch-prog a.past .d {
    border-color: var(--c-gold)
}

/* tighter type on shorter desktop screens so 8 points still fit */
@media (max-height: 860px) {
    .is-pinned .ch-pts li {
        padding: .55rem 0;
        font-size: .88rem;
        line-height: 1.45
    }

    #ch .is-pinned .ch-panel h2 {
        font-size: clamp(1.4rem, 2.2vw, 2rem)
    }
}

/* ---------- 3. journey continues ---------- */
#ch-next {
    padding: clamp(64px, 8vw, 120px) 0 clamp(64px, 9vw, 130px);
    background: #fff
}

.ch-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(40px, 7vw, 110px) clamp(24px, 6vw, 96px);
    border-radius: clamp(24px, 3vw, 40px);
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 0 100%, rgba(169, 192, 236, .28), transparent 45%),
        radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.5px) 0 0/26px 26px,
        linear-gradient(150deg, #2b5088, #1a3560);
    box-shadow: 0 40px 80px -40px rgba(26, 53, 96, .6)
}

/* static corner rings, same motif as the page banner */
.ch-rings {
    position: absolute;
    z-index: -1;
    width: min(460px, 55%);
    height: auto;
    fill: none;
    stroke: rgba(255, 255, 255, .16);
    stroke-width: 1
}

.ch-rings.r1 {
    top: 0;
    right: 0
}

.ch-rings.r2 {
    bottom: 0;
    left: 0
}

#ch .ch-card h3 {
    margin: 0;
    font-family: var(--fd);
    font-weight: 500;
    font-size: clamp(2.1rem, 4.6vw, 4rem);
    line-height: 1.08;
    letter-spacing: -.03em
}

#ch .ch-card p {
    max-width: 760px;
    margin: 1.4rem auto 0;
    font-size: clamp(1.02rem, 1.4vw, 1.25rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, .85)
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .ch-pts {
        grid-template-columns: 1fr
    }
}

@media (max-width: 900px) {
    .ch-intro-grid {
        grid-template-columns: 1fr;
        align-items: start
    }

    .ch-panel {
        grid-template-columns: 1fr
    }

    .ch-media {
        aspect-ratio: 933/355
    }

    .ch-pts {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media (max-width: 620px) {
    .ch-media {
        aspect-ratio: 16/10
    }

    .ch-pts {
        grid-template-columns: 1fr
    }

    .ch-pts li {
        grid-template-columns: 28px 1fr;
        font-size: .95rem
    }
}


