/* 
    GM Law Associates - Ultra-Premium Aesthetic (Behance/Fintech Style)
    Author: Antigravity
*/

:root {
    /* Color Palette - Ultra Dark & Luxury Gold */
    --primary-black: #050510;
    /* Deep cosmic black */
    --secondary-black: #0A0A15;
    --primary-gold: #D4AF37;
    /* More vibrant metallic gold */
    --gold-glow: rgba(212, 175, 55, 0.15);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    --bg-white: #FFFFFF;
    --bg-dark: #050510;
    --text-white: #FFFFFF;
    --text-gray: #A0A0A0;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Cormorant Garamond', serif;
    --font-nav: 'Montserrat', sans-serif;
    --spacing-lg: 120px;

    /* Transitions */
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-black);
    color: var(--text-white);
    line-height: 1.8;
}

/* Background Aesthetic Glows */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    word-break: break-word;
}

p, a, span {
    word-break: break-word;
}

/* Contact form utilities */
.form-full {
    grid-column: span 2;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 60px 0;
}

/* Glass Header */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1400px;
    z-index: 1000;
    padding: 15px 40px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    transition: all 0.5s var(--transition);
}

header.scrolled {
    top: 0;
    width: 100%;
    border-radius: 0;
    background: rgba(5, 5, 16, 0.95);
    padding: 15px 5%;
}

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

.logo img {
    height: 50px;
    transition: 0.3s;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-nav);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-gold);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section - Pinterest Aesthetic */
.hero {
    height: 110vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    letter-spacing: -2px;
    margin-bottom: 30px;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    font-weight: 700;
}

.hero p {
    color: var(--text-gray);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 50px;
}

/* Buttons */
.btn {
    font-family: var(--font-nav);
    padding: 18px 45px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    transition: all 0.4s var(--transition);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-gold {
    background: var(--primary-gold);
    color: var(--primary-black);
    box-shadow: 0 10px 40px var(--gold-glow);
}

.btn-gold:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.2);
}

/* Statistics Block */
.stats-container {
    display: flex;
    gap: 60px;
    margin-bottom: 40px;
}

.stat-item {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 30px 40px;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--primary-gold);
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(212, 175, 55, 0.15);
}

.stat-item h2 {
    font-size: 3.5rem;
    color: var(--primary-gold);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-item p {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-gray);
}

/* Numbered Service List (from Image 2) */
.service-list-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    padding: 40px 0;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-list-item:hover {
    padding-left: 20px;
    background: rgba(212, 175, 55, 0.05);
    border-color: var(--primary-gold);
}

.service-list-item .number {
    font-family: var(--font-body);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.service-list-item .content h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.service-list-item .content p {
    color: var(--text-gray);
    font-size: 0.9rem;
    max-width: 500px;
}

/* Mission/Vision Cards (from Image 1) */
.mv-card {
    background: var(--bg-white);
    color: var(--primary-black);
    padding: 60px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.mv-card.dark {
    background: var(--bg-dark);
    color: white;
    border: 1px solid var(--glass-border);
}

.mv-card h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s var(--transition);
}

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

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

::-webkit-scrollbar-track {
    background: var(--primary-black);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 10px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-bar {
    width: 200px;
    height: 1px;
    background: #333;
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gold);
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Form Elements Enhancement */
.contact-form input,
.contact-form textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Service Card Hover Enhancement */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
}

.service-card:hover {
    border-left-color: var(--primary-gold);
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(212, 175, 55, 0.15) !important;
}

/* Scroll-to-Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gold);
    color: var(--primary-black);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1000;
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--gold-glow);
}

/* Image Enhancements */
#about img {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#about img:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(212, 175, 55, 0.2);
}

/* --- Responsive Design --- */

/* Mobile Menu Toggle (Hidden on Desktop) */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
}

@media (max-width: 1024px) {
    .container { padding: 0 8%; }
    .hero h1 { font-size: 4rem; }
    .section-padding { padding: 100px 0; }
}

@media (max-width: 768px) {
    /* 1. Hamburger Menu */
    .menu-toggle { display: block; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -110%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 16, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-links.active { right: 0; }

    .nav-links li { margin: 18px 0; }

    .nav-links a { font-size: 1.1rem; letter-spacing: 3px; }

    /* 2. Fix Service Cards being cut from right */
    #practice .container > div:last-child {
        grid-template-columns: 1fr !important;
    }

    .service-card {
        padding: 30px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Hero */
    .hero { height: auto; padding: 150px 0 100px; }
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1rem; }
    .stats-container { gap: 20px; flex-wrap: wrap; justify-content: flex-start; }
    .stat-item h2 { font-size: 2.5rem; }

    /* About */
    #about > div > div { flex-direction: column !important; gap: 30px !important; }
    #about img { width: 100% !important; }

    /* Mission & Vision Card */
    .mv-card.dark { padding: 40px 20px !important; }
    .mv-card.dark > p { font-size: 1.3rem !important; }
    .mv-card.dark > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 20px !important; }

    /* Core Values */
    #vision .container > div { flex-direction: column !important; gap: 30px !important; }
    #vision h2 { font-size: 2.2rem !important; }

    /* Team */
    #team > div > div { gap: 30px !important; }

    /* Contact */
    #contact .container > div { flex-direction: column !important; gap: 40px !important; }
    #contact h2 { font-size: 2.5rem !important; }

    /* 3. Contact form: each field on its own line */
    .contact-form {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .form-full {
        grid-column: span 1 !important;
    }

    #contact .btn.form-full {
        grid-column: span 1 !important;
        width: 100%;
    }

    /* Sections with horizontal flex gaps */
    [style*="gap: 80px"] { gap: 20px !important; }
    [style*="gap: 100px"] { gap: 30px !important; }
    [style*="flex: 1"] { min-width: auto !important; width: 100% !important; }
}

@media (max-width: 480px) {
    .container { padding: 0 5%; }
    body { font-size: 14px; }
    
    /* Prevent horizontal overflow */
    * { max-width: 100%; }
    
    header {
        width: 95% !important;
        padding: 10px 20px !important;
    }
    
    .logo img { height: 50px !important; }
    .hero h1 { font-size: 1.8rem; letter-spacing: -0.5px; line-height: 1.2; }
    .hero p { font-size: 0.9rem; }
    .stat-item h2 { font-size: 1.8rem; }
    .stat-item p { font-size: 0.6rem; }
    
    .section-padding { padding: 50px 0; }
    #practice > div > div:first-child h2 { font-size: 1.8rem !important; }
    
    /* Extra tight spacing for mobile */
    .stats-container { gap: 15px !important; flex-direction: column; }
    
    .service-card {
        padding: 20px !important;
    }
    
    .mv-card.dark { padding: 30px 15px !important; }
    .mv-card.dark > p { font-size: 1.1rem !important; }
    
    #contact h2 { font-size: 2rem !important; }
    
    /* Prevent flex overflows */
    [style*="flex"] { 
        flex-direction: column !important;
        width: 100% !important;
    }
    
    [style*="gap: 80px"],
    [style*="gap: 100px"] { 
        gap: 15px !important; 
    }
}