/* ================================
   GLOBAL STYLES - BLUESTONE AI
   ================================ */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #191414;
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   DESIGN TOKENS
   ================================ */

:root {
    /* Colors */
    --primary-green: #1DB954;
    --bright-green: #1ED760;
    --deep-black: #191414;
    --rich-black: #121212;
    --dark-gray: #282828;
    --medium-gray: #535353;
    --light-gray: #B3B3B3;
    --pure-white: #FFFFFF;

    /* Accent Colors */
    --soft-red: #FF6B6B;
    --teal: #4ECDC4;
    --light-blue: #45B7D1;
    --sage-green: #96CEB4;

    /* Typography */
    --font-primary: 'Inter', 'Helvetica Neue', Arial, sans-serif;

    /* Font Sizes */
    --h1-size: clamp(32px, 4vw, 48px);
    --h2-size: clamp(24px, 3vw, 36px);
    --h3-size: clamp(20px, 2.5vw, 24px);
    --h4-size: 20px;
    --body-large: 18px;
    --body-regular: 16px;
    --body-small: 14px;
    --caption: 12px;

    /* Font Weights */
    --weight-black: 900;
    --weight-bold: 700;
    --weight-semibold: 600;
    --weight-medium: 500;
    --weight-regular: 400;
    --weight-light: 300;

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

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-button: 0 8px 24px rgba(29, 185, 84, 0.3);
    --shadow-section: 0 2px 8px rgba(0, 0, 0, 0.05);

    /* Layout */
    --container-max-width: 1200px;
    --container-padding: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ================================
   TYPOGRAPHY
   ================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-bold);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    color: var(--deep-black);
}

h1 {
    font-size: var(--h1-size);
    font-weight: var(--weight-black);
    line-height: 1.1;
}

h2 {
    font-size: var(--h2-size);
    font-weight: var(--weight-bold);
}

h3 {
    font-size: var(--h3-size);
    font-weight: var(--weight-semibold);
}

h4 {
    font-size: var(--h4-size);
    font-weight: var(--weight-semibold);
}

p {
    font-size: var(--body-regular);
    font-weight: var(--weight-regular);
    margin-bottom: var(--space-sm);
    color: var(--medium-gray);
}

.text-large {
    font-size: var(--body-large);
}

.text-small {
    font-size: var(--body-small);
}

.text-caption {
    font-size: var(--caption);
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--deep-black);
}

.text-secondary {
    color: var(--medium-gray);
}

.text-muted {
    color: var(--light-gray);
}

/* ================================
   LAYOUT
   ================================ */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

.section {
    padding: var(--space-xxxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    margin-bottom: var(--space-sm);
}

.section-header p {
    font-size: var(--body-large);
    color: var(--medium-gray);
}

/* ================================
   BUTTONS
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--body-regular);
    font-weight: var(--weight-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
    min-height: 44px;
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--pure-white);
}

.btn-primary:hover {
    background-color: var(--bright-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button);
}

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

.btn-secondary:hover {
    background-color: var(--primary-green);
    color: var(--pure-white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: var(--body-large);
    min-height: 56px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ================================
   FORMS
   ================================ */

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-weight: var(--weight-medium);
    margin-bottom: var(--space-xs);
    color: var(--deep-black);
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: var(--body-regular);
    font-family: inherit;
    transition: border-color var(--transition-fast);
    background-color: var(--pure-white);
    min-height: 44px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

input::placeholder {
    color: var(--light-gray);
}

.error-input {
    border-color: var(--soft-red);
}

.error-message {
    color: var(--soft-red);
    font-size: var(--body-small);
    margin-top: var(--space-xs);
}

/* ================================
   CARDS
   ================================ */

.card {
    background-color: var(--pure-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: var(--space-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ================================
   GRID SYSTEMS
   ================================ */

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ================================
   UTILITIES
   ================================ */

.hidden {
    display: none !important;
}

.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;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mt-auto {
    margin-top: auto;
}

.mb-auto {
    margin-bottom: auto;
}

.ml-auto {
    margin-left: auto;
}

.mr-auto {
    margin-right: auto;
}

/* ================================
   RESPONSIVE BREAKPOINTS
   ================================ */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --container-padding: 20px;
    }

    .section {
        padding: var(--space-xxl) 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --container-padding: 16px;
        --space-xxxl: 64px;
        --space-xxl: 48px;
    }

    .section {
        padding: var(--space-xl) 0;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: var(--body-regular);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    :root {
        --container-padding: 12px;
    }

    .btn {
        padding: 10px 20px;
        font-size: var(--body-small);
    }

    .btn-large {
        padding: 12px 20px;
        font-size: var(--body-regular);
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --light-gray: #666666;
        --medium-gray: #333333;
    }
}

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .btn {
        border: 1px solid black;
        background: transparent;
        color: black;
    }
}