:root {
    --bg-base: #f8fafc; /* Very light slate */
    --card-bg: rgba(255, 255, 255, 0.85); /* Slightly transparent white */
    --card-border: rgba(15, 23, 42, 0.08); /* Subtle dark border */
    --text-primary: #0f172a; /* Slate 900 for high contrast */
    --text-secondary: #475569; /* Slate 600 for descriptions */
    --accent-primary: #2563eb; /* Royal Blue */
    --accent-secondary: #4f46e5; /* Indigo */
    --accent-tertiary: #d946ef; /* Fuchsia for highlight */
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Background Soft Pastel Shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: -5s;
}

.shape-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.1) 0%, transparent 70%);
    top: 40%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.05); }
}

/* Navbar */
.navbar {
    padding: 2rem 5%;
    position: absolute;
    top: 0; left: 0; width: 100%;
    z-index: 10;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-primary);
    margin-bottom: 2rem;
}

.title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.blink {
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(5px); }
}

/* Timeline Layout */
.timeline-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5% 10rem;
    position: relative;
}

/* Center Line */
.timeline-line {
    position: absolute;
    left: 5%; /* For mobile */
    top: 5rem;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--text-secondary), transparent);
    opacity: 0.2;
    z-index: 0;
}

@media (min-width: 1024px) {
    .timeline-line {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-section {
    position: relative;
    z-index: 1;
}

.phase-marker {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 1024px) {
    .phase-marker {
        justify-content: center;
    }
}

.phase-dot {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.phase-dot.highlight {
    background: var(--accent-tertiary);
    box-shadow: 0 0 15px rgba(217, 70, 239, 0.4);
}

.phase-title {
    font-size: 2rem;
    color: var(--text-primary);
}

.phase-title.highlight-text {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards */
.glass-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 5rem;
    position: relative;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

@media (min-width: 1024px) {
    .glass-card {
        flex-direction: row;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .glass-card.reverse {
        flex-direction: row-reverse;
    }
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.1);
}

.card-text {
    padding: 3rem 4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-num {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(15, 23, 42, 0.15); /* Light mode stroke */
    margin-bottom: 0.5rem;
}

.highlight-num {
    -webkit-text-stroke: 1px rgba(217, 70, 239, 0.3);
}

.card-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.card-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.features-list i {
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.1);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
}

.highlight-num ~ .features-list i {
    color: var(--accent-tertiary);
    background: rgba(217, 70, 239, 0.1);
}

.card-visual {
    flex: 1.4;
    position: relative;
    background: #ffffff; /* pure white for clearest diagram view */
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--card-border);
    padding: 1.5rem; /* give space so image isn't glued to borders */
    min-height: 400px;
}

.glass-card.reverse .card-visual {
    border-left: none;
    border-right: 1px solid var(--card-border);
}

.zoomable {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: contain; /* SHOW FULL IMAGE without crop */
    cursor: zoom-in;
    transition: transform 0.4s ease;
}

.card-visual:hover .zoomable {
    transform: scale(1.02);
}

.img-overlay {
    position: absolute;
    bottom: 15px; 
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.card-visual:hover .img-overlay {
    opacity: 1;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

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

/* Footer */
footer {
    border-top: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.5);
    padding: 4rem 20px;
    text-align: center;
}

.footer-content h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.footer-content p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Modal Enhancements */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.85); /* Keep dark for modal focus */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-body {
    position: relative;
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}

.modal-content {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    animation: modalZoom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#modal-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}

.close-modal {
    position: absolute;
    top: 30px; right: 40px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10000;
}

.close-modal:hover {
    background: var(--accent-tertiary);
    transform: rotate(90deg);
}

@keyframes modalZoom {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .card-text { padding: 2rem; }
    .phase-marker { margin-left: 2rem; }
    .card-visual { min-height: 250px; padding: 1rem; }
}
