/* thethird.quest — Dark Mode Neon Crypto */

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: #09090B;
    color: #E4E4E7;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* === Typography === */
.section-heading {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #E4E4E7;
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

/* === Neon Divider Lines === */
.neon-line {
    height: 1px;
    width: 50%;
    margin: 3rem auto;
    opacity: 0.7;
}
.neon-line.purple { background: #A855F7; box-shadow: 0 0 12px #A855F7, 0 0 4px #A855F7; }
.neon-line.cyan { background: #22D3EE; box-shadow: 0 0 12px #22D3EE, 0 0 4px #22D3EE; }
.neon-line.orange { background: #F97316; box-shadow: 0 0 12px #F97316, 0 0 4px #F97316; }

/* === Hero Zone === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168,85,247,0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
}
.triangle-symbol {
    display: block;
    margin: 0 auto 2rem;
    animation: pulseTri 3s ease-in-out infinite;
}
@keyframes pulseTri {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 10px #A855F7); }
    50% { opacity: 0.5; filter: drop-shadow(0 0 20px #A855F7); }
}
.hero-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 40px;
    color: #E4E4E7;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    text-shadow: 0 0 30px rgba(168,85,247,0.15);
}
.hero-fragment {
    font-size: 15px;
    color: #71717A;
    margin-bottom: 0.4rem;
    opacity: 0;
    transform: translateY(10px);
}
.frag-1 { animation: fadeFragment 1.8s ease 0.5s forwards; }
.frag-2 { animation: fadeFragment 1.8s ease 1.3s forwards; }
.frag-3 { animation: fadeFragment 1.8s ease 2.1s forwards; }
@keyframes fadeFragment {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.enter-btn {
    display: inline-block;
    margin-top: 2rem;
    background: transparent;
    border: 2px solid #A855F7;
    color: #A855F7;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 0.75rem 2.5rem;
    text-decoration: none;
    letter-spacing: 0.02em;
    box-shadow: 0 0 16px rgba(168,85,247,0.25);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.enter-btn:hover {
    background: #A855F7;
    color: #09090B;
    box-shadow: 0 0 30px rgba(168,85,247,0.5);
    transform: translateY(-2px);
}

/* === Quest Tracks === */
.tracks {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}
.track-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}
.track {
    background: #18181B;
    border: 1px solid #27272A;
    padding: 1.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.track:hover {
    border-color: #3F3F46;
}
.track-label {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 13px;
    display: block;
    margin-bottom: 1.25rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.track-purple .track-label { color: #A855F7; }
.track-cyan .track-label { color: #22D3EE; }
.track-orange .track-label { color: #F97316; }
.track-nodes {
    display: flex;
    flex-direction: column;
}
.node-connector {
    width: 2px;
    height: 16px;
    margin: 0 auto;
    background: #27272A;
}
.node-connector.purple { background: #A855F7; opacity: 0.4; }
.node-connector.cyan { background: #22D3EE; opacity: 0.4; }
.node-connector.orange { background: #F97316; opacity: 0.4; }
.node-connector.muted { background: #27272A; }
.node {
    padding: 0.6rem 0.85rem;
    font-size: 13px;
    border: 1px solid #27272A;
    color: #71717A;
    font-family: monospace;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    position: relative;
}
.node-icon {
    color: #71717A;
    margin-right: 0.35rem;
}
.node-lock {
    color: #3F3F46;
    margin-right: 0.35rem;
    font-size: 8px;
}
.node.solved {
    opacity: 0.55;
}
.node.active {
    color: #E4E4E7;
    position: relative;
}
.node-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
    animation: nodePulse 2s ease-in-out infinite;
}
.track-purple .node.active {
    border: 2px solid #A855F7;
    box-shadow: 0 0 12px rgba(168,85,247,0.25);
}
.track-purple .node-pulse { background: #A855F7; box-shadow: 0 0 8px #A855F7; }
.track-cyan .node.active {
    border: 2px solid #22D3EE;
    box-shadow: 0 0 12px rgba(34,211,238,0.25);
}
.track-cyan .node-pulse { background: #22D3EE; box-shadow: 0 0 8px #22D3EE; }
.track-orange .node.active {
    border: 2px solid #F97316;
    box-shadow: 0 0 12px rgba(249,115,22,0.25);
}
.track-orange .node-pulse { background: #F97316; box-shadow: 0 0 8px #F97316; }
@keyframes nodePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}
.node.locked {
    color: #3F3F46;
    border-color: #1C1C1E;
}

/* === Active Puzzle === */
.puzzle {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}
.puzzle-panel {
    background: #18181B;
    border: 1px solid #27272A;
    padding: 2rem;
    text-align: center;
}
.puzzle-prompt {
    font-size: 14px;
    color: #71717A;
    margin-bottom: 1.5rem;
}
.cipher-display {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.cipher-char {
    font-family: monospace;
    font-size: 28px;
    color: #A855F7;
    text-shadow: 0 0 10px rgba(168,85,247,0.5);
    width: 44px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #27272A;
    background: #09090B;
    transition: transform 0.2s ease, text-shadow 0.3s ease;
}
.cipher-char:hover {
    transform: translateY(-3px);
    text-shadow: 0 0 18px #A855F7;
}
.cipher-char.decoded {
    color: #22D3EE;
    text-shadow: 0 0 10px rgba(34,211,238,0.5);
    border-color: #22D3EE;
}
.code-input {
    background: #09090B;
    border: 1px solid #27272A;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-family: monospace;
    font-size: 14px;
    cursor: text;
    transition: border-color 0.3s ease;
}
.code-input:hover,
.code-input.focused {
    border-color: #22D3EE;
    box-shadow: 0 0 8px rgba(34,211,238,0.15);
}
.input-prompt {
    color: #22D3EE;
    user-select: none;
}
.input-text {
    color: #E4E4E7;
    white-space: pre;
}
.input-cursor {
    width: 8px;
    height: 17px;
    background: #22D3EE;
    animation: blinkCursor 1s steps(1) infinite;
    flex-shrink: 0;
}
@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.puzzle-hint {
    font-size: 12px;
    color: #71717A;
    font-family: monospace;
}
.puzzle-feedback {
    margin-top: 1rem;
    font-family: monospace;
    font-size: 14px;
    min-height: 1.5em;
    transition: opacity 0.3s ease;
}
.puzzle-feedback.success {
    color: #22D3EE;
    text-shadow: 0 0 10px rgba(34,211,238,0.4);
}
.puzzle-feedback.error {
    color: #F97316;
}

/* === Convergence Map === */
.convergence {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}
.convergence-panel {
    background: #18181B;
    border: 1px solid #27272A;
    padding: 1.5rem;
}
.convergence-svg {
    display: block;
    width: 100%;
    height: auto;
}
.conv-line {
    animation: dashFlow 3s linear infinite;
}
@keyframes dashFlow {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -20; }
}
.center-node {
    animation: centerPulse 4s ease-in-out infinite;
}
@keyframes centerPulse {
    0%, 100% { stroke: #E4E4E7; }
    33% { stroke: #A855F7; }
    66% { stroke: #22D3EE; }
}

/* === Transmission Log === */
.transmission {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}
.transmission-panel {
    background: #18181B;
    border: 1px solid #27272A;
    padding: 1.5rem;
    font-family: monospace;
    font-size: 13px;
}
.log-entry {
    padding: 0.5rem 0;
    border-bottom: 1px solid #1C1C1E;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.log-entry:last-child {
    border-bottom: none;
}
.log-entry.revealed {
    opacity: 1;
    transform: translateX(0);
}
.log-time {
    color: #71717A;
    margin-right: 0.75rem;
}
.log-text {
    color: #E4E4E7;
}
.log-text.highlight {
    color: #F97316;
    text-shadow: 0 0 8px rgba(249,115,22,0.3);
}

/* === Footer === */
.footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
}
.footer-inner {}
.footer-symbols {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}
.footer-tri {
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.footer-tri:hover {
    opacity: 1;
    transform: scale(1.15);
}
.footer-motto {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #71717A;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0.75rem;
}
.flink {
    font-size: 13px;
    color: #71717A;
    text-decoration: none;
    font-family: monospace;
    transition: color 0.3s ease;
}
.flink:hover {
    color: #22D3EE;
}
.footer-copy {
    font-size: 11px;
    color: #3F3F46;
    font-family: monospace;
}

/* === Scroll 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: 700px) {
    .track-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .hero-title {
        font-size: 28px;
    }
    .section-heading {
        font-size: 22px;
    }
    .cipher-display {
        gap: 0.35rem;
    }
    .cipher-char {
        width: 36px;
        height: 44px;
        font-size: 22px;
    }
    .convergence-panel {
        padding: 1rem;
    }
}
