/* showa.boo — Generative Gemstone Brutalism */
/* Hexagonal honeycomb grid with jewel-tone palette on obsidian */

:root {
    --obsidian-void: #0a0a0f;
    --deep-sapphire: #1a3a8f;
    --burmese-ruby: #8f1a3a;
    --imperial-emerald: #1a8f4a;
    --citrine-fire: #c4a020;
    --amethyst-vein: #5a1a8f;
    --quartz-white: #e8e4f0;
    --slate-facet: #4a4a5c;
    --divider-line: #2a0f3d;

    --hex-width: 280px;
    --hex-height: calc(var(--hex-width) * 1.1547);
    --hex-gap: 4px;
    --hex-offset: calc(var(--hex-width) / 2 + var(--hex-gap) / 2);
    --hex-row-shift: calc(var(--hex-height) * 0.75 + var(--hex-gap));
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--obsidian-void);
    color: var(--quartz-white);
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.65;
    letter-spacing: 0.02em;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar styling — angular notches */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: var(--obsidian-void);
}

body::-webkit-scrollbar-thumb {
    background: var(--deep-sapphire);
    clip-path: polygon(0 0, 100% 10%, 100% 90%, 0 100%);
}

/* Hex Grid Container */
.hex-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0 80px;
    gap: 0;
}

/* Hex Row */
.hex-row {
    display: flex;
    gap: var(--hex-gap);
    margin-top: calc(var(--hex-height) * -0.25);
    justify-content: center;
}

.hex-row:first-child {
    margin-top: 0;
}

.hex-row--even {
    margin-left: var(--hex-offset);
}

/* Hex Cell — the core hexagonal unit */
.hex-cell {
    width: var(--hex-width);
    height: var(--hex-height);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    position: relative;
    opacity: 0;
    transition: opacity 400ms ease;
    cursor: default;
    overflow: hidden;
}

.hex-cell.visible {
    opacity: 1;
}

/* Void cells */
.hex-cell--void {
    background: var(--obsidian-void);
}

.hex-cell--void.hex-cell--outlined {
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(74, 74, 92, 0.3);
}

.hex-cell--void.hex-cell--outlined::before {
    content: '';
    position: absolute;
    inset: 2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid rgba(74, 74, 92, 0.3);
}

/* Jewel-tone fills with faceted radial gradients */
.hex-cell--sapphire {
    background: radial-gradient(ellipse at center, #1a3a8f 0%, #112660 100%);
}

.hex-cell--ruby {
    background: radial-gradient(ellipse at center, #8f1a3a 0%, #5e1127 100%);
}

.hex-cell--emerald {
    background: radial-gradient(ellipse at center, #1a8f4a 0%, #115e31 100%);
}

.hex-cell--citrine {
    background: radial-gradient(ellipse at center, #c4a020 0%, #8a7016 100%);
}

.hex-cell--amethyst {
    background: radial-gradient(ellipse at center, #5a1a8f 0%, #3c115e 100%);
}

/* Content cells */
.hex-cell--content {
    background: radial-gradient(ellipse at center, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 1) 100%);
    cursor: default;
}

/* Hover effect — gem focusing */
.hex-cell--sapphire:hover {
    background: radial-gradient(ellipse at center, #2050b0 0%, #0d1a40 100%);
}

.hex-cell--ruby:hover {
    background: radial-gradient(ellipse at center, #a82050 0%, #40091a 100%);
}

.hex-cell--emerald:hover {
    background: radial-gradient(ellipse at center, #20a858 0%, #0d4020 100%);
}

.hex-cell--citrine:hover {
    background: radial-gradient(ellipse at center, #dab830 0%, #6a560e 100%);
}

.hex-cell--amethyst:hover {
    background: radial-gradient(ellipse at center, #7020a8 0%, #2a0d40 100%);
}

.hex-cell:not(.hex-cell--void):not(.hex-cell--content) {
    transition: opacity 400ms ease, background 300ms ease;
}

/* Neighbor dimming on hover — handled by JS class */
.hex-cell.dimmed {
    opacity: 0.7 !important;
    transition: opacity 300ms ease;
}

/* Typography */
.hex-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--citrine-fire);
    line-height: 1;
}

.hex-heading {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--quartz-white);
    margin-bottom: 8px;
    line-height: 1.1;
}

.hex-body {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.65;
    letter-spacing: 0.02em;
    color: var(--quartz-white);
}

.hex-coord {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--slate-facet);
    opacity: 0.6;
    display: block;
    margin-bottom: 6px;
}

/* Fade-reveal label on nav hexagons */
.hex-cell[data-nav] .hex-label {
    opacity: 0;
    transition: opacity 400ms ease;
}

.hex-cell[data-nav].visible .hex-label {
    opacity: 1;
}

/* Scroll reveal for content cells */
.hex-cell--reveal .hex-heading,
.hex-cell--reveal .hex-body,
.hex-cell--reveal .hex-coord {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hex-cell--reveal.content-visible .hex-heading,
.hex-cell--reveal.content-visible .hex-body,
.hex-cell--reveal.content-visible .hex-coord {
    opacity: 1;
    transform: translateY(0);
}

/* Canvas for generative patterns */
.hex-cell canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Chevron divider */
.chevron-divider {
    width: 100%;
    height: 40px;
    position: relative;
    margin: 10px 0;
    overflow: hidden;
}

.chevron-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0;
    border-top: 0.5px solid var(--amethyst-vein);
    transform: translateY(-50%);
}

/* Zigzag divider */
.zigzag-divider {
    width: 100%;
    height: 24px;
    position: relative;
    margin: 10px 0;
    background: linear-gradient(135deg, var(--obsidian-void) 33.33%, transparent 33.33%) 0 0,
                linear-gradient(225deg, var(--obsidian-void) 33.33%, transparent 33.33%) 0 0,
                linear-gradient(315deg, var(--obsidian-void) 33.33%, transparent 33.33%) 0 0,
                linear-gradient(45deg, var(--obsidian-void) 33.33%, transparent 33.33%) 0 0;
    background-size: 24px 24px;
    background-color: var(--deep-sapphire);
    opacity: 0.3;
}

/* Color pulse animation */
@keyframes gemPulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.2) saturate(1.2); }
    100% { filter: brightness(1); }
}

.hex-cell.pulsing {
    animation: gemPulse 3s ease-in-out;
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    :root {
        --hex-width: 220px;
    }

    .hex-row {
        flex-wrap: nowrap;
    }

    .hex-cell:nth-child(5) {
        display: none;
    }
}

/* Responsive: Mobile */
@media (max-width: 768px) {
    :root {
        --hex-width: 180px;
    }

    .hex-row--even {
        margin-left: calc(var(--hex-offset));
    }

    .hex-cell:nth-child(4),
    .hex-cell:nth-child(5) {
        display: none;
    }

    .hex-label {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }

    .hex-heading {
        font-size: clamp(1rem, 2.5vw, 1.5rem);
    }

    .hex-cell--content {
        padding: 20px 14px;
    }
}

@media (max-width: 480px) {
    :root {
        --hex-width: 150px;
    }

    .hex-cell:nth-child(3),
    .hex-cell:nth-child(4),
    .hex-cell:nth-child(5) {
        display: none;
    }

    .hex-row--even {
        margin-left: calc(var(--hex-width) / 2);
    }
}
