/* Consultancy Website - Optimized Styles */
/* Performance-focused with minimal CSS */

:root {
    --primary-navy: #1a1a2e;
    --primary-blue: #0f4c81;
    --accent-gold: #d4af37;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2d3748;
    --text-gray: #4a5568;
    --border-gray: #e2e8f0;

    /* Kensington Sinclair – palette drawn from logo */
    --ks-black: #050505;
    --ks-soft-black: #101010;
    --ks-soft-sage: #b8c4bc;
    --ks-soft-sage-dark: #9eaaa3;
    --ks-off-white: #f5f5f3;
    --ks-border: #252525;
    --ks-muted: #d4d4d8;
    --ks-text-dark: #111827;  /* Text on light backgrounds */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    color: var(--ks-off-white);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--ks-black);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--ks-off-white);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p { margin-bottom: 1rem; color: var(--ks-off-white); opacity: 0.9; }

/* Header & Navigation */
header {
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(184,196,188,0.15);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ks-off-white);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo img {
    height: 56px;
    width: auto;
    display: block;
    filter: brightness(2.5) contrast(1.8) drop-shadow(0 0 3px rgba(245,245,243,0.3));
    opacity: 1;
    transition: filter 0.3s ease;
}

.logo:hover img {
    filter: brightness(3) contrast(2) drop-shadow(0 0 5px rgba(245,245,243,0.5));
}

@media (max-width: 640px) {
    .logo img {
        height: 44px;
    }
}

.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;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--ks-muted);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--ks-soft-sage);
}

.btn-primary {
    background: var(--ks-soft-sage);
    color: #000000 !important;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid var(--ks-soft-sage-dark);
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary:hover {
    background: var(--ks-soft-sage-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--ks-soft-sage);
    padding: 0.75rem 1.75rem;
    border: 1px solid var(--ks-soft-sage-dark);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: var(--ks-soft-sage-dark);
    color: #050505;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--ks-off-white);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at top left, rgba(184,196,188,0.18), transparent 55%), 
                radial-gradient(circle at bottom right, rgba(184,196,188,0.12), transparent 55%),
                var(--ks-soft-black);
    color: var(--ks-off-white);
    padding: 8rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(184,196,188,0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(184,196,188,0.08) 0%, transparent 50%),
        url('data:image/svg+xml,<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(184,196,188,0.06)" stroke-width="1"/></pattern></defs><rect width="200" height="200" fill="url(%23grid)"/><circle cx="50" cy="50" r="3" fill="rgba(184,196,188,0.15)"/><circle cx="150" cy="80" r="3" fill="rgba(184,196,188,0.15)"/><circle cx="100" cy="150" r="3" fill="rgba(184,196,188,0.15)"/><line x1="50" y1="50" x2="150" y2="80" stroke="rgba(184,196,188,0.1)" stroke-width="1.5"/><line x1="150" y1="80" x2="100" y2="150" stroke="rgba(184,196,188,0.1)" stroke-width="1.5"/><line x1="100" y1="150" x2="50" y2="50" stroke="rgba(184,196,188,0.1)" stroke-width="1.5"/><rect x="30" y="30" width="8" height="8" fill="none" stroke="rgba(184,196,188,0.12)" stroke-width="1.5" rx="1"/><rect x="140" y="60" width="8" height="8" fill="none" stroke="rgba(184,196,188,0.12)" stroke-width="1.5" rx="1"/><rect x="90" y="130" width="8" height="8" fill="none" stroke="rgba(184,196,188,0.12)" stroke-width="1.5" rx="1"/></svg>');
    opacity: 1;
    background-size: cover, cover, cover;
    background-position: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--ks-off-white);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(245,245,243,0.85);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Container & Section */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--ks-off-white);
    opacity: 0.9;
}

/* Sections that sit on light backgrounds */
.section-on-light {
    background: var(--light-gray);
    color: var(--ks-text-dark);
}

.section-on-light h1,
.section-on-light h2,
.section-on-light h3,
.section-on-light h4 {
    color: var(--ks-text-dark);
    font-weight: 700;
}

.section-on-light p {
    color: #4b5563;
}

/* Stats Section */
.stats {
    background: #0b0b0b;
    padding: 4rem 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ks-soft-sage);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--ks-off-white);
    font-weight: 500;
    opacity: 0.9;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background: #101010;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
    border: 1px solid var(--ks-border);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.8);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at top left, rgba(184,196,188,0.6), rgba(158,170,163,0.95));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--ks-off-white);
}

.service-card h2,
.service-card h4 {
    color: var(--ks-off-white);
}

.service-card p {
    color: var(--ks-off-white);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.service-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-card ul li {
    padding: 0.5rem 0;
    color: var(--ks-off-white);
    position: relative;
    padding-left: 1.5rem;
    opacity: 0.9;
}

.service-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--ks-soft-sage);
    font-weight: bold;
}

.learn-more {
    color: var(--ks-soft-sage);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.learn-more:hover {
    gap: 0.75rem;
}

/* Process Section */
.process-steps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.process-steps .process-step:nth-child(1) {
    grid-column: 1 / 3;
}

.process-steps .process-step:nth-child(2) {
    grid-column: 3 / 5;
}

.process-steps .process-step:nth-child(3) {
    grid-column: 5 / 7;
}

.process-steps .process-step:nth-child(4) {
    grid-column: 3 / 5;
    justify-self: center;
    max-width: 400px;
    margin: 0 auto;
}

.process-steps .process-step:nth-child(5) {
    grid-column: 4 / 7;
    justify-self: center;
    max-width: 400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .process-steps .process-step:nth-child(1),
    .process-steps .process-step:nth-child(2),
    .process-steps .process-step:nth-child(3),
    .process-steps .process-step:nth-child(4),
    .process-steps .process-step:nth-child(5) {
        grid-column: 1;
    }
    
    /* Responsive 3-column grids in services */
    .expertise-grid {
        grid-template-columns: 1fr !important;
    }
}

.process-step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--ks-soft-sage);
    color: #050505;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.process-step h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--ks-off-white);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--ks-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ks-soft-sage);
}

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

.checkbox-group {
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.contact-info {
    background: #0d0d0d;
    padding: 2.5rem;
    border-radius: 12px;
    height: fit-content;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-detail {
    margin-bottom: 2rem;
}

.contact-detail h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--ks-off-white);
}

.contact-detail p {
    color: var(--ks-muted);
    margin-bottom: 0.25rem;
}

/* CTA Section */
.cta-section {
    background: radial-gradient(circle at top left, rgba(184,196,188,0.16), transparent 55%),
                radial-gradient(circle at bottom right, rgba(184,196,188,0.08), transparent 55%),
                var(--ks-soft-black);
    color: var(--ks-off-white);
    text-align: center;
    padding: 5rem 2rem;
}

.cta-section h2 {
    color: var(--ks-off-white);
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(245,245,243,0.9);
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background: #050505;
    color: var(--ks-off-white);
    padding: 3rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--ks-off-white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

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

.footer-section a {
    color: rgba(245,245,243,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--ks-soft-sage);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* Legal Pages */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.legal-content h1 {
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--ks-off-white);
    font-style: italic;
    margin-bottom: 3rem;
    opacity: 0.85;
}

.legal-content h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.legal-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.legal-content ul,
.legal-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.75rem;
    color: var(--ks-off-white);
}

.toc {
    background: #0d0d0d;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.toc h3 {
    margin-top: 0;
}

.toc ul {
    margin-left: 1.5rem;
}

.toc a {
    color: var(--ks-soft-sage);
    text-decoration: none;
}

.toc a:hover {
    text-decoration: underline;
}

/* Utility: improve contrast on light cards/panels */
.on-light,
.on-light p,
.on-light h1,
.on-light h2,
.on-light h3,
.on-light h4,
.on-light h5,
.on-light h6 {
    color: var(--ks-text-dark);
}

.on-light a {
    color: var(--ks-text-dark);
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 75px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0,0,0,0.1);
        padding: 2rem 0;
        gap: 1.5rem;
    }

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

    .menu-toggle {
        display: flex;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 5rem 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .process-steps .process-step:nth-child(4) {
        grid-column-start: 1;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Responsive 3-column grids in services */
    .expertise-grid {
        grid-template-columns: 1fr !important;
    }
}
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    header, footer, .cta-section {
        display: none;
    }
    
    body {
        color: #000;
    }
}