@media (max-width: 800px) {
    :root {
        --mobile-bottom-safe: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    ::-webkit-scrollbar {
        display: none;
    }

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        padding-bottom: var(--mobile-bottom-safe);
    }

    header {
        padding: 0.9rem 1rem 0.6rem !important;
    }

    #brand-logo {
        height: 42px !important;
        max-width: 58vw;
    }

    #nav-items {
        position: fixed;
        left: 50%;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        z-index: 95;
        width: min(94vw, 430px);
        display: flex !important;
        justify-content: space-between;
        gap: 0.3rem;
        padding: 0.5rem 0.65rem !important;
        opacity: 1;
        pointer-events: auto;
        transition: opacity 0.82s cubic-bezier(0.22, 1, 0.36, 1);
    }

    #nav-items .nav-link {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.16rem;
        height: 46px;
        min-width: 0;
        flex: 1;
        border-radius: 12px;
        font-size: 0.58rem !important;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-family: 'Chakra Petch', sans-serif;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.78) !important;
    }

    #nav-items .nav-link .nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.78rem;
        line-height: 1;
        width: 14px;
        height: 14px;
    }

    #nav-items .nav-link .nav-text {
        display: inline;
    }

    #nav-items .nav-link.active,
    #nav-items .nav-link:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff !important;
    }

    #nav-items .nav-link:focus-visible {
        color: #ffffff !important;
        outline: 1px solid rgba(255, 255, 255, 0.28);
        outline-offset: 2px;
        background: transparent;
    }

    #nav-items .nav-link.active::after {
        display: none;
    }

    #header-contact-btn {
        position: fixed;
        top: calc(12px + env(safe-area-inset-top, 0px));
        right: 12px;
        left: auto;
        bottom: auto;
        transform: none;
        z-index: 96;
        width: auto;
        border-radius: 999px;
        padding: 0.62rem 0.85rem !important;
        font-size: 0.56rem !important;
        letter-spacing: 0.16em !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
        transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    }

    #home,
    #about,
    #vision,
    #services,
    #why-choose-us,
    #founders,
    #contact {
        width: 100vw;
        min-height: 100dvh;
    }

    .stacked-section,
    .vision-section,
    .services-section,
    .why-section,
    .founders-section,
    .contact-section {
        min-height: 100dvh;
        padding-top: 4.8rem;
        padding-bottom: calc(var(--mobile-bottom-safe) + 0.75rem);
    }

    /* Allow services section to expand when cards are expanded */
    .services-section {
        min-height: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    .glass-box,
    .vision-glass-box,
    .why-glass-box,
    .founders-box,
    .contact-shell {
        width: min(94vw, 94vw);
        margin-left: auto;
        margin-right: auto;
    }

    .glass-box,
    .vision-glass-box,
    .why-glass-box,
    .founders-box,
    .contact-shell,
    .footer-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .founders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
    }

    .founders-kicker {
        font-size: 0.52rem !important;
        letter-spacing: 0.18em !important;
        margin-bottom: 0.35rem !important;
    }

    .founders-heading {
        font-size: clamp(1.45rem, 5.7vw, 2rem) !important;
        line-height: 1.05 !important;
        letter-spacing: -0.01em !important;
    }

    .founders-copy {
        font-size: 0.8rem !important;
        line-height: 1.55 !important;
    }

    .founder-card-body {
        padding: 0.85rem 0.75rem 0.9rem !important;
        gap: 0.45rem !important;
    }

    .founder-name {
        font-size: clamp(0.9rem, 3.8vw, 1.08rem) !important;
        line-height: 1.15 !important;
    }

    .founder-role {
        font-size: 0.58rem !important;
        letter-spacing: 0.09em !important;
        line-height: 1.35 !important;
    }

    .founder-socials {
        gap: 0.5rem !important;
        padding-top: 0.35rem !important;
    }

    .founder-socials a {
        font-size: 0.58rem !important;
        gap: 0.22rem !important;
        letter-spacing: 0.08em !important;
    }

    .founder-socials svg {
        width: 9px !important;
        height: 9px !important;
    }

    .services-autoscroll-outer {
        padding-bottom: 1rem;
    }

    .services-footer-cta {
        padding-bottom: 0.5rem;
    }

    .footer-shell,
    .footer-bottom {
        width: min(96vw, 96vw) !important;
    }

    .contact-popup-options {
        grid-template-columns: 1fr;
    }

    #about {
        min-height: 120dvh !important;
        height: 120dvh;
        overflow: hidden;
    }

    #about .stack-top .rays-container {
        display: none;
    }

    #about.stacked-section {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    #about .stack-top,
    #about .stack-bottom {
        height: 60dvh;
    }

    #about .glass-box {
        max-height: calc(120dvh - var(--mobile-bottom-safe) - 5.2rem);
        overflow: hidden;
        padding-top: 0.95rem;
        padding-bottom: 0.95rem;
    }

    #about .story-header span,
    #about .story-header p,
    #about .space-y-6 p,
    #about .space-y-8 p,
    #about .pt-8 p {
        color: rgba(241, 245, 249, 0.92) !important;
    }

    #about .story-header h2,
    #about .pt-8 .hero-font {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        background: none !important;
    }

    #about .story-header p {
        border-left-color: rgba(255, 255, 255, 0.35) !important;
    }

    #about .glass-box .w-full.grid {
        gap: 0.9rem !important;
    }

    #about .story-header h2 {
        font-size: clamp(1.7rem, 7.2vw, 2.35rem) !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.08 !important;
    }

    #about .story-header p {
        margin-bottom: 0;
        font-size: 0.93rem;
        line-height: 1.4;
    }

    #about .space-y-8 {
        gap: 0.8rem !important;
    }

    #about .space-y-6 {
        gap: 0.6rem !important;
    }

    #about .space-y-6 p,
    #about .space-y-8 p {
        font-size: 0.84rem;
        line-height: 1.45;
    }

    #about .pt-8 {
        padding-top: 0.7rem !important;
    }

    @media (min-width: 400px) and (max-width: 500px) {
        ::-webkit-scrollbar {
            display: none;
        }

        #about .glass-box {
            height: 70vh;
            max-height: 70vh;
            padding-top: 5vh !important;
            padding-bottom: 5vh !important;
        }

        #about .glass-box .w-full.grid {
            height: 100%;
            align-content: space-between;
            gap: 1rem !important;
        }

        #about .story-header h2 {
            font-size: clamp(1.95rem, 6.8vw, 2.55rem) !important;
            margin-bottom: 0.9rem !important;
        }

        #about .story-header p {
            font-size: 1rem;
            line-height: 1.48;
        }

        #about .space-y-8 {
            gap: 0.95rem !important;
        }

        #about .space-y-6 p,
        #about .space-y-8 p {
            font-size: 0.92rem;
            line-height: 1.58;
        }

        #about .space-y-6 p:last-child {
            background: #0f172a;
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
        }

        #about #text-about3 {
            background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #334155 100%);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
        }

        #about .pt-8 {
            padding-top: 0 !important;
            padding-bottom: 0.9rem !important;
        }

        #about .pt-8 .hero-font {
            font-size: 1.08rem;
            line-height: 1;
            margin-top: -1rem !important;
            margin-bottom: 1rem !important;
            background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #334155 100%);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            color: #334155 !important;
        }

        #about .pt-8 p:last-child {
            font-size: 0.94rem;
            line-height: 1.55;
        }

        #vision {
            min-height: 70vh !important;
            height: 70vh;
            overflow: hidden;
        }

        #vision .vision-glass-box {
            height: 50vh;
            max-height: 50vh;
            padding: 2rem 2rem;
        }

        #vision .vision-glass-box>.w-full {
            height: 100%;
            display: grid;
            grid-template-rows: 1fr 1fr;
            align-content: space-evenly;
            gap: 0rem;
        }

        #vision .vision-row {
            justify-content: space-evenly;
            gap: 0.9rem !important;
            padding: 0.7rem 0 !important;
        }

        #vision .vision-kicker {
            font-size: 0.72rem !important;
            letter-spacing: 0.24em !important;
            margin-bottom: 0.45rem !important;
        }

        #vision .vision-heading {
            font-size: 5rem !important;
            line-height: 1.02 !important;
            max-width: 14ch;
            text-wrap: balance;
            background: linear-gradient(180deg, #4e5e73 0%, #3c4d64 45%, #334155 100%);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
        }

        #vision .vision-row-copy {
            font-size: 1.14rem !important;
            line-height: 1.68 !important;
        }

        #why-choose-us .why-glass-box {
            height: auto !important;
            max-height: none !important;
        }
    }

    @media (max-width: 399px) {
        ::-webkit-scrollbar {
            display: none;
        }

        #about .glass-box {
            padding-top: 1.5rem;
            padding-bottom: 1.5rem;
        }

        #about .pt-8 {
            padding-top: 0.65rem !important;
            padding-bottom: 0.65rem !important;
        }

        #about .pt-8 .hero-font {
            margin-bottom: 0.65rem !important;
        }
    }

    #vision {
        min-height: 100dvh !important;
        height: 100dvh;
        overflow: hidden;
    }

    #vision.vision-section {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    #vision .vision-stack-top,
    #vision .vision-stack-bottom {
        height: 50dvh;
    }

    #vision .vision-glass-box {
        height: 70dvh;
        max-height: 70dvh;
        overflow: hidden;
        padding: 1rem 0.95rem;
    }

    #vision .vision-glass-box>.w-full {
        height: 100%;
        display: grid;
        grid-template-rows: 1fr 1fr;
        gap: 0.6rem;
    }

    #vision .vision-row {
        height: 100%;
        margin: 0 !important;
        padding: 0.55rem 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.7rem !important;
    }

    #vision .vision-row+.vision-row {
        margin-top: 0 !important;
        padding-top: 0.55rem !important;
    }

    #vision .vision-kicker {
        font-size: 0.56rem !important;
        letter-spacing: 0.2em !important;
        margin-bottom: 0.35rem !important;
    }

    #vision .vision-heading {
        font-size: clamp(1.35rem, 5.2vw, 1.85rem) !important;
        line-height: 1.08 !important;
    }

    #vision .vision-row-copy {
        font-size: 0.82rem !important;
        line-height: 1.38 !important;
    }

    #why-choose-us {
        min-height: 100dvh !important;
        height: auto !important;
        overflow: visible !important;
        padding-top: 0 !important;
        padding-bottom: 2.5rem !important;
    }

    #why-choose-us .why-glass-box {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 2rem 1rem !important;
    }

    #why-choose-us .why-glass-box>.why-intro,
    #why-choose-us .why-glass-box>.why-grid {
        width: 100%;
    }

    #why-choose-us .why-glass-box {
        display: grid;
        grid-template-rows: auto 1fr;
        gap: 0.85rem;
        padding-top: 2rem !important;
        align-content: center;
    }

    #why-choose-us .why-intro {
        margin-bottom: 1rem;
        gap: 0.55rem;
        text-align: left;
    }

    #why-choose-us .why-intro-title {
        padding-left: 0.95rem;
        margin-top: 1rem;
    }

    #why-choose-us .vision-kicker {
        font-size: 0.52rem !important;
        letter-spacing: 0.16em !important;
        margin-bottom: 0.3rem !important;
    }

    #why-choose-us .why-heading {
        font-size: clamp(1.28rem, 5vw, 1.72rem) !important;
        line-height: 1.06 !important;
    }

    #why-choose-us .why-intro-copy {
        font-size: 0.74rem !important;
        line-height: 1.42 !important;
        margin-top: 1rem !important;
    }

    #why-choose-us .why-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        align-content: stretch;
        height: max-content;
    }

    #why-choose-us .why-card {
        padding: 1rem !important;
        min-height: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0.9rem;

    }

    #why-choose-us .why-card-index {
        font-size: 0.5rem !important;
        letter-spacing: 0.11em !important;
        line-height: 1.2 !important;
        margin: 0 !important;
    }

    #why-choose-us .why-card h4 {
        font-size: 0.86rem !important;
        line-height: 1.15 !important;
        margin: 0.5rem !important;
    }

    #why-choose-us .why-card p {
        font-size: 0.68rem !important;
        line-height: 1.38 !important;
        margin: 0 !important;
    }

    /* ---- SERVICES SECTION: VERTICAL EXPANSION ON MOBILE ---- */
    /* Remove horizontal expansion - keep card width constant */
    .service-card {
        --card-collapsed-width: clamp(280px, 85vw, 340px) !important;
        --card-compressed-width: clamp(250px, 85vw, 320px) !important;
        --card-expanded-width: clamp(280px, 85vw, 340px) !important;
        /* Remove height constraints entirely for vertical expansion */
        min-height: auto !important;
        max-height: none !important;
        height: auto !important;
        width: var(--card-collapsed-width) !important;
        flex-basis: var(--card-collapsed-width) !important;
        flex-shrink: 0 !important;
        /* Allow natural flow when expanded */
        transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            width 0.52s cubic-bezier(0.22, 1, 0.36, 1),
            flex-basis 0.52s cubic-bezier(0.22, 1, 0.36, 1),
            border-color 0.3s ease,
            box-shadow 0.4s ease !important;
    }

    /* Compressed state stays same width */
    .services-autoscroll-track.has-expanded .service-card:not(.expanded) {
        width: var(--card-collapsed-width) !important;
        flex-basis: var(--card-collapsed-width) !important;
    }

    /* Expanded card: pure vertical expansion, no width change */
    .service-card.expanded {
        width: var(--card-collapsed-width) !important;
        flex-basis: var(--card-collapsed-width) !important;
        min-height: auto !important;
        max-height: none !important;
        height: auto !important;
        border-color: rgba(226, 232, 240, 0.5) !important;
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.7),
            inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
    }

    /* Watermark should not interfere with content - make it purely decorative */
    .service-card::after {
        opacity: 0.04 !important;
        pointer-events: none !important;
        flex-shrink: 0 !important;
    }

    /* Header styling for mobile - better layout */
    .service-card-header {
        padding: 1.5rem 1.4rem 0.95rem !important;
        gap: 0.65rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .service-card-index {
        font-size: 0.65rem !important;
        top: 1.1rem !important;
        right: 1.2rem !important;
    }

    .service-card-title-wrapper {
        flex: 1 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center !important;
        align-items: center !important;
        gap: 0.45rem !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .service-card-title {
        font-size: clamp(1.3rem, 6.5vw, 1.85rem) !important;
        line-height: 1.1 !important;
        text-align: center !important;
        width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .service-card-summary {
        font-size: 0.65rem !important;
        text-align: center !important;
        max-width: 100% !important;
        margin: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Toggle button - ensure no overlap */
    .service-card-toggle {
        display: inline-block !important;
        margin-top: auto !important;
        font-size: 0.62rem !important;
        text-align: center !important;
        align-self: center !important;
        color: rgba(226, 232, 240, 0.58) !important;
    }

    .service-card:hover .service-card-toggle,
    .service-card.expanded .service-card-toggle {
        color: rgba(255, 255, 255, 0.9) !important;
        transform: none !important;
    }

    /* Divider with proper spacing */
    .service-card-divider {
        height: 1px !important;
        background: linear-gradient(90deg, transparent 0%, rgba(148, 163, 184, 0.18) 30%, rgba(148, 163, 184, 0.18) 70%, transparent 100%) !important;
        margin: 0.95rem 1.4rem 1.15rem !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease 0.1s !important;
    }

    .service-card.expanded .service-card-divider {
        opacity: 1 !important;
    }

    /* Content area - expand vertically */
    .service-card-content {
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        padding: 0 1.4rem !important;
        flex: 1 !important;
        transition: max-height 0.52s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.45s ease 0.05s,
            transform 0.45s ease 0.05s !important;
        transform: translateY(8px) !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.85rem !important;
    }

    .service-card.expanded .service-card-content {
        max-height: 2000px !important;
        opacity: 1 !important;
        padding: 0 1.4rem 1.35rem !important;
        transform: translateY(0) !important;
    }

    /* Description text - readable without overflow */
    .service-card-description {
        font-size: 0.86rem !important;
        line-height: 1.5 !important;
        color: rgba(226, 232, 240, 0.82) !important;
        margin: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        text-align: center !important;
    }

    /* Highlights - single column on mobile */
    .service-highlights {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
    }

    .service-card.expanded .service-highlights {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
    }

    .service-highlight-item {
        padding: 0.6rem 0.85rem !important;
        background: rgba(148, 163, 184, 0.07) !important;
        border: 1px solid rgba(148, 163, 184, 0.13) !important;
        border-radius: 10px !important;
        font-size: 0.75rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        line-height: 1.35 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.55rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .service-highlight-item::before {
        flex-shrink: 0 !important;
    }

    /* Carousel container - allow vertical overflow when card expands */
    .services-autoscroll-outer {
        overflow: visible !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 1rem 0 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: auto !important;
        height: auto !important;
        max-height: none !important;
        width: 100% !important;
    }

    .services-autoscroll-track {
        align-items: center !important;
        justify-content: center !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        position: relative !important;
        min-height: auto !important;
        height: auto !important;
        max-height: none !important;
        width: 100% !important;
        overflow: visible !important;
        animation: none !important;
        will-change: auto !important;
    }

    .services-autoscroll-track .service-card[aria-hidden="true"] {
        display: none !important;
    }

    .mobile-service-hidden {
        display: none !important;
    }

    .mobile-services-view-all-btn {
        width: min(92vw, 430px) !important;
        flex-basis: auto !important;
        flex-shrink: 0 !important;
        min-height: 52px;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0.1rem !important;
        border-radius: 0;
        border: 0;
        border-top: 1px solid rgba(148, 163, 184, 0.24);
        border-bottom: 1px solid rgba(148, 163, 184, 0.24);
        background: transparent;
        color: rgba(203, 213, 225, 0.9);
        font-size: 0.66rem;
        letter-spacing: 0.24em;
        text-transform: uppercase;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        cursor: pointer;
        box-shadow: none;
        transition: color 0.25s ease, letter-spacing 0.25s ease, border-color 0.25s ease;
    }

    .mobile-services-view-all-btn:focus-visible,
    .mobile-services-view-all-btn:hover {
        color: rgba(248, 250, 252, 1);
        letter-spacing: 0.26em;
        border-top-color: rgba(226, 232, 240, 0.38);
        border-bottom-color: rgba(226, 232, 240, 0.38);
    }

    /* Center individual cards on mobile */
    .service-card {
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: visible !important;
        flex-shrink: 0 !important;
        width: clamp(280px, 85vw, 340px) !important;
        flex-basis: auto !important;
    }

    /* When expanded, ensure card is centered in viewport for readability */
    .service-card.expanded {
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: visible !important;
        /* Smooth scroll to center on expansion */
        scroll-margin-top: 6rem !important;
        scroll-margin-bottom: 4rem !important;
    }

    /* Scroll buttons - hidden on mobile (no carousel) */
    .services-scroll-btn {
        display: none !important;
    }

    .services-scroll-btn.left {
        display: none !important;
    }

    .services-scroll-btn.right {
        display: none !important;
    }
    /* Navigation overrides */
    .back-home-text {
        display: none !important;
    }
}

.site-footer {
    margin-bottom: 1.5rem;
}