/* ============================================
   TWINS TECHIE - BASE STYLES & DESIGN SYSTEM
   Premium Agency Website
   ============================================ */

/* CSS Custom Properties - Design Tokens */
:root {
    /* Colors - Dark Theme Primary */
    --color-bg-primary: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-bg-tertiary: #1a1a24;
    --color-bg-card: #16161f;
    --color-bg-elevated: #1e1e28;
    
    /* Accent Colors */
    --color-accent-primary: #6366f1;
    --color-accent-secondary: #8b5cf6;
    --color-accent-tertiary: #a855f7;
    --color-accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --color-accent-glow: rgba(99, 102, 241, 0.4);
    
    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #a1a1aa;
    --color-text-tertiary: #71717a;
    --color-text-muted: #52525b;
    
    /* Utility Colors */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Font Sizes - Fluid Typography */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.4rem + 2.4vw, 2.5rem);
    --text-4xl: clamp(2.25rem, 1.5rem + 3.75vw, 3.5rem);
    --text-5xl: clamp(3rem, 1.8rem + 6vw, 5rem);
    --text-6xl: clamp(3.75rem, 2rem + 8.75vw, 7rem);
    
    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-black: 900;
    
    /* Spacing Scale */
    --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;
    --space-40: 10rem;
    --space-48: 12rem;
    --space-64: 16rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--color-accent-glow);
    --shadow-glow-lg: 0 0 80px var(--color-accent-glow);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-cursor: 9999;
    
    /* Container */
    --container-max: 1400px;
    --container-padding: clamp(1.5rem, 5vw, 4rem);
}

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

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

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    position: relative;
}

body.loading {
    overflow: hidden;
}

body.menu-open {
    overflow: hidden;
}

/* Selection */
::selection {
    background-color: var(--color-accent-primary);
    color: var(--color-text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-secondary);
}

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

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

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

p {
    color: var(--color-text-secondary);
    line-height: 1.8;
}

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

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

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

.container-narrow {
    max-width: 900px;
}

.container-wide {
    max-width: 1600px;
}

/* Section Spacing */
.section {
    padding: var(--space-32) 0;
    position: relative;
}

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

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

/* Flex & Grid 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-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

.grid {
    display: grid;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-gradient {
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* Reveal Animations - Content visible by default, animations optional */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Only apply hidden state when JS is ready */
.js-ready .reveal {
    opacity: 0;
    transform: translateY(60px);
}

.js-ready .reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.js-ready .reveal-left {
    opacity: 0;
    transform: translateX(-60px);
}

.js-ready .reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.js-ready .reveal-right {
    opacity: 0;
    transform: translateX(60px);
}

.js-ready .reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.js-ready .reveal-scale {
    opacity: 0;
    transform: scale(0.9);
}

.js-ready .reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Children */
.stagger-children > * {
    transition-delay: calc(var(--stagger-index, 0) * 100ms);
}

/* Screen Reader Only */
.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;
}
