/* =============================================================
   SN Vertex Corporation — Homepage Mobile Experience
   home-mobile.css

   Load AFTER header.css / footer.css / styles.css.
   Everything here is scoped to <=1024px (mostly <=768px), so the
   desktop design is untouched.

   Design rule for this sheet: FLAT. No card borders, no box
   shadows. Separation comes from background tone and spacing.
   ============================================================= */

/* -------------------------------------------------------------
   0. Mobile design tokens
   ------------------------------------------------------------- */
:root {
    --m-gutter: 20px;
    --m-radius: 14px;
    --m-radius-sm: 10px;
    --m-navy: #1d3557;
    --m-navy-deep: #14273f;
    --m-gold: #d4a017;
    --m-ink: #16202c;
    --m-muted: #5f6b7a;
    --m-line: #e7e9ee;
    --m-surface: #f2f4f7;
}

/* -------------------------------------------------------------
   1. Global mobile rhythm
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    html { -webkit-text-size-adjust: 100%; }

    body {
        font-size: 16px;
        line-height: 1.6;
        overflow-x: hidden;
    }

    .container {
        padding-left: var(--m-gutter);
        padding-right: var(--m-gutter);
    }

    main > section { padding: 56px 0; }

    /* One consistent section header treatment */
    .section-title {
        text-align: left;
        margin-bottom: 28px;
    }

    .section-title h2 {
        display: block;
        font-size: clamp(22px, 6.2vw, 28px);
        line-height: 1.22;
        letter-spacing: .5px;
        padding-bottom: 12px;
    }

    .section-title h2:hover { transform: none; }

    .section-title h2::after {
        content: '';
        display: block;
        width: 40px;
        height: 3px;
        margin-top: 12px;
        border-radius: 2px;
        background: var(--m-gold);
    }

    .section-title p,
    .stats-subtitle,
    .wwd-subtitle {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
        max-width: none;
        font-size: 14.5px;
        line-height: 1.65;
    }

    /* Calmer reveals — long translate distances feel janky on phones */
    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        transform: translateY(16px);
        transition: opacity .5s ease-out, transform .5s ease-out;
    }

    .fade-in-left.animate,
    .fade-in-right.animate,
    .fade-in-up.animate { transform: none; }
}

/* -------------------------------------------------------------
   2. Intro splash — lighter and shorter on phones
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .intro-logo { width: 76px; margin-bottom: 18px; }

    .intro-name {
        font-size: clamp(26px, 8.4vw, 38px);
        letter-spacing: 3px;
    }

    @keyframes introLetters {
        from { opacity: 0; letter-spacing: 9px; transform: translateY(16px); }
        to   { opacity: 1; letter-spacing: 3px; transform: translateY(0); }
    }

    .intro-slogan {
        font-size: 13px;
        letter-spacing: .6px;
        max-width: 320px;
        margin: 0 auto;
        line-height: 1.55;
    }

    .intro-line { margin: 18px auto 16px; }
}

/* -------------------------------------------------------------
   3. Header — bigger tap targets, cleaner sheet menu
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .main-header { padding: 8px 0; }

    .main-header .container {
        padding-left: var(--m-gutter);
        padding-right: var(--m-gutter);
    }

    .logo img { height: 44px; }
    .logo-link { gap: 9px; }
    .logo-link .site-name { font-size: 16px; letter-spacing: .2px; }
    .logo-link .tagline { font-size: 8.5px; letter-spacing: .4px; }

    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
    }

    .mobile-menu-toggle span { width: 22px; height: 2px; }

    .mobile-menu-overlay { background: rgba(10, 18, 28, .55); }

    .mobile-menu {
        width: min(88vw, 360px);
        box-shadow: none;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .mobile-menu-header { padding: 18px var(--m-gutter); }
    .mobile-menu-header h3 { font-size: 15px; letter-spacing: 1px; }

    .mobile-menu-close {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--m-surface);
    }

    .mobile-nav a,
    .mobile-nav .has-submenu .submenu-toggle {
        min-height: 52px;
        display: flex;
        align-items: center;
        padding: 14px var(--m-gutter);
        font-size: 14px;
        letter-spacing: .8px;
    }

    .mobile-nav a:hover,
    .mobile-nav a.active {
        background: #f2f5f9;
        color: var(--m-navy);
    }

    .mobile-nav .has-submenu .submenu a {
        min-height: 46px;
        padding-left: 36px;
        font-size: 14px;
        color: var(--m-muted);
    }

    .mobile-contact { padding: 18px var(--m-gutter) 28px; }
    .mobile-contact a { min-height: 40px; display: flex; align-items: center; }
}

.hero-actions{
    display: none;
}

/* -------------------------------------------------------------
   4. Hero — full-bleed, readable, with real calls to action
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero,
    .hero.hero-sliced {
        height: auto;
        min-height: 78svh;
        min-height: 78vh;
        padding: 72px var(--m-gutter) 76px;
        align-items: flex-end;
        justify-content: flex-start;
        text-align: left;
        background-position: 62% center;
    }

    /* Legible scrim instead of a flat dim */
    .hero .hero-dim,
    .hero::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
        background:
            linear-gradient(180deg, rgba(10, 20, 34, .62) 0%, rgba(10, 20, 34, .18) 34%, rgba(10, 20, 34, .82) 78%, rgba(10, 20, 34, .95) 100%);
    }

    .hero .hero-dim { background: rgba(10, 20, 34, .18); }

    .hero-content {
        width: 100%;
        max-width: 560px;
        transform: translateY(18px);
    }

    /* Eyebrow line (was a long h2 above the title) */
    .hero-content h2 {
        order: -1;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.5;
        letter-spacing: 1.6px;
        text-transform: uppercase;
        color: #f2c14e;
        margin-bottom: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-content h1 {
        font-size: clamp(30px, 9vw, 42px);
        line-height: 1.06;
        letter-spacing: .5px;
        margin-bottom: 14px;
        text-wrap: balance;
    }

    .hero-content p {
        font-size: 14.5px;
        line-height: 1.65;
        color: rgba(255, 255, 255, .86);
        max-width: 40ch;
        margin-bottom: 24px;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        max-width: 300px;
    }

    .hero-actions a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        min-height: 48px;
        padding: 0 22px;
        border: none;
        border-radius: 999px;
        font-family: var(--font-heading);
        font-size: 12.5px;
        font-weight: 700;
        letter-spacing: 1.4px;
        text-transform: uppercase;
    }

    .hero-actions .hero-btn-solid {
        background: var(--m-gold);
        color: #17263a;
    }

    .hero-actions .hero-btn-ghost {
        background: rgba(255, 255, 255, .16);
        color: #fff;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    /* The 8-piece slice animation is expensive on phones */
    .slice-overlay { display: none; }

    .slider-dots { bottom: 18px; left: var(--m-gutter); transform: none; gap: 8px; }
    .slider-dot { width: 8px; height: 8px; border-width: 1px; }
    .slider-dot.active { width: 22px; border-radius: 999px; }
}

@media (max-width: 380px) {
    .hero, .hero.hero-sliced { min-height: 82svh; padding-bottom: 68px; }
    .hero-actions { max-width: none; }
}

/* -------------------------------------------------------------
   5. About — stacked editorial block (flat, no frames)
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .about-intro {
        padding: 56px 0;
        background-image: none;
        background: #fff;
    }

    .about-intro-grid { gap: 34px; }

    .about-intro-media {
        max-width: none;
        margin: 0;
        padding: 0 0 54px 0;
    }

    .about-img-main {
        height: 260px;
        border-radius: var(--m-radius);
        box-shadow: none;
    }

    .about-img-overlap {
        width: 44%;
        max-width: 170px;
        height: 120px;
        right: 0;
        bottom: 0;
        border: none;
        border-radius: var(--m-radius-sm);
        animation: none;
    }

    .about-badge {
        top: auto;
        bottom: 8px;
        left: 0;
        width: auto;
        height: auto;
        border-radius: 999px;
        flex-direction: row;
        gap: 9px;
        padding: 10px 16px;
        animation: none;
        box-shadow: none;
    }

    .about-badge-num { font-size: 22px; }

    .about-badge-text {
        margin-top: 0;
        font-size: 10px;
        letter-spacing: .8px;
        text-align: left;
        line-height: 1.25;
    }

    .about-kicker { font-size: 11px; letter-spacing: 2px; margin-bottom: 10px; }
    .about-kicker::before { width: 22px; margin-right: 9px; }

    .about-title {
        font-size: clamp(24px, 6.6vw, 30px);
        line-height: 1.22;
        margin-bottom: 16px;
    }

    .about-intro-body > p { font-size: 14.5px; line-height: 1.75; margin-bottom: 14px; }

    /* Feature list — flat tinted rows, no borders or shadows */
    .about-features {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 26px 0 0;
    }

    .about-feature {
        align-items: center;
        gap: 14px;
        padding: 14px;
        background: var(--m-surface);
        border: none;
        border-radius: var(--m-radius-sm);
    }

    .about-feature-icon {
        width: 42px;
        height: 42px;
        font-size: 16px;
        border-radius: 10px;
    }

    .about-feature h4 { font-size: 14.5px; margin-bottom: 2px; }
    .about-feature p { font-size: 12.8px; line-height: 1.5; }

    .about-cta {
        display: flex;
        justify-content: center;
        margin-top: 22px;
        padding: 16px 24px;
        border-radius: 999px;
    }
}

/* -------------------------------------------------------------
   6. Track record — 2x2 flat stat tiles
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .stats-section { padding: 56px 0; background: #f8f9fa; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 24px 12px 22px;
        border-radius: var(--m-radius);
        border: none;
        box-shadow: none;
        background: #fff;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 14px;
        font-size: 17px;
    }

    .stat-number { font-size: 30px; }

    .stat-label {
        margin-top: 8px;
        font-size: 10.5px;
        letter-spacing: .7px;
        line-height: 1.35;
    }
}

@media (max-width: 480px) {
    /* Override the old single-column rule from styles.css */
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* -------------------------------------------------------------
   7. What We Do — wrapping tag filters (no swipe rails)
   Both tab rows sit on the same left edge as the gallery below.
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .what-we-do { padding: 56px 0; }

    .what-we-do .section-title h2 { color: #fff; }
    .what-we-do .section-title h2::after { background: var(--m-gold); }

    /* Primary groups: wrapping chips, flush left with the gallery */
    .wwd-groups {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: stretch;
        gap: 8px;
        margin: 26px 0 0;
        padding: 0;
        overflow: visible;
        border-bottom: none;
    }

    .wwd-groups button {
       flex: 0 1 auto;
        min-height: 40px;
        padding: 9px 14px;
        border: 1px solid rgba(255, 255, 255, .08);
        color: rgba(255, 255, 255, .78);
        font-size: 11.5px;
        letter-spacing: 1.2px;
        white-space: nowrap;
    }

    .wwd-groups button sup {
        top: -.4em;
        margin-left: 5px;
        font-size: 9.5px;
        color: rgba(255, 255, 255, .55);
    }

    .wwd-groups button::after { display: none; }

    .wwd-groups button.active {
        background: var(--m-gold);
        color: #17263a;
    }

    .wwd-groups button.active sup { color: rgba(23, 38, 58, .7); }

    /* Sub groups: plain wrapping text filters with a gold underline */
    .wwd-subtabs {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px 18px;
        margin: 22px 0 22px;
        padding: 0;
        overflow: visible;
    }

    .wwd-subtabs button {
        flex: 0 1 auto;
        min-height: 34px;
        padding: 6px 0;
        border: none;
        border-radius: 0;
        background: none;
        color: rgba(255, 255, 255, .62);
        font-size: 11.5px;
        letter-spacing: 1.1px;
        white-space: nowrap;
        position: relative;
    }

    .wwd-subtabs button.active {
        background: none;
        color: #fff;
    }

    .wwd-subtabs button.active::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        border-radius: 2px;
        background: var(--m-gold);
    }

    .wwd-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wwd-tile {
        border: none;
        border-radius: var(--m-radius-sm);
    }

    .wwd-viewall {
        grid-column: 1 / -1;
        aspect-ratio: auto;
        min-height: 52px;
        flex-direction: row;
        gap: 10px;
        border: none;
        border-radius: 999px;
        background: rgba(255, 255, 255, .12);
        color: #fff;
    }

    .wwd-viewall span { font-size: 11.5px; letter-spacing: 1.6px; }
}

/* -------------------------------------------------------------
   8. Product marquee — smaller cards, soft edge fade
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .product-marquee {
        padding: 44px 0;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    }

    .marquee-track { animation-duration: 42s; }
    .marquee-group { gap: 10px; padding-right: 10px; }

    .marquee-group img {
        width: 150px;
        height: 112px;
        border: none;
        border-radius: var(--m-radius-sm);
    }
}

/* -------------------------------------------------------------
   9. Why choose us — 2x2 flat tiles
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .why-choose-us-section { padding: 56px 0; }

    .why-choose-us-section .section-title {
        text-align: left;
        margin-bottom: 26px;
    }

    .why-choose-us-section .section-title h2 { color: #fff; }

    .why-choose-us-section .section-title p {
        text-align: left;
        font-size: 14px;
    }

    .why-choose-us-section .features-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        text-align: left;
    }

    .why-choose-us-section .feature-item {
        padding: 20px 16px;
        border: none;
        border-radius: var(--m-radius);
        background: rgba(255, 255, 255, .05);
    }

    .why-choose-us-section .feature-item:hover { transform: none; }

    .why-choose-us-section .feature-item .feature-icon {
        font-size: 20px;
        margin-bottom: 14px;
        color: var(--m-gold);
    }

    .why-choose-us-section .feature-item h4 {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 8px;
        padding-bottom: 0;
    }

    /* Remove the little grey rule under each card heading */
    .why-choose-us-section .feature-item h4::after { display: none; }

    .why-choose-us-section .feature-item p { font-size: 12.8px; line-height: 1.5; }
}

@media (max-width: 480px) {
    /* Override the old single-column rule from styles.css */
    .why-choose-us-section .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 340px) {
    .why-choose-us-section .features-grid,
    .stats-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------
   10. CTA — centered with a solid full-width button
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .cta-section {
        padding: 64px 0;
        background-position: center;
    }

    .cta-overlay {
        background: linear-gradient(180deg, rgba(10, 20, 34, .18), rgba(10, 20, 34, .62));
    }

    .cta-content {
        text-align: center;
        transform: translateY(16px);
    }

    .cta-content.animate { transform: none; }

    .cta-content h2 {
        font-size: clamp(22px, 6.2vw, 27px);
        line-height: 1.28;
        max-width: none;
        margin: 0 0 12px;
        color: #fff;
    }

    .cta-content p {
        font-size: 14.5px;
        color: rgba(255, 255, 255, .85);
        margin-bottom: 24px;
    }

    .btn-cta {
        width: 100%;
        max-width: 340px;
        justify-content: center;
        min-height: 52px;
        padding: 0 26px;
        border: none;
        border-radius: 999px;
        background: var(--m-gold);
        color: #17263a;
        font-size: 12.5px;
    }

    .btn-cta:hover {
        background: #c2930f;
        color: #17263a;
    }
}

/* -------------------------------------------------------------
   11. Footer — left-aligned, flat, tight

   NOTE: these rules only load on the homepage because this file
   is only linked from index.html. To use the same footer on every
   page, copy section 11 into footer.css.
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Pre-footer: help line + quote button as one clean block */
    .pre-footer {
        padding: 26px 0;
        margin-bottom: 0;
        background: var(--m-navy-deep);
    }

    .pre-footer .container {
        padding-left: var(--m-gutter);
        padding-right: var(--m-gutter);
    }

    .pre-footer-content {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 16px;
    }

    .pre-footer span {
        font-size: 15px;
        font-weight: 700;
        letter-spacing: .6px;
        line-height: 1.45;
    }

    .quote-btn {
        width: 100%;
        max-width: none;
        justify-content: center;
        min-height: 50px;
        padding: 0 24px;
        border: none;
        border-radius: 999px;
        background: var(--m-gold);
        color: #17263a;
        font-size: 12.5px;
        letter-spacing: 1.4px;
    }

    .quote-btn:hover {
        background: #c2930f;
        color: #17263a;
    }

    /* Main footer */
    .main-footer {
        padding: 44px 0 32px;
    }

    .main-footer .container {
        padding-left: var(--m-gutter);
        padding-right: var(--m-gutter);
    }

    .footer-grid {
        display: block;
        gap: 0;
    }

    .footer-col {
        width: 100%;
        padding: 0;
        margin: 0 0 32px;
        text-align: left;
    }

    .footer-col:last-child { margin-bottom: 0; }

    /* Justified text creates ugly rivers at phone widths */
    .footer-col-1 p {
        text-align: left;
        font-size: 14px;
        line-height: 1.8;
        color: #aeb8c4;
    }

    .footer-col h4 {
        display: block;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 1.8px;
        text-transform: uppercase;
        color: #fff;
        margin-bottom: 16px;
        padding-bottom: 0;
        border-bottom: none;
    }

    .footer-col h4::after {
        content: '';
        display: block;
        width: 28px;
        height: 2px;
        margin-top: 10px;
        border-radius: 2px;
        background: var(--m-gold);
    }

    .footer-socials {
        display: flex;
        justify-content: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }

    .footer-socials a { margin-right: 0; width: 40px; height: 40px; }

    /* Sister concerns / associates */
    .sister-list { gap: 14px; }

    .sister-item {
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        min-height: 44px;
    }

    .sister-logo-img,
    .sister-logo {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .sister-logo-img.rect { width: 52px; height: 36px; }

    .sister-name { font-size: 13.5px; line-height: 1.35; }
    .sister-tagline { font-size: 12.5px; }

    /* Contact block */
    .contact-info { text-align: left; }

    .contact-info p {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 12px;
        color: #aeb8c4;
    }

    .contact-info a { color: #e6bb4f; }

    .contact-info .view-directions {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        margin-top: 4px;
        font-weight: 700;
        letter-spacing: .5px;
    }

    /* Sub footer */
    .sub-footer {
        padding: 18px 0 calc(18px + env(safe-area-inset-bottom));
    }

    .sub-footer .container {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 14px;
        padding-left: var(--m-gutter);
        padding-right: var(--m-gutter);
    }

    .sub-footer-right {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 16px;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 4px 8px;
    }

    .footer-bottom-links a { font-size: 12.5px; }

    .copyright { font-size: 12.5px; line-height: 1.6; }

    /* The fixed WhatsApp bubble already occupies the bottom-right corner,
       so the back-to-top chip would sit underneath it. Hide it on phones. */
    .back-to-top { display: none; }

    /* Keep the WhatsApp bubble clear of the back-to-top row */
    .whatsapp-float {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .whatsapp-float a {
        width: 52px;
        height: 52px;
        box-shadow: none;
    }
}

/* -------------------------------------------------------------
   12. Tablet tune-up (769px - 1024px)
   ------------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content h1 { font-size: 52px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .wwd-gallery { grid-template-columns: repeat(3, 1fr); }
    .about-features { gap: 18px 20px; }
}

/* -------------------------------------------------------------
   13. Motion preferences
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
    .about-img-overlap,
    .about-badge { animation: none; }
}
