@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Outfit:wght@200;300;400;500;600&display=swap');

:root {
    /* AENVIX Brand Color System - INVERTED (Oatmeal Light Mode) */
    --bg-color: #EAE6D9;
    /* Matte Oatmeal (NOW BACKGROUND) */
    --bg-color-alt: #F7F5F0;
    /* Parchment White */
    --text-main: #0B1320;
    /* Midnight Navy (NOW TEXT) */
    --text-muted: #2C3539;
    /* Cool Charcoal Grey */
    --accent-white: #0B1320;
    /* Keep high contrast */
    --border-subtle: rgba(44, 53, 57, 0.15);
    /* Subtle navy line */

    --glass-bg: rgba(234, 230, 217, 0.85);
    /* Oatmeal Glass */
    --glass-border: rgba(11, 19, 32, 0.1);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* TM Symbol Styling */
.tm-symbol {
    font-size: 0.4em;
    position: relative;
    top: -0.5em;
    margin-left: 1px;
    font-weight: 500;
}

/* Footer TM Symbol Styling - Decoupled for independent adjustment */
.tm-symbol-alt {
    font-size: 1em;
    /* Slightly larger for footer readability */
    position: relative;
    top: 0.1em;
    /* Adjusted offset for better alignment in footer */
    margin-left: 1px;
    font-weight: 500;
}

/* Base Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--accent-white);
}

h1 {
    font-size: 42px;
    /* Smaller, as requested */
    line-height: 1.1;
    margin-bottom: 20px;
}

h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

p {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 300;
    max-width: 600px;
}

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

a:hover {
    color: var(--accent-white);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 1440px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
    font-family: "Georgia Pro Black", Georgia, serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border-bottom: 1px solid transparent;
    padding-bottom: 4px;
}

.nav-links a.active {
    color: var(--accent-white);
    border-bottom-color: var(--border-subtle);
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    /* Force scrollbar to prevent layout jump */
}

/* Hero Section */
.hero {
    padding-top: 150px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 10;

    border-bottom: 1px solid var(--border-subtle);
}

/* Inner Page Header */
.page-header {
    margin-top: 100px;
    /* Reduced to be closer to navbar */
    padding-top: 50px;
    /* Reduced internal top spacing */
    padding-bottom: 50px;
    /* Reduced internal bottom spacing */
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
}

.page-header.values .page-header-bg {
    background-image: url('../assets/header_values.svg');
}

.page-header.methodology .page-header-bg {
    background-image: url('../assets/header_methodology.svg');
}

.page-header.services .page-header-bg {
    background-image: url('../assets/header_services.svg');
}

.page-header.legal .page-header-bg {
    background-image: url('../assets/header_legal.svg');
}

.page-header .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.page-header .container>* {
    max-width: 650px;
    /* Constrain text to the left so it doesn't overlap graphic */
}



.hero-content {
    position: relative;
    z-index: 2;
}

.tagline {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--accent-white);
    /* Brighter color for visibility */
    opacity: 0.8;
    letter-spacing: 0.15em;
    margin-bottom: 24px;
    display: block;
    text-transform: uppercase;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    margin-top: 24px;
    padding: 16px 32px;
    background: transparent;
    color: var(--accent-white);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-white);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: -1;
}

.btn-primary:hover {
    color: var(--bg-color);
    border-color: var(--accent-white);
}

.btn-primary:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    z-index: 0;
    opacity: 0.6;
    /* Moderate opacity, balanced between visible and restrained */
    pointer-events: none;
}

/* Modal form (Inquiry) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    background: rgba(11, 19, 32, 0.4);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 48px;
    width: 100%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--accent-white);
}

.modal-content h3 {
    margin-bottom: 0.5rem;
}

.modal-content p {
    font-size: 14px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 12px 0;
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

.form-submit {
    width: 100%;
    text-align: center;
}

/* Page Specific Content Sections */
.page-section {
    padding-top: 24px;
    padding-bottom: 24px;
    position: relative;
    z-index: 10;
}

/* Ensure subpages clear the fixed nav */
main.page-section {
    padding-top: 150px;
}

.section-header {
    margin-bottom: 8px;
}

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

.service-card {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
}

.service-card h4 {
    font-size: 20px;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.service-card p {
    font-size: 15px;
}

/* Split Layout for text + image */
.split-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 64px;
    align-items: center;
}

.split-image-wrapper {
    width: 100%;
    overflow: hidden;
}

.split-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    /* Slight softening of the hard edges */
}

.philosophy-block {
    margin-bottom: 24px;
    border-left: 1px solid var(--border-subtle);
    padding-left: 24px;
}

.philosophy-block h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Legal text */
.legal-content {
    max-width: 800px;
}

.legal-content h3 {
    margin-top: 32px;
    margin-bottom: 8px;
    font-size: 20px;
}

.legal-content p {
    font-size: 14px;
    margin-bottom: 16px;
}

/* Footer */
footer {
    padding: 48px 32px;
    border-top: 1px solid var(--border-subtle);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links a {
    margin-left: 1.5rem;
}

@media (max-width: 768px) {

    /* Container & Layout */
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .page-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    /* Typography Scaling */
    h1 {
        font-size: 32px;
        margin-bottom: 16px;
    }

    h2 {
        font-size: 26px;
        margin-bottom: 12px;
    }

    .tagline {
        font-size: 12px;
        margin-bottom: 16px;
    }

    /* Navigation - Ensure links are visible on mobile */
    nav {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .brand-logo {
        font-size: 22px;
    }

    .nav-links {
        display: flex;
        gap: 20px;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        /* Hide scrollbar for a cleaner look */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    /* Subpages clear nav adjustments */
    main.page-section {
        padding-top: 120px;
    }

    /* Hero & Page Header Constraints */
    .hero,
    .page-header {
        padding-top: 120px;
        padding-bottom: 40px;
    }

    .page-header {
        margin-top: 80px;
    }

    /* Content Blocks */
    .split-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .philosophy-block {
        padding-left: 16px;
        margin-bottom: 32px;
    }

    .philosophy-block h3 {
        font-size: 20px;
    }

    /* Grid & Cards */
    .card-grid {
        gap: 32px;
    }

    .service-card {
        padding-top: 20px;
    }

    /* Footer Cleanup */
    footer {
        padding: 40px 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }

    .footer-links a {
        margin-left: 0;
        margin-right: 20px;
    }

    /* Modal Form Constraints */
    .modal-content {
        max-width: 90%;
        padding: 32px 24px;
    }
}