@import url('https://fonts.googleapis.com/css2?family=Encode+Sans:wght@300;400;600;700&display=swap');

:root {
    --brand-orange: #f05a28;
    --brand-orange-dark: #c9471d;
    --brand-orange-soft: #fff3ec;
    --ink: #2b2b2b;
    --bg: #fffdfb;
    --gray-light: #f5f5f5;
    --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 50px rgba(240, 90, 40, 0.15);
    --accent-blue: #005aab;
    /* For some variety if needed, but keeping brand orange dominant */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Encode Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
}

header {
    text-align: center;
    padding: 60px 20px 40px;
    background: radial-gradient(circle at top, var(--brand-orange-soft) 0%, transparent 70%);
}

header h1 {
    color: var(--brand-orange);
    font-size: 2.2rem;
    /* Reduced slightly for top line */
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.highlight-title {
    display: block;
    font-size: 3.2rem;
    font-weight: 800;
    margin-top: 5px;
    letter-spacing: 1px;
    color: var(--brand-orange-dark);
}

header p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 1.1rem;
    color: #555;
}

/* TOGGLE */
.toggle-container {
    display: flex;
    justify-content: center;
    margin: 10px 0 50px;
    padding: 0 20px;
}

.toggle {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 8px;
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    justify-content: center;
}

.toggle button {
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    padding: 10px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Encode Sans', sans-serif;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.toggle button:hover {
    color: var(--brand-orange);
    background: var(--brand-orange-soft);
}

.toggle button.active {
    background: var(--brand-orange);
    color: #fff;
    box-shadow: 0 4px 12px rgba(240, 90, 40, 0.3);
}

/* TIMELINE container */
.timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto 100px;
    padding: 0 20px;
}

/* Central Line */
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand-orange), rgba(240, 90, 40, 0.1) 95%, transparent);
    transform: translateX(-50%);
}

/* ITEM */
.timeline-row {
    display: flex;
    width: 100%;
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.timeline-row.left {
    justify-content: flex-start;
    padding-right: 50%;
}

.timeline-row.right {
    justify-content: flex-end;
    padding-left: 50%;
}

.timeline-row.show {
    opacity: 1;
    transform: none;
}

.timeline-row.hide {
    display: none !important;
}

/* The actual Card */
.card {
    background: #fff;
    width: 90%;
    max-width: 480px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--brand-orange);
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.timeline-row.left .card {
    margin-right: 40px;
}

.timeline-row.right .card {
    margin-left: 40px;
    border-left: none;
    border-right: 4px solid var(--brand-orange);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Connector Dot on the line */
.timeline-row::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 4px solid var(--brand-orange);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(240, 90, 40, 0.2);
    transition: all 0.5s ease;
}

.timeline-row:hover::after {
    background: var(--brand-orange);
    box-shadow: 0 0 0 8px rgba(240, 90, 40, 0.2);
}

/* Card Content */
.card h3 {
    color: var(--brand-orange-dark);
    margin: 15px 0 8px;
    font-size: 1.4rem;
}

.asset {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--ink);
}

.btn {
    background: var(--brand-orange);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.3s;
    display: inline-block;
    text-decoration: none;
    font-size: 0.9rem;
    align-self: flex-start;
}

.btn:hover {
    background: var(--brand-orange-dark);
}

/* SVG ICON styling */
.icon-box {
    width: 64px;
    height: 64px;
    background: var(--brand-orange-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.icon {
    width: 40px;
    height: 40px;
}

.icon path {
    fill: none;
    stroke: var(--brand-orange);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease-out;
}

.timeline-row.show .icon path,
.insight-box.show .icon path {
    stroke-dashoffset: 0;
}

/* INSIGHT BOX */
.insight-box {
    width: 100%;
    max-width: 800px;
    margin: 60px auto;
    background: linear-gradient(135deg, #fff 0%, #fffcf8 100%);
    border: 2px dashed rgba(240, 90, 40, 0.3);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    position: relative;
    z-index: 5;
    /* Above line */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.8s ease;
}

.insight-box.show {
    opacity: 1;
    transform: scale(1);
}

.insight-box h3 {
    color: var(--brand-orange);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.insight-box p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
}

.insight-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.insight-icon path {
    stroke: var(--brand-orange-dark);
    stroke-width: 1.5;
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    background: #fff;
    max-width: 500px;
    width: 100%;
    padding: 40px 30px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.active .modal-box {
    transform: scale(1);
}

.modal-box h2 {
    color: var(--brand-orange);
    margin-top: 0;
    font-size: 1.6rem;
    line-height: 1.3;
}

.modal-content-text {
    line-height: 1.6;
    font-size: 1.05rem;
    color: #444;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close:hover {
    background: #f0f0f0;
    color: #333;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-row {
        width: 100%;
        margin-bottom: 30px;
        padding: 0 !important;
        justify-content: flex-start !important;
    }

    .timeline-row .card {
        width: calc(100% - 50px);
        margin: 0 0 0 50px !important;
        max-width: none;
    }

    .timeline-row.right .card,
    .timeline-row.left .card {
        border-right: none;
        border-left: 4px solid var(--brand-orange);
    }

    .timeline-row::after {
        left: 20px;
    }

    .toggle {
        flex-direction: row;
        width: 100%;
    }

    .toggle button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .insight-box {
        width: calc(100% - 20px);
        margin: 40px 10px;
        padding: 30px 20px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* FOOTER */
.source-footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 40px;
}