/* gabs.cx - Cyberpunk Value Discovery Terminal */
/* Colors: #0a0a12, #1a1a3e, #00e5ff, #ff006e, #565f89, #c0caf5, #1a1b2e, #000000, #39ff14 */
/* Fonts: Space Grotesk (display), Inter (body) */

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

:root {
    --bg-deep: #0a0a12;
    --bg-dark: #1a1a3e;
    --bg-panel: #1a1b2e;
    --cyan: #00e5ff;
    --magenta: #ff006e;
    --green: #39ff14;
    --slate: #565f89;
    --text-light: #c0caf5;
    --black: #000000;
    --hex-size: 120px;
    --hex-gap: 4px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   THE HIVE - Full viewport opening
   ============================================ */

.hive-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-deep);
}

#hive-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hive-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hive-center {
    text-align: center;
    position: relative;
}

.glyph-reveal {
    opacity: 0;
    transform: scale(0.5);
    animation: glyphAppear 2s ease-out 0.5s forwards;
}

.glyph-korean {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 700;
    color: var(--cyan);
    text-shadow:
        0 0 20px rgba(0, 229, 255, 0.5),
        0 0 60px rgba(0, 229, 255, 0.3),
        0 0 120px rgba(0, 229, 255, 0.15);
    display: block;
    line-height: 1;
}

@keyframes glyphAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
        filter: blur(20px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.glyph-subtitle {
    margin-top: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.4rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--slate);
    opacity: 0;
    animation: fadeInUp 1s ease-out 2s forwards;
}

.subtitle-line {
    color: var(--text-light);
    transition: color 0.3s;
}

.subtitle-line:hover {
    color: var(--cyan);
}

.subtitle-divider {
    margin: 0 0.6em;
    color: var(--magenta);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-prompt {
    margin-top: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 0.95rem);
    color: var(--green);
    opacity: 0;
    animation: fadeInUp 1s ease-out 3s forwards;
    letter-spacing: 0.1em;
}

.prompt-bracket {
    color: var(--slate);
}

.prompt-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.scroll-indicator {
    position: absolute;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 4s forwards;
}

.scroll-hex {
    width: 24px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--cyan);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(8px);
    }
}

.scroll-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--slate);
    text-transform: uppercase;
}

/* ============================================
   HEXAGONAL NAVIGATION
   ============================================ */

.hex-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 18, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    padding: 1rem 0;
}

.hex-nav-cluster {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hex-nav-cell {
    background: rgba(26, 26, 62, 0.6);
    border: 1px solid rgba(86, 95, 137, 0.3);
    color: var(--slate);
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 1rem;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
    transition: all 0.3s ease;
    min-width: 110px;
}

.hex-nav-cell:hover,
.hex-nav-cell.active {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.hex-nav-cell.active {
    border-color: var(--cyan);
}

.hex-nav-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.hex-nav-label {
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    font-weight: 500;
}

/* ============================================
   VALUE DIMENSIONS - Hexagonal Content Grid
   ============================================ */

.dimensions-section {
    padding: 5rem 2rem;
    background: var(--bg-deep);
    position: relative;
}

.dimension-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.hex-cluster {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: start;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hex-cluster.visible {
    opacity: 1;
    transform: translateY(0);
}

.hex-cell {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid rgba(86, 95, 137, 0.25);
    clip-path: polygon(3% 0%, 97% 0%, 100% 50%, 97% 100%, 3% 100%, 0% 50%);
    transition: border-color 0.4s, box-shadow 0.4s;
}

.hex-cell:hover {
    border-color: rgba(0, 229, 255, 0.4);
}

.hex-cell-main {
    padding: 3rem 4rem;
    min-height: 200px;
}

.hex-cell-sub {
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.hex-cell-inner {
    position: relative;
    z-index: 1;
}

.hex-title {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.hex-title-korean {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--cyan);
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.hex-title-english {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--slate);
    text-transform: uppercase;
}

.hex-body {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.7;
    color: var(--text-light);
    opacity: 0.85;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.hex-data-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.data-label {
    color: var(--slate);
    font-weight: 500;
}

.data-value {
    color: var(--green);
    font-weight: 400;
    white-space: nowrap;
}

.hex-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--magenta);
    text-shadow: 0 0 15px rgba(255, 0, 110, 0.3);
    line-height: 1;
}

.stat-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: var(--slate);
    text-transform: uppercase;
    font-weight: 500;
}

/* Alternating accent colors for clusters */
.hex-cluster:nth-child(even) .hex-title-korean {
    color: var(--magenta);
    text-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

.hex-cluster:nth-child(even) .hex-cell:hover {
    border-color: rgba(255, 0, 110, 0.4);
}

.hex-cluster:nth-child(even) .stat-number {
    color: var(--cyan);
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.hex-cluster:nth-child(even) .data-value {
    color: var(--cyan);
}

/* ============================================
   DATA STREAM SECTION
   ============================================ */

.data-stream-section {
    padding: 5rem 2rem;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.data-stream-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.stream-container {
    max-width: 1200px;
    margin: 0 auto;
}

.stream-title {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stream-title-korean {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
    display: block;
}

.stream-title-english {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--slate);
    display: block;
}

.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 3px;
    margin-bottom: 3rem;
    min-height: 200px;
}

.stream-cell {
    aspect-ratio: 1;
    background: var(--bg-panel);
    border: 1px solid rgba(86, 95, 137, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    color: var(--slate);
    transition: all 0.3s ease;
    cursor: default;
    overflow: hidden;
}

.stream-cell.active {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.05);
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.1);
}

.stream-cell.pulse-magenta {
    border-color: var(--magenta);
    color: var(--magenta);
    background: rgba(255, 0, 110, 0.05);
}

.stream-cell.pulse-green {
    border-color: var(--green);
    color: var(--green);
    background: rgba(57, 255, 20, 0.05);
}

/* Ticker */
.stream-ticker {
    overflow: hidden;
    border-top: 1px solid rgba(86, 95, 137, 0.2);
    border-bottom: 1px solid rgba(86, 95, 137, 0.2);
    padding: 0.8rem 0;
}

.ticker-track {
    display: flex;
    gap: 1.5rem;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
    width: max-content;
}

.ticker-item {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 0.1em;
}

.ticker-divider {
    color: var(--cyan);
    font-size: 0.6rem;
}

@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ============================================
   TERMINAL FOOTER
   ============================================ */

.terminal-footer {
    position: relative;
    background: var(--black);
    padding: 1.5rem 2rem;
}

.footer-hex-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--magenta) 20%,
        var(--cyan) 50%,
        var(--green) 80%,
        transparent
    );
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-glyph {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.footer-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--slate);
    letter-spacing: 0.15em;
}

.footer-center {
    display: flex;
    align-items: center;
}

.footer-status {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.footer-right {
    display: flex;
    align-items: center;
}

.footer-coord {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--slate);
}

/* ============================================
   PARTICLE CANVAS (ambient overlay)
   ============================================ */

.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.4;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hex-cluster {
        grid-template-columns: 1fr;
    }

    .hex-cell-main {
        padding: 2rem 2.5rem;
    }

    .hex-cell-sub {
        padding: 1.5rem 2rem;
        min-width: unset;
    }

    .hex-nav-cell {
        min-width: 80px;
        padding: 0.5rem 0.7rem;
    }

    .hex-nav-label {
        font-size: 0.45rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .stream-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    }
}

@media (max-width: 480px) {
    .hex-nav-cluster {
        gap: 0.3rem;
    }

    .hex-nav-cell {
        min-width: 60px;
        padding: 0.4rem 0.5rem;
        clip-path: none;
        border-radius: 4px;
    }

    .hex-cell {
        clip-path: none;
    }

    .hex-cell-main {
        padding: 1.5rem;
    }
}

/* ============================================
   GLOW EFFECTS / AMBIENT
   ============================================ */

.hex-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(0, 229, 255, 0.03) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

.hex-cluster:nth-child(even) .hex-cell::before {
    background: radial-gradient(
        ellipse at 70% 80%,
        rgba(255, 0, 110, 0.03) 0%,
        transparent 70%
    );
}

/* Scanline effect on hive section */
.hive-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 229, 255, 0.015) 2px,
        rgba(0, 229, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 3;
}

/* Selection color */
::selection {
    background: rgba(0, 229, 255, 0.3);
    color: #ffffff;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--slate);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}
