/* ==========================================================================
   Home — scroll-driven redesign
   ========================================================================== */

:root {
    --hm-navy: #000b2e;
    --hm-navy-2: #071647;
    --hm-ink: #000b2e;
    --hm-muted: #5d666f;
    --hm-soft: #f3f5f9;
    --hm-line: rgba(0, 11, 46, 0.12);
    --hm-line-light: rgba(255, 255, 255, 0.14);
    --hm-accent: #4129a8;
    --hm-accent-light: #a497ff;
    --hm-red: #e40c1c;
    --hm-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    --hm-sans: "Inter", sans-serif;
    --hm-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Shared ---------- */
.hm-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-family: var(--hm-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--hm-ink);
}

.hm-label--light {
    color: rgba(255, 255, 255, .72);
}

.hm-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hm-red);
    box-shadow: 0 0 0 4px rgba(228, 12, 28, .18);
}

.hm-title {
    margin: 0;
    font-family: var(--hm-sans);
    font-size: clamp(40px, 5.4vw, 84px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.045em;
    color: var(--hm-ink);
}

.hm-title--light {
    color: #fff;
}

.hm-head {
    display: grid;
    grid-template-columns: 1fr minmax(0, 380px);
    align-items: end;
    gap: 40px;
    margin-bottom: 80px;
}

.hm-head__aside {
    margin: 0;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .68);
}

/* Sectors: same columns as the body below, so the intro lines up with the sector texts */
@media (min-width: 992px) {
    .hm-sectors .hm-head {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: 90px;
    }
}

.hm-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--hm-ink);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: gap .3s var(--hm-ease), color .3s;
}

.hm-link::after {
    content: "→";
    transition: transform .3s var(--hm-ease);
}

.hm-link:hover {
    gap: 16px;
    color: var(--hm-accent);
}

.hm-link--light {
    color: #fff;
}

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

/* ---------- Header: iOS-style frosted glass after scrolling ----------
   The blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block of the fixed mobile drawer and clip it. */
.header-1.header-sticky.scrolled-past-header {
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, .08);
}

.header-1.header-sticky.scrolled-past-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(0, 11, 46, .38);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    pointer-events: none;
    transition: background-color .4s var(--hm-ease);
}

/* Over light sections the glass turns light and the header content dark (set by home.js) */
.header-1.header-sticky.scrolled-past-header.hm-header-light {
    border-bottom-color: rgba(0, 11, 46, .08);
}

.header-1.header-sticky.scrolled-past-header.hm-header-light::before {
    background: rgba(255, 255, 255, .62);
}

@media (min-width: 992px) {
    .header-1.header-sticky.scrolled-past-header.hm-header-light {
        --color-foreground: #000b2e;
        --color-primary-hover: rgba(0, 11, 46, .6);
        --color-border: rgba(0, 11, 46, .12);
    }
}

.header-1 .header-grid > .menu-link,
.header-1 .header-menu > .nav-item > .menu-link {
    transition: color .4s var(--hm-ease);
}

.header-1.header-sticky.scrolled-past-header .header-grid {
    background: transparent;
}

/* ---------- 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: 28px 0 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: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.hm-hero__scroll {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hm-mouse {
    position: relative;
    width: 22px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 12px;
}

.hm-mouse::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 2px;
    height: 7px;
    margin-left: -1px;
    border-radius: 2px;
    background: #fff;
    animation: hm-wheel 1.8s var(--hm-ease) infinite;
}

@keyframes hm-wheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

.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);
}

.hm-hero__pause {
    justify-self: end;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.hm-hero__pause-icon {
    width: 8px;
    height: 10px;
    border-left: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.hm-hero__pause[aria-pressed="true"] .hm-hero__pause-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 9px;
    border-color: transparent transparent transparent currentColor;
}

/* ---------- 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);
}

/* ---------- Footer: contact ---------- */
.hm-footer {
    position: relative;
    overflow: hidden;
    padding: 150px 0 36px;
    color: #fff;
    background:
        radial-gradient(900px 600px at 85% 20%, rgba(65, 41, 168, .25), transparent 70%),
        var(--hm-navy);
}

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

.hm-contact__text {
    max-width: 460px;
    margin: 32px 0 0;
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .68);
}

.hm-form {
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding-top: 12px;
}

.hm-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.hm-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.hm-field__label {
    font-family: var(--hm-sans);
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .75);
    transition: color .3s var(--hm-ease);
}

.hm-form input,
.hm-form textarea,
.hm-form input:hover,
.hm-form textarea:hover,
.hm-form input:focus,
.hm-form textarea:focus {
    width: 100%;
    padding: 8px 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .22);
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-family: var(--hm-sans);
    font-size: 17px;
    transition: border-color .3s var(--hm-ease);
}

.hm-form textarea {
    min-height: 96px;
    resize: none;
}

.hm-form input:focus,
.hm-form textarea:focus {
    border-bottom-color: var(--hm-accent-light);
}

.hm-field:focus-within .hm-field__label {
    color: var(--hm-accent-light);
}

.hm-form__submit {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 30px;
    border: 0;
    border-radius: 40px;
    background: #fff;
    color: var(--hm-navy);
    font-family: var(--hm-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: gap .3s var(--hm-ease), background .3s, color .3s;
}

.hm-form__submit::after {
    content: "→";
}

.hm-form__submit:hover {
    gap: 18px;
    background: linear-gradient(90deg, #ff5b6e, #a497ff);
    color: #fff;
}

.hm-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 130px;
    padding-top: 28px;
    border-top: 1px solid var(--hm-line-light);
}

.hm-footer__logo img {
    display: block;
    width: 120px;
    height: auto;
}

.hm-footer__copy {
    margin: 0;
    font-family: var(--hm-sans);
    font-size: 14px;
    color: rgba(255, 255, 255, .55);
}

/* ---------- 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 {
        grid-template-columns: 1fr auto;
        bottom: 22px;
    }

    .hm-hero__tabs {
        display: none;
    }

    .hm-head {
        grid-template-columns: 1fr;
        margin-bottom: 50px;
    }

    .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-footer {
        padding-top: 100px;
    }

    .hm-contact {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hm-footer__bottom {
        margin-top: 90px;
    }

    .hm-why__active {
        display: none;
    }
}

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

    .hm-hero__scroll .hm-label {
        display: none;
    }

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

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

    .hm-form__row {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hm-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-mouse::after {
        animation: none;
    }

    .hm-sectors__img,
    .hm-sector,
    .hm-acc__panel {
        transition: none;
    }
}
