/* ============================================
   nonri.net — Holographic Mountain Observatory
   ============================================ */

/* CSS Custom Properties */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    /* Color Palette - Holographic Mountain Observatory */
    --color-primary-bg: #0C1020;
    --color-hex-dark: #141830;
    --color-hex-light: #1C2040;
    --color-silhouette: #3A4870;
    --color-accent-blue: #60A0FF;
    --color-accent-green: #80FFB0;
    --color-text-muted: #8898B8;
    --color-text-heading: #E0E8F8;
    --color-accent-pink: #FF6090;
    --color-accent-yellow: #FFD060;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    background: var(--color-primary-bg);
    color: var(--color-text-muted);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.75;
    font-size: clamp(0.85rem, 1vw, 1rem);
}

/* ── Typography ── */
.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(2.4rem, 6vw, 5rem);
    color: var(--color-text-heading);
    letter-spacing: 0.08em;
    background: linear-gradient(90deg, var(--color-accent-pink), var(--color-accent-blue), var(--color-accent-green), var(--color-accent-yellow), var(--color-accent-pink));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographicText 6s linear infinite;
}

@keyframes holographicText {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.hero-subtitle {
    margin-top: 1rem;
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.summit-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--color-accent-blue);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hex-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--color-text-heading);
    letter-spacing: 0.04em;
    margin: 0.75rem 0 0.5rem;
}

.hex-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.75;
}

/* ── Mountain Backdrop ── */
.mountain-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    transition: transform 0.1s linear;
    fill: var(--color-silhouette);
}

.mountain-layer-far {
    height: 55%;
    opacity: 0.6;
}

.mountain-layer-mid {
    height: 50%;
    opacity: 0.8;
}

.mountain-layer-near {
    height: 45%;
    opacity: 1;
}

/* ── Hero Section ── */
.hero {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-title-wrap {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1.2s ease-out 0.3s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hex Grid Section ── */
.hex-section {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem 8rem;
}

.hex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Offset odd rows for honeycomb effect */
.hex-cell:nth-child(3n+1) {
    /* first column — no offset */
}

.hex-cell:nth-child(3n+2) {
    transform: translateY(50px);
}

.hex-cell:nth-child(3n+3) {
    /* third column — no offset */
}

.hex-cell {
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, var(--color-hex-dark), var(--color-hex-light));
    aspect-ratio: 1 / 1.1547;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.hex-cell:nth-child(3n+2).visible {
    transform: translateY(50px);
}

/* Holographic shimmer border — uses a pseudo-element behind the clip-path */
.hex-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: conic-gradient(from var(--angle), var(--color-accent-pink), var(--color-accent-blue), var(--color-accent-green), var(--color-accent-yellow), var(--color-accent-pink));
    z-index: -1;
    animation: borderShimmer 6s linear infinite;
    padding: 2px;
}

@keyframes borderShimmer {
    0% { --angle: 0deg; }
    100% { --angle: 360deg; }
}

.hex-inner {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, var(--color-hex-dark), var(--color-hex-light));
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
}

/* Hex cell hover glow */
.hex-cell:hover .hex-inner {
    background: linear-gradient(135deg, var(--color-hex-light), #243060);
}

.hex-cell:hover .summit-label {
    text-shadow: 0 0 12px rgba(96, 160, 255, 0.6);
}

/* ── Footer ── */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--color-silhouette);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hex-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hex-cell:nth-child(3n+2) {
        transform: translateY(0);
    }

    .hex-cell:nth-child(3n+2).visible {
        transform: translateY(0);
    }

    .hex-cell:nth-child(even) {
        transform: translateY(40px);
    }

    .hex-cell:nth-child(even).visible {
        transform: translateY(40px);
    }
}

@media (max-width: 600px) {
    .hex-grid {
        grid-template-columns: 1fr;
        gap: 3px;
        max-width: 320px;
    }

    .hex-cell:nth-child(even) {
        transform: translateY(0);
    }

    .hex-cell:nth-child(even).visible {
        transform: translateY(0);
    }

    .hex-cell:nth-child(3n+2) {
        transform: translateY(0);
    }

    .hex-cell:nth-child(3n+2).visible {
        transform: translateY(0);
    }

    .hex-inner {
        padding: 2rem 1rem;
    }

    .hex-section {
        padding: 2rem 1rem 6rem;
    }
}
