/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Typography Scale */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */
    
    /* Socratix Brand Color Palette */
    --primary-color: #4b3652;        /* Deep purple - primary brand color */
    --primary-dark: #3a2741;         /* Darker purple for hover states */
    --secondary-color: #7b6b4d;      /* Warm brown - secondary and accent text */
    --secondary-dark: #5d5139;       /* Darker brown for hover states */
    --accent-color: #b497ed;         /* Light lavender - secondary text */
    --accent-light: #c9b3f5;         /* Lighter lavender for highlights */
    --text-primary: #050111;         /* Near black - primary text */
    --text-secondary: #7b6b4d;       /* Warm brown - secondary text */
    --text-accent: #b497ed;          /* Light lavender - accent text */
    --bg-light: #f8f8ee;             /* Cream - accent background */
    --white: #ffffff;
    --shadow-light: rgba(75, 54, 82, 0.1);
    --shadow-medium: rgba(75, 54, 82, 0.15);
    
    /* Spacing Scale */
    --space-xs: 0.5rem;   /* 8px */
    --space-sm: 1rem;     /* 16px */
    --space-md: 1.5rem;   /* 24px */
    --space-lg: 2rem;     /* 32px */
    --space-xl: 3rem;     /* 48px */
    --space-2xl: 4rem;    /* 64px */
    --space-3xl: 6rem;    /* 96px */
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background: transparent;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1001;
    padding: var(--space-md);
    display: none; /* Hidden on desktop, shown on mobile */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0.9;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
}

.nav-menu a.active {
    color: var(--white);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
}

/* Logo Banner Section - Fixed Desktop Sizing */
.logo-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 0;
    margin-top: 0;
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden; /* Contain everything */
    height: 60px; /* Fixed height - adjust this number to your preference */
}

.logo-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none; /* Don't interfere with clicks */
}

.logo-banner-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.logo-banner nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
}

.banner-logo {
    height: 50px; /* Fixed logo height to fit banner */
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.banner-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 6px 20px rgba(180, 151, 237, 0.6));
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    text-align: center;
    padding: var(--space-3xl) 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content h2 {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--space-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.cta-button {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(180, 151, 237, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(180, 151, 237, 0.5);
}

.cta-button:hover::before {
    left: 100%;
}

/* Sections */
section {
    padding: var(--space-3xl) 0;
}

.about {
    background: var(--bg-light);
}

.about h2, .services h2, .contact h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-4xl);
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.about p {
    text-align: center;
    font-size: var(--font-size-lg);
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.service-card {
    background: var(--white);
    padding: var(--space-2xl) var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px var(--shadow-light);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: var(--white);
    font-size: var(--font-size-2xl);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(75, 54, 82, 0.3);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(180, 151, 237, 0.4);
}

.service-card h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-weight: 600;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: var(--font-size-base);
}

/* Contact */
.contact {
    background: var(--bg-light);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: var(--space-lg);
}

.contact-form input,
.contact-form textarea {
    padding: var(--space-md);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.contact-form textarea {
    height: 120px;
    resize: vertical;
}

.contact-form button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(75, 54, 82, 0.3);
}

/* Footer */
footer {
    background: var(--text-primary);
    color: var(--white);
    text-align: center;
    padding: var(--space-2xl) 0;
    margin-top: var(--space-3xl);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.footer-logo {
    height: 150px;
    max-height: 150px;
    width: auto;
    max-width: 100%;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-copyright {
    margin: 0;
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styles */
::selection {
    background: var(--accent-color);
    color: var(--white);
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    gap: 4px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logo-banner {
        height: 50px; /* Slightly smaller on tablet */
    }
    
    .logo-banner-content {
        padding-top: 60px; /* Space for fixed mobile menu */
    }
    
    .logo-banner nav {
        display: none; /* Hide nav in banner on mobile, use hamburger instead */
    }
    
    .banner-logo {
        height: 40px; /* Scale logo proportionally */
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: var(--space-2xl);
        transition: left 0.3s ease;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: var(--space-lg) 0;
    }
    
    .nav-menu a {
        font-size: var(--font-size-2xl);
        padding: var(--space-md) var(--space-xl);
    }
    
    .hero {
        margin-top: 0;
        padding: var(--space-2xl) 0;
        min-height: 50vh;
    }
    
    .hero-content {
        padding: var(--space-xl) var(--space-md);
    }
    
    .hero-content h2 {
        font-size: var(--font-size-4xl);
    }
    
    section {
        padding: var(--space-2xl) 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .service-card {
        padding: var(--space-xl) var(--space-lg);
    }
    
    .about h2, .services h2, .contact h2 {
        font-size: var(--font-size-3xl);
    }
}

@media (max-width: 480px) {
    .logo-banner {
        height: 45px; /* Compact for small screens */
    }
    
    .logo-banner-content {
        padding: 0 10px;
        padding-top: 50px;
    }
    
    .banner-logo {
        height: 35px; /* Smaller logo for mobile */
    }
    
    .hero {
        min-height: 40vh;
        padding: var(--space-xl) 0;
    }
    
    .hero-content {
        padding: var(--space-lg) var(--space-md);
    }
    
    .hero-content h2 {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--space-xl);
    }
    
    .cta-button {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--font-size-base);
    }
    
    .nav-menu a {
        font-size: var(--font-size-xl);
    }
}
