/* scientific.quest — Design Language Implementation */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0A0E1A;
    color: #7B8FA1;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
}

/* ========== PARALLAX HERO ========== */
.parallax-scene {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0A0E1A;
}

.parallax-layer {
    position: absolute;
    inset: 0;
}

.starfield-layer {
    will-change: transform;
}

.starfield-mid {
    will-change: transform;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #FFFFFF;
}

.star-large {
    width: 3px;
    height: 3px;
}

.hero-foreground {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hero-content {
    text-align: center;
    padding: 2rem;
    max-width: 720px;
}

.headline {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    color: #E8ECF1;
    line-height: 1.2;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.3s forwards;
}

.hero-sub {
    font-size: 1.05rem;
    color: #7B8FA1;
    margin-bottom: 2.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 1s ease 0.6s forwards;
}

.quest-btn {
    display: inline-block;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #0A0E1A;
    background: #6EC1E4;
    padding: 0.85rem 2.4rem;
    border-radius: 8px;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 24px rgba(110, 193, 228, 0.35), 0 0 60px rgba(110, 193, 228, 0.12);
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 1s ease 0.9s forwards;
}

.quest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(110, 193, 228, 0.5), 0 0 80px rgba(110, 193, 228, 0.2);
}

.btn-glow {
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(110, 193, 228, 0.6), rgba(167, 139, 250, 0.3), rgba(110, 193, 228, 0.6));
    background-size: 300% 300%;
    animation: glowShift 4s ease infinite;
    z-index: -1;
    filter: blur(8px);
}

@keyframes glowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== SHARED ELEMENTS ========== */
.gradient-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #6EC1E4, transparent);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.section-heading {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: #E8ECF1;
    text-align: center;
    margin-bottom: 3rem;
}

.arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* ========== DISCIPLINES ========== */
.disciplines {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.discipline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.discipline-card {
    background: #131830;
    border: 1px solid #1A2040;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.discipline-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.discipline-card:nth-child(1).visible { margin-top: 0; }
.discipline-card:nth-child(2).visible { margin-top: 30px; }
.discipline-card:nth-child(3).visible { margin-top: 60px; }
.discipline-card:nth-child(4).visible { margin-top: 90px; }

.discipline-card:hover {
    transform: translateY(-6px);
    border-color: #6EC1E4;
    box-shadow: 0 8px 32px rgba(110, 193, 228, 0.08);
}

.discipline-card:nth-child(2).visible:hover { transform: translateY(24px); }
.discipline-card:nth-child(3).visible:hover { transform: translateY(54px); }
.discipline-card:nth-child(4).visible:hover { transform: translateY(84px); }

/* Discipline Icons */
.disc-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    position: relative;
}

/* Atom Icon */
.atom-icon {
    position: relative;
}

.ring {
    display: block;
    border: 2px solid #6EC1E4;
    border-radius: 50%;
    position: absolute;
}

.ring-outer {
    width: 48px;
    height: 48px;
    top: 4px;
    left: 4px;
}

.ring-inner {
    width: 32px;
    height: 32px;
    top: 12px;
    left: 12px;
    opacity: 0.5;
    border-style: dashed;
}

.nucleus {
    display: block;
    width: 8px;
    height: 8px;
    background: #6EC1E4;
    border-radius: 50%;
    position: absolute;
    top: 24px;
    left: 24px;
    box-shadow: 0 0 8px rgba(110, 193, 228, 0.5);
}

/* Hexagon Icon */
.hex-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-shape {
    display: block;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #A78BFA;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    position: relative;
}

.hex-bond {
    position: absolute;
    width: 2px;
    height: 14px;
    background: #A78BFA;
    opacity: 0.4;
}

.hex-bond-1 {
    top: 6px;
    right: 8px;
    transform: rotate(30deg);
}

.hex-bond-2 {
    bottom: 6px;
    left: 8px;
    transform: rotate(-30deg);
}

/* Helix Icon */
.helix-icon {
    position: relative;
    height: 56px;
}

.helix-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #A78BFA;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(167, 139, 250, 0.4);
}

.helix-line {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(167, 139, 250, 0.6), rgba(167, 139, 250, 0.1));
    left: 50%;
    transform: translateX(-50%);
}

.hd1 { top: 0; left: calc(50% - 10px); }
.hd2 { top: 12px; left: calc(50% + 6px); }
.hd3 { top: 24px; left: calc(50% - 8px); }
.hd4 { top: 36px; left: calc(50% + 4px); }
.hd5 { top: 46px; left: calc(50% - 6px); }

/* Sphere Icon */
.sphere-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #6EC1E4, #1A2040 70%, #131830);
    margin: 6px auto;
    position: relative;
    box-shadow: 0 0 12px rgba(110, 193, 228, 0.2);
}

.sphere-highlight {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    top: 10px;
    left: 12px;
}

.disc-name {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #E8ECF1;
    margin-bottom: 0.4rem;
}

.quest-count {
    font-size: 0.75rem;
    color: #6EC1E4;
    background: rgba(110, 193, 228, 0.1);
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.disc-desc {
    font-size: 0.85rem;
    color: #7B8FA1;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.explore-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #6EC1E4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.explore-link:hover {
    color: #E8ECF1;
}

.explore-link:hover .arrow {
    transform: translateX(4px);
}

/* ========== SCIENTIFIC METHOD ========== */
.method {
    max-width: 680px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.method-timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline-connector {
    position: absolute;
    left: 5px;
    top: 6px;
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, #6EC1E4, #A78BFA);
    transition: height 0.1s linear;
    border-radius: 1px;
}

.method-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 6px;
    width: 2px;
    height: calc(100% - 12px);
    background: rgba(110, 193, 228, 0.12);
    border-radius: 1px;
}

.method-step {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.method-step:last-child {
    margin-bottom: 0;
}

.method-step.visible {
    opacity: 1;
    transform: translateX(0);
}

.method-node {
    position: absolute;
    left: -3rem;
    top: 0.2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1A2040;
    border: 2px solid #6EC1E4;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    z-index: 2;
}

.method-step.active .method-node {
    background: #6EC1E4;
    box-shadow: 0 0 12px rgba(110, 193, 228, 0.5);
}

.step-watermark {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.5rem;
    color: rgba(110, 193, 228, 0.06);
    position: absolute;
    right: 0;
    top: -0.75rem;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
    transition: color 0.4s ease;
}

.method-step.active .step-watermark {
    color: rgba(110, 193, 228, 0.12);
}

.step-content {
    padding: 1.25rem 1.5rem;
    background: #131830;
    border: 1px solid #1A2040;
    border-radius: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.method-step.active .step-content {
    border-color: rgba(110, 193, 228, 0.25);
    box-shadow: 0 4px 20px rgba(110, 193, 228, 0.06);
}

.step-name {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #E8ECF1;
    margin-bottom: 0.4rem;
}

.step-desc {
    font-size: 0.9rem;
    color: #7B8FA1;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.step-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #6EC1E4;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ========== FEATURED DISCOVERY ========== */
.discovery {
    max-width: 760px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.discovery-panel {
    background: #131830;
    border: 1px solid #1A2040;
    border-radius: 14px;
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.discovery-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.discovery-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFB347, transparent);
}

.disc-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #FFB347;
    background: rgba(255, 179, 71, 0.1);
    padding: 4px 14px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.discovery-title {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: #FFB347;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.discovery-body {
    font-size: 0.95rem;
    color: #7B8FA1;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.discovery-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.discovery-author {
    font-size: 0.85rem;
    color: #E8ECF1;
}

.discovery-date {
    font-size: 0.75rem;
    color: #7B8FA1;
    opacity: 0.7;
}

.discovery-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 179, 71, 0.1);
    border-bottom: 1px solid rgba(255, 179, 71, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    color: #FFB347;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.7rem;
    color: #7B8FA1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.report-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #6EC1E4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.report-link:hover {
    color: #E8ECF1;
}

.report-link:hover .arrow {
    transform: translateX(4px);
}

/* ========== COMMUNITY STATS ========== */
.community {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-block {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #131830;
    border: 1px solid #1A2040;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stat-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    display: block;
    font-size: 1.6rem;
    color: #6EC1E4;
    margin-bottom: 0.3rem;
}

.stat-name {
    font-size: 0.75rem;
    color: #7B8FA1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========== FOOTER ========== */
.footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    border-top: 1px solid #1A2040;
}

.footer-tagline {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #E8ECF1;
    margin-bottom: 1.25rem;
}

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

.flink {
    font-size: 0.8rem;
    color: #6EC1E4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.flink:hover {
    color: #E8ECF1;
}

.footer-bottom {
    padding-top: 1rem;
}

.footer-copy {
    font-size: 0.7rem;
    color: #7B8FA1;
    opacity: 0.6;
}

/* ========== STAR TWINKLE ANIMATION ========== */
@keyframes twinkle {
    0%, 100% { opacity: var(--base-opacity); }
    50% { opacity: calc(var(--base-opacity) * 0.3); }
}

.star.twinkle {
    animation: twinkle var(--twinkle-duration) ease-in-out infinite;
    animation-delay: var(--twinkle-delay);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .discipline-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .discipline-card:nth-child(2).visible,
    .discipline-card:nth-child(3).visible,
    .discipline-card:nth-child(4).visible {
        margin-top: 0;
    }

    .discipline-card:nth-child(2).visible:hover,
    .discipline-card:nth-child(3).visible:hover,
    .discipline-card:nth-child(4).visible:hover {
        transform: translateY(-6px);
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .discovery-stats {
        gap: 1.5rem;
    }

    .method-timeline {
        padding-left: 2.5rem;
    }

    .method-node {
        left: -2.5rem;
    }
}

@media (max-width: 480px) {
    .discipline-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .headline {
        font-size: 2rem;
    }

    .discovery-panel {
        padding: 2rem 1.5rem;
    }

    .discovery-stats {
        flex-direction: column;
        gap: 1rem;
    }
}
