/* --- CSS VARIABLES --- */
:root {
    --bg-base: #020c1b;
    --bg-primary: #0A192F;
    --bg-secondary: #112240;
    --bg-light: #233554;
    --text-heading: #CCD6F6;
    --text-body: #8892B0;
    --accent-color: #64FFDA;
    --accent-glow: rgba(100, 255, 218, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* --- GLOBAL STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 100px; /* Offsets scroll to account for the fixed navbar */
}

body {
    background-color: var(--bg-base);
    color: var(--text-body);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    color: var(--text-heading);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

p {
    margin-bottom: 20px;
}

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

a:hover {
    color: #fff;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}

section {
    padding: 100px 0;
    position: relative;
}

/* --- BUTTONS & INTERACTIVE ELEMENTS --- */
.btn-primary {
    display: inline-block;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 16px 32px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background-color: var(--accent-glow);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px var(--accent-glow);
    color: var(--accent-color);
}

.btn-filled {
    background-color: var(--accent-color);
    color: var(--bg-primary);
    border: 1px solid var(--accent-color);
}

.btn-filled:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin-top: 10px;
    transition: var(--transition);
}

.toggle-btn:hover {
    color: #fff;
}

.toggle-btn i {
    transition: transform 0.3s ease;
}

.toggle-btn.active i {
    transform: rotate(180deg);
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--text-heading);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    position: relative;
}

.nav-indicator {
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

.nav-links a {
    color: var(--text-heading);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:not(.btn-primary).active {
    color: var(--accent-color);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-contact-btn {
    padding: 10px 20px;
    margin-left: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-heading);
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(2, 12, 27, 0.8), rgba(2, 12, 27, 0.95)), url('https://images.unsplash.com/photo-1581093458791-9f3c3900df4b?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat fixed;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 span {
    color: var(--accent-color);
}

.hero p {
    font-size: clamp(18px, 2vw, 22px);
    margin-bottom: 40px;
    max-width: 650px;
}

/* --- SECTION HEADERS --- */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 40px);
    color: var(--text-heading);
}

.section-header::after {
    content: "";
    display: block;
    height: 1px;
    width: 300px;
    background-color: var(--bg-light);
    margin-left: 20px;
}

.section-intro {
    font-size: 18px;
    max-width: 800px;
    margin-bottom: 60px;
}

/* --- EXPANDABLE INLINE CONTENT --- */
.expandable-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), opacity 0.4s ease-in-out;
}

.expandable-content.expanded {
    max-height: 2000px; /* Arbitrary large number to allow content to flow */
    opacity: 1;
    transition: max-height 0.8s ease-in-out, opacity 0.6s ease-in-out;
    margin-top: 20px;
}

/* --- TWO COLUMN LAYOUT (Z-PATTERN) --- */
.z-pattern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
}

.z-pattern.reverse {
    direction: rtl;
}

.z-pattern.reverse > * {
    direction: ltr;
}

.about-cycle-layout,
.software-cfd-layout {
    grid-template-columns: 1fr;
    gap: 40px;
}

.z-text h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-heading);
}

.z-text p {
    font-size: 18px;
    margin-bottom: 20px;
}

.bullet-list {
    list-style: none;
}

.bullet-list li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 20px;
    font-size: 16px;
}

.bullet-list i {
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--accent-color);
    font-size: 20px;
    background: var(--accent-glow);
    padding: 8px;
    border-radius: 4px;
}

.bullet-list strong {
    color: var(--text-heading);
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}

.z-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(2, 12, 27, 0.7);
}

.z-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    mix-blend-mode: multiply;
    opacity: 0.2;
    transition: var(--transition);
}

.z-image:hover::after {
    opacity: 0;
}

.z-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(20%) contrast(1.1);
}

/* --- SERVICES GRID --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 40px 30px;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px -15px rgba(2, 12, 27, 0.7);
}

.service-card .icon {
    font-size: 40px;
    color: var(--accent-color);
    margin-bottom: 25px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.learn-more-link {
    margin-top: auto;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.service-card:hover .learn-more-link {
    gap: 10px;
}

/* --- MODAL (POPUP) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 12, 27, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

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

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: var(--text-body);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

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

#modalIcon {
    font-size: 40px;
    color: var(--accent-color);
    margin-bottom: 20px;
}

#modalTitle {
    font-size: 28px;
    margin-bottom: 20px;
}

#modalBody {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-body);
}

/* --- FORM STYLES --- */
.contact-modal-content {
    max-width: 500px;
}

.contact-modal-content h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-heading);
}

.contact-modal-content p {
    font-size: 15px;
    margin-bottom: 25px;
    color: var(--text-body);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-heading);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.form-group .required {
    color: var(--accent-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 15px;
    background-color: var(--bg-base);
    border: 1px solid var(--bg-light);
    border-radius: 6px;
    color: var(--text-heading);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(136, 146, 176, 0.5);
}

.w-full {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

/* --- DOMAINS OF APPLICATION (ACCORDIONS) --- */
.domains-section {
    background-color: var(--bg-primary);
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    align-items: start;
}

.domain-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--bg-light);
    overflow: hidden;
    transition: var(--transition);
}

.domain-card:hover {
    border-color: rgba(100, 255, 218, 0.5);
}

.domain-card-header {
    padding: 25px 30px;
    background: rgba(100, 255, 218, 0.03);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.domain-card-header h3 {
    font-size: 20px;
    color: var(--text-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.domain-card-header h3 i {
    color: var(--accent-color);
}

.domain-toggle-icon {
    color: var(--accent-color);
    font-size: 20px;
    transition: transform 0.3s ease;
}

.domain-card.active .domain-toggle-icon {
    transform: rotate(45deg);
}

.domain-card-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 30px;
    opacity: 0;
    transition: max-height 0.4s ease-out, padding 0.4s ease, opacity 0.3s ease;
}

.domain-card.active .domain-card-body {
    max-height: 500px;
    padding: 0 30px 30px 30px;
    opacity: 1;
}

.domain-card-body ul {
    list-style: none;
    margin-top: 15px;
}

.domain-card-body li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
}

.domain-card-body li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 18px;
}

.domain-card-body strong {
    color: var(--text-heading);
}

/* --- HIGHLIGHT STRIP --- */
.highlight-strip {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--bg-light);
    border-bottom: 1px solid var(--bg-light);
    padding: 80px 0;
    text-align: center;
}

.highlight-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.highlight-item h3 {
    font-size: 64px;
    color: var(--accent-color);
    margin-bottom: 10px;
    line-height: 1;
}

.highlight-item p {
    font-size: 18px;
    color: var(--text-heading);
    font-weight: 600;
}

/* --- CTA / FOOTER --- */
.cta-section {
    text-align: center;
    padding: 120px 0;
    background: radial-gradient(circle at center, var(--bg-secondary) 0%, var(--bg-base) 100%);
}

.cta-section h2 {
    font-size: clamp(32px, 5vw, 54px);
    margin-bottom: 20px;
    color: var(--text-heading);
}

.cta-section p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 40px;
}

footer {
    background-color: var(--bg-primary);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--bg-light);
    font-size: 14px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .z-pattern {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .z-pattern.reverse {
        direction: ltr;
    }
    .domain-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    .nav-indicator {
        display: none;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70vw;
        height: 100vh;
        background-color: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(2, 12, 27, 0.8);
    }
    .nav-links.active {
        right: 0;
    }
    .nav-contact-btn {
        margin-left: 0;
        margin-top: 20px;
    }
    section {
        padding: 60px 0;
    }
    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 32px;
    }
    .section-header::after {
        width: 80px;
        margin-left: 0;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
}
