/* AI Automation & Agents Page Specific Styles */

:root {
    --ai-primary: #2A8CA6;
    /* Standard Brand Teal */
    --ai-dark: #111827;
    --ai-dark-lighter: #1F2937;
    --ai-accent-red: #EF4444;
    --ai-accent-green: #10B981;
    --ai-accent-yellow: #F59E0B;
    --ai-glow: rgba(42, 140, 166, 0.4);
    --ai-border: rgba(255, 255, 255, 0.1);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Global Utilities & Animations --- */
.hero-ai {
    background: radial-gradient(circle at 50% 50%, #1a2a3a 0%, #0d1117 100%);
    color: white;
    padding-top: 140px;
    /* Nav spacing */
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    position: relative;
    z-index: 10;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.2rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, #fff, #a5f3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subheadline {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.btn-light-outline {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.btn-light-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.trust-strip {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #94a3b8;
    flex-wrap: wrap;
}

.trust-strip span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-strip i {
    color: var(--ai-primary);
}

/* --- Console Panel (Hero Visual) --- */
.hero-visual {
    perspective: 1000px;
}

.console-panel {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--ai-border);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.console-panel:hover {
    transform: rotateY(0deg) rotateX(0deg);
    /* Interactive Tilt Reset */
}

.console-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--ai-border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ef4444;
}

.yellow {
    background: #f59e0b;
}

.green {
    background: #10b981;
}

.console-title {
    margin-left: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #6b7280;
}

.console-body {
    padding: 24px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Workflow Diagram Animation */
.workflow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px 0;
}

.node {
    background: #1f2937;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #374151;
    font-size: 0.8rem;
    color: #e5e7eb;
    position: relative;
}

.node-process {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-color: var(--ai-primary);
    color: var(--ai-primary);
    font-size: 1.5rem;
}

.pulse-ring {
    position: absolute;
    inset: -5px;
    border: 1px solid var(--ai-primary);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
    opacity: 0;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.connector {
    flex: 1;
    height: 2px;
    background: #374151;
    margin: 0 10px;
    position: relative;
    overflow: hidden;
}

.connector::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: var(--ai-primary);
    animation: flow-line 2s infinite linear;
}

@keyframes flow-line {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

.event-log {
    font-family: monospace;
    font-size: 0.8rem;
    color: #d1d5db;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-item {
    display: flex;
    gap: 10px;
    opacity: 0;
    animation: fade-in-up 0.5s forwards;
}

.log-item:nth-child(1) {
    animation-delay: 0.5s;
}

.log-item:nth-child(2) {
    animation-delay: 1.5s;
}

.log-item:nth-child(3) {
    animation-delay: 2.5s;
}

.log-item:nth-child(4) {
    animation-delay: 3.5s;
}

.status {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.queued {
    background: #374151;
    color: #9ca3af;
}

.running {
    background: #1e3a8a;
    color: #93c5fd;
}

.verified {
    background: #065f46;
    color: #6ee7b7;
}

.completed {
    background: #064e3b;
    color: #34d399;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(42, 140, 166, 0.5);
    box-shadow: 0 0 10px var(--ai-primary);
    animation: scan 4s infinite linear;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* --- Section 2: Pain vs Payoff --- */
.pain-payoff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 50px;
}

.col-header {
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.text-red {
    color: #ef4444;
}

.text-blue {
    color: var(--ai-primary);
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    border: 1px solid #f3f4f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pain-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.1);
    border-color: #fecaca;
}

.outcome-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(42, 140, 166, 0.15);
    border-color: #bae6fd;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    flex-shrink: 0;
}

.pain-card .card-icon {
    color: #ef4444;
    background: #fee2e2;
}

.outcome-card .card-icon {
    color: var(--ai-primary);
    background: #e0f2f1;
}

.card-content h4 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.card-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.impact-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: #fef2f2;
    color: #ef4444;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.impact-tag.positive {
    background: #ecfdf5;
    color: #059669;
}

.card:hover .impact-tag {
    opacity: 1;
    transform: translateY(0);
}


/* --- Section 3: Capabilities --- */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 50px;
}

.cap-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.cap-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.cap-icon {
    font-size: 2rem;
    color: var(--ai-primary);
    margin-bottom: 20px;
    transition: transform 0.4s ease;
}

.cap-card:hover .cap-icon {
    transform: scale(1.1) rotate(5deg);
}

.cap-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.cap-card p {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
}

/* --- Section 4: Agent Types (Tabs) --- */
.tabs-container {
    max-width: 900px;
    margin: 50px auto 0;
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 10px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1px;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-btn.active {
    color: var(--ai-primary);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--ai-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-pane {
    display: none;
    padding-top: 40px;
    animation: fade-in 0.4s ease;
}

.tab-pane.active {
    display: block;
}

.tab-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.tab-desc {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 20px;
}

.tab-list li {
    margin-bottom: 10px;
    color: #4b5563;
}

.tab-list strong {
    color: #111827;
}

.badges {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.badge {
    background: #f3f4f6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #4b5563;
    font-weight: 500;
}

.tab-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background: #f9fafb;
    border-radius: 16px;
}

.big-icon {
    font-size: 5rem;
    color: #d1d5db;
    transition: transform 0.5s ease;
}

.tab-pane.active .big-icon {
    transform: scale(1.1);
    color: var(--ai-primary);
}

/* --- Section 5: Guardrails --- */
.guardrails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.guard-tile {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.guard-tile:hover {
    background: #f0f9ff;
    border-color: var(--ai-primary);
    transform: translateY(-5px);
}

.guard-tile i {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 16px;
    transition: color 0.3s;
}

.guard-tile:hover i {
    color: var(--ai-primary);
}

.guard-tile h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.guard-hover {
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #4b5563;
}

.guard-tile:hover .guard-hover {
    height: auto;
    opacity: 1;
    margin-top: 5px;
}

.honesty-callout {
    text-align: center;
    margin-top: 40px;
    background: #fffbeb;
    color: #b45309;
    padding: 16px;
    border-radius: 8px;
    display: inline-block;
}

/* --- Section 6: Use Cases (Interactive) --- */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 50px;
}

.use-case-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.uc-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
}

.uc-header h4 {
    margin: 0;
    font-size: 1rem;
}

.uc-toggle {
    background: none;
    border: none;
    font-size: 1rem;
    color: #6b7280;
    transition: transform 0.3s;
}

.uc-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.use-case-card.expanded .uc-body {
    padding: 20px;
    max-height: 300px;
    /* approximate */
}

.use-case-card.expanded .uc-toggle {
    transform: rotate(45deg);
}

.uc-flow {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #4b5563;
    margin-bottom: 16px;
}

.uc-compare {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.before {
    color: #dc2626;
    margin-bottom: 4px;
}

.after {
    color: #059669;
}

/* --- Section 7: Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 60px auto;
    padding-left: 30px;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #e5e7eb;
}

.timeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--ai-primary);
    transition: height 1s ease;
}

/* This needs JS to animate the height on scroll */
.timeline.in-view .timeline-line::after {
    height: 100%;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 40px;
}

.tm-dot {
    position: absolute;
    left: -37px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 3px solid white;
    transition: background 0.4s ease 0.4s;
    /* delay */
}

.timeline-item.active .tm-dot {
    background: var(--ai-primary);
}

.tm-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.tm-content p {
    color: #6b7280;
}

.tm-details {
    margin-top: 8px;
    color: var(--ai-primary);
    font-weight: 500;
}

/* --- Deliverables & Tech --- */
.del-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.check-list li {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #374151;
}

.check-list i {
    color: #059669;
    margin-right: 10px;
}

.chip-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.chip {
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.chip:hover {
    transform: scale(1.05);
    background: #f0f9ff;
    border-color: var(--ai-primary);
}

.stack-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

.stack-badge {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: #374151;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* --- Pricing --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
    align-items: center;
}

.price-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.price-card.recommended {
    border-color: var(--ai-primary);
    box-shadow: 0 10px 25px -5px rgba(42, 140, 166, 0.2);
    transform: scale(1.05);
    position: relative;
    z-index: 1;
}

.rec-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ai-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
}

.price-desc {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.price-list {
    list-style: none;
    text-align: left;
    margin-top: 20px;
}

.price-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #f3f4f6;
    color: #374151;
    font-size: 0.9rem;
}

/* --- FAQ --- */
.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 20px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #111827;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: #4b5563;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 20px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* --- CTA --- */
.cta-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-sub {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.cta-trust {
    font-size: 0.9rem;
    color: #94a3b8;
    letter-spacing: 1px;
}

/* --- Reveal Animation Classes --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays handled in JS or specific classes */

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        position: relative;
        /* Ensure context for absolute visual */
        min-height: 80vh;
        /* Give space for visual */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text {
        position: relative;
        z-index: 5;
        /* Text above visual */
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
        /* Better readability */
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        z-index: 1;
        /* Below text */
        opacity: 0.25;
        /* Faded background */
        margin-top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        /* Let clicks pass through */
    }

    .console-panel {
        transform: none !important;
    }

    .pain-payoff-grid,
    .tab-layout,
    .pricing-grid,
    .del-grid {
        grid-template-columns: 1fr;
    }

    .price-card.recommended {
        transform: none;
    }

    .cta-buttons {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion) {

    *,
    .console-panel,
    .scan-line,
    .node-process .pulse-ring {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}