/* ============================================
   DDAZZL.com — Holographic Prismatic Design
   ============================================ */

/* === Custom Properties === */
:root {
    --prism-1: #9b5de5;
    --prism-2: #00f5d4;
    --prism-3: #f15bb5;
    --prism-4: #fee440;
    --void: #09090f;
    --void-secondary: #0d0d1a;
    --frost: #e8e8f0;
    --mist: #8888a0;
    --holographic: linear-gradient(135deg, #9b5de5, #00f5d4, #f15bb5, #fee440);
    --holographic-wide: linear-gradient(135deg, #9b5de5 0%, #00f5d4 25%, #f15bb5 50%, #fee440 75%, #9b5de5 100%);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--void);
    color: var(--frost);
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* === Gossamer Navigation === */
#gossamer-nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 40px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#gossamer-nav.visible {
    opacity: 1;
}

.nav-thread {
    position: absolute;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: var(--holographic-wide);
    background-size: 100% 400%;
    animation: threadShimmer 10s ease infinite;
    opacity: 0.25;
}

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

.nav-node {
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    background: var(--holographic);
    background-size: 300% 300%;
    animation: prismSweep 10s ease infinite;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-node:hover {
    transform: rotate(45deg) scale(1.5);
    box-shadow: 0 0 20px 4px rgba(155, 93, 229, 0.5);
}

.nav-node.active {
    transform: rotate(45deg) scale(1.4);
    box-shadow: 0 0 16px 3px rgba(0, 245, 212, 0.4);
}

.node-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: rotate(-45deg) translateY(-50%);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--mist);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.nav-node:hover .node-label {
    opacity: 1;
    transform: rotate(-45deg) translateY(-50%) translateX(4px);
}

/* === Phases (Sections) === */
.phase {
    position: relative;
    z-index: 1;
}

/* === Phase 1: Void === */
#void {
    height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--void);
}

.void-pixel {
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: pixelAppear 1.2s ease 1.2s forwards;
    box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.8);
}

@keyframes pixelAppear {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 1; transform: scale(1); box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.6); }
}

/* === Phase 2: Ignition === */
#ignition {
    height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.prismatic-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    pointer-events: none;
}

.burst-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid transparent;
    opacity: 0;
}

.ring-1 {
    width: 100px;
    height: 100px;
    border-color: var(--prism-1);
    animation: burstExpand 2s ease 2.2s forwards;
}

.ring-2 {
    width: 200px;
    height: 200px;
    border-color: var(--prism-2);
    animation: burstExpand 2s ease 2.5s forwards;
}

.ring-3 {
    width: 320px;
    height: 320px;
    border-color: var(--prism-3);
    animation: burstExpand 2s ease 2.8s forwards;
}

.ring-4 {
    width: 460px;
    height: 460px;
    border-color: var(--prism-4);
    animation: burstExpand 2s ease 3.1s forwards;
}

@keyframes burstExpand {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    40% { opacity: 0.7; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

/* Wordmark */
.wordmark {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: clamp(60px, 12vw, 140px);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: wordmarkReveal 1.5s ease 3s forwards;
}

@keyframes wordmarkReveal {
    0% { opacity: 0; filter: blur(20px); }
    100% { opacity: 1; filter: blur(0); }
}

.letter {
    display: inline-block;
    opacity: 0;
    animation: letterIn 0.8s ease forwards;
    text-shadow: 0 0 30px rgba(155, 93, 229, 0.3);
}

.letter[data-color="prism-1"] { color: var(--prism-1); animation-delay: 3.0s; }
.letter[data-color="prism-2"] { color: var(--prism-2); animation-delay: 3.15s; }
.letter[data-color="prism-3"] { color: var(--prism-3); animation-delay: 3.3s; }
.letter[data-color="prism-4"] { color: var(--prism-4); animation-delay: 3.45s; }

@keyframes letterIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.5); filter: blur(10px); }
    60% { opacity: 1; transform: translateY(-5px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.wordmark.settled .letter {
    color: var(--frost);
    text-shadow: 0 0 40px rgba(155, 93, 229, 0.2), 0 0 80px rgba(0, 245, 212, 0.1);
    transition: color 2s ease, text-shadow 2s ease;
}

.tagline {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: var(--mist);
    letter-spacing: 0.15em;
    margin-top: 24px;
    opacity: 0;
    animation: fadeUp 1s ease 4.2s forwards;
    text-shadow: 0 0 20px rgba(155, 93, 229, 0.1);
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* === Phase 3: Revelation === */
#revelation {
    padding: 100px 0 200px;
    position: relative;
}

/* Prism Fragment Decorations */
.prism-fragment {
    position: absolute;
    background: var(--holographic);
    background-size: 400% 400%;
    animation: prismSweep 10s ease infinite, prismDrift 25s ease-in-out infinite;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
}

@keyframes prismSweep {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 0%; }
    75% { background-position: 0% 100%; }
}

@keyframes prismDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 10px) rotate(-3deg); }
    75% { transform: translate(20px, 15px) rotate(8deg); }
}

.frag-1 {
    width: 120px;
    height: 80px;
    top: 5%;
    left: 10%;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-delay: 0s;
}

.frag-2 {
    width: 90px;
    height: 90px;
    top: 15%;
    right: 8%;
    clip-path: polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%);
    animation-delay: -5s;
    opacity: 0.06;
}

.frag-3 {
    width: 150px;
    height: 100px;
    top: 35%;
    left: 5%;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation-delay: -10s;
    opacity: 0.05;
}

.frag-4 {
    width: 70px;
    height: 70px;
    top: 50%;
    right: 12%;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-delay: -15s;
}

.frag-5 {
    width: 100px;
    height: 60px;
    top: 65%;
    left: 15%;
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
    animation-delay: -8s;
    opacity: 0.07;
}

.frag-6 {
    width: 80px;
    height: 110px;
    top: 78%;
    right: 6%;
    clip-path: polygon(50% 0%, 100% 33%, 80% 100%, 20% 100%, 0% 33%);
    animation-delay: -12s;
    opacity: 0.05;
}

.frag-7 {
    width: 60px;
    height: 60px;
    top: 90%;
    left: 50%;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-delay: -20s;
    opacity: 0.06;
}

/* Content Planes */
.content-plane {
    position: relative;
    width: 80vw;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(13, 13, 26, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(155, 93, 229, 0.15);
    border-radius: 4px;
    padding: 60px 50px;
    transform: perspective(1200px) rotateX(2deg) rotateY(-1deg);
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 1;
}

.content-plane.visible {
    opacity: 1;
    transform: perspective(1200px) rotateX(2deg) rotateY(-1deg) translateZ(0);
}

.content-plane:hover {
    border-color: rgba(155, 93, 229, 0.4);
    box-shadow: 0 0 30px 4px rgba(155, 93, 229, 0.12), 0 0 60px 8px rgba(0, 245, 212, 0.06);
}

/* Plane offset variations */
.plane-1 {
    margin-left: 8%;
    transform: perspective(1200px) rotateX(2deg) rotateY(-1deg) translateZ(-50px);
}

.plane-1.visible {
    transform: perspective(1200px) rotateX(2deg) rotateY(-1deg) translateZ(0);
}

.plane-2 {
    margin-left: 14%;
    transform: perspective(1200px) rotateX(1.5deg) rotateY(1deg) translateZ(-50px);
}

.plane-2.visible {
    transform: perspective(1200px) rotateX(1.5deg) rotateY(1deg) translateZ(0);
}

.plane-3 {
    margin-left: 5%;
    transform: perspective(1200px) rotateX(2.5deg) rotateY(-0.5deg) translateZ(-50px);
}

.plane-3.visible {
    transform: perspective(1200px) rotateX(2.5deg) rotateY(-0.5deg) translateZ(0);
}

/* Plane glow effect */
.plane-glow {
    position: absolute;
    inset: -1px;
    border-radius: 4px;
    background: var(--holographic);
    background-size: 400% 400%;
    animation: prismSweep 10s ease infinite;
    opacity: 0;
    z-index: -1;
    filter: blur(20px);
    transition: opacity 0.5s ease;
}

.content-plane.flash .plane-glow {
    opacity: 0.3;
    animation: glowFlash 0.8s ease forwards, prismSweep 10s ease infinite;
}

@keyframes glowFlash {
    0% { opacity: 0.5; }
    100% { opacity: 0.05; }
}

.plane-inner {
    position: relative;
}

/* Interstitial Voids */
.interstitial-void {
    height: 120px;
    position: relative;
}

/* Section Markers */
.section-marker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.diamond-bullet {
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    background: var(--holographic);
    background-size: 300% 300%;
    animation: prismSweep 10s ease infinite;
    display: inline-block;
    flex-shrink: 0;
}

.marker-text {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    color: var(--mist);
    letter-spacing: 0.1em;
}

/* Section Headings */
.section-heading {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 52px);
    letter-spacing: 0.08em;
    color: var(--frost);
    margin-bottom: 16px;
    text-shadow: 0 0 30px rgba(155, 93, 229, 0.15);
}

/* Gossamer Divider */
.gossamer-divider {
    height: 2px;
    width: 100%;
    background: var(--holographic-wide);
    background-size: 400% 100%;
    animation: prismSweep 8s ease infinite;
    opacity: 0.5;
    margin-bottom: 28px;
    border-radius: 1px;
}

/* Body Text */
.body-text {
    color: var(--frost);
    margin-bottom: 18px;
    text-shadow: 0 0 30px rgba(155, 93, 229, 0.15);
    max-width: 700px;
}

/* Plane Coordinates */
.plane-coordinates {
    display: block;
    margin-top: 24px;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: var(--mist);
    opacity: 0.6;
    letter-spacing: 0.05em;
}

/* Crystal Diagram (Plane 2) */
.crystal-diagram {
    position: relative;
    width: 200px;
    height: 120px;
    margin: 30px 0 10px;
}

.crystal-node {
    position: absolute;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    background: var(--holographic);
    background-size: 300% 300%;
    animation: prismSweep 10s ease infinite;
}

.node-a { top: 10px; left: 90px; }
.node-b { top: 90px; left: 20px; }
.node-c { top: 90px; left: 170px; }

.crystal-edge {
    position: absolute;
    height: 1px;
    background: var(--holographic);
    background-size: 300% 300%;
    animation: prismSweep 10s ease infinite;
    opacity: 0.3;
    transform-origin: left center;
}

.edge-ab {
    top: 14px;
    left: 94px;
    width: 105px;
    transform: rotate(130deg);
}

.edge-bc {
    top: 94px;
    left: 24px;
    width: 150px;
    transform: rotate(0deg);
}

.edge-ca {
    top: 94px;
    left: 174px;
    width: 105px;
    transform: rotate(-130deg);
}

/* Facet Grid (Plane 3) */
.facet-grid {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    gap: 8px;
    margin: 30px 0 10px;
}

.facet {
    width: 50px;
    height: 50px;
    background: rgba(13, 13, 26, 0.5);
    border: 1px solid rgba(155, 93, 229, 0.2);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.facet:hover {
    border-color: rgba(0, 245, 212, 0.6);
    background: rgba(155, 93, 229, 0.1);
    box-shadow: 0 0 15px 2px rgba(0, 245, 212, 0.2);
}

.facet:nth-child(odd) {
    border-color: rgba(0, 245, 212, 0.15);
}

.facet:nth-child(3n) {
    border-color: rgba(241, 91, 181, 0.15);
}

/* === Phase 4: Constellation === */
#constellation {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px 20px;
}

.constellation-field {
    width: 80vw;
    max-width: 1000px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.constellation-field.visible {
    opacity: 1;
    transform: scale(1);
}

.constellation-svg {
    width: 100%;
    height: auto;
}

.const-line {
    stroke: url(#prismGradient);
    stroke: var(--prism-1);
    stroke-width: 0.5;
    opacity: 0.3;
    stroke-dasharray: 4 4;
    animation: dashMove 20s linear infinite;
}

@keyframes dashMove {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 100; }
}

.const-star {
    fill: var(--prism-2);
    filter: drop-shadow(0 0 6px rgba(0, 245, 212, 0.6));
    animation: starPulse 3s ease infinite;
}

.const-star:nth-child(odd) {
    fill: var(--prism-1);
    filter: drop-shadow(0 0 6px rgba(155, 93, 229, 0.6));
    animation-delay: -1.5s;
}

@keyframes starPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.constellation-message {
    text-align: center;
    margin-top: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.constellation-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.constellation-heading {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 4vw, 48px);
    letter-spacing: 0.08em;
    color: var(--frost);
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(155, 93, 229, 0.2);
}

.constellation-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.7;
    color: var(--frost);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 0 30px rgba(155, 93, 229, 0.15);
}

/* === Phase 5: Dispersion === */
#dispersion {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px 20px;
    overflow: hidden;
}

.shatter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 700px;
    margin-bottom: 80px;
    perspective: 800px;
}

.shard {
    background: rgba(13, 13, 26, 0.6);
    border: 1px solid rgba(155, 93, 229, 0.25);
    padding: 12px 20px;
    clip-path: polygon(5% 0%, 95% 5%, 100% 90%, 3% 100%);
    transition: transform 1.5s ease, opacity 1.5s ease;
    transform: translateZ(0) rotate(0deg);
}

.shard span {
    font-family: 'Syncopate', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 2vw, 22px);
    letter-spacing: 0.08em;
    color: var(--frost);
    text-shadow: 0 0 20px rgba(155, 93, 229, 0.2);
}

.shard:nth-child(1) { border-color: rgba(155, 93, 229, 0.3); }
.shard:nth-child(2) { border-color: rgba(0, 245, 212, 0.3); }
.shard:nth-child(3) { border-color: rgba(241, 91, 181, 0.3); }
.shard:nth-child(4) { border-color: rgba(254, 228, 64, 0.3); }
.shard:nth-child(5) { border-color: rgba(155, 93, 229, 0.3); }
.shard:nth-child(6) { border-color: rgba(0, 245, 212, 0.3); }
.shard:nth-child(7) { border-color: rgba(241, 91, 181, 0.3); }
.shard:nth-child(8) { border-color: rgba(254, 228, 64, 0.3); }
.shard:nth-child(9) { border-color: rgba(155, 93, 229, 0.3); }
.shard:nth-child(10) { border-color: rgba(0, 245, 212, 0.3); }

.shatter-container.dispersed .shard {
    opacity: 0;
}

.shatter-container.dispersed .shard:nth-child(1) { transform: translate(-200px, -150px) rotate(-25deg) scale(0.3); }
.shatter-container.dispersed .shard:nth-child(2) { transform: translate(180px, -200px) rotate(30deg) scale(0.4); }
.shatter-container.dispersed .shard:nth-child(3) { transform: translate(-150px, 100px) rotate(-15deg) scale(0.2); }
.shatter-container.dispersed .shard:nth-child(4) { transform: translate(250px, 50px) rotate(20deg) scale(0.3); }
.shatter-container.dispersed .shard:nth-child(5) { transform: translate(-100px, -250px) rotate(-40deg) scale(0.3); }
.shatter-container.dispersed .shard:nth-child(6) { transform: translate(120px, 180px) rotate(35deg) scale(0.2); }
.shatter-container.dispersed .shard:nth-child(7) { transform: translate(-280px, -50px) rotate(-10deg) scale(0.4); }
.shatter-container.dispersed .shard:nth-child(8) { transform: translate(200px, -120px) rotate(45deg) scale(0.2); }
.shatter-container.dispersed .shard:nth-child(9) { transform: translate(-50px, 200px) rotate(-30deg) scale(0.3); }
.shatter-container.dispersed .shard:nth-child(10) { transform: translate(50px, 250px) rotate(15deg) scale(0.2); }

/* Final Diamond */
.final-diamond {
    opacity: 0;
    transition: opacity 1.5s ease 0.5s;
}

.final-diamond.visible {
    opacity: 1;
}

.diamond-shape {
    width: 24px;
    height: 24px;
    transform: rotate(45deg);
    background: var(--holographic);
    background-size: 400% 400%;
    animation: prismSweep 10s ease infinite, diamondPulse 3s ease infinite;
    box-shadow: 0 0 30px 8px rgba(155, 93, 229, 0.3), 0 0 60px 16px rgba(0, 245, 212, 0.15);
}

@keyframes diamondPulse {
    0%, 100% {
        box-shadow: 0 0 30px 8px rgba(155, 93, 229, 0.3), 0 0 60px 16px rgba(0, 245, 212, 0.15);
    }
    50% {
        box-shadow: 0 0 50px 12px rgba(155, 93, 229, 0.5), 0 0 90px 24px rgba(0, 245, 212, 0.25);
    }
}

/* === Light Wipe Reveal Animation === */
.light-wipe {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1s ease;
}

.light-wipe.revealed {
    clip-path: inset(0 0% 0 0);
}

/* === Responsive === */
@media (max-width: 768px) {
    .content-plane {
        width: 92vw;
        padding: 40px 28px;
        transform: perspective(1200px) rotateX(1deg) rotateY(0deg);
    }

    .plane-1, .plane-2, .plane-3 {
        margin-left: auto;
        margin-right: auto;
    }

    .plane-1.visible {
        transform: perspective(1200px) rotateX(1deg) rotateY(0deg) translateZ(0);
    }

    .plane-2.visible {
        transform: perspective(1200px) rotateX(1deg) rotateY(0deg) translateZ(0);
    }

    .plane-3.visible {
        transform: perspective(1200px) rotateX(1deg) rotateY(0deg) translateZ(0);
    }

    #gossamer-nav {
        width: 30px;
    }

    .node-label {
        display: none;
    }

    .wordmark {
        letter-spacing: 0.15em;
    }

    .section-heading {
        letter-spacing: 0.04em;
    }

    .prism-fragment {
        display: none;
    }
}

@media (max-width: 480px) {
    .content-plane {
        padding: 30px 20px;
    }

    .facet-grid {
        grid-template-columns: repeat(3, 40px);
    }

    .facet {
        width: 40px;
        height: 40px;
    }

    .shatter-container {
        gap: 8px;
    }

    .shard {
        padding: 8px 14px;
    }
}
