/* ==============================
   lungi.dev - Hexagonal Honeycomb
   ============================== */

/* === CSS Custom Properties === */
:root {
    --deep-indigo: #1A0A2A;
    --shadow-purple: #0A0418;
    --warm-amber: #D4A84B;
    --rich-saffron: #E8A020;
    --leather-brown: #5A3A20;
    --cream-gold: #F5E8C8;
    --grid-line: rgba(255, 255, 255, 0.15);

    --hex-width: 160px;
    --hex-height: 185px;
    --hex-gap: 4px;
    --hex-offset: 80px;

    --font-headline: 'Space Grotesk', sans-serif;
    --font-body: 'Work Sans', sans-serif;
    --font-code: 'Fira Code', monospace;

    --cursor-x: 50%;
    --cursor-y: 50%;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--shadow-purple);
    color: var(--cream-gold);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(13px, 0.9vw, 16px);
    line-height: 1.6;
    overflow-x: hidden;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* === Textile Geometric Overlay === */
#textile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.6;
}

#textile-svg {
    width: 100%;
    height: 100%;
}

/* === Hero Section === */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-indigo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--deep-indigo);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 1;
}

.hero-bg-amber {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--warm-amber);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    z-index: 0;
}

#hex-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

#hex-grid-lines line {
    stroke: var(--grid-line);
    stroke-width: 1;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

#hex-grid-lines.animate line {
    animation: drawLine 2s ease-out forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

#hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

#logotype {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(48px, 10vw, 120px);
    color: var(--cream-gold);
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 4px 40px rgba(26, 10, 42, 0.6);
    opacity: 0;
    transform: scale(0.9);
    animation: logoReveal 0.8s 0.5s ease-out forwards;
}

@keyframes logoReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#tagline {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(14px, 2vw, 22px);
    color: var(--warm-amber);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 16px;
    opacity: 0;
    animation: fadeIn 0.6s 1.2s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* === Hexagonal Content Grid === */
#hex-grid-section {
    position: relative;
    padding: 80px 0;
    background: var(--shadow-purple);
    min-height: 100vh;
    z-index: 1;
}

#hex-grid-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.hex-row {
    display: flex;
    justify-content: center;
    gap: var(--hex-gap);
    margin-top: -42px;
}

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

.hex-row-offset {
    transform: translateX(var(--hex-offset));
}

/* === Hexagonal Cell === */
.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;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.2s ease-out, filter 0.2s ease-out, box-shadow 0.2s ease-out;
    opacity: 0;
    transform: scale(0.8);
}

.hex-cell.revealed {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.hex-cell.hex-spotlight {
    filter: brightness(1.15);
    transform: scale(1.05);
    z-index: 10;
}

.hex-cell.hex-glow {
    filter: brightness(1.07);
    z-index: 5;
}

.hex-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    text-align: center;
    overflow: hidden;
}

/* === Dark Hexagon === */
.hex-dark {
    background: var(--deep-indigo);
    color: var(--cream-gold);
}

.hex-dark h2 {
    color: var(--warm-amber);
}

/* === Light Hexagon === */
.hex-light {
    background: var(--warm-amber);
    color: var(--deep-indigo);
}

.hex-light h2 {
    color: var(--deep-indigo);
}

.hex-light p {
    color: var(--deep-indigo);
}

.hex-light .hex-code {
    color: var(--deep-indigo);
    background: rgba(26, 10, 42, 0.1);
}

/* === Leather Hexagon === */
.hex-leather {
    background: var(--leather-brown);
    color: var(--cream-gold);
    filter: url(#leather-noise);
}

.hex-leather.hex-spotlight {
    filter: url(#leather-noise) brightness(1.15);
}

.hex-leather.hex-glow {
    filter: url(#leather-noise) brightness(1.07);
}

/* === Hex Typography === */
.hex-cell h2 {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: clamp(16px, 2vw, 22px);
    margin-bottom: 6px;
    line-height: 1.2;
}

.hex-cell p {
    font-size: clamp(10px, 0.75vw, 13px);
    line-height: 1.4;
    opacity: 0.9;
}

/* === Hex Code Block === */
.hex-code {
    font-family: var(--font-code);
    font-size: 10px;
    line-height: 1.5;
    text-align: left;
    padding: 6px 8px;
    border-radius: 4px;
    width: 100%;
    overflow: hidden;
    white-space: pre;
}

.hex-dark .hex-code {
    background: rgba(255, 255, 255, 0.05);
    color: var(--cream-gold);
}

/* === Leather Icons & Labels === */
.leather-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    opacity: 0.85;
}

.leather-label {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: 13px;
    color: var(--warm-amber);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* === Footer === */
#footer {
    position: relative;
    padding: 60px 20px;
    background: var(--deep-indigo);
    text-align: center;
    z-index: 1;
}

.footer-hex-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--warm-amber), var(--rich-saffron), var(--warm-amber));
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-logo {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 24px;
    color: var(--cream-gold);
}

.footer-divider {
    color: var(--warm-amber);
    opacity: 0.5;
}

.footer-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    color: var(--warm-amber);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* === Geometric Floating Shapes === */
.geo-shape {
    position: fixed;
    pointer-events: none;
    z-index: 999;
    opacity: 0.06;
    stroke: var(--cream-gold);
    fill: none;
    stroke-width: 1;
}

/* === Responsive === */
@media (max-width: 900px) {
    :root {
        --hex-width: 120px;
        --hex-height: 139px;
        --hex-offset: 60px;
    }

    .hex-cell p {
        font-size: 9px;
    }

    .hex-code {
        font-size: 8px;
    }

    .hex-cell h2 {
        font-size: 14px;
    }

    .hex-inner {
        padding: 24px 10px;
    }
}

@media (max-width: 600px) {
    :root {
        --hex-width: 100px;
        --hex-height: 116px;
        --hex-offset: 50px;
    }

    .hex-row {
        margin-top: -28px;
    }

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

    .hex-cell p {
        display: none;
    }

    .hex-code {
        display: none;
    }

    .hex-cell h2 {
        font-size: 12px;
    }

    .hex-inner {
        padding: 20px 8px;
    }

    .leather-icon {
        width: 32px;
        height: 32px;
    }

    .leather-label {
        font-size: 10px;
    }

    #logotype {
        font-size: clamp(36px, 8vw, 80px);
    }
}
