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

html {
    scroll-behavior: smooth;
    background: #0a0a0a;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    color: #b0b0b0;
    background: #0a0a0a;
    overflow-x: hidden;
    position: relative;
    /* palette ref: #0d0d0d #e0e0e0 */
}

/* === SCROLL INDICATOR === */
#scroll-indicator {
    position: fixed;
    top: 0;
    right: 0;
    width: 1px;
    height: 0%;
    background: #333333;
    z-index: 100;
    transition: height 0.1s linear;
}

/* === FREQUENCY GATE (Hero) === */
#frequency-gate {
    height: 100vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#center-line {
    position: absolute;
    top: 50%;
    left: 30%;
    width: 40%;
    height: 2px;
    transform: translateY(-50%);
    opacity: 1;
    animation: linePulse 4s ease-in-out infinite;
}

@keyframes linePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

#gate-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawLine 2s ease-out 1s forwards;
}

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

#crystal-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crystal-shape {
    position: absolute;
    width: 30px;
    height: 30px;
}

#hero-title {
    font-family: 'Megrim', cursive;
    font-size: clamp(4rem, 10vw, 9rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 2px 4px #333333;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    line-height: 1;
}

.hero-letter {
    display: inline-block;
    clip-path: inset(100% 0 0 0);
    opacity: 0;
}

.hero-letter.revealed {
    animation: revealLetter 400ms ease-out forwards;
}

@keyframes revealLetter {
    from {
        clip-path: inset(100% 0 0 0);
        opacity: 0;
    }
    to {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

#hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    letter-spacing: 0.08em;
    color: #666666;
    position: relative;
    z-index: 2;
    opacity: 0;
    margin-top: 8px;
}

#hero-subtitle.revealed {
    animation: fadeIn 600ms ease-out forwards;
}

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

/* === VOID BETWEEN === */
#void-between {
    height: 50vh;
    background: #0a0a0a;
    position: relative;
    transition: background 0.5s ease;
}

#void-rule {
    position: absolute;
    left: 50%;
    top: 0;
    width: 0.5px;
    height: 100%;
    background: #1a1a1a;
}

/* === MANIFESTO === */
#manifesto {
    min-height: 80vh;
    background: #0a0a0a;
    position: relative;
    display: flex;
    align-items: center;
    padding: 10vh 0;
}

#manifesto-text {
    position: relative;
    left: 20%;
    width: 40%;
    z-index: 2;
}

.manifesto-line {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 2.0;
    letter-spacing: 0.03em;
    color: #b0b0b0;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
    margin-bottom: 1.5em;
}

.manifesto-line.visible {
    opacity: 1;
    transform: translateY(0);
}

#manifesto-polyhedron {
    position: absolute;
    top: 5%;
    right: 10%;
    width: clamp(120px, 15vw, 200px);
    height: clamp(120px, 15vw, 200px);
    opacity: 0.08;
    animation: slowRotate 66.67s linear infinite;
}

@keyframes slowRotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

/* === GHOST BLOCKS === */
.ghost-block {
    position: absolute;
    background: linear-gradient(90deg, #0e0e0e 0%, #151515 50%, #0e0e0e 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === ARCHIVE LATTICE === */
#archive-lattice {
    position: relative;
}

.project-band {
    height: 60vh;
    background: #0a0a0a;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: default;
}

.project-band.band-alt {
    background: #0e0e0e;
}

.faceted-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
}

.project-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: relative;
}

.project-title {
    font-family: 'Megrim', cursive;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.15em;
    color: #ffffff;
    text-transform: uppercase;
    position: relative;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.project-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #00d4ff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms ease-out;
}

.project-band:hover .project-title::after {
    transform: scaleX(1);
}

.project-crystal {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(150px, 20vw, 300px);
    height: clamp(100px, 14vw, 200px);
    opacity: 0.07;
    transition: opacity 400ms ease-out;
    animation: slowRotate 80s linear infinite;
}

.project-band:hover .project-crystal {
    opacity: 0.2;
}

.project-description {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1vw, 1rem);
    line-height: 1.8;
    letter-spacing: 0.03em;
    color: #b0b0b0;
    text-align: right;
    max-width: 35%;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.project-description.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Skeleton shimmer on bands */
.project-band::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(21,21,21,0.4) 50%, transparent 100%);
    background-size: 200% 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    animation: bandShimmer 1.5s ease-out forwards;
}

@keyframes bandShimmer {
    0% { background-position: 200% 0; opacity: 1; }
    100% { background-position: -200% 0; opacity: 0; }
}

/* === THE SIGNAL === */
#the-signal {
    height: 40vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

#signal-content {
    position: relative;
    z-index: 2;
}

#signal-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.75rem, 0.85vw, 0.9rem);
    letter-spacing: 0.08em;
    color: #ffffff;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

#signal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

#signal-link {
    color: #ffffff;
    text-decoration: none;
    position: relative;
}

#signal-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #00d4ff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms ease-out;
}

#signal-link:hover {
    color: #00d4ff;
    transition: color 200ms ease-out;
}

#signal-link:hover::after {
    transform: scaleX(1);
}

#exit-line {
    position: absolute;
    bottom: 15%;
    left: 30%;
    width: 40%;
    height: 2px;
    animation: linePulseOut 4s ease-in-out infinite reverse;
}

@keyframes linePulseOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* === VERTEX SCATTER === */
#vertex-scatter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #manifesto-text {
        left: 10%;
        width: 80%;
    }

    #manifesto-polyhedron {
        right: 5%;
        top: 2%;
        opacity: 0.04;
    }

    .project-content {
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 5% 8%;
    }

    .project-title {
        text-align: left;
        width: 100%;
    }

    .project-description {
        text-align: left;
        max-width: 100%;
    }

    .project-band {
        height: auto;
        min-height: 50vh;
        padding: 8vh 0;
    }

    #void-between {
        height: 30vh;
    }
}

@media (max-width: 480px) {
    .faceted-divider {
        display: none;
    }

    .project-band {
        border-top: 0.5px solid #1a1a1a;
    }
}
