/* aiice.dev - Holographic Crystalline Design */

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

::selection {
    background: #7df9ff;
    color: #080b14;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #080b14;
    color: #e8edf5;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.8;
    overflow-x: hidden;
}

/* === Snow Particles === */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    background: #e8edf5;
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(1px);
    animation: snowfall linear infinite;
}

@keyframes snowfall {
    0% { transform: translateY(-10px) translateX(0); }
    50% { transform: translateY(50vh) translateX(20px); }
    100% { transform: translateY(100vh) translateX(-10px); }
}

/* === Navigation === */
.frost-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px clamp(2rem, 5vw, 6rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(26, 39, 68, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(125, 249, 255, 0.1);
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.frost-nav.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-brand {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: conic-gradient(from 0deg, #7df9ff, #c7a4ff, #ff6b9d, #ffd43b, #7df9ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #8b9cc0;
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link:hover {
    color: #7df9ff;
}

/* === Sections === */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* === Caustic Background === */
.caustic-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg at 50% 50%, rgba(125, 249, 255, 0.05), rgba(199, 164, 255, 0.03), rgba(255, 107, 157, 0.02), rgba(255, 212, 59, 0.03), rgba(125, 249, 255, 0.05));
    mix-blend-mode: screen;
    animation: causticRotate 20s linear infinite;
    z-index: 0;
}

@keyframes causticRotate {
    to { transform: rotate(360deg); }
}

/* === Surface Section (Hero) === */
.surface-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #080b14;
    z-index: 2;
}

.crystal-lattice {
    position: relative;
    z-index: 5;
}

.hex-hero-svg {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.hex-hero-svg.visible {
    opacity: 1;
}

.hex-ring {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 2s cubic-bezier(0.23, 1, 0.32, 1);
}

.hex-ring.animate {
    stroke-dashoffset: 0;
}

.hex-ring-1 { opacity: 0.4; }
.hex-ring-2 { opacity: 0.25; }
.hex-ring-3 { opacity: 0.15; }

.hero-logotype {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    background: conic-gradient(from 0deg, #7df9ff, #c7a4ff, #ff6b9d, #ffd43b, #7df9ff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: prismShift 6s linear infinite;
    position: relative;
    z-index: 10;
    margin-top: -80px;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.23, 1, 0.32, 1), letter-spacing 1.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-logotype.visible {
    opacity: 1;
    letter-spacing: 0.25em;
}

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

.hero-tagline {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: #8b9cc0;
    margin-top: 24px;
    z-index: 10;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-tagline.visible {
    opacity: 1;
}

.scroll-chevron {
    position: absolute;
    bottom: 40px;
    z-index: 10;
    animation: chevronPulse 2s ease-in-out infinite;
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(8px); }
}

/* === Fracture Divider === */
.fracture-divider {
    position: relative;
    height: 60px;
    z-index: 5;
}

.fracture-svg {
    width: 100%;
    height: 60px;
    filter: drop-shadow(0 0 6px rgba(125, 249, 255, 0.4));
}

.fracture-line {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.fracture-line.animate {
    stroke-dashoffset: 0;
}

/* === Mirror Section === */
.mirror-section {
    background: #101624;
    padding: clamp(2rem, 5vw, 6rem);
}

.split-screen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    min-height: 80vh;
}

.section-heading {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    color: #e8edf5;
    margin-bottom: 24px;
    line-height: 1.2;
}

.body-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.8;
    color: #e8edf5;
    margin-bottom: 16px;
}

.highlight {
    color: #7df9ff;
    font-weight: 400;
}

/* === Hex Grid === */
.hex-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 24px;
}

.hex-node {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(125, 249, 255, 0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s;
    position: relative;
    background: rgba(26, 39, 68, 0.4);
}

.hex-node:hover {
    border-color: rgba(125, 249, 255, 0.6);
    background: rgba(125, 249, 255, 0.1);
}

.hex-node.active {
    border-color: #7df9ff;
    background: rgba(125, 249, 255, 0.15);
}

.hex-node .node-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #7df9ff;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.hex-node:hover .node-dot,
.hex-node.active .node-dot {
    opacity: 1;
}

.hex-node .node-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #7df9ff;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.hex-node:hover .node-tooltip {
    opacity: 1;
}

/* === Rabbit Hole === */
.rabbit-hole {
    height: 30vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.alice-silhouette {
    animation: aliceTumble 30s linear infinite;
}

@keyframes aliceTumble {
    to { transform: rotate(360deg); }
}

.falling-light {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #7df9ff;
    box-shadow: 0 0 12px #7df9ff, 0 0 24px #c7a4ff;
    animation: fallingLight 4s ease-in infinite;
}

@keyframes fallingLight {
    0% { top: -10px; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* === Network Section === */
.network-section {
    background: #101624;
    padding: clamp(4rem, 8vw, 8rem) clamp(2rem, 5vw, 6rem);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.frost-card {
    background: rgba(26, 39, 68, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(125, 249, 255, 0.15);
    border-radius: 8px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1), transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.frost-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.frost-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, rgba(125, 249, 255, 0.03), rgba(199, 164, 255, 0.02), rgba(255, 107, 157, 0.01), transparent);
    mix-blend-mode: screen;
    animation: causticRotate 20s linear infinite;
    opacity: 0;
    transition: opacity 0.4s;
}

.frost-card:hover {
    border-color: rgba(125, 249, 255, 0.4);
}

.frost-card:hover::before {
    opacity: 1;
}

.card-heading {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #e8edf5;
    margin-bottom: 12px;
}

.card-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.7;
    color: #8b9cc0;
}

/* === Lattice Footer === */
.lattice-section {
    min-height: 60vh;
    background: #080b14;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 48px;
    position: relative;
}

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

.lattice-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.lattice-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: #7df9ff;
    margin-bottom: 8px;
}

.lattice-close {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #8b9cc0;
}

/* === Responsive === */
@media (max-width: 768px) {
    .split-screen {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .hex-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
