/* 
  JK Mokwebo Attorneys Inc. - Premium Redesign 2025
  Role: Senior UX/UI Engineer
  Theme: Luxury, Authority, Trust (Black/Gold/Glass)
*/

:root {
    /* Brand Palette */
    --gold-primary: #c9a646;
    --gold-secondary: #f7d774;
    --gold-accent: #e6c86e;
    --black-base: #0a0a0a;
    --black-overlay: rgba(0, 0, 0, 0.85);

    /* Glassmorphism System */
    --glass-surface: rgba(22, 22, 22, 0.65);
    --glass-surface-strong: rgba(12, 12, 12, 0.8);
    --glass-border: rgba(201, 166, 70, 0.3);
    --glass-border-hover: rgba(201, 166, 70, 0.6);
    --glass-blur: 16px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

    /* Spacing System (Mobile First) */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 48px;
    --space-xl: 80px;
    --max-w: 1240px;

    /* Typography Scale */
    --font-main: 'Montserrat', sans-serif;
    --text-xs: 0.875rem;
    --text-sm: 0.95rem;
    --text-base: 1.05rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: 2.5rem;
    --text-4xl: clamp(2.5rem, 5vw, 4rem);

    /* Animation Timing */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --trans-fast: 0.3s var(--ease-out-expo);
    --trans-med: 0.6s var(--ease-out-expo);
    --trans-slow: 0.9s var(--ease-out-expo);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background-color: var(--black-base);

    /* FIXED BACKGROUND IMAGE (Pinned) */
    background: url('images/background.jpg') no-repeat center center fixed;
    background-size: cover;

    color: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Global Utilities */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.text-gold {
    background: linear-gradient(135deg, var(--gold-secondary), var(--gold-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* PREMIUM GLASS CARD */
.glass-panel {
    background: var(--glass-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: var(--space-md);
    transition: transform var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast);
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

header img {
    height: 44px;
    width: auto;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-accent));
    color: #050505;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--trans-fast);
    text-transform: uppercase;
    border-radius: 4px;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(201, 166, 70, 0.3);
}

.btn-primary:hover::after {
    transform: translateX(100%) skewX(-15deg);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 13px 28px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all var(--trans-fast);
    cursor: pointer;
    border-radius: 4px;
}

.btn-ghost:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(0, 0, 0, 0.4);
}

/* HERO SECTION w/ Parallax */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px var(--space-sm) var(--space-lg);
    position: relative;
    overflow: hidden;
    /* Removed scroll-snap-align */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 110%;
    /* Taller for parallax */

    /* HERO COVER IMAGE (For Hero Section Only) */
    background-image: url('images/cover_optimized.jpg');

    /* Fallback if image not present */
    background-color: #111;
    background-position: center;
    background-size: cover;
    z-index: -1;
    transform: translateZ(0);
    /* Activate hardware acceleration */
}

.hero-glass {
    max-width: 900px;
    padding: var(--space-lg) var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid var(--gold-primary);
    background: var(--glass-surface-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    /* Safari support */
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    /* Enhanced depth */
}

.hero h1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.hero p {
    font-size: var(--text-lg);
    color: #d1d1d1;
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
    }
}

/* SECTIONS */
.section-pad {
    padding: var(--space-xl) 0;
}

.section-header {
    margin-bottom: var(--space-lg);
    text-align: left;
}

.section-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--gold-secondary);
    margin: 0 0 var(--space-xs);
}

.section-sub {
    font-size: var(--text-base);
    color: #a3a3a3;
    max-width: 600px;
}

/* ABOUT & COMMITMENT (Split Layout) */
.split-layout {
    display: grid;
    gap: var(--space-md);
}

@media (min-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* PRACTICE AREAS */
.practice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 600px) {
    .practice-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .practice-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.practice-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-md) var(--space-md) var(--space-lg);
    height: 100%;
    cursor: pointer;
    position: relative;
}

.practice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--gold-primary);
    transition: height var(--trans-med);
}

.practice-card:hover {
    transform: translateY(-8px);
    background: rgba(30, 30, 30, 0.7);
    border-color: var(--gold-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.practice-card:hover::before {
    height: 100%;
}

.practice-icon {
    font-size: 2.5rem;
    color: var(--gold-primary);
    margin-bottom: var(--space-md);
    transition: transform var(--trans-fast);
}

.practice-card:hover .practice-icon {
    transform: scale(1.1);
    color: var(--gold-secondary);
}

.practice-card h3 {
    font-size: var(--text-xl);
    margin: 0 0 var(--space-sm);
    font-weight: 700;
}

.practice-card p {
    font-size: 0.95rem;
    color: #ccc;
    margin: 0;
}

/* DIRECTOR SECTION */
.director-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .director-card {
        flex-direction: row;
        text-align: left;
    }
}

.director-img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 2px;
    border: 1px solid var(--gold-primary);
    box-shadow: 20px 20px 0 rgba(0, 0, 0, 0.5);
}

/* WHITE SECTION (Why Choose Us / Testimonials / FAQ) */
.bg-white {
    background: #fdfdfd;
    color: var(--black-base);
    position: relative;
    z-index: 10;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    color: var(--gold-primary);
    margin-bottom: var(--space-sm);
}

.feature-title {
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #111;
}

.feature-text {
    color: #555;
    font-size: 0.95rem;
}

/* FAQ Styles */
.faq-grid details {
    background: #fff;
    border: 1px solid #eee;
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.faq-grid details:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

.faq-grid summary {
    font-weight: 700;
    list-style: none;
    /* Hide default triangle */
    position: relative;
    padding-right: 20px;
}

.faq-grid summary::-webkit-details-marker {
    display: none;
}

.faq-grid summary::after {
    content: '+';
    position: absolute;
    right: 0;
    color: var(--gold-primary);
    font-weight: 800;
}

.faq-grid details[open] summary::after {
    content: '-';
}

.faq-grid p {
    margin-top: 10px;
    color: #555;
    font-size: 0.95rem;
}


/* TESTIMONIALS */
.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

@media (min-width: 768px) {
    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background: white;
    padding: var(--space-md);
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.testimonial-quote {
    font-style: italic;
    color: #444;
    margin: var(--space-sm) 0;
}

.testimonial-author {
    font-weight: 700;
    color: var(--gold-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* CONTACT */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: var(--space-sm);
    font-family: var(--font-main);
    transition: border-color var(--trans-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.07);
}

.map-container {
    height: 400px;
    border: 1px solid var(--glass-border);
    filter: grayscale(1) invert(1) contrast(0.8);
    /* Dark Map Effect */
    transition: filter 0.3s;
}

.map-container:hover {
    filter: grayscale(0) invert(0);
}

/* FOOTER */
footer {
    background: #050505;
    padding: var(--space-xl) 0 var(--space-md);
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #1a1a1a;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ANIMATIONS (Custom Reveal Engine) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-expo);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    background: #111;
    border: 1px solid var(--gold-primary);
    padding: var(--space-md);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

/* Social Floating Bar */
.social-float {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.social-float a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;
    transition: color 0.3s, transform 0.3s;
}

.social-float a:hover {
    color: var(--gold-primary);
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .social-float {
        display: none;
    }

    /* Hide on mobile for cleaner look */
}

/* BACK TO TOP - Strictly LEFT positioned */
#backToTop {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* LEFT side */
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 2999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Hide overlapping elements when near footer */
#backToTop.hide-on-footer {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(20px);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}