/* ==========================================================================
   Justice J.K. Maheshwari - Official Website
   Theme: Journey of Law
   ========================================================================== */

/* --- Variables & Core System --- */
:root {
    /* Colors */
    --clr-charcoal: #1A1C20;        /* Authority / Background */
    --clr-charcoal-light: #2A2D34;  /* Cards / Surface */
    --clr-earth: #8C7B65;           /* Roots / Origin */
    --clr-earth-dark: #6B5D4B;      /* Deep Earth */
    --clr-gold: #C5A059;            /* Achievement / Muted Gold */
    --clr-gold-light: #E2C792;      /* Highlights */
    --clr-text: #E8E6E1;            /* Primary Text */
    --clr-text-muted: #A3A09A;      /* Secondary Text */
    --clr-white: #FFFFFF;

    /* Gradients */
    --grad-elevation: linear-gradient(180deg, var(--clr-charcoal) 0%, var(--clr-charcoal-light) 100%);
    --grad-gold: linear-gradient(135deg, var(--clr-gold) 0%, var(--clr-gold-light) 100%);
    --grad-earth: linear-gradient(180deg, var(--clr-earth-dark) 0%, var(--clr-earth) 100%);

    /* Fonts */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Spacing */
    --space-xs: 0.5rem;   /* 8px */
    --space-sm: 1rem;     /* 16px */
    --space-md: 2rem;     /* 32px */
    --space-lg: 4rem;     /* 64px */
    --space-xl: 8rem;     /* 128px */

    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.125rem;
    --text-lg: 1.5rem;
    --text-xl: 2.25rem;
    --text-2xl: 3rem;
    --text-3xl: 4.5rem;

    /* Borders & Structural Elements */
    --border-subtle: 1px solid rgba(197, 160, 89, 0.2); /* Gold subtle */
    --border-light: 1px solid rgba(232, 230, 225, 0.1); 
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    /* Layout */
    --container-width: 1200px;
    --container-padding: 2rem;
    
    /* Animations */
    --transition-fast: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--clr-charcoal);
    color: var(--clr-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    color: var(--clr-white);
    margin-bottom: var(--space-sm);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-sm);
    color: var(--clr-text);
}

.text-muted { color: var(--clr-text-muted); }
.text-gold { color: var(--clr-gold); }
.text-earth { color: var(--clr-earth); }

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

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

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md) 0;
    z-index: 100;
    transition: var(--transition-fast);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(26, 28, 32, 0.9);
    backdrop-filter: blur(10px);
    padding: var(--space-sm) 0;
    border-bottom: var(--border-subtle);
}

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

.nav-logo {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--clr-gold);
    text-decoration: none;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 80%;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.nav-links a {
    color: var(--clr-text);
    text-decoration: none;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--clr-gold);
    transition: var(--transition-fast);
}

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

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

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--clr-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Global Structural Components --- */
.line-accent {
    width: 1px;
    height: 100px;
    background: var(--grad-gold);
    margin: 0 auto var(--space-md);
}

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

.section-subtitle {
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--clr-gold);
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
    display: block;
}

.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    color: var(--clr-gold);
    border: 1px solid var(--clr-gold);
    text-decoration: none;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: var(--text-sm);
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn:hover {
    background: var(--clr-gold);
    color: var(--clr-charcoal);
}

/* --- Scroll Animations (Elevation Concept) --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition-slow);
}

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

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }

/* Structural Layers - visual building blocks for the "journey" */
.structural-layer {
    background: var(--clr-charcoal-light);
    border: var(--border-subtle);
    padding: var(--space-md);
    position: relative;
    z-index: 1;
}

/* --- Footer --- */
.site-footer {
    background: var(--clr-charcoal-light);
    border-top: var(--border-subtle);
    padding: var(--space-lg) 0 var(--space-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-brand h4 {
    color: var(--clr-gold);
    margin-bottom: var(--space-sm);
}

.footer-contact {
    text-align: right;
}

.footer-contact a {
    color: var(--clr-text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-contact a:hover {
    color: var(--clr-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: var(--border-light);
}

.footer-bottom p {
    font-size: var(--text-xs);
    color: var(--clr-text-muted);
}

.social-links {
    margin-top: var(--space-md);
    display: flex;
    gap: var(--space-sm);
}

.social-links a {
    color: var(--clr-gold);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: var(--clr-white);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --text-3xl: 2.5rem;
        --text-2xl: 2rem;
        --text-xl: 1.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-contact {
        text-align: left;
    }

    .nav-logo {
        font-size: 1.1rem;
    }
}
