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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a1628;
    color: #b8c9e0;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    line-height: 1.72;
    overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.nav-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.3s ease;
}

.nav-toggle:hover {
    transform: scale(1.15);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-overlay nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.nav-overlay nav a {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #b8c9e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-overlay nav a:hover {
    color: #c9a84c;
}

/* ===== CHAPTERS ===== */
.chapter {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.chapter-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.chapter-label {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b8ab0;
    margin-bottom: 1.5rem;
}

.chapter-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2.8rem, 7vw, 6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e8eef5;
    font-weight: 400;
    margin-bottom: 2rem;
}

.chapter-content p {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.72;
    color: #b8c9e0;
    max-width: 580px;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
                transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ===== CHAPTER 1 - THE COLLECTION ===== */
.chapter-1 {
    background: linear-gradient(180deg, #0a1628 0%, #0f2847 100%);
}

.sunburst {
    position: absolute;
    width: 80vmin;
    height: 80vmin;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 120s linear infinite;
    z-index: 1;
}

.sunburst span {
    position: absolute;
    width: 1px;
    height: 40vmin;
    left: 50%;
    bottom: 50%;
    transform-origin: bottom center;
    transform: rotate(calc(var(--i) * 10deg));
    background: linear-gradient(to top, rgba(201,168,76,1), rgba(201,168,76,0.15));
}

.sunburst-flare {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,168,76,0.6) 0%, transparent 60%);
    animation: pulseFl 4s ease-in-out infinite;
}

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

@keyframes pulseFl {
    0%, 100% { width: 40px; height: 40px; }
    50% { width: 60px; height: 60px; }
}

.domain-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2.8rem, 7vw, 6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e8eef5;
    font-weight: 400;
    text-align: center;
    overflow: hidden;
}

.domain-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    clip-path: inset(100% 0 0 0);
    animation: slideUp 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

.tagline {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    color: #6b8ab0;
    text-align: center;
    opacity: 0;
    animation: fadeIn 800ms ease forwards;
    animation-delay: 1.2s;
}

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

/* ===== CHAPTER 2 - THE DISSOLUTION ===== */
.chapter-2 {
    background: #0f2847;
}

.chevron-divider {
    display: block;
    margin: 2rem auto;
}

/* Palette: #2a5a8c (atmosphere), #a07830 (accent warm) */
.chapter-2 .chapter-content {
    border-top: 1px solid #2a5a8c;
    border-color: transparent;
}

.contact-link:active {
    color: #a07830;
}

/* ===== CHAPTER 3 - THE TRANSFORMATION ===== */
.chapter-3 {
    background: linear-gradient(180deg, #0f2847 0%, #1a3d6e 100%);
}

.polyhedron-container {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    perspective: 600px;
    position: relative;
}

.polyhedron {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: polyRotate 30s linear infinite;
}

@keyframes polyRotate {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    100% { transform: rotateY(360deg) rotateX(180deg); }
}

.poly-face {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1px solid #c9a84c;
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.2);
    background: rgba(201, 168, 76, 0.03);
}

.face-1  { transform: rotateY(0deg) translateZ(60px); left: 60px; top: 60px; }
.face-2  { transform: rotateY(60deg) translateZ(60px); left: 60px; top: 60px; }
.face-3  { transform: rotateY(120deg) translateZ(60px); left: 60px; top: 60px; }
.face-4  { transform: rotateY(180deg) translateZ(60px); left: 60px; top: 60px; }
.face-5  { transform: rotateY(240deg) translateZ(60px); left: 60px; top: 60px; }
.face-6  { transform: rotateY(300deg) translateZ(60px); left: 60px; top: 60px; }
.face-7  { transform: rotateX(60deg) rotateY(30deg) translateZ(60px); left: 60px; top: 60px; }
.face-8  { transform: rotateX(60deg) rotateY(90deg) translateZ(60px); left: 60px; top: 60px; }
.face-9  { transform: rotateX(60deg) rotateY(150deg) translateZ(60px); left: 60px; top: 60px; }
.face-10 { transform: rotateX(-60deg) rotateY(30deg) translateZ(60px); left: 60px; top: 60px; }
.face-11 { transform: rotateX(-60deg) rotateY(90deg) translateZ(60px); left: 60px; top: 60px; }
.face-12 { transform: rotateX(-60deg) rotateY(150deg) translateZ(60px); left: 60px; top: 60px; }

.polyhedron-shadow {
    width: 160px;
    height: 40px;
    margin: 20px auto 0;
    background: radial-gradient(ellipse, rgba(42, 90, 140, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

/* ===== CHAPTER 4 - THE REVELATION ===== */
.chapter-4 {
    background: #0a1628;
}

.diamond-flare {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(201,168,76,0.4) 0%, rgba(201,168,76,0.1) 30%, transparent 60%);
    animation: diamondPulse 5s ease-in-out infinite;
    z-index: 1;
}

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

.diamond-frame {
    width: 250px;
    height: 250px;
    border: 1px solid #c9a84c;
    transform: rotate(45deg);
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.diamond-inner {
    transform: rotate(-45deg);
    padding: 2rem;
    text-align: center;
}

.manifesto {
    font-family: 'Poiret One', cursive;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #e8eef5;
    line-height: 1.6;
    font-weight: 400;
}

/* ===== CHAPTER 5 - THE RETURN ===== */
.chapter-5 {
    background: linear-gradient(180deg, #0f2847 0%, #0a1628 100%);
}

.sunburst-dense span {
    opacity: 0.5;
    transform-origin: bottom center;
    transform: rotate(calc(var(--i) * 5deg));
}

.contact {
    text-align: center;
    margin-top: 3rem;
}

.contact-link {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #6b8ab0;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
    padding-bottom: 2px;
}

.contact-link:hover {
    border-bottom-color: #6b8ab0;
}

/* ===== FLOATING ELEMENTS (desktop only) ===== */
.floating-elements {
    display: none;
}

@media (min-width: 1200px) {
    .floating-elements {
        display: block;
    }
}

.float-shape {
    position: fixed;
    z-index: 0;
    animation: float var(--dur, 10s) ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(var(--dist, -25px)); }
}

.float-diamond {
    width: 60px;
    height: 60px;
    border: 1px solid #c9a84c;
    opacity: 0.15;
    transform: rotate(45deg);
}

.float-diamond {
    animation: floatDiamond var(--dur, 10s) ease-in-out infinite;
}

@keyframes floatDiamond {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(var(--dist, -25px)); }
}

.float-circle {
    width: 80px;
    height: 80px;
    border: 1px solid #c9a84c;
    border-radius: 50%;
    opacity: 0.12;
}

.float-hexagon {
    width: 50px;
    height: 50px;
    border: 1px solid #c9a84c;
    opacity: 0.16;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: transparent;
    /* Hexagon needs a background trick for clip-path + border */
}

/* Override hexagon to use box-shadow for border effect with clip-path */
.float-hexagon {
    border: none;
    box-shadow: inset 0 0 0 1px #c9a84c;
}
