/* ==========================================================================
   FILE: website/static/css/custom.css
   PROJECT: IMAAS (Influencer Marketing Agency Automation System)
   AGENCY: Maa Tara Media Agency (https://maataramedia.in)
   THEME: ProClean Executive Editorial + Sacred Amber Gold & Conversion Emerald
   ARCHITECTURE: Ultra-Light Zero-JS-Bloat Stylesheet (< 8KB Gzipped)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (EXACT PRD COLOR PALETTE & TOKENS)
   -------------------------------------------------------------------------- */
:root {
    --color-midnight: #0F172A;
    --color-navy: #1E293B;
    --color-slate-border: #334155;
    --color-emerald: #10B981;
    --color-emerald-dark: #059669;
    --color-emerald-light: #D1FAE5;
    --color-sacred-gold: #D97706;
    --color-sacred-gold-light: #FDE68A;
    --color-sacred-gold-soft: #FFFBEB;
    --color-alabaster: #F8FAFC;
    --font-editorial: 'Instrument Serif', Georgia, Cambria, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-num: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}

/* --------------------------------------------------------------------------
   2. BASE TYPOGRAPHY, SMOOTH SCROLL & STICKY NAVBAR OFFSET
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-family: var(--font-sans);
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-alabaster);
    color: var(--color-midnight);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevents the 80px (h-20) sticky header from covering section titles on anchor jumps */
section[id],
div[id="niche-rates"],
div[id="why-us"] {
    scroll-margin-top: 5.75rem;
}

.font-editorial {
    font-family: var(--font-editorial);
    letter-spacing: 0.012em;
    line-height: 1.08;
    font-weight: 400;
}

.font-num {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Custom Text Selection */
::selection {
    background-color: var(--color-emerald);
    color: #FFFFFF;
}

/* Sleek Custom Scrollbar for Desktop & Modals */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-midnight);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
    border: 2px solid var(--color-midnight);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-emerald);
}

/* --------------------------------------------------------------------------
   3. HERO SECTION (PROCLEAN SPLIT / ATMOSPHERIC OVERLAY ARCHITECTURE)
   -------------------------------------------------------------------------- */
.hero-proclean-bg {
    background-color: var(--color-midnight);
    background-image:
        radial-gradient(circle at 82% 22%, rgba(16, 185, 129, 0.14) 0%, transparent 44%),
        radial-gradient(circle at 16% 82%, rgba(217, 119, 6, 0.14) 0%, transparent 42%),
        linear-gradient(135deg, #0F172A 0%, #111C30 55%, #1E293B 100%);
    position: relative;
}

.hero-grid-subtle {
    opacity: 0.03;
    background-image:
        linear-gradient(to right, #ffffff 1px, transparent 1px),
        linear-gradient(to bottom, #ffffff 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000000 35%, transparent 80%);
    mask-image: radial-gradient(ellipse at center, #000000 35%, transparent 80%);
}

/* Subtle glass reflection on the Hero Benchmark Card */
.hero-proclean-bg .backdrop-blur-md {
    box-shadow:
        0 25px 50px -12px rgba(2, 6, 23, 0.65),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   4. INFINITE AUTO-UPDATING CREATOR MARQUEE (WITH SOFT EDGE FADE MASKS)
   -------------------------------------------------------------------------- */
@keyframes marqueeScroll {
    0% {
        transform: translate3d(0%, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.animate-marquee {
    display: flex;
    width: max-content;
    animation: marqueeScroll 38s linear infinite;
    will-change: transform;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* Soft horizontal fade mask on the creator showcase container */
#creator-network .overflow-hidden {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000000 6%,
        #000000 94%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000000 6%,
        #000000 94%,
        transparent 100%
    );
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .animate-marquee {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   5. SACRED MAA TARA (TARAPITH DHAM) HERITAGE CARD & GOLD FRAME
   -------------------------------------------------------------------------- */
.sacred-gold-card {
    background:
        radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.20) 0%, transparent 60%),
        linear-gradient(145deg, #0F172A 0%, #1E293B 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.55);
    box-shadow:
        0 22px 48px -12px rgba(15, 23, 42, 0.45),
        0 0 28px -6px rgba(217, 119, 6, 0.25),
        inset 0 1px 0 0 rgba(253, 230, 138, 0.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sacred-gold-card:hover {
    transform: translateY(-3px);
    border-color: rgba(253, 230, 138, 0.85);
    box-shadow:
        0 28px 55px -12px rgba(15, 23, 42, 0.55),
        0 0 36px -4px rgba(217, 119, 6, 0.38);
}

/* Sacred Image Frame Inner Glow */
.sacred-gold-card img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sacred-gold-card:hover img {
    transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   6. INTERACTIVE CARDS, PACKAGE BUNDLES & TABLE POLISH
   -------------------------------------------------------------------------- */
#packages .rounded-2xl {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease;
}

#packages .grid > div:hover {
    transform: translateY(-4px);
}

/* 5-Niche CPV Matrix Table Polish */
#niche-rates table th {
    white-space: nowrap;
}

#niche-rates table td {
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   7. ONBOARDING PORTAL FORMS (FOCUS RINGS, INPUTS & BUTTON STATES)
   -------------------------------------------------------------------------- */
#onboard-portal input:focus,
#onboard-portal select:focus,
#onboard-portal textarea:focus {
    border-color: var(--color-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
    outline: none;
}

#reviewModal input:focus,
#reviewModal select:focus,
#reviewModal textarea:focus {
    border-color: var(--color-midnight);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
    outline: none;
}

/* Disabled Submit Button State during AJAX Sync */
button[type="submit"]:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none !important;
}

/* --------------------------------------------------------------------------
   8. MODAL POP-UP ANIMATIONS (REVIEW MODAL & PRIVACY/ESCROW MODAL)
   -------------------------------------------------------------------------- */
@keyframes modalFadeScale {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#reviewModal.flex > div,
#privacyModal.flex > div {
    animation: modalFadeScale 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --------------------------------------------------------------------------
   9. MOBILE & RESPONSIVE REFINEMENTS
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .hero-proclean-bg h1 {
        font-size: 2.65rem;
        line-height: 1.08;
    }

    #niche-rates table th,
    #niche-rates table td {
        padding: 0.85rem 1rem;
        font-size: 0.8125rem;
    }
}