/* hwaglyul.com - Chemical Intelligence */
/* Palette: #0a0a0a, #141414, #2a2a2a, #4ade80, #22d3ee, #a855f7, #d4d4d4 */
/* Fonts: Sora 600, Inter 400, Fira Code 400 */

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

html {
    scroll-behavior: smooth;
}

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

/* ===================== */
/* SECTION 1: IGNITE     */
/* ===================== */
.ignite {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Molecule Hero Structure */
.molecule-hero {
    margin-bottom: 2.5rem;
}

.molecule-structure {
    position: relative;
    width: 220px;
    height: 220px;
}

.node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
    background: #0a0a0a;
    z-index: 2;
}

.node-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #4ade80;
    font-weight: 400;
}

.node-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-color: #4ade80;
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.4);
    animation: nodePulse 3s ease-in-out infinite;
}

.node-tr {
    top: 20px;
    right: 20px;
    border-color: #22d3ee;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

.node-tr .node-label { color: #22d3ee; }

.node-tl {
    top: 20px;
    left: 20px;
    border-color: #22d3ee;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

.node-tl .node-label { color: #22d3ee; }

.node-br {
    bottom: 20px;
    right: 30px;
    border-color: #a855f7;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.node-br .node-label { color: #a855f7; }

.node-bl {
    bottom: 20px;
    left: 30px;
    border-color: #22d3ee;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

.node-bl .node-label { color: #22d3ee; }

/* Bonds */
.bond {
    position: absolute;
    height: 2px;
    background: rgba(74, 222, 128, 0.6);
    z-index: 1;
    transform-origin: center center;
}

.bond-top-right {
    width: 56px;
    top: 80px;
    left: 130px;
    transform: rotate(-40deg);
    background: rgba(34, 211, 238, 0.5);
}

.bond-top-left {
    width: 56px;
    top: 80px;
    left: 36px;
    transform: rotate(40deg);
    background: rgba(34, 211, 238, 0.5);
}

.bond-bottom-right {
    width: 56px;
    bottom: 80px;
    right: 36px;
    transform: rotate(40deg);
    background: rgba(168, 85, 247, 0.5);
}

.bond-bottom-left {
    width: 56px;
    bottom: 80px;
    left: 36px;
    transform: rotate(-40deg);
    background: rgba(34, 211, 238, 0.5);
}

/* Electron orbit rings */
.orbit {
    position: absolute;
    border: 1px solid rgba(74, 222, 128, 0.15);
    border-radius: 50%;
    pointer-events: none;
    animation: orbitSpin 8s linear infinite;
}

.orbit-1 {
    width: 64px;
    height: 28px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(30deg);
    border-color: rgba(74, 222, 128, 0.15);
}

.orbit-2 {
    width: 72px;
    height: 24px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-color: rgba(74, 222, 128, 0.1);
    animation-duration: 12s;
    animation-direction: reverse;
}

.orbit-small {
    width: 48px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(20deg);
    border-color: rgba(34, 211, 238, 0.12);
    animation-duration: 6s;
}

.node-br .orbit-1 {
    border-color: rgba(168, 85, 247, 0.15);
}

/* Brand text */
.brand-name {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: clamp(2.5rem, 7vw, 4rem);
    color: #d4d4d4;
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.9rem;
    color: #4ade80;
    margin-top: 0.4rem;
    letter-spacing: 0.05em;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(74, 222, 128, 0.4);
    border-bottom: 2px solid rgba(74, 222, 128, 0.4);
    transform: rotate(45deg);
}

/* ===================== */
/* SECTION 2: REACT      */
/* ===================== */
.react {
    padding: 4rem 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.panels-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel {
    background: #141414;
    padding: 1.8rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.panel-green {
    border: 1px solid rgba(74, 222, 128, 0.3);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.1);
}

.panel-cyan {
    border: 1px solid rgba(34, 211, 238, 0.3);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.1);
}

.panel-purple {
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.panel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: indicatorPulse 2s ease-in-out infinite;
}

.green-dot {
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

.cyan-dot {
    background: #22d3ee;
    box-shadow: 0 0 6px rgba(34, 211, 238, 0.6);
}

.purple-dot {
    background: #a855f7;
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
}

.panel-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #d4d4d4;
}

.panel-text {
    font-size: 0.82rem;
    color: #d4d4d4;
    opacity: 0.65;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.panel-data {
    margin-bottom: 1rem;
}

.formula {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    display: inline-block;
}

.formula sub {
    font-size: 0.65rem;
    vertical-align: sub;
}

.formula sup {
    font-size: 0.6rem;
    vertical-align: super;
}

.panel-cyan .formula {
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.08);
}

.panel-purple .formula {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.08);
}

.panel-stats {
    display: flex;
    gap: 1.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid #2a2a2a;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 400;
}

.stat-label {
    font-size: 0.65rem;
    color: #d4d4d4;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.green-text { color: #4ade80; }
.cyan-text { color: #22d3ee; }
.purple-text { color: #a855f7; }

/* Electron decorations on panels */
.electron-decoration {
    position: absolute;
    border: 1px solid rgba(74, 222, 128, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.electron-deco-1 {
    width: 120px;
    height: 50px;
    top: -10px;
    right: -30px;
    border-color: rgba(74, 222, 128, 0.06);
    transform: rotate(15deg);
}

.electron-deco-2 {
    width: 140px;
    height: 45px;
    bottom: -8px;
    left: -40px;
    border-color: rgba(34, 211, 238, 0.06);
    transform: rotate(-20deg);
}

.electron-deco-3 {
    width: 100px;
    height: 40px;
    top: 10px;
    right: -20px;
    border-color: rgba(168, 85, 247, 0.06);
    transform: rotate(30deg);
}

.electron-deco-4 {
    width: 130px;
    height: 48px;
    bottom: -5px;
    right: -35px;
    border-color: rgba(74, 222, 128, 0.06);
    transform: rotate(-10deg);
}

/* ===================== */
/* SECTION 3: CHAIN      */
/* ===================== */
.chain {
    padding: 5rem 1.5rem;
    text-align: center;
}

.chain-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #d4d4d4;
    margin-bottom: 2.5rem;
    letter-spacing: 0.03em;
}

.chain-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.chain-element {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.chain-node {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.chain-node:hover {
    transform: scale(1.15);
}

.green-node {
    border: 2px solid #4ade80;
    color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

.green-node:hover {
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.cyan-node {
    border: 2px solid #22d3ee;
    color: #22d3ee;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

.cyan-node:hover {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

.purple-node {
    border: 2px solid #a855f7;
    color: #a855f7;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.purple-node:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.orbit-chain {
    position: absolute;
    width: 68px;
    height: 26px;
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(25deg);
    pointer-events: none;
    animation: orbitSpin 10s linear infinite;
}

.cyan-node .orbit-chain {
    border-color: rgba(34, 211, 238, 0.1);
}

.purple-node .orbit-chain {
    border-color: rgba(168, 85, 247, 0.1);
}

.chain-number {
    font-family: 'Fira Code', monospace;
    font-size: 0.55rem;
    color: #2a2a2a;
}

.chain-bond-line {
    width: 32px;
    height: 2px;
    background: rgba(74, 222, 128, 0.4);
    margin: 0 2px;
    margin-bottom: 1.2rem;
    position: relative;
}

.chain-bond-line::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(74, 222, 128, 0.15);
}

/* Periodic table grid */
.periodic-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    max-width: 500px;
    margin: 3rem auto 0;
    padding: 0 1rem;
}

.periodic-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.55rem;
    color: #d4d4d4;
    opacity: 0.12;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    transition: opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.periodic-cell:hover {
    opacity: 0.6;
    border-color: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.2);
}

/* ===================== */
/* SECTION 4: LAB        */
/* ===================== */
.lab {
    text-align: center;
    padding: 5rem 2rem 4rem;
    position: relative;
}

.flask-icon {
    width: 36px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.flask-neck {
    width: 14px;
    height: 12px;
    border: 2px solid #4ade80;
    border-bottom: none;
    margin: 0 auto;
    border-radius: 2px 2px 0 0;
}

.flask-body {
    width: 36px;
    height: 40px;
    border: 2px solid #4ade80;
    border-radius: 0 0 12px 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.2);
}

.flask-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(74, 222, 128, 0.25), rgba(74, 222, 128, 0.05));
    animation: liquidBubble 4s ease-in-out infinite;
}

.flask-bubble {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.4);
    animation: bubbleRise 3s ease-in infinite;
}

.flask-bubble-1 {
    bottom: 4px;
    left: 8px;
    animation-delay: 0s;
}

.flask-bubble-2 {
    bottom: 2px;
    left: 18px;
    animation-delay: 1.2s;
    width: 3px;
    height: 3px;
}

.flask-bubble-3 {
    bottom: 6px;
    left: 13px;
    animation-delay: 2.1s;
    width: 2px;
    height: 2px;
}

.lab-version {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #2a2a2a;
    display: block;
    margin-bottom: 0.3rem;
}

.lab-brand {
    font-size: 0.75rem;
    color: #2a2a2a;
    display: block;
    margin-bottom: 1.5rem;
}

.lab-formula {
    margin-top: 0.5rem;
}

.formula-footer {
    font-size: 0.7rem;
    color: #4ade80;
    opacity: 0.3;
    background: transparent;
}

/* ===================== */
/* ANIMATIONS            */
/* ===================== */
@keyframes nodePulse {
    0%, 100% { box-shadow: 0 0 8px rgba(74, 222, 128, 0.3); }
    50% { box-shadow: 0 0 24px rgba(74, 222, 128, 0.6); }
}

@keyframes orbitSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes indicatorPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

@keyframes liquidBubble {
    0%, 100% { height: 60%; }
    50% { height: 65%; }
}

@keyframes bubbleRise {
    0% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-32px) scale(0.4); opacity: 0; }
}

/* ===================== */
/* FADE-IN               */
/* ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===================== */
/* RESPONSIVE            */
/* ===================== */
@media (max-width: 640px) {
    .molecule-structure {
        width: 180px;
        height: 180px;
    }

    .node-center {
        width: 36px;
        height: 36px;
    }

    .bond {
        width: 44px;
    }

    .bond-top-right {
        left: 108px;
    }

    .panels-container {
        gap: 1rem;
    }

    .panel {
        padding: 1.4rem;
    }

    .panel-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .chain-strip {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .chain-bond-line {
        width: 20px;
    }

    .chain-node {
        width: 42px;
        height: 42px;
    }

    .periodic-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
