@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0d0a1a;
    color: #fef0e1;
    font-family: 'Instrument Sans', sans-serif;
    cursor: crosshair;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Noise Overlay */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Particle Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Scroll Progress */
#scroll-progress {
    position: fixed;
    bottom: 20%;
    right: 12px;
    width: 2px;
    height: 60%;
    z-index: 50;
    background: rgba(168, 158, 196, 0.15);
    border-radius: 1px;
}

#scroll-progress-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #7b2ff7, #f72fa0, #3cffd0);
    border-radius: 1px;
    transition: height 0.1s linear;
}

/* Section Base */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    z-index: 1;
}

/* Grid Lines Background */
.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.04) 0px,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px,
            transparent calc(100% / 8)
        );
}

/* ===================== */
/* HERO SECTION          */
/* ===================== */
#hero {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(180deg, #0d0a1a 0%, #2a2040 100%);
}

.hero-domain {
    position: relative;
    z-index: 2;
    margin-left: 70%;
    margin-top: -10vh;
    transform: translateX(-50%);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    background: linear-gradient(90deg, #f72fa0, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.hero-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: heroCharIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-char[data-index="0"] { animation-delay: 0ms; }
.hero-char[data-index="1"] { animation-delay: 80ms; }
.hero-char[data-index="2"] { animation-delay: 160ms; }
.hero-char[data-index="3"] { animation-delay: 240ms; }
.hero-char[data-index="4"] { animation-delay: 320ms; }
.hero-char[data-index="5"] { animation-delay: 400ms; }
.hero-char[data-index="6"] { animation-delay: 480ms; }

@keyframes heroCharIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
        font-weight: 400;
    }
    60% {
        opacity: 1;
        transform: translateY(-5px);
        font-weight: 700;
    }
    80% {
        transform: translateY(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        font-weight: 700;
    }
}

.hero-gradient-field {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    z-index: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(123, 47, 247, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 30% 70%, rgba(247, 47, 160, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-3%, 2%) scale(1.05);
    }
    100% {
        transform: translate(2%, -1%) scale(0.98);
    }
}

/* ===================== */
/* MANIFESTO SECTION     */
/* ===================== */
#manifesto {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5vh 8vw;
    background: linear-gradient(180deg, #2a2040 0%, #0d0a1a 100%);
}

.manifesto-line {
    margin-bottom: 8vh;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.manifesto-line-1 {
    text-align: left;
    padding-left: 5%;
}

.manifesto-line-2 {
    text-align: right;
    padding-right: 3%;
    transform: translateX(4px);
}

.manifesto-line-3 {
    text-align: left;
    padding-left: 20%;
}

.manifesto-word {
    font-family: 'Instrument Sans', sans-serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
    display: inline;
}

.manifesto-word.heavy {
    font-weight: 700;
    color: #fef0e1;
}

.manifesto-word.light {
    font-weight: 400;
    color: #a89ec4;
}

/* ===================== */
/* ICONS SECTION         */
/* ===================== */
#icons {
    background: #0d0a1a;
    position: relative;
}

.icon-field {
    position: relative;
    width: 100%;
    height: 100vh;
}

.icon-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #3cffd0;
    cursor: crosshair;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.icon-item.visible {
    opacity: 1;
}

.icon-item svg {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-item:hover svg {
    transform: scale(1.15);
}

.icon-item svg path,
.icon-item svg circle,
.icon-item svg line,
.icon-item svg polygon,
.icon-item svg polyline {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-item.visible svg path,
.icon-item.visible svg circle,
.icon-item.visible svg line,
.icon-item.visible svg polygon,
.icon-item.visible svg polyline {
    stroke-dashoffset: 0;
}

.icon-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #a89ec4;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-item:hover .icon-label {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== */
/* GRADIENT INTERLUDE    */
/* ===================== */
#gradient-interlude {
    position: relative;
}

.gradient-morph {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(from var(--gradient-angle), #7b2ff7, #f72fa0, #3cffd0, #7b2ff7);
    animation: gradientRotate 20s linear infinite;
}

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

/* ===================== */
/* PARTICLE LANDSCAPE    */
/* ===================== */
#particle-landscape {
    background: linear-gradient(180deg, #0d0a1a 0%, #000000 100%);
    position: relative;
}

.landscape-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(180deg, transparent 0%, #000000 100%);
    z-index: 2;
    pointer-events: none;
}

/* ===================== */
/* DECORATIVE BORDERS    */
/* ===================== */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg, rgba(123, 47, 247, 0.4) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

#hero::before {
    display: none;
}

#gradient-interlude::before {
    display: none;
}

.section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 3%;
    width: 40%;
    height: 1px;
    background: linear-gradient(270deg, rgba(247, 47, 160, 0.3) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

#gradient-interlude::after {
    display: none;
}

/* ===================== */
/* RESPONSIVE            */
/* ===================== */
@media (max-width: 768px) {
    .hero-domain {
        margin-left: 50%;
        font-size: clamp(3rem, 15vw, 6rem);
    }

    .manifesto-line-3 {
        padding-left: 5%;
    }

    .icon-item svg {
        width: 36px;
        height: 36px;
    }

    #scroll-progress {
        right: 6px;
    }
}
