/**
 * C Sharp Recording Studio — site-wide layout & mobile responsiveness
 * Loaded after page styles on all front-end pages.
 */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 0;
}

main img,
main video,
main picture,
main svg {
    max-width: 100%;
    height: auto;
}

main table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---- Header & mobile nav (all pages) ---- */
@keyframes csPhoneAutofillStart {
    from { opacity: 1; }
    to { opacity: 1; }
}

.cs-contact-phone-input:-webkit-autofill,
.cs-demo-phone-input:-webkit-autofill {
    animation-name: csPhoneAutofillStart;
    animation-duration: 0.01s;
}

@media (max-width: 1024px) {
    .cs-nav,
    .cs-header .cs-demo-btn {
        display: none !important;
    }

    .cs-menu-toggle {
        display: block;
    }

    .cs-header {
        top: max(8px, env(safe-area-inset-top, 0px));
        width: calc(100% - 16px);
        max-width: none;
        padding: 10px 14px;
        border-radius: 14px;
    }

    .cs-logo img,
    .cs-logo-img {
        max-height: 44px;
        max-width: min(168px, 46vw);
    }
}

@media (max-width: 480px) {
    .cs-header {
        padding: 9px 12px;
    }

    .cs-mobile-menu {
        width: min(288px, 86vw);
        padding: max(72px, calc(env(safe-area-inset-top, 0px) + 56px)) 20px 24px;
    }

    .cs-mobile-close {
        top: max(14px, env(safe-area-inset-top, 0px));
    }
}

/* ---- Shared content shells ---- */
@media (max-width: 900px) {
    .cs-about-shell,
    .cs-contact-shell,
    .cs-contact-hero-inner,
    .cs-portfolio-shell,
    .cs-infra-shell,
    .cs-story-inner,
    .cs-growth-calc-inner {
        width: min(1200px, calc(100% - 24px));
    }

    .cs-contact-hero,
    .cs-portfolio-hero {
        padding-top: clamp(96px, 20vw, 120px);
    }

    .cs-about-hero,
    .cs-infra-hero {
        padding-top: clamp(108px, 22vw, 140px);
    }
}

@media (max-width: 680px) {
    .cs-about-shell,
    .cs-contact-shell,
    .cs-contact-hero-inner,
    .cs-portfolio-shell,
    .cs-infra-shell,
    .cs-story-inner,
    .cs-growth-calc-inner {
        width: min(1200px, calc(100% - 20px));
    }

    .cs-about-title {
        font-size: clamp(1.65rem, 7vw, 2.15rem);
    }

    .cs-about-lead,
    .cs-contact-lead,
    .cs-portfolio-lead {
        font-size: 15px;
    }
}

/* ---- Infrastructure ---- */
@media (max-width: 768px) {
    .cs-infra-hero-title {
        max-width: none;
    }

    .cs-infra-head {
        margin-bottom: 26px;
        text-align: left;
        padding-inline: 0;
    }

    .cs-infra-sub {
        font-size: 15px;
    }

    .cs-infra-gallery-caption {
        flex-direction: column;
        align-items: flex-start;
    }

    .cs-infra-gallery-badge {
        top: 14px;
        left: 14px;
        font-size: 11px;
    }

    .cs-infra-slider-controls {
        margin-top: 14px;
    }

    .cs-infra-slider-btn {
        width: 38px;
        height: 38px;
    }

    .cs-infra-cta-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 320px;
        margin-inline: auto;
    }

    .cs-infra-cta-actions .cs-infra-btn {
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .cs-infra-hero {
        padding-bottom: 48px;
    }

    .cs-infra-hero-meta {
        gap: 8px;
    }

    .cs-infra-chip {
        font-size: 12px;
        padding: 6px 12px;
    }

    .cs-infra-spec-card {
        padding: 18px 16px 20px;
    }

    .cs-infra-feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Homepage: creators strip ---- */
@media (max-width: 899px) {
    .cs-creators-grid .cs-creators-card:nth-child(odd),
    .cs-creators-grid .cs-creators-card:nth-child(even) {
        --cs-wave-offset: 0;
    }

    .cs-creators-card:hover {
        transform: translateY(-4px);
    }
}

/* ---- Homepage sections ---- */
@media (max-width: 580px) {
    .cs-hero {
        padding: 88px 16px 100px;
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .cs-hero-kicker {
        margin-top: 18px;
    }

    .cs-story-inner {
        gap: 32px;
    }

    .cs-global-locations-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .cs-global-locations-list ul {
        display: contents;
        padding-left: 0;
        list-style: none;
    }

    .cs-global-locations-list li {
        margin-bottom: 0;
        font-size: clamp(0.78rem, 3.4vw, 0.88rem);
        line-height: 1.35;
    }

    .modal-dialog {
        margin: 12px auto;
        max-width: calc(100% - 24px);
    }
}

/* ---- Footer ---- */
@media (max-width: 480px) {
    .cs-footer-min-email a {
        font-size: clamp(1.15rem, 5.5vw, 1.5rem);
        word-break: break-word;
    }
}
