/**
 * Captixa - Site & Admin Design System
 * Light theme | Captixa mint green | Inter + JetBrains Mono
 * Values come from the desktop app's src/styles/tokens.css so the site,
 * the customer area and the app read as one product.
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================ */
:root {
    /* Primary - Captixa green, for FILLS only (buttons, active nav, badges, progress).
       White text on #16C47F is 2.3:1 and fails, so text on a green fill is always
       --primary-ink (7.3:1). For green TEXT on white use --accent. */
    --primary: #16C47F;
    --primary-hover: #12B073;
    --primary-press: #0E9863;
    --primary-light: #4CE0AA;
    --primary-dark: #0B7A52;
    --primary-glow: #E4F9F0;
    --primary-surface: #F2FDF8;
    --primary-ink: #06231A;
    --primary-gradient: linear-gradient(135deg, #16C47F 0%, #0E9863 100%);

    /* Accent - green text and links on white (5.4:1) */
    --accent: #0B7A52;
    --accent-hover: #075C3D;
    --accent-light: #4CE0AA;

    /* Secondary - near-black ink for headings and emphasis blocks */
    --secondary: #17171C;
    --secondary-light: #1D1D25;

    /* Semantic colors - text-safe on white, and clearly distinct from the brand green */
    --success: #0B7A52;
    --success-bg: #E4F9F0;
    --warning: #B45309;
    --warning-bg: #FEF3C7;
    --danger: #DC2626;
    --danger-bg: #FEE2E2;
    --info: #2563EB;
    --info-bg: #DBEAFE;

    /* Surfaces - the app's cool-gray ramp */
    --bg-body: #FFFFFF;
    --bg-app: #F4F4F6;
    --bg-gradient: linear-gradient(180deg, #FFFFFF 0%, #F7F7F9 100%);
    --surface-1: #F7F7F9;
    --surface-2: #FFFFFF;
    --surface-3: #EFEFF2;
    --surface-glass: rgba(255, 255, 255, 0.92);
    --surface-hover: #F2F2F5;
    --surface-active: #E9E9EE;
    /* Dark media blocks - the app's video preview stage (hero bands, mockups, CTA bands) */
    --surface-dark: #14141A;
    --surface-dark-2: #1D1D25;

    /* Border Colors */
    --border: #E6E6EC;
    --border-light: #EFEFF2;
    --border-strong: #D5D5DE;
    --border-input: #DEDEDF;
    --border-active: var(--primary);
    --border-width: 1px;

    /* Text Colors */
    --text: #17171C;
    --text-secondary: #4B4B57;
    --text-muted: #6E6E7D;
    --text-disabled: #B0B0BD;
    /* text on the dark media surfaces above */
    --text-on-dark: #F5F5F7;
    --text-on-dark-secondary: #B8B8C4;

    /* Admin / customer-area chrome ("Graphite + Mint"): graphite sidebar,
       light #F4F4F6 workspace, white cards, mint active states. Used when
       the dashboard layouts are rebuilt in the last phase. */
    --sidebar-bg: #14141A;
    --sidebar-fg: #B8B8C4;
    --sidebar-fg-strong: #F5F5F7;
    --sidebar-hover: #1D1D25;
    --sidebar-active-bg: rgba(22, 196, 127, 0.14);
    --sidebar-active-fg: #4CE0AA;
    --sidebar-border: #26262F;

    /* Shadows - soft, cool-gray elevation (app --shadow-*) */
    --shadow-sm: 0 1px 2px rgba(16, 18, 27, 0.05);
    --shadow-md: 0 1px 3px rgba(16, 18, 27, 0.08), 0 1px 2px rgba(16, 18, 27, 0.04);
    --shadow-lg: 0 4px 12px rgba(16, 18, 27, 0.10);
    --shadow-xl: 0 12px 32px rgba(16, 18, 27, 0.14);
    --shadow-glow: 0 0 0 3px rgba(22, 196, 127, 0.22);
    --shadow-card: 0 1px 2px rgba(16, 18, 27, 0.05), 0 4px 12px rgba(16, 18, 27, 0.05);
    --shadow-brutal: 0 8px 24px rgba(22, 196, 127, 0.22);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Border Radius - the app's scale: 8px controls, 12px cards */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;

    /* Typography - Inter for everything (headings tighter and heavier), JetBrains Mono
       for licence keys, IDs and code. Same two families as the app. */
    --font-sans: 'Inter', 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --font-display: 'Inter', 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', ui-monospace, monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Transitions - the app's easing */
    --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 180ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 900;
    --z-modal: 1000;
    --z-tooltip: 1100;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 64px;
    --content-max-width: 1280px;
}

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

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

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-body);
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

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

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.025em;
}

h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; }

code, kbd, samp, pre { font-family: var(--font-mono); }

:focus-visible {
    outline: none;
    box-shadow: var(--shadow-glow);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

/* Green-to-deep-green text; kept dark enough to read on white at display sizes */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-press) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   LAYOUT
   ============================================================================ */
.container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* ============================================================================
   SECTION HEADERS
   ============================================================================ */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-3xl);
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: var(--surface-3);
    color: var(--text);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-md);
    border: 1px solid transparent;
}

.section-tag i {
    color: var(--primary);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;
}

.section-desc {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ============================================================================
   SCROLLBAR
   ============================================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--surface-1);
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

::selection {
    background: rgba(22, 196, 127, 0.22);
    color: var(--text);
}
