/* =========================================
   2 Aces Design System — Global CSS
   Premium Construction & Design Theme
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:wght@700;800;900&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
    /* 
        NEW COLOR PALETTE: "Midnight Emerald"
        Inspired by luxury architecture — deep charcoal base with 
        teal-emerald accents for trust & growth, warm copper for 
        premium feel, and clean whites for contrast.
    */

    /* Primary — Emerald Teal (Trust + Growth + Architecture) */
    --color-primary: #10b981;
    --color-primary-dark: #059669;
    --color-primary-light: #34d399;
    --color-primary-glow: rgba(16, 185, 129, 0.15);

    /* Secondary — Deep Indigo (Depth + Professionalism) */
    --color-secondary: #6366f1;
    --color-secondary-dark: #4f46e5;
    --color-secondary-light: #818cf8;

    /* Accent — Warm Copper/Amber (Premium + Warmth + Construction) */
    --color-accent: #f59e0b;
    --color-accent-light: #fbbf24;
    --color-accent-dark: #d97706;
    --color-accent-glow: rgba(245, 158, 11, 0.15);

    /* Dark surfaces — Warm-tinted charcoal */
    --color-bg: #0c0f16;
    --color-bg-alt: #111520;
    --color-surface: #161b28;
    --color-surface-light: #1c2333;
    --color-surface-lighter: #252d40;

    /* Text */
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-text-dim: #64748b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-hero: linear-gradient(135deg, #0c0f16 0%, #111827 40%, #0c0f16 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    --gradient-warm: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
    --gradient-premium: linear-gradient(135deg, #0c0f16 0%, #1a1f35 50%, #0c0f16 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

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

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 200ms;
    --duration-normal: 350ms;
    --duration-slow: 500ms;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 90px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Disable text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

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

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

ul,
ol {
    list-style: none;
}

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

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

h1 {
    font-size: clamp(2.5rem, 5vw, var(--text-7xl));
}

h2 {
    font-size: clamp(2rem, 4vw, var(--text-5xl));
}

h3 {
    font-size: clamp(1.5rem, 3vw, var(--text-3xl));
}

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

p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-warm {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-serif {
    font-family: var(--font-serif);
}

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

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

.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-header .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-primary-glow);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    color: var(--color-primary-light);
    font-size: var(--text-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

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

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: var(--text-lg);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--ease-out);
}

.btn:hover::before {
    transform: translateX(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--glass-border);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-light);
    transform: translateY(-2px);
}

/* ---- Glass Card ---- */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--duration-normal) var(--ease-out);
}

.glass-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ---- Scroll Reveal Animation Classes ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delay for children */
.stagger>*:nth-child(1) {
    transition-delay: 0s;
}

.stagger>*:nth-child(2) {
    transition-delay: 0.1s;
}

.stagger>*:nth-child(3) {
    transition-delay: 0.2s;
}

.stagger>*:nth-child(4) {
    transition-delay: 0.3s;
}

.stagger>*:nth-child(5) {
    transition-delay: 0.4s;
}

.stagger>*:nth-child(6) {
    transition-delay: 0.5s;
}

.stagger>*:nth-child(7) {
    transition-delay: 0.6s;
}

.stagger>*:nth-child(8) {
    transition-delay: 0.7s;
}

/* ---- Particle Background ---- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---- Glow Effects ---- */
.glow-emerald {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3),
        0 0 60px rgba(16, 185, 129, 0.1);
}

.glow-amber {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3),
        0 0 60px rgba(245, 158, 11, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--color-surface-lighter);
    border-radius: 4px;
}

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

/* Disabled Selection for Protection */

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    :root {
        --space-5xl: 5rem;
        --space-4xl: 4rem;
    }
}

@media (max-width: 768px) {
    :root {
        --space-5xl: 3.5rem;
        --space-4xl: 2.5rem;
        --nav-height: 76px;
    }

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

    .btn {
        padding: 12px 24px;
        font-size: var(--text-sm);
    }
}

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

    .container {
        padding: 0 var(--space-md);
    }
}