/* nonri.net - Jewel-Tone Editorial Design */

/* Color Variables */
:root {
    --color-sapphire: #2B5B84;
    --color-emerald: #2D6B4F;
    --color-ruby: #8B2252;
    --color-amber: #C49A3C;
    --color-amethyst: #6B4D8A;
    --color-plum-black: #1A1624;
    --color-dark-gray: #2E2A3B;
    --color-cream: #E8E2D8;

    --font-display: "Nunito", sans-serif;
    --font-body: "Source Serif 4", serif;
    --font-accent: "Space Grotesk", sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--color-plum-black);
}

body {
    font-family: var(--font-body);
    color: var(--color-cream);
}

/* Main viewport container with scroll-snap */
.viewport-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Individual spreads */
.spread {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

.spread-1 {
    background-color: var(--color-plum-black);
}

.spread-2 {
    background-color: var(--color-plum-black);
}

.spread-3 {
    background-color: var(--color-plum-black);
}

.spread-4 {
    background-color: var(--color-plum-black);
}

.spread-5 {
    background-color: var(--color-plum-black);
}

/* Gemstone facet shapes - overlapping polygons with semi-transparent jewel colors */
.gemstone-shape {
    position: absolute;
    opacity: 0.15;
    mix-blend-mode: screen;
    pointer-events: none;
}

.spread-1 .shape-1 {
    width: 400px;
    height: 400px;
    background-color: var(--color-sapphire);
    clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
    top: 15%;
    left: 10%;
    animation: float-shape 6s ease-in-out infinite;
}

.spread-1 .shape-2 {
    width: 300px;
    height: 300px;
    background-color: var(--color-amber);
    clip-path: polygon(50% 0%, 100% 38.2%, 81.8% 100%, 18.2% 100%, 0% 38.2%);
    bottom: 10%;
    right: 15%;
    animation: float-shape 7s ease-in-out infinite 0.5s;
}

.spread-2 .shape-3 {
    width: 350px;
    height: 350px;
    background-color: var(--color-emerald);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    top: 20%;
    right: 20%;
    animation: float-shape 8s ease-in-out infinite;
}

.spread-3 .shape-4 {
    width: 450px;
    height: 450px;
    background-color: var(--color-ruby);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    top: 10%;
    left: 5%;
    animation: float-shape 7.5s ease-in-out infinite 0.3s;
}

.spread-3 .shape-5 {
    width: 280px;
    height: 280px;
    background-color: var(--color-amber);
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    bottom: 15%;
    right: 10%;
    animation: float-shape 6.5s ease-in-out infinite 0.8s;
}

.spread-4 .shape-6 {
    width: 500px;
    height: 500px;
    background-color: var(--color-amber);
    clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
    bottom: 5%;
    left: 15%;
    animation: float-shape 9s ease-in-out infinite;
}

.spread-5 .shape-7 {
    width: 380px;
    height: 380px;
    background-color: var(--color-amethyst);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    top: 15%;
    left: 20%;
    animation: float-shape 8.5s ease-in-out infinite 0.4s;
}

.spread-5 .shape-8 {
    width: 320px;
    height: 320px;
    background-color: var(--color-sapphire);
    clip-path: polygon(50% 0%, 100% 38.2%, 81.8% 100%, 18.2% 100%, 0% 38.2%);
    bottom: 20%;
    right: 12%;
    animation: float-shape 7s ease-in-out infinite 0.6s;
}

@keyframes float-shape {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(3deg);
    }
}

/* Spread content text wrapping */
.spread-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    text-align: center;
}

/* Display heading H1 */
.display-heading {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    text-transform: lowercase;
}

/* Display heading H2 */
.display-heading.h2-size {
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.01em;
}

/* Spread 1 title color */
.spread-1 .display-heading {
    color: var(--color-sapphire);
}

/* Spread 2 title color */
.spread-2 .display-heading {
    color: var(--color-emerald);
}

/* Spread 3 title color */
.spread-3 .display-heading {
    color: var(--color-ruby);
}

/* Spread 4 title color */
.spread-4 .display-heading {
    color: var(--color-amber);
}

/* Spread 5 title color */
.spread-5 .display-heading {
    color: var(--color-amethyst);
}

/* Body text */
.body-text {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-cream);
    text-align: center;
}

/* Navigation dots at bottom */
.nav-dots {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
    opacity: 0;
    animation: fade-in-dots 0.6s ease-out 1.2s forwards;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid var(--color-cream);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: dot-appear 0.4s ease-out forwards;
}

/* Staggered appearance for each dot */
.nav-dot:nth-child(1) {
    animation-delay: 1.2s;
}
.nav-dot:nth-child(2) {
    animation-delay: 1.3s;
}
.nav-dot:nth-child(3) {
    animation-delay: 1.4s;
}
.nav-dot:nth-child(4) {
    animation-delay: 1.5s;
}
.nav-dot:nth-child(5) {
    animation-delay: 1.6s;
}

.nav-dot.active {
    background-color: var(--color-cream);
    transform: scale(1.3);
}

.nav-dot:hover {
    border-color: var(--color-amber);
    transform: scale(1.2);
}

@keyframes fade-in-dots {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes dot-appear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Entry animation - black screen then reveal */
@keyframes entry-fade {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

.spread-content {
    animation: entry-fade 1.2s ease-out;
}

/* Responsive design for tablets */
@media (max-width: 1024px) {
    .spread {
        padding: 40px;
    }

    .nav-dots {
        bottom: 30px;
        gap: 12px;
    }

    .nav-dot {
        width: 10px;
        height: 10px;
    }
}

/* Responsive design for mobile */
@media (max-width: 640px) {
    .spread {
        padding: 30px;
    }

    .spread-content {
        max-width: 100%;
    }

    .nav-dots {
        bottom: 20px;
        gap: 10px;
    }

    .nav-dot {
        width: 8px;
        height: 8px;
        border-width: 1px;
    }

    .gemstone-shape {
        display: none;
    }
}
