/* --- Global Styles & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* FIX: Ensures the base window root can always compute element heights correctly */
    height: -webkit-fill-available; 
}

body {
    background-color: #fafafa;
    color: #2d3748;
    line-height: 1.6;
    padding-top: 70px;
    
    /* FIX: Force default rendering state to keep scrolling active */
    overflow-y: scroll; 
    overflow-x: hidden;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    
    -webkit-overflow-scrolling: touch; 
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation Header --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a202c;
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
    z-index: 101;
}

.logo span {
    color: #4a5568;
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #000;
}

/* --- Mobile Menu Toggle Icon --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    z-index: 101;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #1a202c;
    transition: all 0.3s ease;
}

/* --- Buttons --- */
button {
    cursor: pointer;
    border: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-nav {
    background: transparent;
    color: #4a5568;
    font-size: 1rem;
    padding: 8px 12px;
}

.btn-nav:hover {
    color: #000;
}

.btn-primary {
    background-color: #1a202c;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
}

.btn-primary:hover {
    background-color: #4a5568;
}

.btn-secondary {
    background-color: #edf2f7;
    color: #2d3748;
    padding: 10px 20px;
    text-align: center;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.large {
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
}

/* --- Hero Section --- */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 60px 20px;
}

.hero-content {
    max-width: 750px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    color: #111;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: #4a5568;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* --- Services Grid --- */
.services-section {
    padding: 100px 0;
    background-color: #ffffff;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #f7fafc;
    padding: 45px 35px;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
}

.service-card .icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a202c;
    letter-spacing: -0.3px;
}

.service-card p {
    color: #4a5568;
    font-size: 0.98rem;
    line-height: 1.7;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px 20px;
    background-color: #1a202c;
    color: #a0aec0;
    font-size: 0.9rem;
}

/* --- App Workspace / Fullscreen Viewport Panels --- */
.fullscreen-workspace {
    position: fixed;
    top: 0;
    left: 0;
    /* FIX: Change 100vw/vh to top/bottom/left/right 0 for perfect, unbuggy mobile viewport sizing */
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    transition: opacity 0.25s ease-in-out;
    
    /* FIX: Ensures if content inside the fullscreen view overflows, it scrolls naturally on mobile */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; 
}

.fullscreen-workspace.active {
    opacity: 1;
    pointer-events: auto;
}

.workspace-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.workspace-header h2 {
    font-size: 1.25rem;
    color: #1a202c;
    font-weight: 700;
}

.back-btn {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    color: #4a5568;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background-color: #edf2f7;
    color: #1a202c;
}

.back-arrow {
    font-size: 1.1rem;
    line-height: 1;
}

.workspace-body {
    flex-grow: 1;
    width: 100%;
    background-color: #f7fafc;
    /* FIX: Allows the container holding the iframe to handle scroll independent of the main page */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Absolute Fullscreen Airtable Form Sizing */
.airtable-embed {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    
    /* FIX: Tells mobile renderers to use hardware acceleration for this frame element */
    will-change: transform; 
}

/* --- Responsive Adjustments & Breakpoints --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -4px 0 15px rgba(0,0,0,0.1);
        flex-direction: column;
        align-items: stretch;
        padding: 100px 30px;
        gap: 25px;
        transition: right 0.3s ease-in-out;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 5px 0;
        border-bottom: 1px solid #f0f4f8;
    }

    .hero h1 { 
        font-size: 2.3rem; 
    }
    
    .hero p {
        font-size: 1.1rem;
    }

    .hero-buttons { 
        flex-direction: column; 
        gap: 12px; 
    }

    .large {
        width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 30px 20px;
    }

    /* Fullscreen mobile optimizations */
    .workspace-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .workspace-header h2 {
        font-size: 1.15rem;
    }

    .back-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}

/* --- FAQ Section Styling --- */
.faq-section {
    padding: 100px 0;
    background-color: #f7fafc;
    border-top: 1px solid #edf2f7;
}

.small-container {
    max-width: 800px !important;
}

.faq-accordion {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #cbd5e0;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    padding: 22px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
}

.faq-icon {
    font-size: 1.3rem;
    font-weight: 400;
    color: #718096;
    transition: transform 0.2s ease;
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr; /* Collapsed state */
    transition: grid-template-rows 0.25s ease-out;
    padding: 0 25px;
}

/* When active, the grid track expands safely without calculations */
.faq-item.active .faq-answer {
    grid-template-rows: 1fr; /* Expanded state */
    padding: 0 25px 25px 25px;
}

/* This inner container holds the text and prevents it from cutting off */
.faq-answer-inner {
    overflow: hidden;
}

.faq-answer ul li {
    margin-bottom: 5px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .faq-section {
        padding: 60px 0;
    }
    .faq-question {
        padding: 18px 20px;
        font-size: 1rem;
    }
    .faq-answer {
        padding: 0 20px;
    }
}