/* ==========================================================================
   Premium Styles for AdTech Foundations
   ========================================================================== */

:root {
    --af-bg-dark: #020617;
    --af-bg-card: rgba(15, 23, 42, 0.6);
    --af-border: rgba(56, 189, 248, 0.15);
    --af-border-glow: rgba(56, 189, 248, 0.4);
    --af-accent-blue: #38bdf8;
    --af-accent-purple: #8b5cf6;
    --af-text-main: #f8fafc;
    --af-text-muted: #94a3b8;
}

body.af-page {
    background-color: var(--af-bg-dark);
    color: var(--af-text-main);
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ── Hero Section ──────────────────────────────────────────────────────── */
.af-hero {
    position: relative;
    padding: 8rem 2rem 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

/* Subtle glowing background mesh */
.af-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 30%);
    z-index: -1;
    animation: af-slow-spin 30s linear infinite;
}

@keyframes af-slow-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.af-hero-content {
    max-width: 800px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.af-kicker {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--af-accent-purple);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.af-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.af-hero-summary {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--af-text-muted);
    max-width: 600px;
    margin: 0;
}

.af-hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.af-btn-primary {
    background: linear-gradient(135deg, var(--af-accent-blue) 0%, #0ea5e9 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.af-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.af-btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--af-text-main);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.af-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Timeline / User Journey ───────────────────────────────────────────── */
.af-section {
    padding: 5rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.af-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.af-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.af-section-desc {
    color: var(--af-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.af-timeline {
    position: relative;
    padding-left: 2rem;
}

/* Glowing vertical line */
.af-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        rgba(56, 189, 248, 0) 0%, 
        rgba(56, 189, 248, 0.5) 10%, 
        rgba(139, 92, 246, 0.5) 90%, 
        rgba(139, 92, 246, 0) 100%);
}

.af-timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.af-timeline-item:last-child {
    margin-bottom: 0;
}

/* Dot on the timeline */
.af-timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem; /* center on the 2px line (2rem padding + 1px) */
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--af-bg-dark);
    border: 2px solid var(--af-accent-blue);
    box-shadow: 0 0 10px var(--af-accent-blue);
    z-index: 2;
    transition: all 0.3s ease;
}

.af-timeline-item:hover::before {
    background: var(--af-accent-blue);
    transform: scale(1.3);
}

/* Glassmorphic Card */
.af-timeline-card {
    background: var(--af-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--af-border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.af-timeline-item:hover .af-timeline-card {
    border-color: var(--af-border-glow);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(56, 189, 248, 0.05);
    transform: translateX(8px);
}

.af-step-number {
    font-family: 'DM Mono', monospace;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.1);
    user-select: none;
}

.af-step-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    color: var(--af-accent-blue);
}

.af-step-content p {
    margin: 0;
    color: var(--af-text-main);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ── Overrides for included sections (Story, Metrics, Case Studies) ────── */
/* We want them to fit into the dark theme seamlessly */

body.af-page .story-section-shell {
    margin-top: 0;
}

body.af-page .story-section-heading h3,
body.af-page .story-section-heading h2 {
    color: var(--af-text-main);
}

body.af-page .story-section-heading p {
    color: var(--af-text-muted);
}

body.af-page .flow-card {
    background: var(--af-bg-card);
    border: 1px solid var(--af-border);
    backdrop-filter: blur(12px);
}

body.af-page .flow-card h3 {
    color: var(--af-accent-blue);
}

body.af-page .flow-card p {
    color: var(--af-text-main);
}

@media (max-width: 768px) {
    .af-hero {
        padding: 6rem 1rem 4rem;
    }
    .af-timeline-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    .af-timeline-item:hover .af-timeline-card {
        transform: translateX(4px);
    }
    .af-step-number {
        font-size: 2rem;
    }
}
