/* 
    Ammar Imtiaz - Design System CSS
    -- Confidential --
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Color Palette - Light Theme */
    --bg-dark: #FAFAFA;
    /* Off-white main background */
    --bg-card: #FFFFFF;
    /* Pure white component cards */
    --bg-subtle: #F1F5F9;
    /* Slate 100 for tags/subtle sections */

    --accent: #6366F1;
    /* Indigo 500 */
    --accent-2: #4F46E5;
    /* Indigo 600 - darker hover */
    --lime: #059669;
    /* Emerald 600 - adapted for contrast */

    --text-main: #0F172A;
    /* Slate 900 - high contrast text */
    --text-muted: #475569;
    /* Slate 600 - secondary text */
    --border: #E2E8F0;
    /* Slate 200 - structural borders */
    --white: #000000;
    /* Pure black, inverted for 'white' utility */

    /* Layout */
    --max-width: 1200px;
    --section-px: 5vw;
    --grid-gap: 2rem;

    /* Transitions */
    --hover-trans: all 0.25s ease-in-out;
}

/* Base Reset & Custom Scrollbar */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-2);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.display {
    font-family: 'Newsreader', serif;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--white);
}

h1 {
    font-size: clamp(3rem, 5vw, 6rem);
    /* The spec requires 4.5rem-6rem for the hero, this is close but we'll specificty target the hero later */
}

h2 {
    font-size: clamp(2rem, 3vw, 3rem);
}

p {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
}

.serif-italic {
    font-family: 'Newsreader', serif;
    font-style: italic;
}

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

a:hover {
    color: var(--accent-2);
}

/* Utility Containers */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--section-px);
}

section {
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Components */

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    transition: var(--hover-trans);
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--hover-trans);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background-color: var(--accent-2);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--accent);
}

.btn-secondary:hover {
    background-color: rgba(99, 102, 241, 0.05);
    /* Slight fill on hover for light theme */
    border-color: var(--accent-2);
    color: var(--accent-2);
    /* Keep text dark enough */
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.1);
}

.btn-small {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* Tags & Pills */
.tag {
    display: inline-block;
    background-color: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.35rem 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-main);
}

.tag.live,
.tag.lime {
    background-color: rgba(5, 150, 105, 0.1);
    /* Emerald 600 at 10% */
    color: var(--lime);
    border-color: rgba(5, 150, 105, 0.2);
}

.tag.accent {
    color: var(--accent);
}

.tag.amber {
    background-color: rgba(217, 119, 6, 0.08);
    color: #D97706;
    border-color: rgba(217, 119, 6, 0.2);
}

/* Code / System IDs */
.code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--bg-dark);
    transition: background-color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.navbar.scrolled {
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem var(--section-px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-family: 'Newsreader', serif;
    font-size: 1.4rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
}

.nav-logo-img {
    height: 28px !important;
    width: auto !important;
    max-width: 140px !important;
    display: block;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 400;
}

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

.nav-links .soon-badge {
    background-color: var(--lime);
    color: var(--bg-dark);
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 300px;
        background-color: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 99;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.open {
        display: flex;
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: block;
        z-index: 101;
    }
}

/* ------------------ */
/* Hero Section       */
/* ------------------ */
.hero {
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 180px;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    flex: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}

.pre-headline {
    margin-bottom: 0;
}

.avail-tag {
    color: var(--lime);
    background: rgba(5, 150, 105, 0.06);
    border-color: rgba(5, 150, 105, 0.2);
}

.hero-title {
    font-size: clamp(1.75rem, 2.8vw, 2.8rem);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    margin-bottom: 2.5rem;
    font-size: 1.15rem;
    max-width: 90%;
}

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

/* Stats Card */
.tilt-card {
    /* transform is handled by the floatCard animation */
    max-width: 400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Newsreader', serif;
    font-size: 3rem;
    color: var(--white);
    line-height: 1;
    margin-bottom: 0.5rem;
}

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

/* Logo Strip */
.hero-logo-strip {
    width: 100%;
    padding: 1.25rem 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
    margin-top: 2.5rem;
}

.logo-track {
    display: flex;
    width: max-content;
    animation: scroll 50s linear infinite;
    will-change: transform;
}

.logo-set {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-shrink: 0;
    padding: 0 1.25rem;
}

.logo-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.logo-item:hover {
    opacity: 0.85;
}

.tool-logo {
    height: 16px;
    width: 16px;
    object-fit: contain;
    filter: brightness(0) opacity(0.55);
    flex-shrink: 0;
    display: block;
}

.tool-logo-color {
    filter: none;
    opacity: 0.7;
    height: 20px;
    width: 20px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-content {
        align-items: center;
    }

    .hero-title {
        font-size: clamp(2rem, 7vw, 3.5rem);
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
        font-size: 1rem;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .tilt-card {
        animation: floatCardMobile 6s ease-in-out infinite;
        max-width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    .stat-value {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .tilt-card {
        grid-template-columns: 1fr 1fr;
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
        text-align: center;
    }
}

/* ------------------ */
/* Philosophy Section */
/* ------------------ */
.philosophy-container {
    max-width: 720px;
    text-align: left;
}

.section-tag {
    margin-bottom: 1.5rem;
}

.philosophy h2 {
    margin-bottom: 2rem;
}

.philosophy-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.philosophy-content .closing-line {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 2rem;
}

/* ------------------ */
/* Systems Preview    */
/* ------------------ */
.systems-preview {
    background-color: var(--bg-dark);
}

.systems-preview h2 {
    margin-bottom: 1rem;
}

.section-subtext {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 800px;
}

.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--grid-gap);
    margin-bottom: 3rem;
}

.system-card {
    height: 100%;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.system-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.system-outcome {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* Pushes tags and actions to the bottom */
}

.card-tags {
    margin-bottom: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
    /* Aligns to bottom if content varies */
}

/* Base button styles applied, specific tweaks for system cards */
.live-demo-btn {
    border-color: var(--lime);
    color: var(--lime);
}

.live-demo-btn:hover {
    background-color: var(--lime);
    color: var(--white);
    border-color: var(--lime);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.systems-cta-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* ------------------ */
/* Capabilities       */
/* ------------------ */
.capabilities {
    background-color: var(--bg-dark);
    padding-top: 0;
    /* Flows naturally from previous section */
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
}

.cap-card {
    background-color: transparent;
    padding: 2.5rem;
}

.cap-card h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.cap-card p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.cap-tools {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 992px) {
    .capabilities-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 2rem;
        gap: 1.5rem;
    }

    .cap-card {
        min-width: 320px;
        scroll-snap-align: start;
        background-color: var(--bg-card);
        /* Add bg back on mobile for clear boundary */
    }
}

/* ------------------ */
/* Tech Stack         */
/* ------------------ */
.tech-stack {
    background-color: var(--bg-card);
    /* Slight contrast from bg-dark */
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
    margin-top: 3rem;
}

.tech-card {
    background-color: var(--bg-dark);
    /* Invert card/bg for this section */
}

.tech-card h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tags .tag {
    background-color: transparent;
    border-color: var(--bg-subtle);
    color: var(--text-main);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

@media (max-width: 992px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------ */
/* Testimonials       */
/* ------------------ */
.testimonials {
    background-color: var(--bg-dark);
}

/* Carousel */
.testimonials-carousel {
    margin-top: 3rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-track {
    position: relative;
    min-height: 220px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: all;
}

.testimonial-card {
    justify-content: space-between;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.carousel-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hover-trans);
    flex-shrink: 0;
}

.carousel-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--hover-trans);
}

.carousel-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

.testimonial-quote {
    font-family: 'Newsreader', serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.author-name {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--white);
}

.author-company {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* testimonial card responsive handled by carousel */

/* ------------------ */
/* Case Studies       */
/* ------------------ */
.case-studies {
    background-color: var(--bg-dark);
    padding-top: 0;
}

.case-study-placeholder {
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    border-style: dashed;
}

.lock-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.case-study-placeholder h3 {
    margin-bottom: 1rem;
}

.placeholder-link {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ------------------ */
/* Contact Section    */
/* ------------------ */
.contact {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
}

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

.contact-subtext {
    margin: 1.5rem 0 2.5rem;
    font-size: 1.1rem;
    max-width: 90%;
}

.contact-methods {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.95rem;
}

.method-link {
    color: var(--text-main);
}

.method-link:hover {
    color: var(--accent);
}

.method-divider {
    color: var(--border);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--hover-trans);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

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

.w-100 {
    width: 100%;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-subtext {
        max-width: 100%;
    }
}

/* Footer */
.site-footer {
    background-color: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

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

.footer-container p {
    font-size: 0.85rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

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

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

@media (max-width: 576px) {
    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ------------------ */
/* Systems Page UI    */
/* ------------------ */
.systems-header {
    background-color: var(--bg-dark);
    padding-top: 210px;
    padding-bottom: 4rem;
}

.systems-header-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.systems-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.systems-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
}

.systems-tab-bar {
    background-color: transparent;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 72px;
    /* Approx navbar height on desktop */
    z-index: 90;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.systems-tab-bar.stuck {
    background-color: rgba(250, 250, 250, 0.95);
    /* light theme bg-dark var approx */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tab-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-dark);
}

.tab-container::-webkit-scrollbar {
    height: 3px;
}

.tab-container::-webkit-scrollbar-thumb {
    background: var(--border);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 1rem 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s ease;
}

.tab-btn:hover {
    color: var(--white);
}

.tab-btn.active {
    color: var(--white);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
}

.systems-content {
    background-color: var(--bg-dark);
    padding-top: 3rem;
}

/* GHL System Wrappers */
.system-wrapper {
    display: flex;
    flex-direction: column;
}

.system-wrapper .card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

.accordion {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 1rem 2rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--hover-trans);
}

.accordion-trigger:hover,
.accordion-trigger.active {
    color: var(--white);
    background-color: rgba(0, 0, 0, 0.03);
    /* subtle light hover */
}

.accordion-icon {
    font-size: 1.2rem;
    font-weight: 300;
}

.accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 2rem;
    background-color: rgba(0, 0, 0, 0.02);
    /* subtle internal depth */
}

.system-workflow-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.system-workflow-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.system-workflow-list li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.system-workflow-list li strong {
    color: var(--text-main);
    font-weight: 600;
}

.accordion-note {
    font-size: 0.8rem;
    font-style: italic;
    color: rgba(148, 163, 184, 0.7);
    margin-bottom: 1.5rem;
}

.zone-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.zone-header h2 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.snapshot-coming-soon {
    padding: 5rem 2rem;
    text-align: center;
    margin-bottom: 4rem;
}

/* ============================= */
/* Hero Animated Background      */
/* ============================= */
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 900px 700px at 15% 50%, rgba(99, 102, 241, 0.08), transparent),
        radial-gradient(ellipse 700px 500px at 85% 20%, rgba(79, 70, 229, 0.05), transparent),
        radial-gradient(ellipse 800px 600px at 65% 85%, rgba(5, 150, 105, 0.04), transparent);
    animation: heroBgPulse 18s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.hero .container,
.hero-logo-strip {
    position: relative;
    z-index: 1;
}

@keyframes heroBgPulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.06); opacity: 1; }
}

/* ============================= */
/* Stats Card Float Animation    */
/* ============================= */
@keyframes floatCard {
    0%, 100% { transform: rotate(-2deg) translateY(0px); }
    50% { transform: rotate(-2deg) translateY(-14px); }
}

.tilt-card {
    animation: floatCard 6s ease-in-out infinite;
    /* Override static transform — animation handles it */
    transform: none;
}

@keyframes floatCardMobile {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@media (max-width: 992px) {
    .tilt-card {
        animation: floatCardMobile 6s ease-in-out infinite;
    }
}

/* ============================= */
/* Card Shine Effect on Hover    */
/* ============================= */
.system-card,
.cap-card,
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.system-card::after,
.cap-card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -60%;
    width: 40%;
    height: 300%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 60%
    );
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.system-card:hover::after,
.cap-card:hover::after {
    animation: cardShine 0.55s ease forwards;
}

@keyframes cardShine {
    from { left: -60%; opacity: 1; }
    to { left: 130%; opacity: 1; }
}

/* ============================= */
/* Hero Social Row               */
/* ============================= */
.hero-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.social-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--hover-trans);
}

.social-link:hover {
    color: var(--accent);
}

.social-sep {
    color: var(--border);
}

/* ============================= */
/* Authority Section             */
/* ============================= */
.authority {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.authority-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: start;
}

.authority-container > .section-tag {
    display: inline-block;
    margin-bottom: 2rem;
}

.authority-left h2 {
    margin-bottom: 1.5rem;
}

.authority-left p {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.authority-left .closing-line {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.authority-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.authority-right {
    padding-top: 3.2rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding-top: 0;
}

.expertise-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background-color: var(--bg-subtle);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: var(--hover-trans);
}

.expertise-item:hover {
    border-color: var(--accent);
    background-color: rgba(99, 102, 241, 0.03);
    transform: translateY(-2px);
}

.expertise-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.35;
}

@media (max-width: 992px) {
    .authority-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .authority-left {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .expertise-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================= */
/* Capabilities – 3-col Grid     */
/* ============================= */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    margin-top: 2.5rem;
}

.capabilities > .container > h2 {
    margin-bottom: 0.5rem;
}

@media (max-width: 992px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Disable horizontal scroll on wider tablets */
        overflow-x: unset;
    }
}

@media (max-width: 640px) {
    .capabilities-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================= */
/* Tech Stack – 3-col Grid       */
/* ============================= */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    margin-top: 3rem;
}

@media (max-width: 992px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================= */
/* Contact Social Row            */
/* ============================= */
.contact-social-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.95rem;
    margin-top: 1rem;
}

/* ============================= */
/* Email Gate Modal              */
/* ============================= */
.gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gate-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.gate-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 460px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 24px 80px rgba(99, 102, 241, 0.18), 0 4px 20px rgba(0,0,0,0.08);
}

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

.gate-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0.2rem 0.4rem;
    transition: var(--hover-trans);
}

.gate-close:hover {
    color: var(--text-main);
}

.gate-icon {
    font-size: 2.75rem;
    display: block;
    margin-bottom: 1.25rem;
}

.gate-modal h3 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.gate-modal > p {
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    font-size: 1rem;
    line-height: 1.6;
}

.gate-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.gate-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* ============================= */
/* Staggered Section Entrance    */
/* ============================= */
.capabilities .card,
.systems-preview .card,
.tech-card,
.expertise-item {
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ============================= */
/* Description Line Clamp        */
/* (Equal card content density)  */
/* ============================= */
.system-outcome {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cap-card p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================= */
/* Systems Page Search & Filter  */
/* ============================= */
.systems-search-bar {
    padding: 0 0 2.5rem;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.systems-search-input {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: var(--hover-trans);
}

.systems-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.systems-search-input::placeholder {
    color: var(--text-muted);
}

.filter-pills {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.45rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--hover-trans);
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-pill.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pill-count {
    background: rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.filter-pill:not(.active) .pill-count {
    background: var(--bg-subtle);
    color: var(--text-muted);
}

.results-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.results-count span {
    color: var(--text-main);
    font-weight: 600;
}

/* Systems page full-width grid */
.systems-page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .systems-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .systems-page-grid {
        grid-template-columns: 1fr;
    }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.no-results h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* ============================= */
/* Mobile Tech Grid              */
/* ============================= */
.mobile-tech-section { display: none; }

/* Card expand (mobile) */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.card-chevron {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.75rem;
}
.system-card.expanded .card-chevron { transform: rotate(180deg); }

@media (max-width: 768px) {
    /* Tech grid */
    .mobile-tech-section {
        display: block;
        padding: 1rem 1.25rem 0;
    }
    .mobile-tech-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .mobile-tech-chip {
        background: rgba(99,102,241,0.08);
        border: 1px solid var(--border);
        border-radius: 50px;
        padding: 0.3rem 0.75rem;
        font-size: 0.78rem;
        color: var(--text-muted);
    }
    /* extra-chip visibility handled by JS */
    .mobile-tech-toggle {
        margin-top: 0.75rem;
        background: none;
        border: none;
        color: var(--accent);
        font-size: 0.85rem;
        cursor: pointer;
        padding: 0;
    }
    .hero-logo-strip { display: none; }

    /* System card collapse */
    .card-body {
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.35s ease;
    }
    .system-card.expanded .card-body { max-height: 400px; }
}

@media (min-width: 769px) {
    .card-chevron { display: none; }
    .card-header-row { cursor: default; }
    .card-body { max-height: none !important; overflow: visible !important; }
}

/* ============================= */
/* Mobile: Section Padding       */
/* ============================= */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    h2 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

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

    .contact-form-wrapper iframe {
        min-height: 780px !important;
    }

    .nav-container {
        padding: 0.6rem 1.25rem;
    }

    .nav-logo-img,
    img[alt="Ammar Imtiaz"] {
        height: 52px !important;
        max-width: 180px !important;
        flex-shrink: 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    .hero {
        padding-top: 100px;
    }

    .hero-visual {
        width: 100%;
        padding: 0;
    }

    .tilt-card {
        width: 100%;
        box-sizing: border-box;
    }

    .systems-header {
        padding-top: 120px !important;
    }

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

    .tech-grid {
        grid-template-columns: 1fr !important;
    }

    .tech-card .tech-tags {
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.35s ease;
    }
    .tech-card.expanded .tech-tags { max-height: 500px; }
    .tech-card .card-chevron { display: inline; }

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

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

    .testimonials-carousel {
        margin-top: 2rem;
    }

    .systems-grid .system-card:nth-child(n+4) {
        display: none;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================= */
/* GHL Form / Calendar Modal     */
/* ============================= */
.ghl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.ghl-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.ghl-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem 1.75rem 1.5rem;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.3s ease;
    box-shadow: 0 24px 80px rgba(99, 102, 241, 0.18), 0 4px 20px rgba(0,0,0,0.1);
}

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

.ghl-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

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

.ghl-modal-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    padding-right: 2rem;
    display: none;
}

.ghl-modal-label.visible { display: block; }

.ghl-modal-content { width: 100%; }

.ghl-modal-content iframe {
    display: block;
    width: 100%;
    border: none;
    border-radius: 4px;
}
