/* Deliberate mobile composition for the home header and hero. */

.mobile-menu-toggle,
.mobile-nav-backdrop {
    display: none;
}

@media (max-width: 1040px) {
    .home-site-header {
        z-index: 60 !important;
        align-items: center !important;
    }

    .mobile-menu-toggle {
        position: relative;
        z-index: 3;
        display: inline-flex;
        grid-column: 1;
        grid-row: 1;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        justify-self: start;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 50%;
        background: rgba(5, 5, 5, 0.72);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        transition: border-color 220ms ease, background-color 220ms ease;
    }

    .mobile-menu-toggle span {
        position: absolute;
        width: 16px;
        height: 1.5px;
        border-radius: 999px;
        background: #f4f4f5;
        transition: transform 240ms ease, top 240ms ease;
    }

    .mobile-menu-toggle span:first-child {
        top: 17px;
    }

    .mobile-menu-toggle span:last-child {
        top: 24px;
    }

    .home-site-header.is-menu-open .mobile-menu-toggle {
        border-color: rgba(219, 89, 6, 0.62);
        background: rgba(20, 20, 20, 0.94);
    }

    .home-site-header.is-menu-open .mobile-menu-toggle span:first-child {
        top: 21px;
        transform: rotate(45deg);
    }

    .home-site-header.is-menu-open .mobile-menu-toggle span:last-child {
        top: 21px;
        transform: rotate(-45deg);
    }

    .home-site-header nav {
        position: fixed;
        z-index: 2;
        top: 86px;
        left: 18px;
        right: 18px;
        display: flex !important;
        width: auto !important;
        padding: 14px;
        gap: 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        background: rgba(7, 7, 7, 0.94);
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
    }

    .home-site-header.is-menu-open nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .home-site-header nav a {
        width: 100% !important;
        min-height: 48px !important;
        padding: 0 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.62);
        font-size: 11px !important;
    }

    .home-site-header nav a:last-child {
        border-bottom: 0;
    }

    .home-site-header nav a:hover,
    .home-site-header nav a:focus-visible,
    .home-site-header nav a[aria-current="page"] {
        color: #fff;
    }

    .mobile-nav-backdrop {
        position: fixed;
        z-index: 1;
        inset: 0;
        display: block;
        background: rgba(0, 0, 0, 0.38);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 220ms ease, visibility 220ms ease;
    }

    .home-site-header.is-menu-open .mobile-nav-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (max-width: 767px) {
    .home-site-header {
        padding: max(20px, env(safe-area-inset-top)) 18px 12px !important;
    }

    .home-site-header .site-logo {
        width: 46px !important;
    }

    .home-site-header > .header-el.pointer-events-auto:last-child a {
        min-height: 44px;
        gap: 7px;
        font-size: 9px !important;
        letter-spacing: 0.2em !important;
    }

    .home-site-header nav {
        top: max(82px, calc(env(safe-area-inset-top) + 62px));
    }

    .hero-scroll {
        height: 280vh !important;
    }

    .hero-sticky {
        height: 100vh;
        height: 100svh;
        min-height: 680px;
        justify-content: flex-start !important;
    }

    .hero-content {
        position: absolute !important;
        top: clamp(116px, 15svh, 148px);
        left: 50%;
        width: min(calc(100% - 32px), 390px) !important;
        padding-inline: 0 !important;
        transform: translateX(-50%) !important;
    }

    .hero-title-group {
        width: 100%;
        padding-inline: 8px;
    }

    .hero-title-top {
        font-size: clamp(62px, 19vw, 82px) !important;
        letter-spacing: 0.035em !important;
    }

    .hero-title-bottom {
        font-size: clamp(58px, 18vw, 78px) !important;
        letter-spacing: 0.035em !important;
    }

    .hero-content .badge-el {
        font-size: 8px !important;
        line-height: 1.2;
        letter-spacing: 0.35em !important;
    }

    .hero-title-group .badge-el {
        margin-bottom: 8px !important;
    }

    .hero-content .badge-el:last-child {
        margin-top: 8px !important;
    }

    .hero-video-wrapper {
        width: min(86vw, 360px) !important;
        margin-top: 14px !important;
        margin-bottom: 18px !important;
        border-radius: 7px;
    }

    .hero-proof-row {
        bottom: max(16px, env(safe-area-inset-bottom)) !important;
        left: 50% !important;
        display: grid !important;
        width: min(calc(100% - 32px), 420px) !important;
        padding: 0 !important;
        gap: 18px !important;
        align-items: stretch !important;
        transform: translateX(-50%);
    }

    .hero-proof-row > .footer-el:first-child {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0 !important;
        width: 100%;
        padding-block: 14px 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.13);
        border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    }

    .hero-proof-row > .footer-el:first-child > div {
        display: flex !important;
        min-width: 0;
        min-height: 58px;
        padding: 0 10px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 7px !important;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero-proof-row > .footer-el:first-child > div:first-child {
        padding-left: 0;
        border-left: 0;
    }

    .hero-proof-row > .footer-el:first-child > div:last-child {
        padding-right: 0;
    }

    .hero-proof-row > .footer-el:first-child span:first-child {
        min-width: 0 !important;
        font-size: 19px;
        line-height: 1;
        letter-spacing: 0.08em !important;
    }

    .hero-proof-row > .footer-el:first-child span:last-child {
        font-size: 7px !important;
        line-height: 1.35;
        letter-spacing: 0.13em !important;
    }

    .hero-offer {
        width: 100%;
        max-width: none !important;
        align-items: flex-start !important;
        gap: 7px !important;
    }

    .hero-offer-copy {
        max-width: 350px;
        font-size: 8px !important;
        line-height: 1.55 !important;
        letter-spacing: 0.1em !important;
    }

    .hero-offer-cta {
        width: auto !important;
        min-height: 44px;
        justify-content: flex-start !important;
        font-size: 9px !important;
    }

    .statistics-section {
        padding: 80px 18px !important;
    }

    .statistics-heading {
        max-width: 22rem !important;
        font-size: clamp(31px, 9.4vw, 39px) !important;
        line-height: 1.04 !important;
    }

    .statistics-grid {
        margin-top: 46px !important;
    }

    .statistics-card {
        min-height: 214px !important;
        padding-left: 20px !important;
    }

    .projects-sticky {
        padding: 82px 0 !important;
    }

    .projects-header,
    .projects-mask {
        padding-inline: 18px !important;
    }

    .projects-title {
        font-size: clamp(46px, 14vw, 58px) !important;
    }

    .project-card,
    .projects-cta-card {
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 4 / 5;
    }

    .core-skills-section {
        padding: 82px 18px 34px !important;
    }

    .core-skills-list {
        margin-top: 44px !important;
    }

    .growth-rotator-section {
        min-height: 330px !important;
        padding-block: 34px !important;
    }

    .growth-rotator-word {
        font-size: clamp(66px, 22vw, 88px) !important;
        line-height: 0.88 !important;
    }

    .growth-rotator-dot {
        width: 15px !important;
        height: 15px !important;
        margin-inline: 28px !important;
    }

    .xenith-showcase-section {
        padding: 12px 8px 78px !important;
    }

    .xenith-visual-hero {
        min-height: 70svh !important;
    }

    .xenith-about-section {
        padding: 76px 12px 0 !important;
    }

    .team-stack-section {
        padding: 66px 18px 94px !important;
    }

    .team-stack-header {
        margin-bottom: 50px !important;
    }

    .team-stack-title {
        font-size: clamp(46px, 14vw, 58px) !important;
    }

    .team-glass-card {
        padding: 18px !important;
    }

    .journal-section {
        padding: 72px 18px 82px !important;
    }

    .journal-title {
        font-size: clamp(68px, 20vw, 88px) !important;
    }

    .journal-grid {
        margin-top: 42px !important;
    }

    .journal-media,
    .journal-card.is-large .journal-media,
    .journal-card.is-medium .journal-media {
        height: auto !important;
        aspect-ratio: 4 / 3;
    }

    .faq-section {
        padding: 70px 18px 86px !important;
    }

    .faq-title {
        font-size: clamp(46px, 14vw, 58px) !important;
    }

    .xaxis-contact-section {
        padding: 68px 18px 92px !important;
    }

    .xaxis-contact-title {
        font-size: clamp(68px, 21vw, 92px) !important;
    }
}

@media (max-width: 767px) and (max-height: 760px) {
    .hero-content {
        top: 94px;
    }

    .hero-title-top {
        font-size: clamp(54px, 17vw, 70px) !important;
    }

    .hero-title-bottom {
        font-size: clamp(52px, 16.5vw, 66px) !important;
    }

    .hero-video-wrapper {
        width: min(74vw, 300px) !important;
        margin-top: 10px !important;
        margin-bottom: 12px !important;
    }

    .hero-proof-row {
        gap: 10px !important;
    }

    .hero-proof-row > .footer-el:first-child {
        padding-block: 10px;
    }

    .hero-offer-copy {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1040px) {
    .hero-content {
        width: min(100%, 620px) !important;
    }

    .hero-title-top {
        font-size: clamp(100px, 14vw, 138px) !important;
    }

    .hero-title-bottom {
        font-size: clamp(90px, 12.5vw, 124px) !important;
    }

    .hero-video-wrapper {
        width: clamp(320px, 42vw, 390px);
    }
}

@media (min-width: 568px) and (max-width: 1040px) and (max-height: 500px) {
    .home-site-header {
        padding-top: 16px !important;
        padding-bottom: 8px !important;
    }

    .home-site-header nav {
        top: 70px;
    }

    .home-site-header .site-logo {
        width: 42px !important;
    }

    .hero-scroll {
        height: 300vh !important;
    }

    .hero-sticky {
        height: 100svh;
        min-height: 0;
        justify-content: flex-start !important;
    }

    .hero-content {
        position: absolute !important;
        top: 68px;
        left: 50%;
        width: 280px !important;
        padding: 0 !important;
        transform: translateX(-50%) !important;
    }

    .hero-title-group {
        width: 100%;
        align-items: center;
    }

    .hero-title-top {
        font-size: 50px !important;
        letter-spacing: 0.05em !important;
    }

    .hero-title-bottom {
        font-size: 46px !important;
        letter-spacing: 0.05em !important;
    }

    .hero-content .badge-el {
        font-size: 6px !important;
        line-height: 1;
        letter-spacing: 0.32em !important;
    }

    .hero-title-group .badge-el {
        margin-bottom: 4px !important;
    }

    .hero-content .badge-el:last-child {
        margin-top: 4px !important;
    }

    .hero-video-wrapper {
        width: 230px !important;
        margin-top: 6px !important;
        margin-bottom: 7px !important;
        border-radius: 6px;
    }

    .hero-proof-row {
        bottom: 10px !important;
        padding-inline: 28px !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        gap: 20px !important;
    }

    .hero-proof-row > .footer-el:first-child {
        gap: 4px !important;
    }

    .hero-proof-row > .footer-el:first-child > div {
        gap: 10px !important;
    }

    .hero-proof-row > .footer-el:first-child span:first-child {
        min-width: 48px !important;
        font-size: 15px;
    }

    .hero-proof-row > .footer-el:first-child span:last-child {
        font-size: 6px !important;
        letter-spacing: 0.15em !important;
    }

    .hero-offer {
        width: auto;
        align-items: flex-end !important;
    }

    .hero-offer-copy {
        display: none;
    }

    .hero-offer-cta {
        width: auto !important;
        min-height: 44px;
        justify-content: flex-end !important;
        font-size: 7px !important;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-toggle span,
    .home-site-header nav,
    .mobile-nav-backdrop {
        transition-duration: 1ms !important;
    }
}
