/* ==========================================================================
   Home — scroll-driven redesign
   Shared tokens, header, footer and type styles live in site.css
   ========================================================================== */

/* ---------- Hero ---------- */
.hm-hero {
    --p: 0;
    position: relative;
    height: 320vh;
    color: #fff;
    background:
        radial-gradient(900px 700px at 72% 48%, rgba(65, 41, 168, .28), transparent 70%),
        radial-gradient(1400px 900px at 70% 40%, #0b1c5a 0%, var(--hm-navy) 62%);
}

.hm-hero__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
}

.hm-hero__sticky::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 70% 50%, #000 0%, transparent 70%);
    pointer-events: none;
}

.hm-hero__canvas {
    position: absolute;
    inset: 0;
}

.hm-hero__canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.hm-hero__inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.hm-hero__content {
    max-width: 48%;
    padding-top: 90px;
    pointer-events: auto;
}

/* The three stage titles share one grid cell; only the active one is visible */
.hm-hero__stages {
    display: grid;
}

.hm-hero__stage {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(24px);
    visibility: hidden;
    transition: opacity .6s var(--hm-ease), transform .7s var(--hm-ease), visibility 0s linear .7s;
}

.hm-hero__stage.is-active {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity .7s var(--hm-ease) .12s, transform .8s var(--hm-ease) .12s, visibility 0s;
}

.hm-hero__stage.is-leaving {
    transform: translateY(-24px);
}

.hm-hero__title {
    margin: 0;
    font-family: var(--hm-sans);
    font-size: clamp(44px, min(5vw, 9vh), 88px);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.05em;
    color: #fff;
}

.hm-hero__title span {
    display: block;
}

.hm-grad {
    padding-bottom: .08em;
    background: linear-gradient(90deg, #ff5b6e 0%, #a497ff 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hm-hero__text {
    max-width: 420px;
    margin: 32px 0 34px;
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .72);
}

.hm-hero__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 32px;
    display: flex;
    justify-content: center;
}

.hm-hero__tabs {
    display: flex;
    justify-content: center;
    gap: 28px;
}

.hm-hero__tab {
    position: relative;
    padding: 0 0 10px;
    border: 0;
    background: none;
    cursor: pointer;
    color: rgba(255, 255, 255, .45);
    transition: color .4s var(--hm-ease);
}

.hm-hero__tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, #ff5b6e, #a497ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--hm-ease);
}

.hm-hero__tab:hover,
.hm-hero__tab.is-active {
    color: #fff;
}

.hm-hero__tab.is-active::after {
    transform: scaleX(1);
}

/* ---------- About ---------- */
.hm-about {
    padding: 160px 0 150px;
    background: #fff;
}

.hm-statement {
    max-width: 1180px;
    margin: 70px 0 100px;
    font-family: var(--hm-sans);
    font-size: clamp(24px, 2.8vw, 42px);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: -.035em;
    color: var(--hm-ink);
}

.hm-about__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 80px;
    align-items: end;
    padding-top: 60px;
    border-top: 1px solid var(--hm-line);
}

.hm-about__grid--text {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.hm-about__grid--text .hm-about__text {
    grid-column: 2;
}

.hm-about__media {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
    background: var(--hm-soft);
}

.hm-about__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hm-about__text p {
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.75;
    color: var(--hm-muted);
}

/* ---------- Sectors ---------- */
.hm-sectors {
    padding: 150px 0 60px;
    color: #fff;
    background: var(--hm-navy);
}

.hm-sectors__body {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 90px;
}

.hm-sectors__visual {
    position: relative;
}

.hm-sectors__frame {
    position: sticky;
    top: 120px;
    height: calc(100vh - 180px);
    min-height: 460px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--hm-navy-2);
}

.hm-sectors__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity .9s var(--hm-ease), transform 1.6s var(--hm-ease);
}

.hm-sectors__img.is-active {
    opacity: 1;
    transform: scale(1);
}

.hm-sectors__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 11, 46, .55) 0%, rgba(0, 11, 46, 0) 30%, rgba(0, 11, 46, 0) 65%, rgba(0, 11, 46, .75) 100%);
    pointer-events: none;
}

.hm-sectors__grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}

.hm-sectors__hud {
    position: absolute;
    left: 28px;
    right: 28px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hm-sectors__hud--top {
    top: 26px;
}

.hm-sectors__hud--bottom {
    bottom: 28px;
}

.hm-sectors__hud b {
    font-weight: 500;
    color: #fff;
}

.hm-sectors__progress {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, .2);
}

.hm-sectors__progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #ff5b6e, #a497ff);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform .6s var(--hm-ease);
}

.hm-sector {
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 0;
    opacity: .28;
    transition: opacity .6s var(--hm-ease);
}

.hm-sector.is-active {
    opacity: 1;
}

.hm-sector__num {
    color: var(--hm-accent-light);
}

.hm-sector__name {
    margin: 18px 0 24px;
    font-family: var(--hm-sans);
    font-size: clamp(32px, 3.4vw, 52px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -.04em;
    color: #fff;
}

.hm-sector__img {
    display: none;
}

.hm-sector__text {
    margin: 0 0 30px;
    padding-bottom: 30px;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .68);
    border-bottom: 1px solid var(--hm-line-light);
}

.hm-sector .hm-link {
    align-self: flex-start;
}

/* ---------- Why Us ---------- */
.hm-why {
    padding: 150px 0 60px;
    background: var(--hm-soft);
}

.hm-why__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 80px;
    align-items: start;
}

.hm-why__aside {
    position: sticky;
    top: 140px;
}

.hm-why__count {
    display: flex;
    align-items: baseline; /* "/ 06" sits on the same baseline as the big number */
    gap: 12px;
    margin: 0;
    font-family: var(--hm-sans);
    font-size: clamp(80px, 9vw, 140px);
    font-weight: 400;
    line-height: .85;
    letter-spacing: -.06em;
    color: var(--hm-accent);
}

.hm-why__count small {
    font-family: var(--hm-mono);
    font-size: 13px;
    letter-spacing: .1em;
    color: var(--hm-muted);
}

.hm-why__active {
    max-width: 420px;
    font-family: var(--hm-sans);
    margin: 40px 0 0;
    font-size: clamp(24px, 2.4vw, 36px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.035em;
    color: var(--hm-ink);
}

.hm-acc {
    border-top: 1px solid var(--hm-line);
}

.hm-acc__item {
    border-bottom: 1px solid var(--hm-line);
}

.hm-acc__btn {
    font-family: var(--hm-sans);
    display: grid;
    grid-template-columns: 48px 1fr 24px;
    align-items: center;
    width: 100%;
    padding: 30px 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--hm-ink);
}

.hm-acc__num {
    font-family: var(--hm-mono);
    font-size: 12px;
    color: var(--hm-accent);
}

.hm-acc__title {
    font-size: clamp(19px, 1.8vw, 26px);
    font-weight: 500;
    letter-spacing: -.025em;
    transition: color .3s;
}

.hm-acc__btn:hover .hm-acc__title {
    color: var(--hm-accent);
}

.hm-acc__icon {
    position: relative;
    width: 14px;
    height: 14px;
    justify-self: end;
    color: var(--hm-accent);
}

.hm-acc__icon::before,
.hm-acc__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    margin-top: -.75px;
    background: currentColor;
    transition: transform .4s var(--hm-ease);
}

.hm-acc__icon::after {
    transform: rotate(90deg);
}

.hm-acc__item.is-open .hm-acc__icon::after {
    transform: rotate(0deg);
}

.hm-acc__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .5s var(--hm-ease);
}

.hm-acc__item.is-open .hm-acc__panel {
    grid-template-rows: 1fr;
}

.hm-acc__panel > div {
    overflow: hidden;
}

.hm-acc__panel p {
    max-width: 560px;
    margin: 0;
    padding: 0 0 32px 48px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--hm-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .hm-hero {
        height: 240vh;
    }

    .hm-hero__inner {
        align-items: flex-start;
    }

    .hm-hero__content {
        max-width: 100%;
        padding-top: 130px;
    }

    .hm-hero__text {
        margin: 22px 0 24px;
        font-size: 15px;
    }

    .hm-hero__bar {
        display: none;
    }

    .hm-hero__tabs {
        display: none;
    }

    .hm-about,
    .hm-sectors,
    .hm-why {
        padding-top: 100px;
    }

    .hm-about {
        padding-bottom: 90px;
    }

    .hm-statement {
        margin: 28px 0 60px;
    }

    .hm-about__grid,
    .hm-why__grid,
    .hm-sectors__body {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hm-sectors__visual {
        display: none;
    }

    .hm-about__grid--text .hm-about__text {
        grid-column: auto;
    }

    .hm-sector {
        min-height: 0;
        padding: 40px 0;
        opacity: 1;
        border-top: 1px solid var(--hm-line-light);
    }

    .hm-sector__img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        object-fit: cover;
        margin-bottom: 24px;
        border-radius: 14px;
    }

    .hm-why__aside {
        position: static;
    }

    .hm-why__active {
        display: none;
    }
}

@media (max-width: 575px) {
    .hm-hero__title {
        font-size: 44px;
    }

    .hm-acc__btn {
        grid-template-columns: 36px 1fr 20px;
        padding: 24px 0;
    }

    .hm-acc__panel p {
        padding-left: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-sectors__img,
    .hm-sector,
    .hm-acc__panel {
        transition: none;
    }
}
