/* ============================================
   GRAND PARK LAW GROUP - DESIGN SYSTEM
   ============================================
   
   Color Palette:
   - Primary Dark:     #1a1915 (Warm Charcoal)
   - Primary Charcoal: #2d2a24
   - Primary Warm:     #3d3830
   - Primary Light:    #4a453c
   - Accent Gold:      #c9a962 (Champagne Gold)
   - Cream:            #f5f2eb
   - Off White:        #faf9f6
   
   Typography:
   - Display: Cormorant Garamond (serif)
   - Body: Outfit (sans-serif)
   
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Primary Colors - Warm Charcoal */
    --primary-dark: #1a1915;
    --primary-charcoal: #2d2a24;
    --primary-warm: #3d3830;
    --primary-light: #4a453c;
    
    /* Accent - Champagne Gold */
    --accent-gold: #c9a962;
    --accent-gold-light: #d4bc7d;
    --accent-gold-dark: #a68b4b;
    --accent-gold-glow: rgba(201, 169, 98, 0.15);
    
    /* Neutrals */
    --cream: #f5f2eb;
    --cream-dark: #e8e4db;
    --off-white: #faf9f6;
    --text-light: rgba(250, 249, 246, 0.9);
    --text-muted: rgba(250, 249, 246, 0.55);
    --text-dark: #1a1915;
    
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Font Sizes - Fluid Typography */
    --text-xs: clamp(0.65rem, 0.6rem + 0.2vw, 0.75rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.2vw, 0.9rem);
    --text-base: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
    --text-lg: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
    --text-3xl: clamp(2rem, 1.6rem + 1.2vw, 2.75rem);
    --text-4xl: clamp(2.5rem, 2rem + 1.8vw, 3.5rem);
    --text-5xl: clamp(3rem, 2.3rem + 2.5vw, 5rem);
    
    /* Spacing Scale */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 10rem;
    
    /* Layout */
    --max-width: 1400px;
    --header-height: 80px;
    --container-padding: clamp(1rem, 4vw, 4rem);
    
    /* Transitions */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: 0.2s var(--ease-out-quart);
    --transition-smooth: 0.5s var(--ease-out-expo);
    --transition-slow: 0.8s var(--ease-out-expo);
    --transition-slower: 1.2s var(--ease-out-expo);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 4px 20px rgba(201, 169, 98, 0.2);
    
    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-loader: 9999;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--space-md));
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: var(--text-base);
    background: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--primary-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 3px;
}

/* Focus States */
:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 300;
    line-height: 1.2;
    color: var(--off-white);
}

h1 { font-size: var(--text-5xl); }
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-sm);
}

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

a:hover {
    color: var(--accent-gold);
}

strong, b {
    font-weight: 500;
}

em, i {
    font-style: italic;
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Colors */
.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-dark { color: var(--text-dark); }

/* Eyebrow Text */
.eyebrow {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: var(--space-sm);
}

/* Section Title */
.section-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

/* 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;
}

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

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

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

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--space-xl) 0;
}

.section-dark {
    background: var(--primary-dark);
    color: var(--text-light);
}

.section-charcoal {
    background: var(--primary-charcoal);
    color: var(--text-light);
}

.section-warm {
    background: var(--primary-warm);
    color: var(--text-light);
}

.section-light {
    background: var(--cream);
    color: var(--text-dark);
}

.section-light .section-title {
    color: var(--text-dark);
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.btn svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-smooth);
}

.btn:hover svg {
    transform: translateX(5px);
}

/* Primary Button */
.btn-primary {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border-color: var(--accent-gold);
}

.btn-primary:hover {
    background: var(--accent-gold-light);
    border-color: var(--accent-gold-light);
    color: var(--primary-dark);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.btn-secondary:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.65rem;
}

.btn-lg {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-sm);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 300;
    color: var(--text-light);
    background: var(--primary-charcoal);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: var(--primary-warm);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c9a962'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-sm) center;
    background-size: 16px;
    padding-right: var(--space-lg);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-gold);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--primary-charcoal);
    border: 1px solid rgba(201, 169, 98, 0.06);
    transition: all var(--transition-smooth);
}

.card:hover {
    border-color: rgba(201, 169, 98, 0.2);
    transform: translateY(-5px);
}

.card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-md);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes loadingBar {
    0% { left: -100%; }
    50% { left: 0; }
    100% { left: 100%; }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.5; transform: scaleY(0.8); }
}

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

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

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1200px) {
    :root {
        --space-xl: 5rem;
    }
}

@media (max-width: 1024px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 2.5rem;
        --space-xl: 3rem;
        --header-height: 70px;
    }
}

@media (max-width: 640px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 2.5rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .footer,
    .loader,
    .menu-overlay {
        display: none !important;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
