/* =====================================================
   AgriFlow – Master Stylesheet  v3.0
   Sections:
   01. Design Tokens       08. Buttons
   02. Reset & Base        09. Grid & Layout
   03. Typography          10. Cards
   04. Navigation          11. Badges & Tags
   05. Hero                12. Forms
   06. Layout Utils        13. Filter Bar
   07. Page Header         14. Marketplace
                           15. Dashboard
                           16. Demo System
                           17. Skeleton Loader
                           18. Utilities & Animations
                           19. Responsive
   ===================================================== */

/* ─── FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* =====================================================
   01. DESIGN TOKENS
   ===================================================== */
:root {
    /* ── Brand palette ── */
    --primary:          #2d6a4f;
    --primary-light:    #52b788;
    --primary-dark:     #1b4332;
    --primary-bg:       #d8f3dc;
    --primary-bg-soft:  #edf7ef;
    --secondary:        #e07a28;
    --secondary-light:  #f4a261;
    --accent:           #74c69d;

    /* ── Surfaces ── */
    --bg-body:          #f3f7f4;
    --bg-card:          #ffffff;
    --bg-muted:         #eef3ef;
    --bg-overlay:       rgba(255,255,255,0.92);

    /* ── Text ── */
    --text-heading:     #182e21;
    --text-main:        #334037;
    --text-muted:       #6a7d72;
    --text-subtle:      #9db09f;

    /* ── Borders ── */
    --border:           #dde8df;
    --border-focus:     var(--primary-light);

    /* ── Shadows ── */
    --shadow-xs:  0 1px 3px rgba(27,67,50,.05);
    --shadow-sm:  0 2px 8px rgba(27,67,50,.08);
    --shadow-md:  0 6px 24px rgba(27,67,50,.11);
    --shadow-lg:  0 16px 48px rgba(27,67,50,.14);
    --shadow-focus: 0 0 0 3px rgba(82,183,136,.22);

    /* ── Shape ── */
    --radius-xs:  6px;
    --radius-sm:  10px;
    --radius:     16px;
    --radius-lg:  22px;
    --radius-xl:  32px;
    --radius-full: 100px;

    /* ── Spacing scale (8-pt grid) ── */
    --sp-1:  4px;
    --sp-2:  8px;
    --sp-3:  12px;
    --sp-4:  16px;
    --sp-5:  20px;
    --sp-6:  24px;
    --sp-8:  32px;
    --sp-10: 40px;
    --sp-12: 48px;
    --sp-16: 64px;

    /* ── Typography scale ── */
    --text-xs:   0.75rem;    /* 12px */
    --text-sm:   0.875rem;   /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg:   1.125rem;   /* 18px */
    --text-xl:   1.25rem;    /* 20px */
    --text-2xl:  1.5rem;     /* 24px */
    --text-3xl:  1.875rem;   /* 30px */
    --text-4xl:  2.25rem;    /* 36px */
    --text-5xl:  3rem;       /* 48px */

    /* ── Motion ── */
    --ease:      cubic-bezier(.4,0,.2,1);
    --ease-out:  cubic-bezier(0,0,.3,1);
    --dur-fast:  150ms;
    --dur-base:  250ms;
    --dur-slow:  400ms;
    --transition: all var(--dur-base) var(--ease);

    /* ── Z-index stack ── */
    --z-nav:     200;
    --z-demo:    999;
}

/* =====================================================
   02. RESET & BASE
   ===================================================== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { display:block; max-width:100%; }

a { transition: color var(--dur-base) var(--ease); }

/* =====================================================
   03. TYPOGRAPHY
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); font-weight: 800; }
h2 { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p  { color: var(--text-main); line-height: 1.75; }
small { font-size: var(--text-sm); color: var(--text-muted); }
strong { font-weight: 600; color: var(--text-heading); }

/* =====================================================
   04. NAVIGATION
   ===================================================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    height: 68px;
    background: var(--bg-overlay);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    box-shadow: var(--shadow-xs);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    text-decoration: none;
    font-size: var(--text-xl);
    font-weight: 800;
    letter-spacing: -0.035em;
    flex-shrink: 0;
    color: var(--primary);
}

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: var(--text-sm);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-sm);
    transition: color var(--dur-base) var(--ease),
                background var(--dur-base) var(--ease);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-links a.active {
    color: var(--primary-dark);
    background: var(--primary-bg);
    font-weight: 600;
}

/* Mobile hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--sp-2);
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    transition: background var(--dur-fast) var(--ease);
}
.nav-toggle:hover { background: var(--bg-muted); }

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

/* =====================================================
   05. HERO
   ===================================================== */
.hero {
    text-align: center;
    padding: clamp(var(--sp-12), 10vw, 100px) 6% clamp(var(--sp-10), 8vw, 80px);
    background:
        radial-gradient(ellipse 70% 60% at 30% -10%, rgba(82,183,136,.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 75% 110%, rgba(45,106,79,.08) 0%, transparent 60%),
        var(--bg-body);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    background: rgba(45,106,79,.1);
    color: var(--primary-dark);
    border: 1px solid rgba(45,106,79,.2);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: var(--sp-6);
}

.hero h1 {
    max-width: 760px;
    margin: 0 auto var(--sp-6);
    color: var(--text-heading);
}

.hero > p {
    max-width: 560px;
    margin: 0 auto var(--sp-8);
    color: var(--text-muted);
    font-size: var(--text-lg);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--sp-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--sp-8);
}

/* Hero stat strip */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 680px;
    margin: 0 auto;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(45,106,79,.14);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--sp-6) var(--sp-8);
    gap: 0;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 var(--sp-8);
}

.hero-stat-num {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    letter-spacing: -0.04em;
}

.hero-stat-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: var(--sp-1);
    white-space: nowrap;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(45,106,79,.2);
    flex-shrink: 0;
}

/* =====================================================
   06. LAYOUT UTILITIES
   ===================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-12) 6%;
}

/* =====================================================
   07. PAGE HEADER
   ===================================================== */
.page-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto var(--sp-10);
}

.page-header h1 {
    color: var(--primary-dark);
    margin-bottom: var(--sp-3);
}

.page-header p {
    color: var(--text-muted);
    font-size: var(--text-lg);
}

.section-label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--primary-bg);
    padding: var(--sp-1) var(--sp-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--sp-4);
    border: 1px solid rgba(45,106,79,.2);
}

/* =====================================================
   08. BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0.65rem var(--sp-6);
    border-radius: var(--radius-full);
    border: 1.5px solid transparent;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
    transition:
        transform var(--dur-fast) var(--ease),
        box-shadow var(--dur-base) var(--ease),
        background var(--dur-base) var(--ease),
        color var(--dur-base) var(--ease),
        border-color var(--dur-base) var(--ease);
    user-select: none;
    white-space: nowrap;
}

.btn:active { transform: scale(.97); }

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(45,106,79,.28);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(45,106,79,.38);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-bg);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255,255,255,.65);
    color: var(--primary-dark);
    border-color: rgba(45,106,79,.28);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.8rem 1.75rem;
    font-size: var(--text-base);
}

/* =====================================================
   09. GRID & LAYOUT
   ===================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-6);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--sp-6);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-8);
}

/* =====================================================
   10. CARDS
   ===================================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--sp-6);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition:
        transform var(--dur-base) var(--ease),
        box-shadow var(--dur-base) var(--ease),
        border-color var(--dur-base) var(--ease);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

/* Card text atoms */
.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--sp-2);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.card-text {
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1.65;
}

/* ── Feature cards (home page) ── */
.feature-card {
    text-align: center;
    align-items: center;
    padding: var(--sp-8) var(--sp-6);
}

.card-icon {
    font-size: var(--text-3xl);
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-5);
    line-height: 1;
    flex-shrink: 0;
}

/* ── Stat cards ── */
.stat-card {
    text-align: center;
    padding: var(--sp-6) var(--sp-4);
    border-top: 3px solid var(--primary-light);
    gap: var(--sp-2);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card p {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    letter-spacing: -0.04em;
}

/* ── Product cards ── */
.product-card {
    padding: 0;
    overflow: hidden;
}

.product-img-wrap {
    overflow: hidden;
    height: 200px;
    flex-shrink: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg-muted);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease-out);
}

.product-card:hover .product-img {
    transform: scale(1.07);
}

.price-tag {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.03em;
    margin-top: var(--sp-4);
    line-height: 1;
}

.price-unit {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
}

/* ── Dashboard KPI cards ── */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-8);
}

.dash-kpi-card {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-5);
    padding: var(--sp-5) var(--sp-6);
    border-top: 3px solid var(--primary-light);
}

.dash-kpi-card:hover {
    border-top-color: var(--primary);
}

.dash-kpi-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg-soft);
    border-radius: var(--radius-sm);
    font-size: var(--text-2xl);
    flex-shrink: 0;
    border: 1px solid rgba(45,106,79,.12);
}

.dash-kpi-body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    min-width: 0;
}

.dash-kpi-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

.dash-kpi-value {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    letter-spacing: -0.04em;
}

/* ── Chart cards ── */
.dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
    margin-bottom: var(--sp-6);
}

.chart-card {
    padding: var(--sp-6);
    gap: 0;
}

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

.chart-card-header h3 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    margin: 0;
}

.chart-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--sp-1) var(--sp-3);
    border-radius: var(--radius-full);
    background: var(--bg-muted);
    color: var(--text-muted);
    white-space: nowrap;
}

.chart-wrap {
    position: relative;
    height: 280px;
    width: 100%;
}

/* =====================================================
   11. BADGES & TAGS
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-1) var(--sp-3);
    font-size: var(--text-xs);
    font-weight: 500;
    background: var(--primary-bg);
    color: var(--primary-dark);
    border-radius: var(--radius-full);
    border: 1px solid rgba(82,183,136,.3);
    line-height: 1.4;
}

/* =====================================================
   12. FORMS
   ===================================================== */
.form-group {
    margin-bottom: var(--sp-5);
}

.form-group label {
    display: block;
    margin-bottom: var(--sp-2);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-heading);
}

.form-control {
    width: 100%;
    padding: 0.65rem var(--sp-4);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: var(--text-sm);
    color: var(--text-main);
    background: white;
    transition:
        border-color var(--dur-base) var(--ease),
        box-shadow var(--dur-base) var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: var(--shadow-focus);
}

.form-control::placeholder { color: var(--text-subtle); }

/* =====================================================
   13. FILTER BAR
   ===================================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    align-items: center;
    padding: var(--sp-4) var(--sp-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    margin-bottom: var(--sp-6);
}

.search-input {
    flex: 1 1 220px;
    min-width: 160px;
    border-radius: var(--radius-full) !important;
}

.filter-select {
    flex: 0 1 200px;
    cursor: pointer;
}

/* Category filter pills */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    width: 100%;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition:
        border-color var(--dur-base) var(--ease),
        background var(--dur-base) var(--ease),
        color var(--dur-base) var(--ease),
        box-shadow var(--dur-base) var(--ease);
}

.filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--primary-bg);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(45,106,79,.28);
}

/* =====================================================
   14. MARKETPLACE ELEMENTS
   ===================================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: var(--sp-12) var(--sp-8);
    font-size: var(--text-sm);
}

/* =====================================================
   15. DASHBOARD ELEMENTS
   ===================================================== */
.insight-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.insight-item {
    padding: var(--sp-4) var(--sp-5);
    border-left: 3px solid var(--primary-light);
    background: var(--bg-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: var(--text-sm);
    color: var(--text-main);
    line-height: 1.7;
    animation: fadeSlideUp var(--dur-slow) var(--ease-out) both;
}

.insight-item strong { color: var(--primary-dark); }

/* =====================================================
   16. DEMO SYSTEM
   ===================================================== */

/* ── "Demo Mode Active" pill badge ── */
.demo-badge {
    position: fixed;
    bottom: var(--sp-5);
    right: var(--sp-5);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--radius-full);
    z-index: var(--z-demo);
    box-shadow: 0 4px 16px rgba(27,67,50,.4);
    letter-spacing: 0.05em;
    pointer-events: none;
    animation: badgePulse 3s var(--ease) infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(27,67,50,.4); }
    50%       { box-shadow: 0 4px 28px rgba(27,67,50,.65); }
}

/* ── Context banner ── */
.demo-banner {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-3) 6%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    font-size: var(--text-sm);
    flex-wrap: wrap;
}

.demo-banner-icon { font-size: 1.5rem; flex-shrink: 0; }

.demo-banner strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.demo-banner-sub {
    color: rgba(255,255,255,.8);
    font-size: var(--text-xs);
    line-height: 1.4;
}

.demo-banner-next {
    margin-left: auto;
    flex-shrink: 0;
    background: rgba(255,255,255,.16);
    color: white;
    text-decoration: none;
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.28);
    white-space: nowrap;
    transition: background var(--dur-base) var(--ease);
}

.demo-banner-next:hover { background: rgba(255,255,255,.28); }

/* ── Highlight section ── */
.demo-highlight {
    position: relative;
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-lg);
    padding: var(--sp-6) var(--sp-5) var(--sp-5);
    margin-bottom: var(--sp-8);
    background: linear-gradient(135deg, rgba(216,243,220,.3) 0%, transparent 100%);
    box-shadow: 0 0 0 4px rgba(82,183,136,.1), var(--shadow-sm);
}

.demo-highlight-label {
    position: absolute;
    top: -0.72rem;
    left: var(--sp-5);
    background: var(--primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 0.18rem var(--sp-3);
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Callout tip ── */
.demo-callout {
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    background: var(--primary-bg);
    border-left: 3px solid var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--primary-dark);
    line-height: 1.6;
}

/* ── Problem strip (home page) ── */
.problem-strip {
    background: var(--primary-dark);
    padding: var(--sp-8) 6%;
}

.problem-strip-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: var(--sp-6);
    flex-wrap: wrap;
    justify-content: center;
}

.problem-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    max-width: 300px;
    flex: 1;
    min-width: 220px;
}

.problem-icon {
    font-size: var(--text-2xl);
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.problem-item--solution .problem-icon {
    background: rgba(82,183,136,.25);
}

.problem-item strong { display:block; color:white; font-size:var(--text-sm); margin-bottom:var(--sp-1); }
.problem-item p { color:rgba(255,255,255,.65); font-size:var(--text-sm); line-height:1.55; }
.problem-arrow { color:rgba(255,255,255,.35); font-size:var(--text-2xl); font-weight:300; flex-shrink:0; padding-top:var(--sp-3); }

/* ── Demo flow cards (home page) ── */
.demo-flow-header {
    text-align: center;
    margin-bottom: var(--sp-8);
}

.demo-flow-tag {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary-dark);
    font-size: var(--text-xs);
    font-weight: 700;
    padding: var(--sp-1) var(--sp-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--sp-4);
    border: 1px solid rgba(45,106,79,.2);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.demo-flow-header h2 { color: var(--primary-dark); margin-bottom: var(--sp-2); }
.demo-flow-header p  { color: var(--text-muted); max-width: 500px; margin: 0 auto; }

.demo-flow-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: var(--sp-5);
    margin-bottom: var(--sp-12);
}

.demo-flow-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--sp-6) var(--sp-5) var(--sp-5);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    position: relative;
    transition:
        transform var(--dur-base) var(--ease),
        box-shadow var(--dur-base) var(--ease),
        border-color var(--dur-base) var(--ease);
}

.demo-flow-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.demo-flow-step {
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-5);
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--text-subtle);
    letter-spacing: 0.06em;
}

.demo-flow-icon {
    font-size: var(--text-3xl);
    line-height: 1;
    margin-bottom: var(--sp-2);
}

.demo-flow-card h3  { font-size: var(--text-base); color: var(--primary-dark); margin:0; }
.demo-flow-card p   { font-size: var(--text-sm); color: var(--text-muted); flex-grow:1; margin:0; }
.demo-flow-cta      { font-size: var(--text-sm); font-weight: 700; color: var(--primary); }

/* =====================================================
   17. SKELETON LOADER
   ===================================================== */
@keyframes shimmer {
    0%   { background-position: -800px 0; }
    100% { background-position:  800px 0; }
}

.skeleton-card {
    height: 380px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(90deg, #e8ede9 25%, #d6e2d7 50%, #e8ede9 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* =====================================================
   18. UTILITIES & ANIMATIONS
   ===================================================== */

/* Section headlines */
.section-title    { font-size: var(--text-3xl); color: var(--primary-dark); margin-bottom: var(--sp-2); text-align:center; }
.section-subtitle { color: var(--text-muted); text-align:center; margin-bottom: var(--sp-8); }

.features-header { text-align:center; margin-bottom: var(--sp-8); }
.features-header h2 { color: var(--primary-dark); margin-bottom: var(--sp-2); }
.features-header p  { color: var(--text-muted); }

/* Scroll reveal system */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal.visible { opacity:1; transform:translateY(0); }

/* Fade-slide keyframes */
@keyframes fadeSlideUp {
    from { opacity:0; transform:translateY(10px); }
    to   { opacity:1; transform:translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =====================================================
   19. RESPONSIVE
   ===================================================== */

/* ── Tablet ── */
@media (max-width: 960px) {
    .grid    { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    .grid-2  { grid-template-columns: 1fr; }
    .dash-grid-2 { grid-template-columns: 1fr; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: var(--sp-3) 5%;
        gap: 0;
    }

    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: var(--sp-3) 0 var(--sp-2);
        gap: var(--sp-1);
        border-top: 1px solid var(--border);
        margin-top: var(--sp-3);
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        padding: var(--sp-3) var(--sp-3);
        border-radius: var(--radius-sm);
    }

    .hero { padding: var(--sp-12) 5% var(--sp-10); }
    .hero h1 { font-size: clamp(var(--text-3xl), 8vw, var(--text-4xl)); }
    .hero > p { font-size: var(--text-base); }
    .hero-actions { gap: var(--sp-3); }

    .hero-stat  { padding: 0 var(--sp-4); }
    .hero-stat-divider { display: none; }
    .hero-stats { gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); }
    .hero-stat-num { font-size: var(--text-3xl); }

    .container { padding: var(--sp-8) 5%; }
    .grid { grid-template-columns: 1fr; }

    .stat-card p { font-size: var(--text-3xl); }
    .dash-kpi-value { font-size: var(--text-3xl); }
    .chart-wrap { height: 240px; }

    .demo-banner { gap: var(--sp-3); padding: var(--sp-3) 5%; }
    .demo-banner-next { margin-left: 0; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .category-filters { justify-content: flex-start; }
    .search-input { min-width: 100%; }

    .problem-item { max-width: 100%; min-width: 0; }
    .problem-arrow { display: none; }
}

/* ── Small mobile ── */
@media (max-width: 480px) {
    .hero h1 { font-size: var(--text-3xl); }
    .card { padding: var(--sp-5); }
    .dash-kpi-card { padding: var(--sp-4); gap: var(--sp-4); }
    .dash-kpi-icon { width: 44px; height: 44px; min-width: 44px; font-size: var(--text-xl); }
    .demo-flow-cards { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .btn-lg { padding: 0.7rem var(--sp-6); font-size: var(--text-sm); }
}