/* ==========================================================================
   StockFlow - Site Styles
   Modern inventory & sales management SaaS
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --sf-primary: #2563EB;
    --sf-primary-dark: #1D4ED8;
    --sf-secondary: #0F172A;
    --sf-accent: #10B981;
    --sf-accent-dark: #059669;
    --sf-light: #F8FAFC;
    --sf-gray: #64748B;
    --sf-gray-light: #94A3B8;
    --sf-border: #E2E8F0;
    --sf-danger: #EF4444;
    --sf-warning: #F59E0B;
    --sf-info: #3B82F6;
    --sf-radius: 0.5rem;
    --sf-radius-lg: 0.75rem;
    --sf-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --sf-shadow: 0 1px 3px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06);
    --sf-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.1);
    --sf-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.1);
    --sf-shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    --sf-transition: all 0.2s ease;
    --sf-transition-slow: all 0.3s ease;
}

/* ---------- Base / Reset ---------- */
html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--sf-secondary);
    background-color: #fff;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--sf-primary);
    text-decoration: none;
    transition: var(--sf-transition);
}

a:hover {
    color: var(--sf-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--sf-secondary);
}

.sf-section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sf-primary);
    background: rgba(37, 99, 235, 0.08);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.sf-section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--sf-secondary);
}

.sf-section-subtitle {
    font-size: 1.125rem;
    color: var(--sf-gray);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ---------- Navbar ---------- */
.sf-navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--sf-transition-slow);
    z-index: 1050;
}

.sf-navbar-scrolled {
    padding: 0.6rem 0;
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: var(--sf-border);
    box-shadow: var(--sf-shadow-sm);
}

.sf-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.sf-brand:hover {
    text-decoration: none;
}

.sf-brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sf-secondary);
    letter-spacing: -0.02em;
}

.sf-nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sf-gray) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--sf-radius);
    transition: var(--sf-transition);
}

.sf-nav-link:hover,
.sf-nav-link.active {
    color: var(--sf-secondary) !important;
    background: var(--sf-light);
}

.sf-toggler {
    border: 1px solid var(--sf-border);
    padding: 0.35rem 0.6rem;
    border-radius: var(--sf-radius);
}

/* ---------- Buttons ---------- */
.btn-sf-primary {
    background: linear-gradient(135deg, var(--sf-primary), var(--sf-primary-dark));
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--sf-radius);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
    transition: var(--sf-transition);
}

.btn-sf-primary:hover,
.btn-sf-primary:focus {
    background: linear-gradient(135deg, var(--sf-primary-dark), #1e40af);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-sf-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-sf-outline {
    background: transparent;
    color: var(--sf-primary);
    border: 1.5px solid var(--sf-primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--sf-radius);
    transition: var(--sf-transition);
}

.btn-sf-outline:hover,
.btn-sf-outline:focus {
    background: var(--sf-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-sf-accent {
    background: linear-gradient(135deg, var(--sf-accent), var(--sf-accent-dark));
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--sf-radius);
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
    transition: var(--sf-transition);
}

.btn-sf-accent:hover,
.btn-sf-accent:focus {
    background: linear-gradient(135deg, var(--sf-accent-dark), #047857);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-sf-accent:active {
    transform: translateY(0);
}

.btn-sf-lg {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

/* ---------- Hero Section ---------- */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--sf-secondary) 0%, #1e293b 50%, #0f2744 100%);
    color: #fff;
    padding: 10rem 0 6rem;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
    letter-spacing: -0.03em;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--sf-primary), #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--sf-gray-light);
    margin-bottom: 2.5rem;
    max-width: 540px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 1rem;
}

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--sf-gray-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-image-wrapper {
    position: relative;
    z-index: 1;
}

.hero-image-wrapper img,
.hero-image-wrapper .hero-placeholder {
    border-radius: var(--sf-radius-lg);
    box-shadow: var(--sf-shadow-xl), 0 0 60px rgba(37, 99, 235, 0.15);
}

.hero-placeholder {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--sf-radius-lg);
    padding: 2rem;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sf-gray-light);
}

/* Grid/dot pattern overlay for hero */
.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* ---------- Section Spacing ---------- */
.sf-section {
    padding: 5rem 0;
}

.sf-section-alt {
    padding: 5rem 0;
    background: var(--sf-light);
}

.sf-section-dark {
    padding: 5rem 0;
    background: var(--sf-secondary);
    color: #fff;
}

.sf-section-dark h2,
.sf-section-dark h3 {
    color: #fff;
}

.sf-section-dark .sf-section-subtitle {
    color: var(--sf-gray-light);
}

/* ---------- Feature Cards ---------- */
.feature-card {
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 2rem;
    transition: var(--sf-transition-slow);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sf-primary), var(--sf-accent));
    opacity: 0;
    transition: var(--sf-transition-slow);
}

.feature-card:hover {
    border-color: transparent;
    box-shadow: var(--sf-shadow-lg);
    transform: translateY(-4px);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--sf-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.feature-card-icon.icon-blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--sf-primary);
}

.feature-card-icon.icon-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--sf-accent);
}

.feature-card-icon.icon-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.feature-card-icon.icon-orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--sf-warning);
}

.feature-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--sf-gray);
    font-size: 0.925rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ---------- Stats / Metrics Section ---------- */
.stats-section {
    background: linear-gradient(135deg, var(--sf-primary), var(--sf-primary-dark));
    padding: 3.5rem 0;
}

.stat-item {
    text-align: center;
    color: #fff;
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Testimonials ---------- */
.testimonial-card {
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 2rem;
    transition: var(--sf-transition);
    height: 100%;
}

.testimonial-card:hover {
    box-shadow: var(--sf-shadow-md);
}

.testimonial-stars {
    color: var(--sf-warning);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--sf-gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sf-primary), var(--sf-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--sf-secondary);
}

.testimonial-role {
    font-size: 0.8rem;
    color: var(--sf-gray);
}

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--sf-secondary) 0%, #1e293b 100%);
    padding: 5rem 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.cta-section h2 {
    color: #fff;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-section p {
    color: var(--sf-gray-light);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.cta-section .btn {
    position: relative;
    z-index: 1;
}

/* ---------- Footer ---------- */
.sf-footer {
    background: var(--sf-secondary);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 0;
}

.sf-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sf-footer-brand span {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.sf-footer-desc {
    font-size: 0.875rem;
    color: var(--sf-gray-light);
    line-height: 1.7;
    max-width: 300px;
}

.sf-footer-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    margin-bottom: 1rem;
}

.sf-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sf-footer-links li {
    margin-bottom: 0.5rem;
}

.sf-footer-links a {
    color: var(--sf-gray-light);
    font-size: 0.875rem;
    transition: var(--sf-transition);
}

.sf-footer-links a:hover {
    color: #fff;
}

.sf-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
}

.sf-footer-bottom p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--sf-gray);
}

/* ---------- Table Styling ---------- */
.sf-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.sf-table thead th {
    background: var(--sf-light);
    color: var(--sf-gray);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--sf-border);
    white-space: nowrap;
}

.sf-table thead th:first-child {
    border-radius: var(--sf-radius) 0 0 0;
}

.sf-table thead th:last-child {
    border-radius: 0 var(--sf-radius) 0 0;
}

.sf-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--sf-border);
    vertical-align: middle;
    color: var(--sf-secondary);
}

.sf-table tbody tr:hover {
    background: var(--sf-light);
}

.sf-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Badges / Status Labels ---------- */
.sf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    white-space: nowrap;
}

.sf-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--sf-accent-dark);
}

.sf-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #B45309;
}

.sf-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

.sf-badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--sf-primary);
}

.sf-badge-neutral {
    background: rgba(100, 116, 139, 0.1);
    color: var(--sf-gray);
}

/* Status dot inside badges */
.sf-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.sf-badge-success .sf-badge-dot {
    background: var(--sf-accent);
}

.sf-badge-warning .sf-badge-dot {
    background: var(--sf-warning);
}

.sf-badge-danger .sf-badge-dot {
    background: var(--sf-danger);
}

/* ---------- Cards (General) ---------- */
.sf-card {
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--sf-shadow-sm);
    transition: var(--sf-transition);
}

.sf-card:hover {
    box-shadow: var(--sf-shadow-md);
}

.sf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sf-border);
}

.sf-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

/* ---------- Form Overrides ---------- */
.form-control:focus,
.form-select:focus {
    border-color: var(--sf-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sf-secondary);
    margin-bottom: 0.4rem;
}

/* ---------- Utility Classes ---------- */
.text-sf-primary {
    color: var(--sf-primary) !important;
}

.text-sf-accent {
    color: var(--sf-accent) !important;
}

.text-sf-gray {
    color: var(--sf-gray) !important;
}

.bg-sf-light {
    background-color: var(--sf-light) !important;
}

.border-sf {
    border-color: var(--sf-border) !important;
}

/* ---------- Focus Styles ---------- */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.25);
}

/* ---------- Logo List / Trusted By ---------- */
.logo-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    opacity: 0.5;
    filter: grayscale(1);
}

.logo-strip img {
    height: 24px;
    object-fit: contain;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 8rem 0 4rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .sf-section-title {
        font-size: 1.85rem;
    }

    .hero-image-wrapper {
        margin-top: 3rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 7rem 0 3rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    .sf-section,
    .sf-section-alt,
    .sf-section-dark {
        padding: 3.5rem 0;
    }

    .sf-section-title {
        font-size: 1.6rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .sf-footer {
        padding-top: 3rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}
