:root {
    /* Colors */
    --primary: #0F2A4A; /* Deep Navy */
    --primary-light: #1A3E6B;
    --secondary: #D4AF37; /* Gold */
    --secondary-hover: #F2C84A;
    --text: #2D3748;
    --text-light: #718096;
    --text-muted: #A0AEC0;
    --bg: #FFFFFF;
    --bg-light: #F7FAFC;
    --border: #E2E8F0;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    /* Spacing & Sizes */
    --container-width: 1200px;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    color: var(--secondary);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- Typography --- */
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    color: var(--bg);
    border-color: var(--bg);
}

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

/* --- Layout --- */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--secondary);
    margin: 1.5rem auto 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

/* --- Header & Nav --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.header.scrolled {
    padding: 0.5rem 0;
}

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

.logo img {
    height: 40px;
    width: auto;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #0a1b32 100%);
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cg transform='translate(20,17) rotate(-20)'%3E%3Crect x='-7' y='-3.5' width='14' height='7' rx='2'/%3E%3Crect x='-1' y='3.5' width='2' height='8' rx='1'/%3E%3C/g%3E%3Cg transform='translate(60,24)'%3E%3Crect x='-1' y='-10' width='2' height='14'/%3E%3Cpolygon points='0,-12 -1.5,-9.5 1.5,-9.5'/%3E%3Crect x='-8' y='-8' width='16' height='1.5' rx='0.75'/%3E%3Crect x='-8' y='-6.5' width='1' height='5'/%3E%3Crect x='7' y='-6.5' width='1' height='5'/%3E%3Cellipse cx='-7.5' cy='-0.5' rx='3' ry='1'/%3E%3Cellipse cx='7.5' cy='-0.5' rx='3' ry='1'/%3E%3C/g%3E%3Cg transform='translate(20,64)'%3E%3Crect x='-1' y='-10' width='2' height='14'/%3E%3Cpolygon points='0,-12 -1.5,-9.5 1.5,-9.5'/%3E%3Crect x='-8' y='-8' width='16' height='1.5' rx='0.75'/%3E%3Crect x='-8' y='-6.5' width='1' height='5'/%3E%3Crect x='7' y='-6.5' width='1' height='5'/%3E%3Cellipse cx='-7.5' cy='-0.5' rx='3' ry='1'/%3E%3Cellipse cx='7.5' cy='-0.5' rx='3' ry='1'/%3E%3C/g%3E%3Cg transform='translate(60,57) rotate(-20)'%3E%3Crect x='-7' y='-3.5' width='14' height='7' rx='2'/%3E%3Crect x='-1' y='3.5' width='2' height='8' rx='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    color: var(--bg);
    max-width: 800px;
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 0 auto;
}

.hero-content h1 {
    color: var(--bg);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* --- What We Do --- */
.intro-text {
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: justify;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.feature-card {
    text-align: left;
}

.feature-card p {
    text-align: justify;
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* --- How It Works Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 2px;
    background-color: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 0 0 4px var(--bg);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.timeline-content p {
    text-align: justify;
}

/* --- Team --- */
.team-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
}

.team-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.team-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.team-content {
    padding: 2.5rem;
}

.team-title {
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.team-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.team-contact a,
.team-contact .location {
    color: var(--primary);
    font-weight: 500;
}

.team-contact span {
    color: var(--border);
}

.team-bio {
    color: var(--text-light);
    text-align: justify;
}

/* --- Contact Section --- */

.contact-offices {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.contact-item strong {
    display: block;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.contact-item p {
    margin-bottom: 0.25rem;
    color: var(--text-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* --- Footer --- */
.footer {
    background-color: var(--primary);
    color: var(--bg);
    text-align: justify;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-links h4, .footer-contact h4 {
    color: var(--secondary);
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* --- Responsive --- */
@media (min-width: 992px) {
    .team-card {
        flex-direction: row;
    }
    
    .team-image {
        width: 35%;
        height: auto;
        min-height: 400px;
    }
    
    .team-content {
        width: 65%;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg);
        padding: 1rem 2rem;
        box-shadow: var(--shadow);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
    }
    
    .nav.open {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline-dot {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Reveal --- */
.reveal-up    { opacity: 0; transform: translateY(40px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal-left  { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal-right { opacity: 0; transform: translateX(40px);  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal-scale { opacity: 0; transform: scale(0.95);        transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1); }

.reveal-up.is-visible, .reveal-left.is-visible, .reveal-right.is-visible, .reveal-scale.is-visible { opacity: 1; transform: none; }

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* --- Divider Draw --- */
.divider-animate { width: 0; transition: width 0.8s cubic-bezier(0.22,1,0.36,1) 0.3s; }
.divider-animate.is-visible { width: 60px; }

/* --- Timeline Line Draw + Dot Pop --- */
.timeline::before {
    transform-origin: top center;
    transform: scaleY(0);
    transition: transform 1.4s cubic-bezier(0.22,1,0.36,1) 0.2s;
}
.timeline.is-visible::before { transform: scaleY(1); }

.timeline-dot {
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.timeline-item.is-visible .timeline-dot { transform: scale(1); }

.timeline-item:first-child .timeline-dot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    opacity: 0;
    transform: scale(0.8);
}
.timeline-item:first-child.is-visible .timeline-dot::after {
    opacity: 0.4;
    transform: scale(1);
    animation: ringPulse 2.5s ease-in-out infinite;
    animation-delay: 0.8s;
}
@keyframes ringPulse {
    0%   { opacity: 0.4; transform: scale(1); }
    50%  { opacity: 0;   transform: scale(1.5); }
    100% { opacity: 0.4; transform: scale(1); }
}

/* --- Feature Card Icon Hover --- */
.feature-card .icon { display: inline-block; transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); }
.feature-card:hover .icon { transform: scale(1.18); }

/* --- Hero Motifs --- */
.hero-motif {
    position: absolute; opacity: 0.14; z-index: 0; pointer-events: none;
    animation: floatDrift ease-in-out infinite;
}
.motif-scales { bottom: 12%; right: 6%;  width: 200px; animation-duration: 14s; }
.motif-gavel  { top: 22%;   right: 22%; width: 110px; animation-duration: 18s; animation-delay: -6s; }
.motif-column { bottom: 28%; right: 38%; width: 70px;  animation-duration: 22s; animation-delay: -11s; }

@keyframes floatDrift {
    0%   { transform: translateY(0px) rotate(0deg); }
    50%  { transform: translateY(-16px) rotate(1.5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@media (max-width: 768px) {
    .motif-gavel, .motif-column { display: none; }
    .motif-scales { opacity: 0.10; width: 130px; }
}

/* --- Hero Background Shimmer --- */
.hero-bg::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(225deg, transparent 20%, rgba(212,175,55,0.045) 50%, transparent 80%);
    background-size: 300% 300%;
    animation: heroShimmer 14s ease-in-out infinite;
    z-index: 0;
}
@keyframes heroShimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Location Skylines --- */
.location-skyline {
    display: block; margin-top: 1.25rem; width: 100%; max-width: 340px;
    opacity: 0.13; transition: opacity 0.4s ease;
}
.contact-item:hover .location-skyline { opacity: 0.25; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .hero-motif, .hero-bg::before { animation: none; }
    .reveal-up, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; transition: none; }
    .divider-animate { width: 60px; transition: none; }
    .timeline::before { transform: scaleY(1); transition: none; }
    .timeline-dot { transform: scale(1); transition: none; }
    .timeline-item:first-child .timeline-dot::after { animation: none; }
}
