/* GLOBAL VARIABLES */
:root {
    --primary-navy: #051C2C;
    --secondary-blue: #004D71;
    --highlight-blue: #8ecae6;
    --white: #FFFFFF;
    --off-white: #F9FAFB;
    --text-gray: #4A4A4A;
    --border-gray: #E5E7EB;
    --glass: rgba(255, 255, 255, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--primary-navy);
    line-height: 1.6;
    overflow-x: hidden;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 700; }
h1 { font-size: 3.5rem; line-height: 1.15; letter-spacing: -1px; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { font-size: 1.05rem; color: var(--text-gray); margin-bottom: 1.5rem; max-width: 700px; }
.hero p { color: rgba(255, 255, 255, 0.9); font-size: 1.25rem; }

/* HEADER & NAV */
header {
    padding: 1.2rem 10%;
    position: fixed;
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows menu to drop down on mobile */
}

.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--primary-navy);
    text-decoration: none;
}

/* Desktop Nav Styles */
nav {
    display: flex;
    align-items: center;
}

nav a {
    margin-left: 2rem;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover, nav a.active { color: var(--secondary-blue); }

.header-btn {
    background-color: var(--secondary-blue);
    color: white !important;
    padding: 0.7rem 1.4rem;
    border-radius: 2px;
    margin-left: 2rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-btn:hover { background-color: var(--primary-navy); }

/* MOBILE MENU BUTTON (Hidden on Desktop) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-navy);
    padding: 0.5rem;
}

/* SECTIONS */
section {
    padding: 8rem 10% 6rem 10%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
section.visible { opacity: 1; transform: translateY(0); }

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--secondary-blue);
    margin-bottom: 1rem;
    display: block;
}

/* HERO - BASE STYLES */
.hero {
    background: var(--primary-navy);
    background: linear-gradient(170deg, var(--primary-navy) 0%, #082032 100%);
    color: var(--white);
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    perspective: 1000px; 
}

/* HERO CONTENT Z-INDEX */
.hero-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}
.hero-content a { pointer-events: auto; }

/* --- 3D GRID LOGIC (DESKTOP ONLY) --- */
@media (min-width: 769px) {
    .grid-container {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        display: grid;
        z-index: 0; 
    }

    .grid-tile {
        position: relative;
        border: 1px solid transparent; 
        background: transparent;
        transition: transform 0.1s ease-out, background-color 0.1s ease-out, border-color 0.2s ease-out;
        will-change: transform, background-color;
    }
}

/* --- MOBILE OPTIMIZATIONS --- */
@media (max-width: 768px) {
    /* 1. Show the Menu Button */
    .mobile-menu-btn { display: block; }

    /* 2. Transform Nav into a Dropdown */
    nav {
        display: none; /* Hidden by default */
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 1rem;
        padding-bottom: 1rem;
        background: var(--white);
        position: absolute;
        top: 100%;
        left: 0;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

    /* 3. Class to show menu when clicked */
    nav.active { display: flex; }

    nav a {
        margin: 0;
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .header-btn {
        margin: 1.5rem 0 0 0;
        display: inline-block;
        width: 100%;
        text-align: center;
    }

    .grid-container { display: none !important; }

    h1 { font-size: 2.2rem; }
    .hero { padding-top: 8rem; }
    .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
    header { padding: 1rem 5%; }
    .footer-flex { flex-direction: column; text-align: center; gap: 2rem; align-items: center; }
}

/* REST OF STYLES */
.hero h1 { color: var(--white); max-width: 950px; margin-bottom: 2rem; }
.highlight { color: var(--highlight-blue); font-style: italic; }

.btn-primary {
    display: inline-block;
    background: transparent;
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-primary:hover { 
    background: var(--white); 
    color: var(--primary-navy); 
    border-color: var(--white);
}

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }

.card {
    padding: 2.5rem;
    background: var(--white);
    border: 1px solid var(--border-gray);
    transition: all 0.3s ease;
}
.card:hover {
    border-color: var(--secondary-blue);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.check-list { list-style: none; }
.check-list li { 
    margin-bottom: 0.8rem; 
    padding-left: 1.5rem; 
    position: relative; 
    color: var(--text-gray);
}
.check-list li::before { 
    content: '→'; 
    position: absolute; 
    left: 0; 
    color: var(--secondary-blue); 
    font-weight: bold;
}

footer {
    padding: 5rem 10%;
    background: #05141f;
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-flex { display: flex; justify-content: space-between; align-items: flex-end; }
.footer-link { color: white; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }