/* ====================================
   DDAZZL.com — Crystalline Vault
   Navy-Metallic | Glassmorphic | Parallax
   ==================================== */

/* --- Custom Properties --- */
:root {
    --color-deep-bg: #0a0e1a;
    --color-surface-bg: #131830;
    --color-card-surface: rgba(200, 210, 230, 0.08);
    --color-card-border: rgba(180, 200, 240, 0.15);
    --color-primary-text: #d8dde8;
    --color-secondary-text: #7a849b;
    --color-accent-glow: #3a6bff;
    --color-metallic: #b8c4e0;
    --color-hover: #5b8aff;
    --color-warm-accent: #c9a84c;
    --font-headline: 'Jost', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--color-primary-text);
    background: var(--color-deep-bg);
    overflow-x: hidden;
}

/* --- Scroll Indicator (Right Edge Dots) --- */
.scroll-indicator {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 100;
}

.scroll-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-secondary-text);
    opacity: 0.3;
    transition: opacity 0.5s ease, background 0.5s ease, box-shadow 0.5s ease;
    cursor: pointer;
}

.scroll-indicator .dot.active {
    opacity: 1;
    background: var(--color-accent-glow);
    box-shadow: 0 0 8px var(--color-accent-glow), 0 0 20px rgba(58, 107, 255, 0.3);
}

/* --- Floating Particles --- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -10px;
    width: 2px;
    height: 2px;
    background: var(--color-metallic);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100vh) translateX(30px);
        opacity: 0;
    }
}

/* --- Sections (Full Viewport) --- */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Progressive darkening */
.section-surface {
    background: linear-gradient(180deg, #131830 0%, #0f1428 100%);
}

.section-descent {
    background: linear-gradient(180deg, #0f1428 0%, #0c1122 100%);
}

.section-chamber {
    background: linear-gradient(180deg, #0c1122 0%, #0a0e1a 100%);
}

.section-vault {
    background: linear-gradient(180deg, #0a0e1a 0%, #070a14 100%);
}

.section-echo {
    background: #060912;
}

/* --- Depth Halos --- */
.depth-halo {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(58, 107, 255, 0.05) 0%, transparent 70%);
}

.halo-hero {
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.halo-descent {
    width: 400px;
    height: 400px;
    top: 30%;
    left: 25%;
}

.halo-chamber {
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.halo-vault {
    width: 700px;
    height: 700px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(58, 107, 255, 0.06) 0%, transparent 70%);
}

/* ====================================
   SECTION 1 — THE SURFACE (Hero)
   ==================================== */
.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.crystal-cluster {
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
    animation: crystalSpin 30s linear infinite;
}

.crystal-svg {
    width: 100%;
    height: 100%;
}

@keyframes crystalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.crystal-bg-element {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(58, 107, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}

/* Brand Name Letter Animation */
.brand-name {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.15em;
    color: var(--color-primary-text);
    display: flex;
    gap: 0.02em;
}

.brand-name .letter {
    display: inline-block;
    opacity: 0;
    filter: blur(8px);
    animation: letterReveal 0.6s ease-out forwards;
}

@keyframes letterReveal {
    from {
        opacity: 0;
        filter: blur(8px);
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-secondary-text);
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll Cue */
.scroll-cue {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--color-accent-glow));
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.scroll-chevron {
    animation: chevronBounce 2s ease-in-out infinite;
}

@keyframes chevronBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ====================================
   SECTION 2 — THE DESCENT
   ==================================== */
.descent-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    width: 100%;
    padding: 0 60px;
    align-items: start;
    position: relative;
    z-index: 10;
}

.card-descent {
    margin-top: 0;
}

.descent-text {
    margin-top: 120px;
    padding-right: 40px;
}

.descent-heading {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.03em;
    color: var(--color-primary-text);
    line-height: 1.15;
    margin-bottom: 20px;
}

.descent-body {
    color: var(--color-secondary-text);
    font-size: 1rem;
    line-height: 1.8;
}

/* --- Glassmorphic Cards --- */
.glass-card {
    position: relative;
    padding: 40px;
    background: var(--color-card-surface);
    border: 1px solid var(--color-card-border);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

@supports (backdrop-filter: blur(1px)) {
    .glass-card {
        backdrop-filter: blur(20px) saturate(1.4);
    }
}

@supports not (backdrop-filter: blur(1px)) {
    .glass-card {
        background: rgba(19, 24, 48, 0.9);
    }
}

/* Prismatic border overlay */
.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    background: linear-gradient(135deg, rgba(58, 107, 255, 0.12), rgba(184, 196, 224, 0.06), rgba(201, 168, 76, 0.1));
    background-size: 200% 200%;
    animation: borderShift 8s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.5;
    z-index: -1;
}

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

/* Mouse glow effect (controlled via JS) */
.glass-card .glow-effect {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(58, 107, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.glass-card:hover .glow-effect {
    opacity: 1;
}

.card-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent-glow);
    display: block;
    margin-bottom: 16px;
}

.card-title {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: -0.03em;
    color: var(--color-primary-text);
    margin-bottom: 16px;
}

.card-body {
    color: var(--color-secondary-text);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.card-detail {
    color: var(--color-secondary-text);
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

/* Prismatic Line Divider Inside Cards */
.prismatic-line {
    height: 1px;
    width: 100%;
    margin: 20px 0;
    background: linear-gradient(90deg, var(--color-accent-glow), var(--color-metallic), var(--color-warm-accent));
    background-size: 200% 100%;
    animation: prismaticShift 8s linear infinite;
    position: relative;
    z-index: 1;
}

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

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-warm-accent);
    display: block;
    margin-bottom: 20px;
}

/* ====================================
   SECTION 3 — THE CHAMBER
   ==================================== */
.chamber-band {
    width: 100%;
    padding: 80px 60px;
    position: relative;
    z-index: 10;
}

/* Prismatic Divider Lines */
.prismatic-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-accent-glow) 20%,
        var(--color-metallic) 50%,
        var(--color-warm-accent) 80%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: prismaticShift 8s linear infinite;
    margin: 40px 0;
    transform: rotate(-1deg);
}

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

.card-chamber {
    padding: 36px;
}

.card-stagger-1 {
    margin-top: 0;
}

.card-stagger-2 {
    margin-top: 60px;
}

.card-stagger-3 {
    margin-top: 30px;
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

/* ====================================
   SECTION 4 — THE VAULT
   ==================================== */
.section-vault {
    min-height: 100vh;
}

.vault-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.vault-crystal-large {
    width: min(70vw, 500px);
    height: min(70vw, 500px);
    opacity: 0.6;
    animation: crystalSpin 60s linear infinite reverse;
}

.vault-svg {
    width: 100%;
    height: 100%;
}

.vault-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    text-align: center;
    padding: 40px;
}

.vault-heading {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    letter-spacing: -0.03em;
    color: var(--color-primary-text);
    margin-bottom: 24px;
}

.vault-text {
    color: var(--color-secondary-text);
    font-size: 1.05rem;
    line-height: 1.85;
    max-width: 480px;
    margin: 0 auto;
}

/* ====================================
   SECTION 5 — THE ECHO (Footer)
   ==================================== */
.section-echo {
    min-height: 50vh;
}

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

.echo-glow {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(58, 107, 255, 0.06) 0%, transparent 70%);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: echoGlowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes echoGlowPulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.echo-text {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: -0.02em;
    color: var(--color-metallic);
    position: relative;
    z-index: 2;
}

.echo-label {
    margin-top: 32px;
    color: var(--color-secondary-text);
    opacity: 0.5;
}

/* ====================================
   REVEAL ANIMATIONS
   ==================================== */
.reveal-element {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger siblings */
.card-stagger-1.reveal-element { transition-delay: 0ms; }
.card-stagger-2.reveal-element { transition-delay: 150ms; }
.card-stagger-3.reveal-element { transition-delay: 300ms; }

/* ====================================
   REDUCED MOTION
   ==================================== */
@media (prefers-reduced-motion: reduce) {
    .reveal-element {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .brand-name .letter {
        opacity: 1;
        filter: none;
        animation: none;
    }

    .hero-tagline {
        opacity: 1;
        animation: none;
    }

    .scroll-cue {
        opacity: 1;
        animation: none;
    }

    .particle {
        animation: none;
        display: none;
    }

    .crystal-cluster,
    .vault-crystal-large {
        animation: none;
    }

    .prismatic-divider,
    .prismatic-line,
    .glass-card::before {
        animation: none;
    }

    .scroll-line {
        animation: none;
        opacity: 0.5;
    }

    .scroll-chevron {
        animation: none;
    }

    .echo-glow {
        animation: none;
    }
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 900px) {
    .descent-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 30px;
    }

    .descent-text {
        margin-top: 0;
        padding-right: 0;
    }

    .chamber-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .card-stagger-1,
    .card-stagger-2,
    .card-stagger-3 {
        margin-top: 0;
    }

    .chamber-band {
        padding: 60px 30px;
    }

    .scroll-indicator {
        right: 14px;
    }

    .scroll-indicator .dot {
        width: 5px;
        height: 5px;
    }
}

@media (max-width: 600px) {
    .descent-layout {
        padding: 0 20px;
    }

    .glass-card {
        padding: 28px;
    }

    .chamber-band {
        padding: 40px 20px;
    }

    .vault-content {
        padding: 20px;
    }
}
