/* ============================================
   SAS & Co — Custom Styles
   Bold Editorial · Teal + Slate Grey
   ============================================ */

/* --- Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* --- Hero Animations (only for below-fold content) --- */
.hero-eyebrow,
.hero-headline,
.hero-sub,
.hero-ctas,
.hero-stats {
    /* Default state: visible — JS enhances if available */
}

/* --- Navbar Transition --- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 250, 249, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* --- Mobile Menu --- */
#mobileMenu.open {
    transform: translateX(0);
}

/* --- Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Hero entrance (only if JS runs; graceful fallback) --- */
@media (prefers-reduced-motion: no-preference) {
    .hero-eyebrow {
        transform: translateY(100%);
        transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .hero-headline {
        transform: translateY(100%);
        transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
    }
    .hero-sub {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
    }
    .hero-ctas {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
    }
    .hero-stats {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.7s ease 0.4s, transform 0.7s ease 0.4s;
    }
    .hero-loaded .hero-eyebrow,
    .hero-loaded .hero-headline {
        transform: translateY(0);
    }
    .hero-loaded .hero-sub,
    .hero-loaded .hero-ctas,
    .hero-loaded .hero-stats {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Input Focus States --- */
input:focus,
textarea:focus {
    outline: none;
}

/* --- Smooth image loading --- */
img {
    display: block;
    max-width: 100%;
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #backToTop,
    #mobileMenu {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
    a {
        color: black !important;
    }
}
