:root {
    --font-sans: "Geist Sans", system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    --bg-color: #FFFFFF;
    --primary-text-color: #111111;
    --secondary-text-color: #666666;
    --border-color: #EAEAEA;
    --light-gray-fill: #F5F5F5;
}

/* 1. Base & Typography */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    background: var(--bg-color);
    font-family: var(--font-sans);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--primary-text-color);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Re-enable text selection for content areas */
p, h1, h2, h3, h4, h5, h6, span, div {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary-text-color);
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 2. Header & Navigation */
header {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    position: relative;
}

.logo {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 11;
}

ul {
    display: flex;
    list-style: none;
    gap: .5px;
    margin: 0;
    padding: 0;
}

ul li a {
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    position: relative;
    padding: 12px 20px;
    display: block;
    cursor: pointer;
    user-select: none;
    color: var(--primary-text-color);
    transition: color 0.4s ease-out, transform 0.2s ease;
}

ul li a::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    font-weight: 700;
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: linear-gradient(90deg, #111, #999, #111);
    background-size: 200% auto;
    background-position: 200% center;
    opacity: 0;
    transition: background-position 0.4s ease-out, opacity 0.4s ease-out;
}

ul li a:hover {
    color: transparent; /* Hide original text by making it transparent */
}

ul li a:hover::before {
    opacity: 1;
    background-position: 0% center;
}

ul li a:active {
    transform: scale(0.98);
    color: transparent;
}

ul li a:active::before {
    opacity: 1;
    background-position: 0% center; /* Keep gradient on click */
}

.menu-toggle {
    display: none; /* Hidden by default */
    width: 25px;
    height: 20px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 12;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--primary-text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}


/* 3. Main Content & Sections */
main > section {
    padding: 7rem 0;
}

.subtitle {
    max-width: 70ch;
    margin: 0 auto 3rem auto;
    text-align: left;
}

/* Hero Section */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0; /* Full bleed */
}

.hero-video {
    width: 100%;
    max-width: 500px;
    height: 500px;
    margin: 0 auto;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Optimize video for mobile performance */
@media (max-width: 768px) {
    .hero-video video {
        -webkit-transform: translateZ(0) scale(1);
        transform: translateZ(0) scale(1);
    }
}

#hero + .container.reveal {
    padding-top: 2rem;
}

/* About Us Section */
#about {
    text-align: center;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-intro {
    max-width: 70ch;
    margin: 0 auto;
    text-align: left;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
    max-width: 70ch;
    margin: 0 auto;
}

/* Our Expertise Section */
#expertise {
    text-align: center;
}

#expertise h2 {
    margin-bottom: 1.5rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
}

.expertise-item {
    /* No longer needed */
}

.expertise-details {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.expertise-item p {
    max-width: 50ch; /* Limit line length for readability */
}

.expertise-item .btn {
    margin-top: 1rem;
}

/* Our Products Section */
#products {
    text-align: center;
}

/* Advisory Section */
#advisory {
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: left;
}

.card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Only hide cards if JavaScript is enabled */
.js-enabled .card {
    opacity: 0;
    transform: translateY(20px);
}

.js-enabled .card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile-first responsive design */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-video {
        max-width: 400px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-image.coming-soon span {
        font-size: 1rem;
    }
    
    .hero-video {
        max-width: 300px;
        height: 300px;
    }

    .logo {
        font-size: 0.8rem;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 10;
        padding-top: 60px; /* Adjust as needed */
    }

    nav.nav-active ul {
        opacity: 1;
        visibility: visible;
    }

    nav ul li {
        margin: 20px 0;
    }

    nav ul li a {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: flex;
    }
    
    .nav-active .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-active .menu-toggle span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-active .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

.card-image {
    width: 100%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: var(--light-gray-fill);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.card-image.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f6f7 0%, #e2e5e8 50%, #f5f6f7 100%);
    border: 2px dashed #cbd2d9;
}

.card-image.coming-soon span {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--secondary-text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

/* Mobile-optimized card interactions */
@media (max-width: 768px) {
    .card {
        transition: transform 0.2s ease, opacity 0.4s ease-out;
        transform: translateY(15px); /* Reduced movement on mobile */
    }
    
    .card.visible {
        transform: translateY(0);
    }
    
    .card:active {
        transform: scale(0.98);
    }
    
    .card:hover .card-image img {
        transform: scale(1.02);
    }
}

.card-copy h3 {
    font-size: 1.25rem;
}

.card-copy p {
    font-size: 1rem;
}

/* Contact Section */
#contact {
    text-align: center;
}

#contact p {
    margin-bottom: 0.5rem;
}

.email {
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--primary-text-color);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 6rem 0;
    background: var(--bg-color); /* Use pure white to match body */
    color: #444;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.footer-left p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

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

.footer-right p {
    font-size: 0.9rem;
    margin: 0;
}

.footer-right a {
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: var(--primary-text-color);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-right {
        text-align: center;
    }
}

/* 4. Components */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: transparent;
    color: var(--primary-text-color);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    background-color: var(--light-gray-fill);
    border-color: var(--light-gray-fill);
}

.btn:active {
    background-image: linear-gradient(to bottom, #EAEAEA, #DDDDDD);
    border-color: #DDDDDD;
    transform: translateY(1px);
}

/* 5. Animations & Responsiveness */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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


@media (max-width: 992px) {
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .expertise-details {
        text-align: left;
    }
    .expertise-item {
        text-align: left;
    }
    .expertise-item p {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    main > section {
        padding: 4rem 0;
    }
    
    .about-intro {
        font-size: 1.1rem;
        line-height: 1.7;
    }
    
    .subtitle {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
    
    .card-copy h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .card-copy p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .email {
        font-size: 1.1rem;
        word-break: break-all;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    main > section {
        padding: 3rem 0;
    }
    
    .hero-video {
        max-width: 280px;
        height: 280px;
    }
    
    .about-intro {
        font-size: 1rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card-copy h3 {
        font-size: 1rem;
    }
    
    .card-copy p {
        font-size: 0.9rem;
    }
}
