/**
 * Design System - Web Yoli
 * Sistema de diseño para mentoría de mindfulness
 * Paleta: Tonos tierra, beige, verde salvia, dorado suave
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colores principales */
    --color-primary: #8B7355;          /* Marrón tierra cálido */
    --color-primary-light: #A89078;
    --color-primary-dark: #6B5645;
    
    --color-secondary: #9CAF88;        /* Verde salvia suave */
    --color-secondary-light: #B5C9A3;
    --color-secondary-dark: #7A9068;
    
    --color-accent: #D4A574;           /* Dorado/coral suave */
    --color-accent-light: #E5C4A0;
    --color-accent-dark: #B88B5A;
    
    /* Neutros cálidos */
    --color-cream: #FAF7F2;            /* Fondo principal */
    --color-cream-dark: #F0EBE3;
    --color-beige: #E8E0D5;
    --color-sand: #D4C8B8;
    
    /* Texto */
    --color-text: #3D3229;             /* Marrón oscuro para texto */
    --color-text-light: #6B5D4D;
    --color-text-muted: #9A8B7A;
    
    /* Estados */
    --color-success: #7A9068;
    --color-error: #C4756E;
    --color-warning: #D4A574;
    
    /* Gradientes */
    --gradient-hero: linear-gradient(135deg, rgba(139, 115, 85, 0.9) 0%, rgba(156, 175, 136, 0.8) 100%);
    --gradient-warm: linear-gradient(180deg, #FAF7F2 0%, #F0EBE3 100%);
    --gradient-card: linear-gradient(145deg, #FFFFFF 0%, #FAF7F2 100%);
    
    /* Sombras suaves */
    --shadow-sm: 0 2px 8px rgba(61, 50, 41, 0.06);
    --shadow-md: 0 4px 20px rgba(61, 50, 41, 0.08);
    --shadow-lg: 0 8px 40px rgba(61, 50, 41, 0.12);
    --shadow-xl: 0 20px 60px rgba(61, 50, 41, 0.15);
    --shadow-glow: 0 0 40px rgba(212, 165, 116, 0.2);
    
    /* Tipografía */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Tamaños de fuente */
    --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;
    --text-7xl: 4.5rem;
    
    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
    
    /* Container */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1400px;
}

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-cream);
    min-height: 100vh;
    overflow-x: hidden;
}

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

h1 {
    font-size: var(--text-5xl);
    font-weight: 400;
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-light);
}

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

a:hover {
    color: var(--color-primary-dark);
}

strong {
    font-weight: 600;
    color: var(--color-text);
}

em {
    font-style: italic;
}

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

.container-sm {
    max-width: var(--container-sm);
}

.container-md {
    max-width: var(--container-md);
}

.container-lg {
    max-width: var(--container-lg);
}

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

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

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

/* Grid system */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Flex utilities */
.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-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-3xl); }
    h3 { font-size: var(--text-2xl); }
    
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        padding: var(--space-16) 0;
    }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.5rem;
    }
    
    .container {
        padding: 0 var(--space-4);
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: var(--space-12) 0;
    }
    
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }

.bg-cream { background-color: var(--color-cream); }
.bg-cream-dark { background-color: var(--color-cream-dark); }
.bg-beige { background-color: var(--color-beige); }
.bg-white { background-color: #FFFFFF; }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mx-auto { margin-left: auto; margin-right: auto; }

.max-w-lg { max-width: var(--container-lg); }
.max-w-md { max-width: var(--container-md); }
.max-w-sm { max-width: var(--container-sm); }

.w-full { width: 100%; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.overflow-hidden { overflow: hidden; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Scroll animations - add via JS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SELECTION & SCROLLBAR
   ============================================ */
::selection {
    background-color: var(--color-accent);
    color: white;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-sand);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-light);
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
