/* 1. General Styles & Theming */
:root {
    --header-height: 2.5rem;
    --apple-radius: 40px; /* Standardized border-radius */
    --ease-1: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-2: cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

[data-theme='light'] {
    --bg-color: #ffffff;
    --text-color: #1d1d1f;
    --text-color-muted: #cccccc;
    --primary-color: #007aff;
    --primary-hover-color: #2997ff;
    --header-bg: rgba(255, 255, 255, 0.366);
    --section-bg: #f5f5f7;
    --card-bg: #ffffff;
    --border-color: #d2d2d7c7;
    --mobile-nav-bg: rgba(255, 255, 255, 0.85);
}

[data-theme='dark'] {
    --bg-color: #000000;
    --text-color: #f5f5f7;
    --text-color-muted: #6e6e73;
    --primary-color: #007aff;
    --primary-hover-color: #2997ff;
    --header-bg: rgba(18, 18, 18, 0.379);
    --section-bg: #1c1c1c;
    --card-bg: #242424;
    --border-color: #424245;
    --mobile-nav-bg: rgba(20, 20, 20, 0.85);
}

* {
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 2;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main { padding-top: var(--header-height); }
.container { max-width: 1000px; margin: 0 auto; padding: 0 2rem; }
.container-full-width { width: 100%; padding: 0 2rem; }

section { padding: 5rem 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; text-align: center; }
h4 { font-weight: 600; line-height: 1.2; text-align: left; }
h1 { font-size: clamp(5.8rem, 5vw, 4rem); }
h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.5rem; margin-bottom: 1rem; }
h5 {
display: block;
font-size: clamp(2.2rem, 4vw, 3.5rem);
margin-block-start: 0em;
margin-block-end: -0.67em;
margin-inline-start: -220px;
font-weight: bold;
}
h6{ font-size: 1.5rem; margin-bottom: 1rem;text-align: center; }
p { max-width: -1000px; margin:  auto 1.5rem auto; text-align: center; font-size: 1.5rem; }

/* 2. Header & Navigation */
header { position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height); padding: 0; display: flex; align-items: center; z-index: 1001; background-color: transparent; border-bottom: 0px solid transparent; }
header.scrolled { background-color: var(--header-bg); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(7px); border-bottom-color: var(--border-color); }
header .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%;  }
.header-left { justify-self: start; }
.header-center { justify-self: center; }
.header-right { justify-self: end; display: flex; align-items: center; }

.logo { display: flex; align-items: center; }
.logo img { height: 1.8rem; width: auto; max-width: 150px; transition: opacity 0.3s var(--ease-1); }
[data-theme='light'] .logo-dark { display: none; }
[data-theme='dark'] .logo-light { display: none; }

.desktop-nav { display: block; }
.desktop-nav ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; }
.desktop-nav li { margin: 0 1.5rem; }
.desktop-nav a { text-decoration: none; color: var(--text-color); font-weight: 500; }
.desktop-nav a:hover { color: var(--primary-color); font-weight: 700; }

#theme-toggle { background: none; border: none; cursor: pointer; font-size: 1.5rem; padding: 0; color: var(--text-color); margin-left: 1rem; }

.mobile-nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 24px; height: 24px; z-index: 3000; margin-left: 1rem; }
.mobile-nav-toggle span { display: block; width: 100%; height: 2px; background-color: var(--text-color); border-radius: 2px; }
body.mobile-nav-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.mobile-nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
body.mobile-nav-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.main-nav { display: none; }

/* 3. Buttons */
.btn-container { text-align: center; margin-top: 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; background-color: var(--primary-color); color: #fff; padding: 0.5rem 2rem; text-decoration: none; border-radius: 50px; font-weight: 600; margin-bottom: 1rem; border: none; position: relative; min-height: 40px; }
.btn:hover { background-color: var(--primary-hover-color); transform: scale(1.05); }
.btn.is-processing { background-color: transparent; width: 54px; height: 54px; padding: 0; }

.arrow-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    font-size: 1.2rem;
    margin-top: -1rem;
     margin-bottom: 2rem;
}

.arrow-link .chevron {
    border: solid var(--primary-color);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(-45deg);
    margin-left: 8px;
}

/* 4. Home Page Sections */
.hero {
    position: relative;
    margin-block-start: 50px;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: -350px;
    z-index: -1;
}

.hero::before {
    background-image: url(../images/herobglight.png);
    background-size: 43.5rem;
    opacity: 1;
    transition: opacity 0.7s ease-in-out;
}

.hero::after {
    background-image: url(../images/herobgdark.png);
    background-size: 43rem;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
}

[data-theme='dark'] .hero::before {
    opacity: 0;
}

[data-theme='dark'] .hero::after {
    opacity: 1;
}




.alternating-section { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem; }

.alternating-section { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem;
margin-top: 100px; }
#software { grid-auto-flow: dense; 
 margin-top: 3rem;}
#software .alternating-image { grid-column: 1; }
#software .alternating-text { grid-column: 2; }
.alternating-text h2 { font-size: clamp(2.5rem, 5vw, 4rem); text-align: left; font-weight: 700; }
.alternating-text p { font-size: 1.2rem; text-align: left; max-width: 450px; margin-left: 0; }
.alternating-image img { width: 100%; border-radius: var(--apple-radius); filter: grayscale(1); transition: filter 1.2s var(--ease-1); }
.alternating-section:hover .alternating-image img { filter: grayscale(0); }

/* Closer Look Section */
#closer-look .heading-container { max-width: 1000px; margin: 2rem auto; padding: 0 2rem; }
#closer-look h2 { text-align: left; }
.feature-card { position: relative; background-color: var(--section-bg); border-radius: 20px; padding: 4rem; }
.closer-look-grid { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 5rem; max-width: 1200px; margin: 0 auto; }
.feature-image-container { position: relative; width: 100%; padding-top: 100%; border-radius: 20px; overflow: hidden; }
.feature-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease-in-out; }
.feature-image.active { opacity: 1; }

.feature-close-button { position: absolute; top: 2rem; right: 2rem; background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--text-color-muted); z-index: 10; opacity: 0; pointer-events: none; }
.feature-card.is-open .feature-close-button { opacity: 1; pointer-events: auto; }
.feature-close-button:hover { color: var(--text-color); }

.feature-controls-container { display: flex; align-items: flex-start; gap: 1.5rem; }
.feature-list-wrapper { flex-grow: 1; }
.feature-nav-arrows { position: absolute; top: 50%; transform: translateY(-50%); left: 4rem; display: flex; flex-direction: column; gap: 1rem; opacity: 0; transition: opacity 0.8s ease; pointer-events: none; z-index: 1; }
.feature-card.is-open .feature-nav-arrows { opacity: 1; pointer-events: auto; }
.feature-nav-arrows button { background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-color); width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.feature-nav-arrows button:hover { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.feature-nav-arrows button.disabled { opacity: 0.3; cursor: not-allowed; }
.chevron { border: solid var(--text-color); border-width: 0 2px 2px 0; display: inline-block; padding: 3px; }
.feature-nav-arrows button:hover .chevron { border-color: #fff; }
.chevron.up { transform: rotate(-135deg); margin-top: 3px; }
.chevron.down { transform: rotate(45deg); margin-bottom: 3px; }

.feature-item { background-color: var(--card-bg); border-radius: 50px; margin-bottom: 1rem; padding: 1rem 1.5rem; cursor: pointer; width: fit-content; transition: width 1s ease-in-out; }
.feature-item.active { width: 100%; }
.feature-title { font-size: 1.2rem; font-weight: 600; margin: 0; text-align: left; display: flex; align-items: center; justify-content: flex-start; gap: 14px; }
.feature-description { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out; }
.feature-item.active .feature-description { max-height: 15rem; /* Approximate height */ }
.feature-description p { text-align: left; font-size: 1rem; padding-top: 0.5rem; margin: 0; }
.icon-circle { width: 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.06); background: rgba(255,255,255,0.6); will-change: transform; transition: transform 0.4s ease-in-out; flex-shrink: 0; }
.feature-item.active .icon-circle { transform: rotate(45deg); }

#contact-home { margin-bottom: 5rem; }

/* 5. Cards & Grids */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 3rem; }
.card { display: flex; flex-direction: column; background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--apple-radius); padding: 2rem; text-align: left; }
.card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
[data-theme='dark'] .card:hover { box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.card img { width: 100%; border-radius: var(--apple-radius); margin-bottom: 1.5rem; filter: grayscale(1); transition: filter 0.4s var(--ease-1); }
.card:hover img { filter: grayscale(0); }
.card h3 { text-align: left; }
.card p { font-size: 1rem; text-align: left; }

/* Team Grid Specific Styles */
.team-grid { grid-template-columns: repeat(2, 1fr); max-width: 700px; margin-left: auto; margin-right: auto; margin-top: 4rem; margin-bottom: 4rem; gap: 4rem; align-items: stretch; }
.team-grid .card img { border-radius: var(--apple-radius); }

/* 6. Animations */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease-1), transform 0.8s var(--ease-1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.animated-text p span { color: var(--text-color-muted); }
.animated-text p span.visible { color: var(--text-color); }

/* 7. Contact Form */
.contact-form .btn-container { text-align: center; }

/* 8. Accordion */
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item { border-bottom: 1px solid var(--border-color); }
.accordion-header { padding: 1.5rem 1rem; cursor: pointer; font-weight: 600; font-size: 1.2rem; display: flex; justify-content: space-between; align-items: center; }
.accordion-header:hover { background-color: var(--section-bg); }
.accordion-header::after { content: '+'; font-size: 1.8rem; transition: transform 0.3s var(--ease-1); }
.accordion-item.active .accordion-header::after { transform: rotate(45deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease-1); }
.accordion-content p { padding: 0 1rem 1.5rem 1rem; text-align: left; }

/* 9. Footer */
footer { padding: 3rem 0; border-top: 1px solid var(--border-color); }
footer .container { display: flex; flex-direction: column; align-items: center; }
.social-links { text-align: center; margin-bottom: 2rem; }
.social-links a { margin: 0 1rem; text-decoration: none; color: var(--text-color); font-weight: 500; }
.social-links a:hover { color: var(--primary-color); }
.footer-nav { text-align: center; margin-bottom: 2rem; }
.footer-nav a { margin: 0 1rem; text-decoration: none; color: var(--text-color-muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--primary-color); }
.footer-copyright p { text-align: center; color: var(--text-color-muted); font-size: 0.8rem; margin: 0; }

/* 10. Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    p { font-size: 1.1rem; line-height: 1.6; }
    .container { padding: 0 1.5rem; }
    section { padding: 4rem 0; }

    header { height: 3rem; }
    header .container { grid-template-columns: 1fr auto; }
    .header-center { display: none; }
    .header-right { justify-self: end; }
    .logo img { height: 2rem; }

    .mobile-nav-toggle { display: block; }
    .desktop-nav { display: none; }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--mobile-nav-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 2000;
        opacity: 0;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.5s cubic-bezier(0.76, 0, 0.24, 1);
        pointer-events: none;
    }
    .main-nav.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .main-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .main-nav li {
        margin: 1.5rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    .main-nav.is-open li {
        opacity: 1;
        transform: translateY(0);
    }
    .main-nav.is-open li:nth-child(1) { transition-delay: 0.2s; }
    .main-nav.is-open li:nth-child(2) { transition-delay: 0.25s; }
    .main-nav.is-open li:nth-child(3) { transition-delay: 0.3s; }
    .main-nav.is-open li:nth-child(4) { transition-delay: 0.35s; }
    .main-nav.is-open li:nth-child(5) { transition-delay: 0.4s; }
    .main-nav a {
        font-size: 2rem;
        font-weight: 600;
        color: var(--text-color);
        text-decoration: none;
    }

    .alternating-section, .closer-look-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    #software .alternating-image { grid-row: 1; }
    .alternating-text h2, .alternating-text p {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }
    .alternating-image img {
        width: 100%;
        border-radius: 30px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .card {
        padding: 1.5rem;
        border-radius: 30px;
    }
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: none;
    }
    .team-grid .card {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
    .team-grid .card img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        margin-bottom: 0;
    }
    .card h6, .card p {
        text-align: left;
        margin: 0;
    }
     .card h6 {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .content-section h2, .content-section h3, .content-section p {
        text-align: left;
    }

    .footer-nav {
        flex-direction: column;
        align-items: center;
    }
    .footer-nav a { margin: 0.5rem 0; }
}

/* 11. Image Grayscale Effect */
.grayscale-hover {
    filter: grayscale(1);
    transition: filter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grayscale-hover:hover {
    filter: grayscale(0);
}
