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

.home-site-header .language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    letter-spacing: 0;
}

.home-site-header .language-switcher a {
    width: auto;
    min-width: 24px;
    min-height: 32px;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0;
}

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

.home-site-header .home-language-switcher-mobile {
    display: none;
}

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

@media (max-width: 1040px) {
    .home-site-header .home-language-switcher-desktop {
        display: none !important;
    }

    .home-site-header .home-language-switcher-mobile {
        display: block;
    }

    .home-site-header nav .language-switcher {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0;
        padding: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .home-site-header nav .language-switcher a {
        width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border-bottom: 0;
    }

    .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: 11px !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: 9px !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: 14px !important;
        line-height: 1.4 !important;
    }

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

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

    .statistics-heading {
        max-width: 22rem !important;
        font-size: 32px !important;
        line-height: 1.04 !important;
    }

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

    .statistics-card {
        padding-left: 0 !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-glass-card {
        padding: 18px !important;
    }

    .journal-section {
        padding: 72px 18px 82px !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(42px, 12vw, 50px) !important;
    }

    .xaxis-contact-section {
        padding: 68px 18px 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;
    }
}

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

.home-site-header nav a.nav-contact-link {
    display: none;
}

.hero-title-top,
.hero-title-bottom {
    width: 100%;
    font-size: clamp(44px, 4.4vw, 70px) !important;
    line-height: 0.98 !important;
    text-wrap: balance;
    white-space: normal;
}

/* The custom pointer must stay above the compact menu and consent panels. */
#custom-cursor,
#custom-cursor-ring {
    z-index: 150;
}

.statistics-intro {
    max-width: 780px;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 18px;
    line-height: 1.6;
}

.statistics-intro + .statistics-intro {
    margin-top: 16px;
}

.statistics-description {
    max-width: 380px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 17px;
    line-height: 1.6;
}

.statistics-content .stat-metric {
    display: flex;
    align-items: center;
}

.stat-phrase {
    color: #f7f7f7;
    font-size: clamp(18px, 1.55vw, 25px);
    line-height: 1.12;
    font-weight: 700;
}

.core-skills-section .core-skill-title {
    font-size: clamp(13px, 1.35vw, 20px) !important;
}

.journal-intro {
    max-width: 720px;
    margin: 24px auto 0;
    text-align: center;
}

.site-footer .footer-bottom .footer-copyright,
.site-footer .footer-bottom .footer-credit {
    color: rgba(255, 255, 255, 0.62) !important;
    font-size: 12px !important;
    letter-spacing: 0 !important;
}

@media (max-width: 767px) {
    .hero-title-top,
    .hero-title-bottom {
        font-size: clamp(30px, 8vw, 38px) !important;
    }

    .core-skills-section .core-skill-title {
        font-size: clamp(12px, 3.3vw, 15px) !important;
    }
}

@media (max-width: 1040px) {
    .home-site-header nav a.nav-contact-link {
        display: inline-flex;
    }

    .home-site-header.is-menu-open nav {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

@media (max-width: 767px) and (max-height: 760px) {
    .hero-offer-copy {
        display: block;
        font-size: 13px;
        line-height: 1.4;
    }
}

@media (min-width: 1800px) and (max-height: 960px) {
    .hero-content {
        transform: translateY(-10px) !important;
    }
}

@media (min-width: 768px) and (max-height: 800px) {
    .hero-content {
        transform: translateY(-36px) !important;
    }
}

@media (max-width: 767px) and (max-height: 600px) {
    .hero-sticky {
        min-height: 0;
    }

    .hero-content {
        top: 70px !important;
    }

    .hero-title-top,
    .hero-title-bottom {
        font-size: clamp(26px, 7.4vw, 32px) !important;
    }

    .hero-video-wrapper {
        width: min(60vw, 210px) !important;
        margin-top: 4px !important;
        margin-bottom: 4px !important;
    }

    .hero-proof-row {
        bottom: 4px !important;
    }

    .hero-offer-copy {
        font-size: 13px !important;
        line-height: 1.4;
    }
}

/* Align the two hero introductions and keep the proof labels readable. */
@media (min-width: 768px) and (min-height: 501px) {
    .hero-proof-row { align-items: flex-start !important; }
    .hero-proof-row > .footer-el:first-child { max-width: 48%; }
    .hero-proof-row > .footer-el:first-child > div { flex-wrap: wrap; column-gap: 16px; row-gap: 4px; }
    .hero-proof-row > .footer-el:first-child span:first-child {
        font-size: clamp(16px, 1.5vw, 18px);
        line-height: 1.5;
        letter-spacing: .07em;
    }
    .hero-proof-row > .footer-el:first-child span:last-child {
        font-size: clamp(10px, .93vw, 11px) !important;
        line-height: 1.5;
        letter-spacing: .14em !important;
        color: rgba(255,255,255,.72);
    }
    .hero-offer { max-width: min(440px, 48%) !important; }
}
@media (max-width: 767px) and (min-height: 501px) {
    .hero-proof-row > .footer-el:first-child span:first-child {
        font-size: clamp(14.5px, 4vw, 16px);
        line-height: 1.15;
        letter-spacing: .02em !important;
        min-width: 0 !important;
        max-width: 100%;
    }
    .hero-proof-row > .footer-el:first-child span:last-child {
        font-size: clamp(8.5px, 2.4vw, 9.5px) !important;
        letter-spacing: .06em !important;
        color: rgba(255,255,255,.72);
    }
}

/* Center the whole title/video group in the space reserved above the proofs. */
@media (min-height: 501px) {
    .hero-sticky.has-centered-hero .hero-content {
        position: absolute !important;
        top: var(--hero-group-top) !important;
        left: 50%;
        transform: translateX(-50%) !important;
    }
}

/* A visible breathing light on the hero contact link, without movement. */
.hero-offer-cta::before {
    --cta-glow-near: 7px;
    --cta-glow-far: 24px;
    color: var(--shell-orange);
    animation: hero-contact-light 3.6s ease-in-out infinite;
    transition: text-shadow 220ms ease;
}
@keyframes hero-contact-light {
    0%, 100% {
        text-shadow: 0 0 2px rgba(219,89,6,.18), 0 0 5px rgba(219,89,6,.06);
    }
    50% {
        text-shadow: 0 0 var(--cta-glow-near) rgba(255,170,95,1),
                     0 0 var(--cta-glow-far) rgba(255,110,30,.85);
    }
}
.hero-offer-cta:hover::before,
.hero-offer-cta:focus-visible::before {
    animation: none;
    text-shadow: 0 0 6px rgba(255,140,65,.9), 0 0 20px rgba(219,89,6,.6);
}
@media (max-width: 767px) {
    .hero-offer-cta::before { --cta-glow-near: 5px; --cta-glow-far: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-offer-cta::before {
        animation: none;
        text-shadow: 0 0 4px rgba(219,89,6,.35);
        transition: none;
    }
}

.hero-offer-cta {
    --cta-text-glow: 16px;
    animation: hero-contact-text-light 3.6s ease-in-out infinite;
}
@keyframes hero-contact-text-light {
    0%, 100% { color: rgba(255,255,255,.82); text-shadow: 0 0 2px rgba(255,255,255,0); }
    50% {
        color: #fff;
        text-shadow: 0 0 6px rgba(255,255,255,.5),
                     0 0 var(--cta-text-glow) rgba(219,89,6,.4);
    }
}
.hero-offer-cta:hover,
.hero-offer-cta:focus-visible {
    animation: none;
    color: #fff;
    text-shadow: 0 0 6px rgba(255,255,255,.5), 0 0 16px rgba(219,89,6,.4);
}
@media (max-width: 767px) {
    .hero-offer-cta { --cta-text-glow: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-offer-cta {
        animation: none;
        color: rgba(255,255,255,.9);
        text-shadow: none;
    }
}
