/* aiice.quest - Wabi-sabi AI landscape */

:root {
    --gold: #d4a853;
    --teal: #5ba4a4;
    --purple: #7b6e9e;
    --darker-navy: #0c0e14;
    --deep-navy: #101820;
    --mint: #8bcec2;
    --warm-grey: #8a8278;
    --dark-teal: #1a2a2e;
    --parchment: #ece6dc;
    --parchment-dark: #d8d2c8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-navy);
    color: var(--parchment);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Navigation Glyph */
#nav-glyph {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 999;
    opacity: 0.3;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    color: var(--parchment);
}

#nav-glyph:hover {
    opacity: 1;
}

#nav-glyph .nav-icon {
    cursor: pointer;
    display: block;
}

#nav-glyph .nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

#nav-glyph:hover .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#nav-glyph .nav-links a {
    color: var(--parchment);
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
}

#nav-glyph .nav-links a:hover {
    opacity: 1;
    color: var(--gold);
}

/* Chapters */
.chapter {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 80px clamp(40px, 10vw, 160px);
    position: relative;
    overflow: hidden;
}

.chapter-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

/* Typography */
h1.wordmark {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.2rem, 5.5vw, 4.8rem);
    font-weight: 300;
    font-variation-settings: 'opsz' 72, 'WONK' 1;
    letter-spacing: -0.02em;
    color: var(--parchment);
    margin-bottom: 24px;
}

h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 300;
    font-variation-settings: 'opsz' 72, 'WONK' 1;
    letter-spacing: -0.02em;
    color: var(--parchment);
    margin-bottom: 32px;
}

.chapter-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 300;
    color: var(--parchment);
    opacity: 0.85;
    margin-bottom: 24px;
    line-height: 1.8;
}

.scroll-hint {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--warm-grey);
    margin-top: 48px;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Kintsugi Lines */
.kintsugi-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 1px;
}

.kintsugi-final {
    width: 200px;
    margin-top: 48px;
    background: linear-gradient(90deg, var(--gold), var(--gold) 60%, transparent);
}

/* Accent text */
.gold-accent {
    color: var(--gold);
    font-style: italic;
}

.teal-accent {
    color: var(--teal);
}

.purple-accent {
    color: var(--purple);
}

/* Organic Blobs */
.blob {
    position: absolute;
    border-radius: 30% 70% 60% 40% / 60% 30% 70% 40%;
    background: linear-gradient(135deg, rgba(139,206,194,0.06), rgba(91,164,164,0.04), rgba(123,110,158,0.03));
    width: clamp(200px, 30vw, 500px);
    height: clamp(200px, 30vw, 500px);
    animation: blobFloat 20s ease-in-out infinite;
    z-index: 1;
}

.blob-1 {
    right: 10%;
    top: 20%;
    border-radius: 30% 70% 60% 40% / 60% 30% 70% 40%;
}

.blob-2 {
    right: 5%;
    top: 30%;
    border-radius: 60% 40% 30% 70% / 40% 60% 70% 30%;
    animation-delay: -5s;
    width: clamp(150px, 25vw, 400px);
    height: clamp(150px, 25vw, 400px);
}

.blob-3 {
    right: 15%;
    top: 15%;
    border-radius: 40% 60% 70% 30% / 70% 40% 30% 60%;
    animation-delay: -10s;
}

.blob-4 {
    right: 8%;
    bottom: 20%;
    border-radius: 70% 30% 40% 60% / 30% 70% 60% 40%;
    animation-delay: -15s;
    width: clamp(180px, 28vw, 450px);
    height: clamp(180px, 28vw, 450px);
}

.blob-5 {
    right: 12%;
    top: 25%;
    border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    animation-delay: -8s;
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(15px, -20px) rotate(2deg) scale(1.02);
    }
    50% {
        transform: translate(-10px, 15px) rotate(-1deg) scale(0.98);
    }
    75% {
        transform: translate(20px, 10px) rotate(1.5deg) scale(1.01);
    }
}

/* Ridgeline Dividers */
.ridgeline {
    position: relative;
    margin-top: -2px;
    line-height: 0;
}

.ridgeline svg {
    width: 100%;
    height: 120px;
    display: block;
}

.ridgeline svg path {
    fill: var(--dark-teal);
    opacity: 0.3;
}

/* Elevation Marker */
#elevation-marker {
    position: fixed;
    bottom: 24px;
    right: 24px;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--warm-grey);
    opacity: 0.5;
    z-index: 100;
    letter-spacing: 0.05em;
}

/* Chapter reveal animation */
.chapter-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1), transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.chapter-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Final chapter */
.chapter-final {
    min-height: 80vh;
    padding-bottom: 120px;
}
