/* rollup.quest — Holographic 3D Product Aesthetic */

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --deep-void: #0C0C1A;
    --card-dark: #14142A;
    --rollup-cyan: #6BD0FF;
    --zk-purple: #D06BFF;
    --optimistic-gold: #FFD93D;
    --light-signal: #E8ECF1;
    --node-gray: #6B7280;
    --panel-edge: #1E1E32;
    --red: #ff6b6b;
    --green: #6bff6b;
}

html { scroll-behavior: smooth; }

body {
    background: var(--deep-void);
    color: var(--node-gray);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    font-size: 1rem;
    overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3 {
    font-family: 'Sora', sans-serif;
    color: var(--light-signal);
    line-height: 1.25;
}

code {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
}

/* ===== Fade-in Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Section Dividers ===== */
.section-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
}
.chain-icon {
    color: var(--node-gray);
    font-size: 0.75rem;
    opacity: 0.5;
}

/* ===== Hero: The Portal ===== */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 85vh;
    padding: 4rem 2rem;
    position: relative;
}

.holographic-border {
    background: conic-gradient(from var(--holo-angle, 0deg), #ff6b6b, #ffd93d, #6bff6b, #6bd0ff, #d06bff, #ff6b6b);
    padding: 2px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(107, 208, 255, 0.15);
    transition: box-shadow 0.3s ease;
    position: relative;
}
.holographic-border:hover {
    box-shadow: 0 25px 80px rgba(107, 208, 255, 0.25), 0 0 40px rgba(208, 107, 255, 0.1);
}

.card-inner {
    background: var(--card-dark);
    border-radius: 14px;
    padding: 3.5rem 5rem;
    text-align: center;
    position: relative;
    transition: transform 0.15s ease;
}

.headline {
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, var(--light-signal), var(--rollup-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--rollup-cyan);
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-btn {
    display: inline-block;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--deep-void);
    background: var(--rollup-cyan);
    padding: 0.85rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
.cta-btn:hover {
    background: #8ee0ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 208, 255, 0.3);
}

/* ===== Section Headings ===== */
.section-heading {
    font-weight: 600;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* ===== Quest Paths ===== */
.paths {
    max-width: 960px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.quest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.quest-card {
    background: var(--card-dark);
    border: 1px solid var(--panel-edge);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}
.quest-card:hover {
    transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
    box-shadow: 0 12px 40px rgba(107, 208, 255, 0.12);
}

/* Shimmer overlay */
.quest-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.08), transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}
.quest-card:hover .quest-shimmer {
    opacity: 1;
}

/* Quest Icons */
.quest-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-ring {
    width: 40px;
    height: 40px;
    border: 3px solid var(--rollup-cyan);
    border-radius: 50%;
    position: relative;
    animation: pulseRing 3s ease-in-out infinite;
}
.circle-ring::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 7px;
    right: 7px;
    bottom: 7px;
    border: 2px solid var(--rollup-cyan);
    border-radius: 50%;
}

@keyframes pulseRing {
    0%, 100% { box-shadow: 0 0 0 0 rgba(107, 208, 255, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(107, 208, 255, 0); }
}

.triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid var(--zk-purple);
    filter: drop-shadow(0 0 6px rgba(208, 107, 255, 0.3));
}

.hexagon {
    width: 36px;
    height: 20px;
    background: var(--optimistic-gold);
    position: relative;
    filter: drop-shadow(0 0 6px rgba(255, 217, 61, 0.3));
}
.hexagon::before,
.hexagon::after {
    content: '';
    position: absolute;
    width: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
}
.hexagon::before {
    top: -10px;
    border-bottom: 10px solid var(--optimistic-gold);
}
.hexagon::after {
    bottom: -10px;
    border-top: 10px solid var(--optimistic-gold);
}

.quest-name {
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.difficulty-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.85rem;
    letter-spacing: 0.02em;
}
.difficulty-badge.beginner {
    background: rgba(107, 208, 255, 0.15);
    color: var(--rollup-cyan);
}
.difficulty-badge.intermediate {
    background: rgba(255, 217, 61, 0.15);
    color: var(--optimistic-gold);
}
.difficulty-badge.advanced {
    background: rgba(208, 107, 255, 0.15);
    color: var(--zk-purple);
}

.quest-desc {
    font-size: 0.88rem;
    color: var(--node-gray);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.start-btn {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s ease;
}
.start-btn:hover {
    gap: 0.8rem;
}
.start-btn .arrow {
    transition: transform 0.2s ease;
}
.start-btn:hover .arrow {
    transform: translateX(2px);
}
.cyan-glow { color: var(--rollup-cyan); }
.purple-glow { color: var(--zk-purple); }
.gold-glow { color: var(--optimistic-gold); }

/* ===== Knowledge Base ===== */
.knowledge {
    max-width: 960px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.kb-layout {
    display: flex;
    gap: 2.5rem;
}

.kb-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 200px;
}

.kb-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--node-gray);
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.kb-link:hover {
    color: var(--light-signal);
    background: rgba(107, 208, 255, 0.05);
}
.kb-link.active {
    background: rgba(107, 208, 255, 0.1);
    color: var(--rollup-cyan);
    border-left-color: var(--rollup-cyan);
}

.kb-content {
    flex: 1;
    background: var(--card-dark);
    border: 1px solid var(--panel-edge);
    border-radius: 12px;
    padding: 2rem;
}

.kb-title {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.kb-body {
    font-size: 0.95rem;
    color: var(--node-gray);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.kb-tech-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(107, 208, 255, 0.05);
    border: 1px solid rgba(107, 208, 255, 0.15);
    border-radius: 8px;
}

.tech-label {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rollup-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.tech-code {
    font-size: 0.88rem;
    color: var(--light-signal);
    background: rgba(14, 14, 42, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* ===== Progress Dashboard ===== */
.dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.holo-line {
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bff6b, #6bd0ff, #d06bff);
    margin-bottom: 2.5rem;
    border-radius: 1px;
}

.stats-row {
    display: flex;
    gap: 1.5rem;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.stat-block {
    text-align: center;
    flex: 1;
    background: var(--card-dark);
    border: 1px solid var(--panel-edge);
    border-radius: 10px;
    padding: 1.75rem;
}

.stat-num {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    color: var(--light-signal);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--node-gray);
    display: block;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 4px;
    background: var(--panel-edge);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width 1.2s ease;
}
.progress-fill.cyan { background: var(--rollup-cyan); }
.progress-fill.purple { background: var(--zk-purple); }
.progress-fill.gold { background: var(--optimistic-gold); }

/* Badges Row */
.badges-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge-pill {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}
.cyan-badge {
    background: rgba(107, 208, 255, 0.12);
    color: var(--rollup-cyan);
    border: 1px solid rgba(107, 208, 255, 0.2);
}
.purple-badge {
    background: rgba(208, 107, 255, 0.12);
    color: var(--zk-purple);
    border: 1px solid rgba(208, 107, 255, 0.2);
}
.gold-badge {
    background: rgba(255, 217, 61, 0.12);
    color: var(--optimistic-gold);
    border: 1px solid rgba(255, 217, 61, 0.2);
}

/* ===== The Network ===== */
.network {
    max-width: 960px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.network-desc {
    font-size: 1rem;
    color: var(--node-gray);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.network-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.network-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-dark);
    border: 1px solid var(--panel-edge);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 160px;
}
.network-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 208, 255, 0.3);
    box-shadow: 0 8px 32px rgba(107, 208, 255, 0.1);
}

.network-icon {
    margin-bottom: 0.25rem;
}

.network-label {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--light-signal);
}

.network-sub {
    font-size: 0.78rem;
    color: var(--node-gray);
}

/* ===== Footer ===== */
.footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-protocol code {
    font-size: 0.85rem;
    color: var(--rollup-cyan);
}

.footer-sep {
    color: var(--panel-edge);
}

.footer-link {
    font-size: 0.85rem;
    color: var(--node-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-link:hover {
    color: var(--rollup-cyan);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--node-gray);
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .quest-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .kb-layout {
        flex-direction: column;
    }
    .kb-sidebar {
        flex-direction: row;
        overflow-x: auto;
        min-width: 0;
        gap: 0.25rem;
    }
    .kb-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 0.5rem 0.75rem;
        font-size: 0.82rem;
    }
    .kb-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--rollup-cyan);
    }
    .stats-row {
        flex-direction: column;
        gap: 1rem;
    }
    .network-links {
        flex-direction: column;
        align-items: center;
    }
    .network-card {
        width: 100%;
        max-width: 280px;
    }
    .card-inner {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 480px) {
    .card-inner {
        padding: 2rem 1.5rem;
    }
    .headline {
        letter-spacing: 0.04em;
    }
    .footer-content {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
