/* ============================================================
   AEO Page — "Neural Network" Design Concept
   ============================================================ */

/* ---------- Neural Hero ---------- */
.neural-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.neural-hero .neural-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.35;
}

.neural-hero .container {
    position: relative;
    z-index: 2;
}

/* ---------- Entity Nodes ---------- */
.entity-node {
    animation: nodePulse 3s ease-in-out infinite;
    transform-origin: center;
}

.entity-node:nth-child(2n) {
    animation-delay: 0.5s;
}

.entity-node:nth-child(3n) {
    animation-delay: 1.1s;
}

.entity-node:nth-child(5n) {
    animation-delay: 1.7s;
}

.entity-node:nth-child(7n) {
    animation-delay: 2.3s;
}

@keyframes nodePulse {
    0%, 100% {
        r: 4;
        opacity: 0.4;
        filter: drop-shadow(0 0 4px rgba(218, 237, 26, 0.3));
    }
    50% {
        r: 7;
        opacity: 1;
        filter: drop-shadow(0 0 12px rgba(218, 237, 26, 0.7));
    }
}

/* ---------- Connection Lines ---------- */
.connection-line {
    stroke: var(--color-accent);
    stroke-width: 0.8;
    fill: none;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawLine 4s ease forwards;
    opacity: 0.25;
}

.connection-line:nth-child(2n) {
    animation-delay: 0.3s;
    animation-duration: 3.5s;
}

.connection-line:nth-child(3n) {
    animation-delay: 0.8s;
    animation-duration: 4.5s;
}

.connection-line:nth-child(5n) {
    animation-delay: 1.2s;
    animation-duration: 3s;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* ---------- Hero Overlay Glow ---------- */
.neural-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to top, var(--color-bg) 20%, transparent);
    z-index: 1;
    pointer-events: none;
}

.hero-label {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-sm);
    display: inline-block;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.08;
    margin-bottom: var(--space-md);
    max-width: 800px;
}

.hero-title .accent {
    color: var(--color-accent);
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 650px;
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

/* ---------- Citation Card (Glassmorphism) ---------- */
.citation-card {
    background: rgba(218, 237, 26, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(218, 237, 26, 0.12);
    border-radius: 16px;
    padding: var(--space-md) var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.citation-card:hover {
    border-color: rgba(218, 237, 26, 0.35);
    box-shadow: 0 0 40px rgba(218, 237, 26, 0.08);
}

.citation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top left, rgba(218, 237, 26, 0.06), transparent 60%);
    pointer-events: none;
}

/* ---------- Paradigm Shift Section ---------- */
.paradigm-section {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--color-border);
}

.paradigm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.paradigm-text h2 {
    margin-bottom: var(--space-md);
}

.paradigm-text p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: var(--space-sm);
}

.paradigm-text strong {
    color: var(--color-accent);
    font-weight: 600;
}

.funnel-svg {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: block;
}

.funnel-arrow {
    fill: var(--color-accent);
    opacity: 0;
    animation: fadeArrow 0.6s ease forwards;
}

.funnel-arrow:nth-child(2) { animation-delay: 0.6s; }
.funnel-arrow:nth-child(3) { animation-delay: 1.2s; }

@keyframes fadeArrow {
    to { opacity: 1; }
}

/* ---------- AEO Framework Cards ---------- */
.aeo-framework-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: var(--space-lg);
    transition: transform var(--transition-normal),
                border-color var(--transition-normal),
                box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.aeo-framework-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: radial-gradient(circle at bottom center, rgba(218, 237, 26, 0.06), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.aeo-framework-card:hover {
    transform: translateY(-8px);
    border-color: rgba(218, 237, 26, 0.4);
    box-shadow: 0 8px 40px rgba(218, 237, 26, 0.07);
}

.aeo-framework-card:hover::before {
    opacity: 1;
}

.aeo-framework-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(218, 237, 26, 0.08);
    border: 1px solid rgba(218, 237, 26, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--color-accent);
}

.aeo-framework-card h3 {
    font-size: 1.4rem;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.aeo-framework-card p {
    color: var(--color-text-muted);
    font-size: 0.975rem;
    line-height: 1.7;
    margin: 0;
}

/* ---------- Comparison Table ---------- */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.95rem;
}

.comparison-table thead th {
    background: rgba(218, 237, 26, 0.06);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 1.25rem 1.5rem;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--color-border);
}

.comparison-table thead th:first-child {
    color: var(--color-text-muted);
}

.comparison-table thead th:nth-child(2) {
    color: var(--color-text-muted);
}

.comparison-table thead th:nth-child(3) {
    color: var(--color-accent);
}

.comparison-table tbody td {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--color-text-muted);
    vertical-align: top;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody td:first-child {
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.comparison-table tbody td:nth-child(3) {
    color: var(--color-accent);
    font-weight: 500;
}

.comparison-table tbody tr {
    transition: background var(--transition-fast);
}

.comparison-table tbody tr:hover {
    background: rgba(218, 237, 26, 0.03);
}

.comparison-table tbody tr:hover td {
    color: var(--color-text);
}

.comparison-table tbody tr:hover td:nth-child(3) {
    color: var(--color-accent);
}

/* ---------- Methodology / Technical Stack ---------- */
.aeo-methodology {
    counter-reset: step;
}

.aeo-methodology .methodology-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.aeo-step {
    text-align: center;
    position: relative;
}

.aeo-step .step-num {
    color: #000;
    background-color: var(--color-accent);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 auto var(--space-sm) auto;
    box-shadow: 0 0 20px rgba(218, 237, 26, 0.2);
}

.aeo-step h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--color-text);
}

.aeo-step p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Connecting dots between steps */
.aeo-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    right: -50%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    opacity: 0.2;
    z-index: 0;
}

/* ---------- FAQ Section ---------- */
.aeo-faq {
    max-width: 800px;
    margin: 0 auto;
}

.aeo-faq-item {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
}

.aeo-faq-item h4 {
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    font-size: 1.15rem;
    cursor: default;
    transition: color var(--transition-fast);
}

.aeo-faq-item:hover h4 {
    color: var(--color-accent);
}

.aeo-faq-item p {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* ---------- CTA Section ---------- */
.aeo-cta {
    text-align: center;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.aeo-cta::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(218, 237, 26, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.aeo-cta h2 {
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.aeo-cta p {
    margin: 0 auto var(--space-md) auto;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

/* ---------- Section Headers ---------- */
.section-label {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    margin-bottom: var(--space-sm);
}

.section-header p {
    margin: 0 auto;
    max-width: 700px;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 992px) {
    .paradigm-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .funnel-svg {
        max-width: 360px;
    }

    .aeo-methodology .methodology-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .aeo-step:not(:last-child)::after {
        display: none;
    }

    .comparison-table {
        font-size: 0.85rem;
    }

    .comparison-table thead th,
    .comparison-table tbody td {
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 768px) {
    .neural-hero {
        min-height: auto;
        padding-top: 7rem;
        padding-bottom: var(--space-xl);
    }

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

    .aeo-methodology .methodology-grid {
        grid-template-columns: 1fr;
    }

    .aeo-step:not(:last-child)::after {
        display: none;
    }

    /* Horizontal scroll for table on small screens */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        border: 1px solid var(--color-border);
    }

    .table-wrap .comparison-table {
        min-width: 600px;
        border: none;
        border-radius: 0;
    }

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

    .citation-card {
        padding: var(--space-md);
    }
}
