/* === licence.broker — Retro-Futuristic Flat Hexagonal Exchange === */
/* Typography compliance terms: IBM Plex Mono only for data labels IBM Plex Mono.** IBM Plex Mono* IBM Plex Mono" (Google Fonts Interaction:** Interaction* */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple: #9b5de5;
    --orange: #e8734a;
    --teal: #2ec4b6;
    --cream: #f0ece2;
    --teal-alt: #4ecdc4;
    --yellow: #f5cb5c;
    --dark: #1e1e2e;
    --pink: #e36588;
    --dark-mid: #2d2d44;
    --dark-text: #4a4a6a;

    --font-display: 'Commissioner', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

    --hex-clip: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    font-family: var(--font-display);
    color: var(--dark);
    overflow-x: hidden;
    min-height: 100vh;
}

.mono {
    font-family: var(--font-mono);
}

/* --- Hex Map Container --- */
#hex-map {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

/* --- Hex Cluster Layout --- */
.hex-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Hexagon Base --- */
.hex {
    clip-path: var(--hex-clip);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.hex:hover {
    transform: scale(1.06) !important;
}

.hex::after {
    content: "";
    position: absolute;
    inset: 10px;
    clip-path: var(--hex-clip);
    border: 2px solid currentColor;
    opacity: 0.18;
    pointer-events: none;
}

.hex-inner {
    clip-path: var(--hex-clip);
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 16px;
    gap: 6px;
    width: 100%;
}

/* --- Hex Sizes --- */
.hex-large {
    width: 340px;
    height: 374px;
}

.hex-medium {
    width: 196px;
    height: 216px;
}

#hero-cluster {
    min-height: 88vh;
    align-content: center;
}

#exchange-cluster,
#status-cluster,
#how-cluster,
#terminal-cluster {
    min-height: 72vh;
    align-content: center;
}

/* --- Hex Colors (Flat — no gradients, no shadows) --- */
.hex-purple {
    background: var(--purple);
}
.hex-purple .hex-inner {
    background: var(--purple);
    color: var(--cream);
}

.hex-orange {
    background: var(--orange);
}
.hex-orange .hex-inner {
    background: var(--orange);
    color: var(--cream);
}

.hex-teal {
    background: var(--teal);
}
.hex-teal .hex-inner {
    background: var(--teal);
    color: var(--dark);
}

.hex-yellow {
    background: var(--yellow);
}
.hex-yellow .hex-inner {
    background: var(--yellow);
    color: var(--dark);
}

.hex-pink {
    background: var(--pink);
}
.hex-pink .hex-inner {
    background: var(--pink);
    color: var(--cream);
}

.hex-dark {
    background: var(--dark);
}
.hex-dark .hex-inner {
    background: var(--dark);
    color: var(--cream);
}

/* --- Hero --- */
.brand-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-tagline {
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 1.2vw, 0.85rem);
    font-weight: 400;
    opacity: 0.85;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-command,
.micro-copy,
.ticker,
.licence-price {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    opacity: 0.72;
    text-transform: uppercase;
}

.hero-command {
    margin-top: 8px;
    color: var(--yellow);
}

/* --- Hex Labels --- */
.hex-label {
    font-weight: 500;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
}

.hex-icon svg {
    display: block;
}

/* --- Section Labels --- */
.section-label {
    font-weight: 500;
    font-size: clamp(0.9rem, 2vw, 1.4rem);
    text-transform: uppercase;
    font-family: var(--font-mono);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    opacity: 0.8;
    max-width: 220px;
    line-height: 1.4;
}

/* --- Licence Cards --- */
.licence-type {
    font-weight: 600;
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
}

.licence-code {
    font-size: 0.75rem;
    opacity: 0.7;
    letter-spacing: 0.08em;
}

.licence-status {
    font-size: 0.7rem;
    font-weight: 500;
}

.licence-price {
    font-weight: 600;
    opacity: 0.8;
}

.status-active { color: var(--teal-alt); }
.status-pending { color: var(--yellow); }
.status-expiring { color: var(--orange); }

.hex-dark .status-active { color: var(--teal-alt); }
.hex-purple .status-active,
.hex-orange .status-active,
.hex-pink .status-active { color: var(--cream); }
.hex-teal .status-pending { color: var(--dark); }
.hex-yellow .status-expiring { color: var(--dark); }

/* --- Stats --- */
.stat-number {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: clamp(0.65rem, 1.1vw, 0.8rem);
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Steps --- */
.step-number {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--purple);
}

.step-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.step-desc {
    font-size: 0.75rem;
    opacity: 0.7;
    line-height: 1.4;
    max-width: 140px;
}

/* --- Terminal --- */
#terminal {
    width: 100%;
    text-align: left;
    padding: 8px;
    max-height: 245px;
    overflow: hidden;
}

.terminal-line {
    font-size: 0.75rem;
    line-height: 1.8;
    color: var(--teal-alt);
}

.terminal-line.flash {
    color: var(--yellow);
}

.terminal-response {
    color: var(--cream);
    opacity: 0.6;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.terminal-prompt {
    color: var(--teal-alt);
    font-size: 0.75rem;
}

#terminal-input {
    background: none;
    border: none;
    outline: none;
    color: var(--cream);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    width: 100%;
    caret-color: var(--teal-alt);
}

#terminal-input::placeholder {
    color: var(--dark-text);
}

/* --- CTA --- */
.cta-label {
    font-weight: 700;
    font-size: 1.1rem;
}

.cta-sub {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

/* --- Footer --- */
.footer-brand {
    font-weight: 700;
    font-size: 1rem;
}

.footer-copy {
    font-size: 0.65rem;
    opacity: 0.5;
}

/* --- Hex Cursor Follower --- */
#hex-cursor {
    position: fixed;
    width: 20px;
    height: 22px;
    clip-path: var(--hex-clip);
    background: var(--purple);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9999;
    mix-blend-mode: multiply;
}

body:hover #hex-cursor {
    opacity: 0.4;
}

/* --- Hex border flash animation --- */
@keyframes hex-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.hex.pulsing {
    animation: hex-pulse 2s ease-in-out infinite;
}

.hex.selected {
    outline: 4px solid var(--dark);
    outline-offset: 4px;
}

.hex-dark.selected {
    outline-color: var(--purple);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hex-large {
        width: 260px;
        height: 285px;
    }
    .hex-medium {
        width: 150px;
        height: 165px;
    }
    .hex-content {
        padding: 14px 10px;
        gap: 4px;
    }
    .hex-cluster {
        gap: 8px;
        margin-bottom: 24px;
    }
    #hex-map {
        padding: 30px 10px;
    }
    .step-desc, .section-desc {
        max-width: 110px;
    }
    #terminal {
        padding: 4px;
    }
    .terminal-line, .terminal-prompt, #terminal-input {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .hex-large {
        width: 220px;
        height: 240px;
    }
    .hex-medium {
        width: 130px;
        height: 143px;
    }
}
