/* JJUGGL.com - Art Deco Chrome Metallic Design */

/* ========== CSS Custom Properties ========== */
:root {
    --color-obsidian: #0D0D0D;
    --color-charcoal: #1A1A1E;
    --color-deep: #2A2A30;
    --color-chrome: #C0C0C0;
    --color-mercury: #8A8A8F;
    --color-gold: #D4A853;
    --color-platinum: #E8E4DF;
    --color-rose-gold: #B76E79;
    --color-champagne: #F7E7CE;

    --gradient-hero: linear-gradient(135deg, #0D0D0D 0%, #1A1A1E 40%, #2A2A30 70%, #0D0D0D 100%);
    --gradient-chrome: linear-gradient(90deg, #8A8A8F, #C0C0C0, #E8E4DF, #C0C0C0, #8A8A8F);
    --gradient-gold: linear-gradient(45deg, #D4A853, #F7E7CE, #D4A853);

    --font-display: 'Poiret One', cursive;
    --font-serif: 'Cormorant Garamond', serif;
    --font-body: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========== 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;
    line-height: 1.7;
    color: var(--color-platinum);
    background-color: var(--color-obsidian);
    overflow-x: hidden;
}

/* ========== Chrome Spheres (Ambient) ========== */
.chrome-spheres {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #E8E4DF, #C0C0C0, #8A8A8F, #1A1A1E);
    opacity: 0.18;
}

.sphere-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 5%;
    animation: sphereDrift1 32s ease-in-out infinite;
}

.sphere-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 8%;
    animation: sphereDrift2 28s ease-in-out infinite;
}

.sphere-3 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    left: 50%;
    opacity: 0.12;
    animation: sphereDrift3 38s ease-in-out infinite;
}

.sphere-4 {
    width: 60px;
    height: 60px;
    top: 30%;
    right: 20%;
    animation: sphereDrift4 25s ease-in-out infinite;
}

.sphere-5 {
    width: 150px;
    height: 150px;
    top: 70%;
    left: 15%;
    opacity: 0.1;
    animation: sphereDrift5 35s ease-in-out infinite;
}

.sphere-6 {
    width: 40px;
    height: 40px;
    top: 45%;
    left: 40%;
    animation: sphereDrift6 30s ease-in-out infinite;
}

.sphere-7 {
    width: 90px;
    height: 90px;
    top: 20%;
    right: 35%;
    opacity: 0.15;
    animation: sphereDrift7 33s ease-in-out infinite;
}

@keyframes sphereDrift1 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(40px, 30px, 0); }
    50% { transform: translate3d(-20px, 60px, 0); }
    75% { transform: translate3d(30px, -20px, 0); }
}

@keyframes sphereDrift2 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-30px, -40px, 0); }
    50% { transform: translate3d(50px, -20px, 0); }
    75% { transform: translate3d(-20px, 30px, 0); }
}

@keyframes sphereDrift3 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-60px, 20px, 0); }
    50% { transform: translate3d(30px, -40px, 0); }
    75% { transform: translate3d(50px, 30px, 0); }
}

@keyframes sphereDrift4 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(20px, 50px, 0); }
    50% { transform: translate3d(-40px, 20px, 0); }
    75% { transform: translate3d(10px, -30px, 0); }
}

@keyframes sphereDrift5 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(50px, -30px, 0); }
    50% { transform: translate3d(-30px, -50px, 0); }
    75% { transform: translate3d(-20px, 40px, 0); }
}

@keyframes sphereDrift6 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-25px, 35px, 0); }
    50% { transform: translate3d(35px, -15px, 0); }
    75% { transform: translate3d(-15px, -25px, 0); }
}

@keyframes sphereDrift7 {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(35px, -25px, 0); }
    50% { transform: translate3d(-20px, 45px, 0); }
    75% { transform: translate3d(40px, 15px, 0); }
}

/* ========== Navigation ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 2rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

.nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 1px;
    background: var(--gradient-chrome);
    opacity: 0.3;
}

.nav-inner {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-chrome);
    text-decoration: none;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.3s var(--ease-out);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width 0.3s var(--ease-out), left 0.3s var(--ease-out);
}

.nav-link:hover {
    color: var(--color-champagne);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* ========== Scenes (Full Viewport) ========== */
.scene {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ========== Scene 1: Hero ========== */
.scene-hero {
    background: var(--gradient-hero);
    z-index: 2;
}

.sunburst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(800px, 90vw);
    height: min(800px, 90vw);
    animation: sunburstRotate 60s linear infinite;
    opacity: 0.6;
}

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

@keyframes sunburstRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.sunburst-inverted {
    animation: sunburstRotateInvert 60s linear infinite;
}

@keyframes sunburstRotateInvert {
    from { transform: translate(-50%, -50%) rotate(360deg); }
    to { transform: translate(-50%, -50%) rotate(0deg); }
}

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

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--color-platinum);
    margin-bottom: 1.5rem;
    display: inline-flex;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: scale(0) rotate(-15deg);
    transition: all 0.8s var(--ease-spring);
    background: var(--gradient-chrome);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title .char.revealed {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.hero-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--color-mercury);
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s var(--ease-out) 1.2s, transform 1s var(--ease-out) 1.2s;
}

.hero-tagline.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

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

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

/* ========== Scene 2: Introduction ========== */
.scene-intro {
    background: var(--color-charcoal);
    position: relative;
    flex-direction: row;
    padding: 4rem 2rem;
}

.scene-intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(192, 192, 192, 0.03) 49px, rgba(192, 192, 192, 0.03) 50px),
        repeating-linear-gradient(90deg, transparent, transparent 49px, rgba(192, 192, 192, 0.03) 49px, rgba(192, 192, 192, 0.03) 50px);
    pointer-events: none;
}

.concentric-arches {
    position: absolute;
    top: 0;
    width: 300px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#archesLeft {
    left: 0;
}

#archesRight {
    right: 0;
}

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

.arch-path {
    transition: opacity 0.8s var(--ease-out);
}

.intro-content {
    position: relative;
    z-index: 5;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 6rem 2rem;
}

.deco-divider {
    width: 200px;
    margin: 2rem auto;
    opacity: 0.6;
}

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

.pull-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.125rem, 2.5vw, 1.75rem);
    line-height: 1.8;
    color: var(--color-platinum);
    margin: 2rem 0;
    position: relative;
}

.quote-mark {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--color-gold);
    vertical-align: -0.3em;
    opacity: 0.6;
    line-height: 0;
}

.intro-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-mercury);
    max-width: 55ch;
    margin: 2rem auto 0;
}

/* ========== Scene 3: Features ========== */
.scene-features {
    background: linear-gradient(180deg, var(--color-charcoal) 0%, var(--color-obsidian) 50%, var(--color-charcoal) 100%);
    padding: 8rem 2rem;
    min-height: 100vh;
}

.features-bg-grid {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 99px, rgba(212, 168, 83, 0.02) 99px, rgba(212, 168, 83, 0.02) 100px),
        repeating-linear-gradient(90deg, transparent, transparent 99px, rgba(212, 168, 83, 0.02) 99px, rgba(212, 168, 83, 0.02) 100px);
    pointer-events: none;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
    z-index: 5;
}

.section-title .word {
    display: inline-block;
    background: var(--gradient-chrome);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cards-constellation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.feature-card {
    position: relative;
    padding: 2px;
    background: var(--gradient-chrome);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-out);
    transform-style: preserve-3d;
    perspective: 800px;
}

.feature-card:nth-child(2) {
    transform: translateY(2rem);
}

.feature-card:nth-child(3) {
    transform: translateY(-1rem);
}

.feature-card:nth-child(4) {
    transform: translateY(1.5rem);
}

.feature-card:hover {
    box-shadow: 0 20px 60px rgba(212, 168, 83, 0.1), 0 0 30px rgba(192, 192, 192, 0.05);
}

.card-border {
    position: absolute;
    inset: 0;
    border-radius: 2px;
    pointer-events: none;
}

.card-inner {
    background: var(--color-obsidian);
    padding: 2.5rem;
    border-radius: 1px;
    position: relative;
}

.card-icon {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    color: var(--color-champagne);
    margin-bottom: 1rem;
    font-weight: 400;
}

.card-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-mercury);
}

/* ========== Scene 4: Interlude ========== */
.scene-interlude {
    background: var(--color-obsidian);
    padding: 6rem 2rem;
    position: relative;
}

.pyramid-bg {
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 20%, 80% 100%, 20% 100%);
    background: linear-gradient(180deg, rgba(42, 42, 48, 0.3) 0%, rgba(13, 13, 13, 0) 100%);
    pointer-events: none;
}

.zigzag-border-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 5;
}

.zigzag-bottom {
    top: auto;
    bottom: 0;
}

.zigzag-border-svg {
    width: 100%;
    height: 100%;
}

.zigzag-draw {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.2s ease-in-out;
}

.zigzag-draw.drawn {
    stroke-dashoffset: 0;
}

.interlude-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.kinetic-phrase {
    margin-bottom: 3rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 1rem;
}

.phrase-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease-spring);
}

.phrase-word.revealed {
    opacity: 1;
    transform: translateY(0);
}

.phrase-light {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--color-chrome);
}

.phrase-bold {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--color-mercury);
    text-transform: lowercase;
}

.phrase-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--color-rose-gold);
}

.phrase-display {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: 0.2em;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.interlude-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-mercury);
    max-width: 60ch;
    margin: 0 auto;
}

/* ========== Scene 5: Closure ========== */
.scene-closure {
    background: linear-gradient(180deg, var(--color-obsidian) 0%, var(--color-charcoal) 50%, var(--color-obsidian) 100%);
    padding: 8rem 2rem;
}

.closure-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.winged-disc {
    margin: 0 auto 3rem;
    opacity: 0.7;
}

.winged-disc-svg {
    display: block;
    margin: 0 auto;
}

.closure-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    margin-bottom: 2rem;
}

.closure-title .word {
    display: inline-block;
    background: var(--gradient-chrome);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.closure-statement {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.8;
    color: var(--color-mercury);
    margin-bottom: 3rem;
}

.contact-link {
    display: inline-block;
    text-decoration: none;
    position: relative;
    padding: 0.75rem 2rem;
    transition: transform 0.3s var(--ease-spring);
}

.contact-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-image: var(--gradient-chrome) 1;
    opacity: 0.5;
    transition: opacity 0.3s var(--ease-out);
}

.contact-link:hover {
    transform: scale(1.05);
}

.contact-link:hover::before {
    opacity: 1;
}

.contact-text {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.05em;
    background: var(--gradient-chrome);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.greek-key-border {
    position: absolute;
    bottom: 2rem;
    left: 5%;
    width: 90%;
    height: 30px;
    opacity: 0.3;
}

.greek-key-svg {
    width: 100%;
    height: 100%;
}

/* ========== Reveal Animation ========== */
.reveal-element {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

/* ========== Kinetic Text ========== */
.kinetic-text .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotate(-10deg);
    transition: opacity 0.5s var(--ease-spring), transform 0.5s var(--ease-spring);
}

.kinetic-text.visible .word {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Stagger delays for kinetic words */
.kinetic-text .word:nth-child(1) { transition-delay: 0ms; }
.kinetic-text .word:nth-child(2) { transition-delay: 80ms; }
.kinetic-text .word:nth-child(3) { transition-delay: 160ms; }
.kinetic-text .word:nth-child(4) { transition-delay: 240ms; }
.kinetic-text .word:nth-child(5) { transition-delay: 320ms; }
.kinetic-text .word:nth-child(6) { transition-delay: 400ms; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .cards-constellation {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .feature-card:nth-child(2),
    .feature-card:nth-child(3),
    .feature-card:nth-child(4) {
        transform: translateY(0);
    }

    .nav-inner {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .concentric-arches {
        width: 150px;
        opacity: 0.5;
    }

    .scene-intro {
        padding: 2rem 1rem;
    }

    .intro-content {
        padding: 4rem 1rem;
    }

    .kinetic-phrase {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .nav-link {
        font-size: 0.65rem;
    }

    .nav-inner {
        gap: 1rem;
    }

    .concentric-arches {
        display: none;
    }

    .card-inner {
        padding: 1.5rem;
    }
}
