/* recycle.makeup - Dark Academia Apothecary Cosmetic Design */

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Source Sans 3', sans-serif;
    background-color: #1A1610;
    color: #3A3228;
}

body {
    background: linear-gradient(135deg, #2A2420 0%, #4A3A30 100%);
}

/* Viewport and 3D Perspective */
.viewport {
    perspective: 1200px;
    perspective-origin: center center;
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background-color: #1A1610;
}

/* Depth Planes */
.depth-plane {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Background Plane (z: 0) */
.background-plane {
    z-index: 1;
    transform: translateZ(-400px);
}

.leather-texture {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        repeating-conic-gradient(
            from 45deg at 0 0,
            #2A2420,
            #2A2420 1px,
            #1A1610 1px,
            #1A1610 2px
        );
    opacity: 0;
    animation: fadeInTexture 1s ease-out 0.5s forwards;
}

@keyframes fadeInTexture {
    to {
        opacity: 0.6;
    }
}

#decorative-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    filter: blur(1px) saturate(0.7);
}

/* Middle Plane (z: 1) */
.middle-plane {
    z-index: 5;
    transform: translateZ(0px);
}

/* Spine Line Animation */
.spine-line {
    position: absolute;
    width: 2px;
    height: 0%;
    left: 50%;
    top: 0;
    background: linear-gradient(180deg, rgba(200, 152, 72, 0) 0%, #C89848 50%, rgba(200, 152, 72, 0) 100%);
    opacity: 0;
    animation: drawSpine 0.7s ease-out 0.5s forwards;
    transform: translateX(-1px);
}

@keyframes drawSpine {
    to {
        height: 60vh;
        opacity: 1;
    }
}

.book-spine-element {
    position: absolute;
    width: 40px;
    height: 180px;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%) rotateZ(-90deg);
    background: linear-gradient(90deg, #8A6A4A 0%, #C89848 50%, #8A6A4A 100%);
    border: 1px solid #C89848;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: appearSpine 0.5s ease-out 1.2s forwards;
}

@keyframes appearSpine {
    to {
        opacity: 0.7;
    }
}

.spine-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(0.6rem, 1vw, 0.8rem);
    color: #F0E8D8;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.middle-content {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Foreground Plane (z: 2) */
.foreground-plane {
    z-index: 10;
    transform: translateZ(400px);
}

.foreground-content {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Isometric Tool Icons */
.tools-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 4vh;
}

.isometric-icon {
    width: clamp(60px, 8vw, 120px);
    height: clamp(60px, 8vw, 120px);
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(200, 152, 72, 0.3));
    animation: floatIcon 0.8s ease-out forwards;
}

.mirror-icon {
    animation-delay: 1.5s;
}

.lipstick-icon {
    animation-delay: 1.7s;
}

.brush-icon {
    animation-delay: 1.9s;
}

.pipette-icon {
    animation-delay: 2.1s;
}

.palette-icon {
    animation-delay: 2.3s;
}

.jar-icon {
    animation-delay: 2.5s;
}

@keyframes floatIcon {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to {
        opacity: 0.8;
        transform: translateY(0) scale(1);
    }
}

/* Geometric Accent Lines */
.geometric-accents {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sharp-angle-line {
    position: absolute;
    background: linear-gradient(45deg, transparent 0%, #C89848 50%, transparent 100%);
    opacity: 0.5;
}

.angle-1 {
    width: 300px;
    height: 2px;
    top: 30%;
    left: 10%;
    transform: rotate(45deg);
    animation: slideInLine 0.8s ease-out 0.8s forwards;
    opacity: 0;
}

.angle-2 {
    width: 250px;
    height: 2px;
    top: 60%;
    right: 15%;
    transform: rotate(-45deg);
    animation: slideInLine 0.8s ease-out 0.9s forwards;
    opacity: 0;
}

.angle-3 {
    width: 200px;
    height: 2px;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    animation: slideInLine 0.8s ease-out 1s forwards;
    opacity: 0;
}

@keyframes slideInLine {
    to {
        opacity: 0.5;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    z-index: 15;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    animation: fadeInContent 1.2s ease-out 0.3s forwards;
    opacity: 0;
}

@keyframes fadeInContent {
    to {
        opacity: 1;
    }
}

.main-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(2rem, 4.5vw, 4rem);
    font-weight: 700;
    color: #F0E8D8;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 400;
    color: #C89848;
    letter-spacing: 0.03em;
    margin-top: 1.5rem;
}

/* Narrative Section */
.narrative-section {
    position: relative;
    z-index: 15;
    width: 100%;
    min-height: 100vh;
    padding: 10vh 5vw;
    background: linear-gradient(180deg, rgba(26, 22, 16, 0.95) 0%, rgba(42, 36, 32, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.narrative-content {
    max-width: 700px;
    animation: slideUpContent 0.8s ease-out forwards;
}

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

.section-heading {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 700;
    color: #F0E8D8;
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #C89848 0%, transparent 100%);
}

.narrative-text,
.journal-text,
.closing-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    font-weight: 400;
    color: #3A3228;
    line-height: 1.75;
    letter-spacing: 0.005em;
}

/* Tools Section */
.tools-section {
    position: relative;
    z-index: 15;
    width: 100%;
    min-height: 100vh;
    padding: 10vh 5vw;
    background: linear-gradient(180deg, rgba(42, 36, 32, 0.95) 0%, rgba(26, 22, 16, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tools-info {
    max-width: 700px;
    animation: slideUpContent 0.8s ease-out forwards;
}

.tools-description {
    margin-top: 2rem;
    background: rgba(200, 152, 72, 0.1);
    padding: 2rem;
    border-left: 3px solid #C89848;
    border-radius: 2px;
}

.tools-description p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    font-weight: 400;
    color: #3A3228;
    line-height: 1.75;
}

/* Journal Section */
.journal-section {
    position: relative;
    z-index: 15;
    width: 100%;
    min-height: 100vh;
    padding: 10vh 5vw;
    background: linear-gradient(180deg, rgba(26, 22, 16, 0.95) 0%, rgba(42, 36, 32, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.journal-content {
    max-width: 700px;
    animation: slideUpContent 0.8s ease-out forwards;
}

.journal-entry {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(138, 106, 74, 0.2) 0%, rgba(200, 152, 72, 0.1) 100%);
    border: 1px solid rgba(200, 152, 72, 0.3);
    border-radius: 2px;
}

.journal-date {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 700;
    color: #C89848;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

/* Closing Section */
.closing-section {
    position: relative;
    z-index: 15;
    width: 100%;
    min-height: 100vh;
    padding: 10vh 5vw;
    background: linear-gradient(180deg, rgba(42, 36, 32, 0.95) 0%, rgba(26, 22, 16, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.closing-content {
    text-align: center;
    max-width: 600px;
    animation: fadeInContent 1.2s ease-out forwards;
}

.closing-text {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    color: #F0E8D8;
    font-style: italic;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

/* Typewriter Font for Annotations */
.typewriter-annotation {
    font-family: 'Special Elite', cursive;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: #6A5A48;
    letter-spacing: 0.02em;
}

.typewriter-effect {
    font-family: 'Special Elite', cursive;
    color: #6A5A48;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: #8A6A4A;
    margin-left: 0.2em;
    animation: blink 0.6s infinite;
}

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

/* Botanical Line Drawings Container */
.botanical-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.botanical-decoration {
    position: absolute;
    opacity: 0.6;
}

/* Rose Dust accent color usage */
.rose-dust-accent {
    color: #C8988A;
    border-color: #C8988A;
}

/* Oxidized Brass accent color usage */
.oxidized-brass {
    color: #7A8A58;
    border-color: #7A8A58;
}

/* Ink Shadow accent */
.ink-shadow {
    color: #1A1610;
    background-color: #1A1610;
}

/* Burger Pigment accent */
.burgundy-pigment {
    color: #8A3A3A;
    border-color: #8A3A3A;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    background: #1A1610;
}

::-webkit-scrollbar-track {
    background: #2A2420;
}

::-webkit-scrollbar-thumb {
    background: #C89848;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D4A857;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tools-container {
        gap: 2rem;
    }

    .isometric-icon {
        width: 80px;
        height: 80px;
    }

    .sharp-angle-line {
        display: none;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .section-heading {
        font-size: 1.8rem;
    }

    .narrative-section,
    .tools-section,
    .journal-section,
    .closing-section {
        padding: 5vh 4vw;
    }
}

/* Color Palette Reference (from DESIGN.md) */
/* #C89848 - Warm gold/amber */
/* #1A1610 - Near black */
/* #8A3A3A - Deep rose (accent) */
/* #3A3228 - Dark brown */
/* #8A6A4A - Medium brown */
/* #F0E8D8 - Off-white cream */
/* #2A2420 - Dark brown-black */
/* #4A3A30 - Medium dark brown */
