/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --bg-dark: #0f1115;
    /* Slightly lighter charcoal vs pure black */
    --bg-card: rgba(26, 30, 35, 0.7);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;

    --accent-primary: #0ea5e9;
    /* Sky Blue - Trustworthy & Tech */
    --accent-secondary: #bef264;
    /* Lime green - Growth/Energy but subtle */
    --accent-glow: rgba(14, 165, 233, 0.2);
    /* Much softer glow */

    --border-color: rgba(255, 255, 255, 0.08);

    /* Fonts */
    --font-heading: 'Inter', sans-serif;
    /* Clean, modern, corporate */
    --font-heading-mono: 'JetBrains Mono', monospace;
    /* Keep for small details */
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 100px 20px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Full Page Animated Background */
#header-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    opacity: 0.2;
    /* Very faint */
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.02em;
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grids */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* =========================================
   2. LAYOUT UTILITIES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: var(--section-padding);
    /* Removed hard border for seamless blend */
    border-bottom: none;
    position: relative;
    /* Ensure transparent background */
    background: transparent !important;
}

/* =========================================
   3. HEADER & HERO
   ========================================= */
header {
    position: relative;
    width: 100%;
    height: 80vh;
    /* Transparent background to show canvas */
    background: transparent;
    overflow: hidden;
    color: #fff;
    display: flex;
    flex-direction: column;
}

/* Header Content (Navbar + Hero Text) */
.header-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hero Text */
.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: none;
    /* Let moves pass to canvas */
    padding-top: 10vh;
    /* Offset slightly */
}

.hero-text h1 {
    font-size: 7rem;
    /* Massive size */
    margin-bottom: 2rem;
    color: #fff;
    /* Solid white is cleaner than gradient text for corporate */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    /* Star hidden for animation */
    animation: titleReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--accent-primary);
    font-weight: 500;
    opacity: 1;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* =========================================
   4. SERVICES SECTION
   ========================================= */
.services h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.services>.container>p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 60px;
    max-width: 600px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Tech Card */
.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tech-card::before {
    /* Corner decoration */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* Subtle shadow, no neon glow */
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-card h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

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

/* =========================================
   5. ABOUT SECTION
   ========================================= */
.about {
    /* Seamless Gradient Blend */
    background: transparent !important;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.about p {
    font-size: 1.2rem;
    max-width: 800px;
    margin-bottom: 20px;
    color: var(--text-muted);
    padding-left: 20px;
    border-left: 3px solid var(--accent-primary);
    /* Use primary accent */
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.team-member h3 {
    color: var(--accent-primary);
    /* Distinct form service cards */
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.team-member p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    border: none;
    /* Reset inherited border from .about p */
    padding-left: 0;
    margin-bottom: 0;
}

/* =========================================
   6. CONTACT SECTION
   ========================================= */
.contact {
    /* No hard break background */
    background: transparent;
}

.contact h2 {
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
    /* Centered */
}

#quoteForm {
    max-width: 600px;
    margin: 0 auto;
    /* Center the form */
    background: var(--bg-card);
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

#quoteForm div {
    margin-bottom: 25px;
}

#quoteForm label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
}

#quoteForm input,
#quoteForm textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    /* Full border, box style */
    border-radius: 6px;
    padding: 12px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.3s ease;
}

#quoteForm input:focus,
#quoteForm textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(14, 165, 233, 0.05);
}

#quoteForm button {
    background: var(--accent-primary);
    border: none;
    color: #fff;
    padding: 16px 40px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s ease;
    font-size: 1rem;
}

#quoteForm button:hover {
    background: #0284c7;
    /* Darker blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 4rem;
        /* Large enough to be impactful, fits on screen */
        margin-bottom: 1rem;
    }

    .hero-text p {
        font-size: 1rem;
        padding: 0 10px;
        /* Prevent edge touching */
    }

    #nav-menu {
        display: none;
        /* Hide for now or implement mobile logic */
    }
}

/* =========================================
   9. INTERACTIVITY & DETAILS PANEL
   ========================================= */

.tech-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Active Selection State */
.tech-card.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.2);
    transform: translateY(-5px);
}

.tech-card.active .card-action {
    opacity: 1;
    transform: translateX(5px);
}

/* Hide 'Learn More' when active if desired, or keep it */
.card-action {
    margin-top: auto;
    padding-top: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: 0.3s;
}

.tech-card:hover .card-action {
    opacity: 1;
    transform: translateX(5px);
}

/* Details Panel (Below Grid) */
.details-panel {
    grid-column: 1 / -1;
    /* Ensure if it's in grid it spans (it's outside in HTML but just in case) */
    background: #15181e;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 30px;

    /* Animation props */
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;

    display: flex;
    flex-direction: row;
    position: relative;
}

.details-panel.panel-open {
    height: auto;
    /* Allow natural growth to eliminate vertical scrollbar */
    max-height: 2000px;
    /* Transition trick if needed, or just let it snap */
    opacity: 1;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding-bottom: 30px;
    /* Add breathing room at bottom */
}

.panel-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.panel-close:hover {
    color: #fff;
}

.details-content {
    flex: 1;
    padding: 40px;
    width: 100%;
    /* Grid Layout for Content */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    /* overflow-y: auto;  removed to prevent scrollbar */
}

/* Blocks generated by JS */
.detail-block h3 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    display: inline-block;
}

.detail-block p {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.7;
}

/* Specific overrides if needed, removing old selectors */
/* Responsive */
@media (max-width: 768px) {
    .details-panel.panel-open {
        height: auto;
    }

    .details-content {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        padding: 20px;
        gap: 30px;
    }
}