/*
 * WebMax Digital — Homepage Centred Layout
 * Front-page only overrides · v1.0.0
 */

/* ─────────────────────────────────────────────
   HERO — centred column (was 1fr 1fr split)
───────────────────────────────────────────── */
.hero__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    max-width: 800px;
}

.hero__copy {
    max-width: 680px;
    width: 100%;
    min-width: 0; /* prevent grid item from expanding beyond viewport */
}

.hero__subtitle {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero__meta {
    justify-content: center;
}



/* ─────────────────────────────────────────────
   SECTION LABELS — centre on homepage
───────────────────────────────────────────── */
.section .section-label,
.section--alt .section-label {
    text-align: center;
}

/* ─────────────────────────────────────────────
   SECTION HEADERS — centred (replaces inline grid)
───────────────────────────────────────────── */
.hp-section-header {
    text-align: center;
    margin: 0 auto var(--space-xl);
}

.hp-section-header .t-h2 {
    margin-bottom: var(--space-md);
}

.hp-section-header p {
    max-width: 520px;
    margin: 0 auto;
}

/* ─────────────────────────────────────────────
   ABOUT — centred text, full-width stats
───────────────────────────────────────────── */
.hp-about {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
}

.hp-about__copy {
    max-width: 680px;
    text-align: center;
}

.hp-about__copy .t-h2,
.hp-about__copy p {
    text-align: center;
}

.hp-about__stats {
    width: 100%;
}

.hp-about__geo {
    max-width: 640px;
    text-align: center;
    margin: 0 auto;
}

/* ─────────────────────────────────────────────
   CTA STRIP — centred column (was 1fr auto)
───────────────────────────────────────────── */
.cta-strip__inner {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 560px;
}

.cta-strip__sub {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    margin: 0 auto;
    justify-content: center;
}

/* ─────────────────────────────────────────────
   HERO CTA BUTTONS
───────────────────────────────────────────── */
.hero__ctas {
    margin-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

/* ─────────────────────────────────────────────
   AUDIT MODAL — full-screen overlay
   (overrides bottom-sheet from components.css)
───────────────────────────────────────────── */
.audit-modal {
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.audit-modal__overlay {
    background: transparent;
}

.audit-modal__sheet {
    width: calc(100% - 40px);
    max-width: 720px;
    height: min(600px, calc(100vh - 80px));
    max-height: none;
    border-radius: 8px;
    transform: scale(0.95) translateY(16px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}

.audit-modal.is-open .audit-modal__sheet {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.audit-modal__body {
    min-height: 0;
    font-size: 14px;
}

.audit-modal__body .cli-line {
    font-size: 14px;
}

.audit-modal__body .cli-input {
    font-size: 14px;
}

/* ─────────────────────────────────────────────
   SUCCESS TOAST
───────────────────────────────────────────── */
.audit-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: calc(100vw - 40px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.audit-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.audit-toast__icon {
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}



/* ─────────────────────────────────────────────
   HERO LABEL — DXB · LDN glow effect
───────────────────────────────────────────── */
.hero__label {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--space-md);
}

.hero__label-dxb,
.hero__label-ldn {
    color: var(--accent);
    text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent),
                 0 0 20px color-mix(in srgb, var(--accent) 30%, transparent);
    font-weight: 700;
}

/* ─────────────────────────────────────────────
   USP CAROUSEL — scrolling left to right
───────────────────────────────────────────── */
.hero__usp-carousel {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    margin: var(--space-md) 0;
}

.hero__usp-track {
    display: flex;
    gap: var(--space-xl);
    width: max-content;
    animation: usp-scroll 12s linear infinite;
}

.hero__usp-track:hover {
    animation-play-state: paused;
}

.hero__usp-item {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--bg-secondary);
}

@keyframes usp-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─────────────────────────────────────────────
   MOBILE — comprehensive responsive fixes
───────────────────────────────────────────── */
@media (max-width: 767px) {

    /* Hero */
    .hero {
        min-height: auto;
        padding: 32px 0 40px;
    }
    .hero__inner {
        padding: 0 var(--space-md);
    }
    .hero__title {
        font-size: clamp(28px, 8vw, 44px);
    }
    .hero__subtitle {
        font-size: 14px;
        max-width: 100%;
    }
    .hero__copy {
        min-width: 0; /* allow grid item to shrink — prevents title <br> from expanding past viewport */
    }
    .hero__title {
        overflow-wrap: break-word;
    }
    .hero__ctas {
        margin-top: var(--space-md);
    }
    .hero__ctas .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Services grid — single col on mobile */
    .services-grid[style] {
        grid-template-columns: 1fr !important;
    }

    /* Section containers */
    .section, .section--alt {
        padding: var(--space-2xl) var(--space-md);
    }
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    /* Stats strip — 2 col */
    .stats-strip {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Process tabs — wrap + smaller */
    .process-tabs {
        gap: 6px;
        flex-wrap: wrap;
    }
    .process-tab {
        font-size: 11px;
        padding: 6px 10px;
    }

    /* Blog grid */
    .blog-grid {
        grid-template-columns: 1fr !important;
    }

    /* FAQ */
    .faq-grid {
        grid-template-columns: 1fr !important;
    }

    /* CTA strip */
    .cta-strip__inner {
        padding: var(--space-xl) var(--space-md);
    }
    .cta-strip__inner h2 {
        font-size: clamp(22px, 6vw, 32px);
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    .hero__usp-carousel {
        margin-left: calc(-1 * var(--space-md));
        margin-right: calc(-1 * var(--space-md));
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    }

    /* HP about */
    .hp-about__geo {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: clamp(22px, 5.5vw, 32px); /* JetBrains Mono is wide — smaller clamp prevents line overflow */
    }
    .stats-strip {
        grid-template-columns: 1fr !important;
    }
}
