/* namu.systems - Ethereal Aquarium Hexagonal Design */

:root {
    /* Color Palette */
    --color-teal: #4ECDC4;
    --color-gold: #F7B32B;
    --color-accent-gold: #FFD166;
    --color-navy-dark: #060E1A;
    --color-navy-light: #142840;
    --color-navy-mid: #1A3050;
    --color-navy-subtle: #0A1628;
    --color-pearlescent: #E8F0F2;
    --color-dusty-blue: #B8D4D9;

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Hexagon dimensions */
    --hex-width: 30vw;
    --hex-height: calc(var(--hex-width) * 1.1547);

    /* Spacing */
    --gutter: 1rem;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-navy-subtle) 50%, var(--color-navy-light) 100%);
    font-family: var(--font-body);
    color: var(--color-pearlescent);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    width: 100%;
    min-height: 100vh;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Hexagon Grid System */
.hex-grid {
    display: grid;
    gap: var(--gutter);
    margin-bottom: 2rem;
}

/* Surface Layer: 3 large hexagons */
.surface-layer {
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

/* Middle Layer: 3 hexagons */
.middle-layer {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-left: calc(var(--hex-width) / 4);
}

/* Deep Layer: 3 offset hexagons */
.deep-layer {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-left: -calc(var(--hex-width) / 4);
}

/* Bottom Layer: 3 feature hexagons */
.bottom-layer {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-left: calc(var(--hex-width) / 4);
}

/* Hexagon Base Styles */
.hexagon {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hexagon:hover {
    transform: scale(1.05);
    filter: brightness(1.15);
}

/* Hexagon Content */
.hex-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    position: relative;
}

/* Marble Background */
.marble-bg {
    background:
        linear-gradient(135deg, var(--color-navy-light) 25%, var(--color-navy-mid) 50%, var(--color-navy-light) 75%),
        radial-gradient(ellipse at 30% 40%, rgba(255, 209, 102, 0.12), transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(247, 179, 43, 0.15), transparent 60%);
    background-attachment: fixed;
}

.marble-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(184, 212, 217, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hex-content > * {
    position: relative;
    z-index: 2;
}

/* SVG Vein Paths - Path Drawing Animation */
.vein-path {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

.vein-path path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: draw-vein 2.5s ease-in-out forwards;
}

@keyframes draw-vein {
    to {
        stroke-dashoffset: 0;
    }
}

/* Stagger animation for multiple veins */
.hex-content:nth-child(1) .vein-path path {
    animation-delay: 0.2s;
}

.hex-content:nth-child(2) .vein-path path {
    animation-delay: 0.4s;
}

.hex-content:nth-child(3) .vein-path path {
    animation-delay: 0.6s;
}

/* Fish SVG */
.fish-svg {
    filter: drop-shadow(0 0 8px rgba(78, 205, 196, 0.6));
    animation: fish-float 3s ease-in-out infinite;
}

@keyframes fish-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.fish-svg:nth-of-type(2) {
    animation-delay: 0.5s;
}

.fish-svg:nth-of-type(3) {
    animation-delay: 1s;
}

/* Center Hex Styles */
.center-hex {
    grid-column: 2;
}

.center-content {
    background: radial-gradient(circle at center, rgba(78, 205, 196, 0.2), rgba(6, 14, 26, 0.8));
    box-shadow: inset 0 0 30px rgba(78, 205, 196, 0.3), 0 0 20px rgba(78, 205, 196, 0.2);
}

.center-hex h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-pearlescent);
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.6);
}

/* Flanking Hexagon Styles */
.flanking-hex {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(247, 179, 43, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.flanking-hex .hex-content {
    background: radial-gradient(circle at center, rgba(6, 14, 26, 0.7), rgba(20, 40, 64, 0.9));
}

/* Content Hexagon Styles */
.content-hex {
    background: linear-gradient(135deg, rgba(20, 40, 64, 0.6), rgba(26, 48, 80, 0.6));
}

.content-hex h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--color-pearlescent);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.4);
}

.content-hex p {
    font-family: var(--font-body);
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    font-weight: 400;
    color: var(--color-dusty-blue);
    line-height: 1.5;
}

/* Feature Hexagon Styles */
.feature-hex {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(20, 40, 64, 0.5));
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.feature-hex h2 {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    color: var(--color-gold);
    margin-bottom: 0.8rem;
}

.feature-hex p {
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    color: var(--color-pearlescent);
}

/* Offset Class for Honeycomb Effect */
.offset {
    margin-left: calc(var(--hex-width) / 2);
}

/* Glow Effects */
.hexagon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(78, 205, 196, 0.1), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hexagon:hover::after {
    opacity: 1;
}

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

    .hexagon {
        clip-path: none;
        border-radius: 12px;
        width: 100%;
    }

    .surface-layer {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .middle-layer,
    .deep-layer,
    .bottom-layer {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-left: 0 !important;
    }

    .flanking-hex {
        display: none;
    }

    .center-hex {
        grid-column: 1;
        margin: 1rem auto;
    }

    .center-hex h1 {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    .content-hex h2,
    .feature-hex h2 {
        font-size: clamp(1rem, 3vw, 1.5rem);
    }

    .content-hex p,
    .feature-hex p {
        font-size: clamp(0.8rem, 2vw, 1rem);
    }

    .hex-content {
        padding: 1.5rem;
    }

    .fish-svg {
        width: 60px;
        height: 60px;
    }
}

/* Medium Screens */
@media (max-width: 1200px) {
    :root {
        --hex-width: 25vw;
    }

    .surface-layer {
        grid-template-columns: 0.8fr 1fr 0.8fr;
    }

    .middle-layer,
    .deep-layer {
        margin-left: calc(var(--hex-width) / 6);
    }
}

/* Large Screens */
@media (min-width: 1600px) {
    :root {
        --hex-width: 28vw;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-navy-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-teal);
    border-radius: 4px;
}

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

/* Selection Styling */
::selection {
    background: var(--color-teal);
    color: var(--color-navy-dark);
}
