/* ============================================
   CSS Variables - Dark Brutalism Design System
   Cowch App - "Cozy Bold" Aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400;700;900&display=swap');

:root {
    /* ===== Typography ===== */
    --font-family: 'Gabarito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Gabarito', sans-serif;
    --font-body: var(--font-family);

    /* Font Sizes */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 2rem;      /* 32px */
    --font-size-4xl: 2.5rem;    /* 40px */
    --font-size-5xl: 3rem;      /* 48px */
    --font-size-giant: clamp(3rem, 8vw, 5rem);

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;

    /* ===== Dark Warm Palette ===== */
    --bg-primary: #1a1512;
    --bg-secondary: #2a2320;
    --bg-card: #2d2825;
    --bg-card-hover: #3a3533;
    --bg-elevated: #3a3228;
    --bg-dark: #0D0B09;

    /* Chat Message Backgrounds */
    --bg-mandy-message: #2d2825;
    --bg-user-message: var(--coral);

    /* ===== Accent Colors - Coral ===== */
    --coral: #D4896A;
    --coral-dark: #C47A5D;
    --coral-light: #E39B7F;
    --coral-glow: rgba(212, 137, 106, 0.25);

    /* Aliases for compatibility */
    --accent-primary: var(--coral);
    --accent-secondary: var(--coral-dark);
    --accent-hover: var(--coral-light);
    --accent-glow: var(--coral-glow);

    /* ===== Text Colors ===== */
    --text-primary: #F5F0E8;
    --text-secondary: #FFF8F0;
    --text-muted: #b0a499;
    --text-on-coral: var(--bg-primary);

    /* ===== Border Colors ===== */
    --border-warm: #8a7a6a;
    --border-coral: var(--coral);
    --border-subtle: rgba(255, 255, 255, 0.08);

    /* ===== IMAGINE Domain Colors ===== */
    --color-self: #E88A6A;       /* I - Self Care (coral) */
    --color-mind: #7EA88B;       /* M - Mindfulness (sage) */
    --color-accept: #C9A857;     /* A - Acceptance (gold) */
    --color-thanks: #B794C4;     /* G - Gratitude (lavender) */
    --color-connect: #6B9AAF;    /* I - Interactions (blue) */
    --color-play: #E8A86A;       /* N - Nurturing (warm orange) */
    --color-explore: #8FBC8F;    /* E - Exploring (green) */

    /* ===== Brutalism Design Tokens ===== */
    --border-thicc: 5px;
    --border-medium: 3px;
    --border-thin: 2px;

    --radius-chunky: 32px;
    --radius-medium: 24px;
    --radius-small: 16px;
    --radius-xs: 8px;
    --radius-full: 50%;

    /* Radius Aliases */
    --radius-xl: var(--radius-chunky);
    --radius-lg: var(--radius-medium);
    --radius-md: var(--radius-small);

    /* ===== Spacing Scale ===== */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */
    --space-3xl: 4rem;     /* 64px */

    /* ===== Layout ===== */
    --tab-bar-height: 80px;
    --header-height: 60px;
    --input-height: 52px;
    --max-width: 600px;

    /* ===== Shadows - Brutalist Style ===== */
    --shadow-brutal: 8px 8px 0 0 var(--bg-card);
    --shadow-brutal-coral: 8px 12px 0 0 var(--coral);
    --shadow-brutal-hover: 12px 16px 0 0 var(--coral);
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px var(--coral-glow);

    /* Standard Shadow Scale */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-accent: 0 4px 12px var(--coral-glow);

    /* ===== Transitions ===== */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-brutal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* ===== Z-Index Scale ===== */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 800;
    --z-modal: 900;
    --z-navbar: 1000;
    --z-toast: 1100;

    /* ===== Glassmorphism (for overlays) ===== */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-strong: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(20px) saturate(180%);
}

/* ===== Animations ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Safe Area CSS Environment Variables Fallbacks */
@supports not (padding-top: env(safe-area-inset-top)) {
    :root {
        --safe-area-top: 0px;
        --safe-area-bottom: 0px;
        --safe-area-left: 0px;
        --safe-area-right: 0px;
    }
}
