/* ===================================
   MAIN STYLES
   Calmmind Brand Guidelines Implementation
   ================================== */

/* CSS Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Prevent horizontal scroll */
    overflow-x: hidden;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Arial Rounded', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #343A40;
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Account for fixed header */
    padding-top: 80px;
    /* Prevent horizontal scroll */
    overflow-x: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

/* Brand Color Variables */
:root {
    /* Brand Colors */
    --color-slate-grey: #6C757D;
    --color-amber: #FFB703;
    --color-white: #FFFFFF;
    --color-soft-sage: #DDE7DC;
    --color-charcoal: #343A40;
    
    /* Extended Palette */
    --color-amber-light: #FFC94C;
    --color-amber-dark: #E6A003;
    --color-slate-light: #868E96;
    --color-slate-dark: #495057;
    --color-sage-light: #E8F5E8;
    --color-sage-dark: #C4D3C2;
    
    /* Semantic Colors */
    --color-success: #28A745;
    --color-error: #DC3545;
    --color-warning: #FFC107;
    --color-info: #17A2B8;
    
    /* Typography */
    --font-primary: 'Nunito', -apple-system, BlinkMacSystemFont, 'Arial Rounded', Arial, sans-serif;
    --font-weight-regular: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Spacing Scale (8px base unit) */
    --spacing-xs: 0.5rem;   /* 8px */
    --spacing-sm: 1rem;     /* 16px */
    --spacing-md: 1.5rem;   /* 24px */
    --spacing-lg: 2rem;     /* 32px */
    --spacing-xl: 3rem;     /* 48px */
    --spacing-2xl: 4rem;    /* 64px */
    --spacing-3xl: 6rem;    /* 96px */
    
    /* Layout */
    --container-max-width: 1200px;
    --container-padding: var(--spacing-sm);
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-charcoal);
}

h1 { font-size: 2.5rem; font-weight: var(--font-weight-extrabold); }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; font-weight: var(--font-weight-semibold); }

/* Mobile-first responsive typography */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-slate-grey);
}

a {
    color: var(--color-amber);
    text-decoration: none;
    transition: var(--transition);
}

a:hover, a:focus {
    color: var(--color-amber-dark);
    text-decoration: underline;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--color-amber);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-charcoal);
    color: var(--color-white);
    padding: var(--spacing-xs) var(--spacing-sm);
    z-index: 1000;
    text-decoration: none;
    border-radius: var(--border-radius);
}

.skip-link:focus {
    top: 6px;
}

/* Layout Components */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
        max-width: 100%;
    }
}

/* Section Styling */
section {
    padding: var(--spacing-2xl) 0;
}

@media (max-width: 768px) {
    section {
        padding: var(--spacing-xl) 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    color: var(--color-charcoal);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-slate-grey);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
    width: 100%;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

@media (max-width: 768px) {
    .grid {
        gap: var(--spacing-md);
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-center {
    align-items: center;
    justify-content: center;
}

.flex-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Logo Styling */
.logo-image {
    height: 60px;
    width: auto;
    object-fit: contain;
    /* Hide empty space around logo */
    filter: drop-shadow(0 0 0 transparent);
}

@media (max-width: 768px) {
    .logo-image {
        height: 48px;
    }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    .header, .footer, .nav, .btn {
        display: none;
    }
} 