/* ============================================================
   Scoopy's Splendid Ice Creams - Shared Stylesheet
   ------------------------------------------------------------
   Consolidated from inline <style> blocks across index/about/
   careers. Loaded on every page.

   NOTE: Tailwind is loaded via the Play CDN for now. For
   production, run the Tailwind CLI to generate a purged CSS
   file and replace the CDN script with a local <link>.
   ============================================================ */

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: #FFFFFF;
    color: #4A4A4A;
}

/* ---------- Skip-to-content link (a11y) ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: #A799E1;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 0.5rem 0.5rem;
}
.skip-link:focus {
    left: 1rem;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* ---------- Brand utilities ---------- */
.bg-brand-purple { background-color: #A799E1; }
.text-brand-purple { color: #A799E1; }
.border-brand-purple { border-color: #A799E1; }
.hover\:bg-brand-purple-dark:hover { background-color: #8675C4; }
.hover\:text-brand-purple-dark:hover { color: #8675C4; }
.hover\:border-brand-purple-dark:hover { border-color: #8675C4; }
.focus\:border-brand-purple:focus { border-color: #A799E1; }
.focus\:ring-brand-purple:focus { --tw-ring-color: #A799E1; }
.bg-brand-purple\/10 { background-color: rgba(167, 153, 225, 0.1); }

/* ---------- Nav links ---------- */
.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4A5568;
    position: relative;
    padding-bottom: 4px;
    overflow: hidden;
    transition: color 0.3s ease-in-out;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    transition: width 0.3s ease-in-out;
    background-color: transparent;
}
.nav-link:hover::after { width: 100%; }

.nav-link.flavors:hover { color: #D8BFD8; }
.nav-link.flavors:hover::after { background-color: #D8BFD8; }
.nav-link.about:hover,
.nav-link.partnership:hover { color: #FFB6C1; }
.nav-link.about:hover::after,
.nav-link.partnership:hover::after { background-color: #FFB6C1; }
.nav-link.network:hover { color: #87CEEB; }
.nav-link.network:hover::after { background-color: #87CEEB; }
.nav-link.testimonials:hover { color: #F0E68C; }
.nav-link.testimonials:hover::after { background-color: #F0E68C; }
.nav-link.careers:hover { color: #A799E1; }
.nav-link.careers:hover::after { background-color: #A799E1; }
.nav-link.contact:hover { color: #FFA07A; }
.nav-link.contact:hover::after { background-color: #FFA07A; }

.nav-link.active { color: #A799E1; }
.nav-link.active::after { width: 100%; background-color: #A799E1; }

/* ---------- Mobile menu drawer ---------- */
.mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: #374151;
    background: transparent;
    border: none;
    cursor: pointer;
}
.mobile-menu-btn:focus-visible {
    outline: 2px solid #A799E1;
    outline-offset: 2px;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
    z-index: 60;
}
.mobile-menu-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(85vw, 320px);
    background: #fff;
    box-shadow: -10px 0 30px -10px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 70;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
}
.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu nav a {
    display: block;
    padding: 0.875rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.mobile-menu nav a:hover,
.mobile-menu nav a:focus-visible { background: rgba(167, 153, 225, 0.1); color: #A799E1; }
.mobile-menu nav a.active { color: #A799E1; }

/* prevent body scroll when menu is open */
body.menu-open { overflow: hidden; }

/* ---------- Animations ---------- */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in-up { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- Paint swipe text effect ---------- */
.paint-swipe {
    position: relative;
    display: inline-block;
    font-weight: 600;
    color: #374151;
}
.paint-swipe::before {
    content: '';
    position: absolute;
    inset: -0.2em -0.5em;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='40' viewBox='0 0 200 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 15C50 5 150 5 200 15V25C150 35 50 35 0 25V15Z' fill='%23A799E1'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.8s cubic-bezier(0.25, 1, 0.5, 1) 0.3s;
}
.fade-in-up.is-visible .paint-swipe::before { transform: scaleX(1); }

/* ---------- Timeline (about page) ---------- */
.timeline-line {
    background: linear-gradient(to bottom,
        rgba(167, 153, 225, 0) 0%,
        #A799E1 10%,
        #A799E1 90%,
        rgba(167, 153, 225, 0) 100%);
}

/* ---------- Value cards (about page) ---------- */
.value-card { transition: all 0.3s ease-in-out; }
.value-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(167, 153, 225, 0.3);
}

/* ---------- Team cards (about page) ---------- */
.team-card img { transition: transform 0.5s ease-in-out; }
.team-card:hover img { transform: scale(1.05); }

/* ---------- Job listings (careers page) ---------- */
.job-card { transition: all 0.3s ease-in-out; }
.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(167, 153, 225, 0.25);
}
.job-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out;
}
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: rgba(167, 153, 225, 0.15);
    color: #6B5BB0;
}
.filter-btn { transition: all 0.2s ease-in-out; }
.filter-btn.active {
    background-color: #A799E1;
    color: white;
    border-color: #A799E1;
}

/* ---------- Position dropdown (placeholder vs selected) ---------- */
select.has-value { color: #1f2937 !important; }

/* ---------- Back-to-top button ---------- */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background-color: #A799E1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(167, 153, 225, 0.5);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background-color 0.3s ease;
    z-index: 40;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { background-color: #8675C4; }
.back-to-top:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
