/* ============================================================
   TECHNOLOGY OPPORTUNITY ASSESSMENT PAGE
   Design: hero + 6 alternating sections,
   each with a pipeline steps list + image visual (timeline-block).
   Color palette (brand):
     Primary   #2f1f4f   deep purple
     Secondary #4949e7   electric blue
     Accent    #d35b74   rose
     Light     #dedede
   ============================================================ */

/* ── Body baseline ─────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--theme-bg-primary, #ffffff);
    color: var(--theme-text-secondary, #1d1d1f);
    overflow-x: hidden;
}

/* ============================================================
   HERO
   ============================================================ */
.toa-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 24px 100px;
    background: linear-gradient(
        180deg,
        var(--theme-bg-primary, #ffffff) 0%,
        var(--theme-bg-secondary, #f5f5f7) 100%
    );
    position: relative;
    overflow: hidden;
}

.toa-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 28%, rgba(73, 73, 231, 0.07) 0%, transparent 58%),
        radial-gradient(circle at 78% 72%, rgba(211, 91, 116, 0.05) 0%, transparent 52%);
    pointer-events: none;
}

.toa-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.toa-hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--theme-text-primary, #2f1f4f);
    margin-bottom: 1.5rem;
    animation: toaHeroFadeUp 0.9s ease 0.1s both;
}

.toa-hero-desc {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--theme-text-light, #6e6e73);
    line-height: 1.65;
    max-width: 640px;
    margin: 0 auto;
    animation: toaHeroFadeUp 0.9s ease 0.28s both;
}

@keyframes toaHeroFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FEATURE SECTIONS
   ============================================================ */
.toa-section {
    min-height: 100vh;
    background: var(--theme-bg-primary, #ffffff);
    display: flex;
    align-items: center;
    overflow-x: hidden;
}

.toa-section--alt {
    background: var(--theme-bg-secondary, #f5f5f7);
}

/* Two-column inner grid */
.toa-section-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 6%;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    align-items: center;
    gap: 4rem;
}

/* Reversed: visual left, content right */
.toa-section-inner--reverse {
    grid-template-columns: 1.4fr 1fr;
}

/* ── Content side ──────────────────────────────────────────── */
.toa-content {
    max-width: 480px;
}

.toa-title {
    font-size: clamp(1.8rem, 3vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--theme-text-primary, #2f1f4f);
    margin-bottom: 1.5rem;
}

/* ── Pipeline Steps ────────────────────────────────────────── */
.toa-pipeline-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--theme-text-light, #6e6e73);
    margin-bottom: 1rem;
}

.toa-pipeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

/* Vertical track line connecting step badges */
.toa-pipeline::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 15px;
    bottom: 15px;
    width: 2px;
    background: linear-gradient(
        180deg,
        rgba(73, 73, 231, 0.25) 0%,
        rgba(211, 91, 116, 0.45) 100%
    );
}

.toa-step {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem 0;
    position: relative;
    z-index: 1;
}

.toa-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--theme-bg-primary, #ffffff);
    border: 2px solid rgba(73, 73, 231, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--theme-accent-secondary, #4949e7);
    flex-shrink: 0;
}

/* Step 6 (AI): identical to other inactive steps —
   gradient activates only when slider reaches it via .is-active */

.toa-step-label {
    font-size: 0.9375rem;
    color: var(--theme-text-secondary, #1d1d1f);
    line-height: 1.4;
}

/* Dark-theme step badges */
body.theme-dark .toa-step-num {
    background: var(--theme-bg-secondary, #1c1c1e);
    border-color: rgba(73, 73, 231, 0.5);
}

/* No special dark-mode override needed for step 6 inactive state */

/* ── Visual side: image block ──────────────────────────────── */
.toa-visual {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-block {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 16px;
    background: #020617;
    position: relative;
}

.timeline-pan {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: left center;
    transition: background-position 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-pan.is-animating {
    animation: pan 20s linear infinite alternate;
}

@keyframes pan {
    0%,   8% { background-position: left center; }
    92%, 100% { background-position: right center; }
}

/* ── timeline-block flex stretch inside slider stage ─────── */
.toa-slider-stage .timeline-block {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

/* ============================================================
   SLIDER CONTROLS
   ============================================================ */
.toa-slider {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.toa-slider-stage {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Prev / Next arrow buttons */
.toa-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(73, 73, 231, 0.3);
    background: var(--theme-bg-primary, #ffffff);
    color: var(--theme-accent-secondary, #4949e7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.05rem;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.toa-nav-btn:hover {
    background: var(--theme-accent-secondary, #4949e7);
    color: #ffffff;
    border-color: transparent;
    transform: scale(1.08);
}

body.theme-dark .toa-nav-btn {
    background: var(--theme-bg-secondary, #1c1c1e);
    border-color: rgba(73, 73, 231, 0.45);
    color: #6e6ef5;
}

body.theme-dark .toa-nav-btn:hover {
    background: var(--theme-accent-secondary, #4949e7);
    color: #ffffff;
    border-color: transparent;
}

/* Dot indicators */
.toa-dots {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 4px 2px;
}

.toa-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: rgba(73, 73, 231, 0.22);
    transition: background 0.25s ease, transform 0.25s ease;
}

.toa-dot:hover {
    background: rgba(73, 73, 231, 0.5);
}

.toa-dot.is-active {
    background: var(--theme-accent-secondary, #4949e7);
    transform: scale(1.55);
}

.toa-dot--ai.is-active {
    background: linear-gradient(135deg, #4949e7 0%, #d35b74 100%);
}

/* Step overlay — bottom of the image, text label only */
.toa-step-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0) 100%);
    padding: 2.5rem 1.25rem 1.1rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.toa-overlay-label {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ── Pipeline step interactivity ─────────────────────────── */
.toa-step {
    cursor: pointer;
    border-radius: 8px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    transition: background 0.25s ease;
}

.toa-step:hover {
    background: rgba(73, 73, 231, 0.07);
}

body.theme-dark .toa-step:hover {
    background: rgba(73, 73, 231, 0.14);
}

.toa-step.is-active .toa-step-num {
    background: linear-gradient(135deg, #4949e7 0%, #d35b74 100%);
    border-color: #d35b74;
    color: #ffffff;
}

.toa-step.is-active .toa-step-label {
    font-weight: 600;
    color: var(--theme-text-primary, #2f1f4f);
}

body.theme-dark .toa-step.is-active .toa-step-label {
    color: #dedede;
}

/* ============================================================
   SECTION REVEAL ANIMATION
   ============================================================ */
.toa-section .toa-content,
.toa-section .toa-visual {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.toa-section.is-visible .toa-visual {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.toa-cta {
    background: linear-gradient(
        135deg,
        var(--theme-bg-secondary, #f5f5f7) 0%,
        var(--theme-bg-primary, #ffffff) 100%
    );
    padding: 120px 10%;
    text-align: center;
}

.toa-cta-inner {
    max-width: 600px;
    margin: 0 auto;
}

.toa-cta-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--theme-text-primary, #2f1f4f);
    margin-bottom: 1rem;
}

.toa-cta-desc {
    font-size: 1.2rem;
    color: var(--theme-text-light, #6e6e73);
    margin-bottom: 2.5rem;
    line-height: 1.65;
}

.toa-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--theme-accent-secondary, #4949e7);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid var(--theme-accent-secondary, #4949e7);
    padding: 0.85rem 2rem;
    border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.toa-cta-btn:hover {
    background: var(--theme-accent-secondary, #4949e7);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(73, 73, 231, 0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-minimal {
    background: var(--theme-bg-secondary, #f5f5f7);
    padding: 3rem 10%;
    text-align: center;
    border-top: 1px solid var(--theme-border, rgba(0, 0, 0, 0.05));
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--theme-text-light, #6e6e73);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--theme-accent-secondary, #4949e7);
}

.footer-copy {
    color: var(--theme-text-light, #86868b);
    font-size: 0.8125rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-minimal {
        padding: 2rem 5%;
    }
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .toa-section-inner,
    .toa-section-inner--reverse {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 80px 5%;
    }

    /* Content always first on mobile */
    .toa-section-inner--reverse .toa-visual {
        order: 1;
    }

    .toa-section-inner--reverse .toa-content {
        order: -1;
    }

    .toa-content {
        max-width: 100%;
    }

    .timeline-block {
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .toa-hero {
        padding: 120px 20px 80px;
    }

    .toa-section-inner,
    .toa-section-inner--reverse {
        padding: 64px 6%;
        gap: 2.5rem;
    }

    .timeline-block {
        max-width: 100%;
    }

    .toa-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .toa-slider-stage {
        gap: 0.5rem;
    }

    /* Pipeline: 2 columns × 3 rows on mobile */
    .toa-pipeline {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.2rem 0.75rem;
    }

    /* Hide the vertical connector line — doesn't work in grid */
    .toa-pipeline::before {
        display: none;
    }

    .toa-step {
        gap: 0.55rem;
        padding: 0.4rem 0.4rem 0.4rem 0.4rem;
    }

    .toa-step-num {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }

    .toa-step-label {
        font-size: 0.82rem;
    }
}
