:root {
    /* Color Palette */
    --bg-dark: #37373d;
    --bg-dark-secondary: #424249;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-primary: #7da632; /* Olive Green */
    --accent-glow: rgba(125, 166, 50, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.07);

    /* Spacing */
    --section-padding: 6rem 2rem;
    --container-width: 1300px;

    /* Transitions */
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
}

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

ul {
    list-style: none;
}

/* --- Utilities --- */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-accent {
    color: var(--accent-primary);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* --- Glassmorphism Components --- */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    background: #658a25;
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    backdrop-filter: blur(4px);
}

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

/* --- Navigation --- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(55, 55, 61, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link:hover {
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

/* --- Hero Section --- */

.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

/* Abstract laser beam background effect */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 140%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    opacity: 0.15;
    filter: blur(80px);
    z-index: -1;
}

.hero-content {
    max-width: 700px;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* --- Features / Tech --- */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.tech-card {
    padding: 2.5rem;
    transition: var(--transition-fast);
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: rgba(125, 166, 50, 0.3);
    background: var(--glass-bg-hover);
}

.tech-icon {
    width: 50px;
    height: 50px;
    background: rgba(125, 166, 50, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.tech-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.tech-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Services & Applications --- */

.services-section {
    position: relative;
    padding: var(--section-padding);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.app-card {
    position: relative;
    height: 250px;
    border-radius: 1rem;
    overflow: hidden;
    group: relative;
    cursor: default;
}

.app-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.app-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 2;
}

.app-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.app-card p {
    font-size: 0.9rem;
    color: #cbd5e1;
    opacity: 0.9;
}

/* --- Before/After Gallery --- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); /* Wider cards for split view */
    gap: 2rem;
}

.comparison-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
    padding: 0 !important;
}

.split-view {
    display: flex;
    height: 300px;
    width: 100%;
}

.split-item {
    position: relative;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.split-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.split-item:hover img {
    transform: scale(1.05);
}

.split-label {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    border-radius: 1rem;
    z-index: 2;
    white-space: nowrap;
}

.split-item:first-child {
    border-right: 2px solid white; /* Divider */
}

.comparison-caption {
    padding: 1.25rem 1.25rem 1.5rem;
}

.comparison-caption h3 {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.comparison-caption p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Mobile responsive for split view */
@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .split-view {
        height: 250px;
    }
}

/* --- FAQ --- */

.faq-container {
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: var(--glass-bg-hover);
}

.faq-icon {
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
    color: var(--text-muted);
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    background: rgba(0,0,0,0.2);
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
}

/* --- Contact --- */

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--glass-bg-hover);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-helper {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.turnstile-shell {
    min-height: 74px;
    padding: 0.75rem;
    border: 1px dashed var(--glass-border);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
}

.turnstile-shell.is-ready {
    border-style: solid;
}

.form-status {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-status.is-success {
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
    color: #dcfce7;
}

.form-status.is-error {
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
    color: #fee2e2;
}

.form-status.is-info {
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.12);
    color: #fef3c7;
}

#contact-submit[disabled] {
    opacity: 0.65;
    cursor: wait;
}

/* --- Footer --- */

footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    background: #2b2b31;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: white;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--accent-primary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* --- Mobile Responsive --- */

@media (max-width: 968px) {
    .nav-container {
        padding-right: 0;
    }

    /* Fix for 3rd flex item causing button offset */
    .nav-container nav {
        display: contents;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section-title, 
    .section-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .nav-links {
        display: none; /* Add JS toggle logic later */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .section-padding {
        padding: 4rem 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Animation Classes --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 1.5rem;
    z-index: 2000;
    transition: bottom 0.5s ease-in-out;
    display: flex;
    justify-content: center;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: var(--container-width);
    width: 100%;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cookie-text a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

@media (max-width: 968px) {
    .section-header-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
}

/* --- Mobile Optimization Overrides --- */

@media (max-width: 968px) {
    /* 1. Global Container & Text Alignment */
    .container {
        padding: 0 1.25rem; /* Slightly tighter padding */
    }
    
    /* Force center alignment for major sections */
    .hero-content, 
    .glass-panel,
    .tech-card,
    .app-card,
    .comparison-card,
    .contact-wrapper,
    .footer-grid,
    .footer-col {
        text-align: center;
    }

    /* 2. Flex & Grid Centering */
    /* Ensure flex containers stack and center */
    .contact-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .contact-wrapper > * {
        width: 100%; /* Ensure full width for panels */
    }

    /* Fix "About" section icons alignment */
    #about .glass-panel > div > div {
        justify-content: center;
        gap: 1.5rem;
    }

    /* 3. Spacing Adjustments */
    /* Reduce large internal padding on cards to prevent "cramped" look */
    .glass-panel, 
    .tech-card, 
    .app-card, 
    .faq-question {
        padding: 1.5rem !important; /* Force override desktop styles */
    }
    
    .section-padding {
        padding: 4rem 1.25rem;
    }

    /* 4. Footer Alignment */
    .footer-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    
    .footer-brand p {
        margin: 1rem auto; /* Center the paragraph */
    }

    /* 5. Contact Info Alignment */
    .contact-info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-icon {
        margin-bottom: 0.5rem;
    }
    
    /* 6. Form Adjustments */
    .form-group label {
        text-align: left; /* Keep labels readable */
        padding-left: 0.25rem;
    }
}

@media (max-width: 640px) {
    /* Ultra-small screen tweaks */
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Stack hero buttons */
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
}
