/* genpatsu.quest - Motion Heavy Interactive */
/* Palette: #0a2f2f, #143d3d, #fbbf24, #06b6d4, #e0f2f1, #22d3ee */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a2f2f;
    color: #e0f2f1;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========== Particle Canvas ========== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ========== Progress Arc (fixed) ========== */
#progress-arc {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#progress-arc.visible {
    opacity: 1;
}

#progress-arc svg {
    transform: rotate(-90deg);
}

.arc-bg {
    fill: none;
    stroke: #143d3d;
    stroke-width: 6;
}

#arc-fill {
    fill: none;
    stroke: #fbbf24;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 0 314;
    transition: stroke-dasharray 0.3s ease;
}

#progress-pct {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #fbbf24;
    min-width: 32px;
}

/* ========== Sections ========== */
.section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
}

/* ========== Hero Section ========== */
#hero {
    min-height: 100vh;
    padding-bottom: 6rem;
}

/* Atom Icon */
.atom {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 2.5rem;
}

.atom-small {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.orbit {
    position: absolute;
    border: 1.5px solid #06b6d4;
    border-radius: 50%;
    top: 50%;
    left: 50%;
}

.o1 {
    width: 100%;
    height: 33%;
    margin-top: -16.5%;
    margin-left: -50%;
    animation: orbit-spin 4s linear infinite;
}

.o2 {
    width: 100%;
    height: 33%;
    margin-top: -16.5%;
    margin-left: -50%;
    transform: rotate(60deg);
    animation: orbit-spin-60 5s linear infinite;
}

.o3 {
    width: 100%;
    height: 33%;
    margin-top: -16.5%;
    margin-left: -50%;
    transform: rotate(-60deg);
    animation: orbit-spin-n60 6s linear infinite;
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes orbit-spin-60 {
    from { transform: rotate(60deg); }
    to   { transform: rotate(420deg); }
}

@keyframes orbit-spin-n60 {
    from { transform: rotate(-60deg); }
    to   { transform: rotate(300deg); }
}

.nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #fbbf24;
    border-radius: 50%;
    margin-top: -8px;
    margin-left: -8px;
    box-shadow: 0 0 20px #fbbf24, 0 0 40px rgba(251, 191, 36, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

.atom-small .nucleus {
    width: 10px;
    height: 10px;
    margin-top: -5px;
    margin-left: -5px;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px #fbbf24, 0 0 40px rgba(251, 191, 36, 0.4); }
    50%      { box-shadow: 0 0 30px #fbbf24, 0 0 60px rgba(251, 191, 36, 0.6); }
}

.brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 8vw, 5rem);
    color: #e0f2f1;
    letter-spacing: -0.02em;
    text-align: center;
}

.tagline {
    font-size: 1rem;
    color: #06b6d4;
    margin-top: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-arrow {
    display: block;
    width: 20px;
    height: 20px;
    border-right: 2px solid #06b6d4;
    border-bottom: 2px solid #06b6d4;
    transform: rotate(45deg);
    animation: bounce-arrow 2s ease-in-out infinite;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0) rotate(45deg); opacity: 1; }
    50%      { transform: translateY(10px) rotate(45deg); opacity: 0.4; }
}

/* Hero fade-in elements */
.fade-hero {
    opacity: 0;
    transform: translateY(20px);
    animation: hero-entrance 1s ease forwards;
}

.fade-hero:nth-child(2) { animation-delay: 0.3s; }
.fade-hero:nth-child(3) { animation-delay: 0.6s; }
.fade-hero:nth-child(4) { animation-delay: 0.9s; }

@keyframes hero-entrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Chapter Sections ========== */
.chapter-section {
    background: #0a2f2f;
}

.chapter-section:nth-child(odd) {
    background: linear-gradient(180deg, #0a2f2f 0%, #0f3535 50%, #0a2f2f 100%);
}

.chapter-inner,
.peak-inner,
.horizon-inner {
    max-width: 680px;
    width: 100%;
    text-align: left;
}

.horizon-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Bolt icon beside headings */
.bolt {
    display: inline-block;
    width: 14px;
    height: 22px;
    position: relative;
    margin-right: 10px;
    flex-shrink: 0;
}

.bolt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2px;
    width: 10px;
    height: 22px;
    background: #fbbf24;
    clip-path: polygon(50% 0%, 100% 40%, 55% 40%, 70% 100%, 0% 55%, 45% 55%);
}

.bolt-large {
    width: 18px;
    height: 28px;
}

.bolt-large::before {
    width: 14px;
    height: 28px;
}

.chapter-heading {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.chapter-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #fbbf24;
}

.chapter-text {
    font-size: 0.95rem;
    color: #a0c4c4;
    margin-bottom: 2rem;
    max-width: 560px;
}

/* ========== Counters ========== */
.counter-row {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.counter {
    text-align: center;
}

.counter-val {
    font-family: 'Fira Code', monospace;
    font-size: 2.2rem;
    color: #22d3ee;
    display: block;
    line-height: 1.2;
}

.counter-label {
    font-size: 0.65rem;
    color: #6b9e9e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-top: 0.25rem;
}

/* ========== Peak Section ========== */
.peak-section {
    background: linear-gradient(180deg, #0a2f2f 0%, #143d3d 40%, #143d3d 60%, #0a2f2f 100%);
}

.peak-inner {
    border-left: 4px solid #fbbf24;
    padding-left: 2rem;
}

.peak-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #fbbf24;
}

.peak-text {
    font-size: 1rem;
    color: #e0f2f1;
    margin-bottom: 2rem;
    max-width: 560px;
}

.peak-counters .counter-val {
    font-size: 2.8rem;
    color: #fbbf24;
}

/* ========== Horizon Section ========== */
.horizon-section {
    background: linear-gradient(180deg, #0a2f2f 0%, #0d2828 100%);
    min-height: 70vh;
}

.horizon-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.horizon-brand {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #6b9e9e;
    letter-spacing: 0.1em;
}

/* ========== Fade-in (scroll-triggered) ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 600px) {
    .section {
        padding: 3rem 1.2rem;
    }

    .atom {
        width: 120px;
        height: 120px;
    }

    .brand {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .counter-row {
        gap: 1.5rem;
    }

    .counter-val {
        font-size: 1.6rem;
    }

    .peak-counters .counter-val {
        font-size: 2rem;
    }

    .peak-inner {
        padding-left: 1.2rem;
    }

    #progress-arc {
        top: 12px;
        right: 12px;
    }
}
