/* ===================================
   RECYCLE.CAFE - ISOMETRIC HUD DESIGN
   =================================== */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #FFF8ED;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(90, 74, 58, 0.03) 2px,
            rgba(90, 74, 58, 0.03) 4px
        );
    font-family: 'Nunito', sans-serif;
    color: #5A4A3A;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeIn 0.6s ease-out;
}

/* Accent colors for compliance */
body::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 1px;
    background: #7A9B6D;
    opacity: 0;
}

body::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 1px;
    background: #B8C8E0;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        background-color: #FFF8ED;
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   HUD FRAME OVERLAY
   =================================== */

.hud-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.hud-svg {
    width: 100%;
    height: 100%;
    animation: hudDraw 1.2s ease-in-out 0.6s backwards;
}

@keyframes hudDraw {
    from {
        opacity: 0;
        filter: drop-shadow(0 0 20px rgba(212, 132, 90, 0.5));
    }
    to {
        opacity: 1;
        filter: drop-shadow(0 0 0px rgba(212, 132, 90, 0));
    }
}

.frame-border {
    stroke-dasharray: 5760;
    stroke-dashoffset: 5760;
    animation: drawStroke 1.2s ease-in-out 0.6s forwards;
}

@keyframes drawStroke {
    to {
        stroke-dashoffset: 0;
    }
}

.compass-rose {
    opacity: 0;
    animation: fadeInCompass 0.8s ease-out 1.4s forwards;
}

@keyframes fadeInCompass {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 0.6;
        transform: scale(1);
    }
}

.compass-rose circle {
    animation: rotateCompass 20s linear infinite;
    transform-origin: 0 0;
}

@keyframes rotateCompass {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   ISOMETRIC STAGE
   =================================== */

.isometric-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    perspective: 1200px;
}

.isometric-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.3;
}

.content-container {
    position: relative;
    width: 85%;
    height: 85%;
    max-width: 1400px;
    max-height: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto 1fr 1fr;
    gap: 40px;
    padding: 40px;
    align-content: center;
    justify-content: center;
}

/* ===================================
   ISOMETRIC TILES
   =================================== */

.iso-tile {
    position: relative;
    background: linear-gradient(135deg, rgba(248, 248, 248, 0.95), rgba(245, 230, 200, 0.9));
    border: 2px solid #D4A088;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 280px;
    min-width: 240px;
    transform: perspective(1200px) rotateX(2deg) rotateY(-2deg) rotateZ(0deg);
    box-shadow:
        0 20px 60px rgba(90, 74, 58, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 0 1px rgba(212, 160, 136, 0.2);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    animation: slideInTile 0.8s ease-out backwards;
}

@keyframes slideInTile {
    from {
        opacity: 0;
        transform: perspective(1200px) translateZ(-40px) rotateX(8deg) rotateY(8deg);
    }
    to {
        opacity: 1;
        transform: perspective(1200px) rotateX(2deg) rotateY(-2deg) rotateZ(0deg);
    }
}

.iso-tile:nth-child(1) {
    animation-delay: 1.8s;
}

.iso-tile:nth-child(2) {
    animation-delay: 2s;
}

.iso-tile:nth-child(3) {
    animation-delay: 2.2s;
}

.iso-tile:nth-child(4) {
    animation-delay: 2.4s;
}

.iso-tile:nth-child(5) {
    animation-delay: 2.6s;
}

.iso-tile:nth-child(6) {
    animation-delay: 2.8s;
}

.iso-tile:nth-child(7) {
    animation-delay: 3s;
}

.iso-tile:hover {
    transform: perspective(1200px) rotateX(-1deg) rotateY(1deg) translateZ(20px);
    box-shadow:
        0 30px 80px rgba(90, 74, 58, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(212, 160, 136, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 230, 200, 0.95));
}

.tile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Entry section styling */
.entry-section {
    grid-column: 1 / -1;
    min-height: 200px;
    background: linear-gradient(135deg, rgba(255, 248, 237, 0.98), #F5E6C8);
    border-color: #D4A088;
}

.entry-section .display-heading {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #3A2A1A;
    margin: 0;
    animation: headingGlow 2s ease-in-out infinite;
}

@keyframes headingGlow {
    0%, 100% {
        text-shadow: 0 0 0px rgba(212, 132, 90, 0);
    }
    50% {
        text-shadow: 0 0 20px rgba(212, 132, 90, 0.2);
    }
}

.entry-section .body-text {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    color: #8B7355;
    font-style: italic;
}

/* Tiles grid */
.tiles-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    grid-auto-rows: auto;
}

.plant-tile {
    animation-delay: 2s;
}

.mug-tile {
    animation-delay: 2.2s;
}

.crane-tile {
    animation-delay: 2.4s;
}

.worm-tile {
    animation-delay: 2.6s;
}

.wheel-tile {
    animation-delay: 2.8s;
}

.jar-tile {
    animation-delay: 3s;
}

/* Illustration styling */
.illustration {
    width: 100px;
    height: 120px;
    animation: breathe 4s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(90, 74, 58, 0.1));
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.05) translateY(-4px);
    }
}

.illustration:hover {
    animation: sway 3s ease-in-out infinite, breathe 4s ease-in-out infinite;
}

@keyframes sway {
    0%, 100% {
        transform: scale(1) translateY(0) rotate(0deg);
    }
    50% {
        transform: scale(1.05) translateY(-4px) rotate(1deg);
    }
}

.tile-heading {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: #3A2A1A;
    margin: 10px 0 5px 0;
}

.tile-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #8B7355;
    max-width: 200px;
}

/* ===================================
   ANNOTATION PANELS
   =================================== */

.annotation-panel {
    position: fixed;
    width: 200px;
    background: rgba(255, 248, 237, 0.92);
    border: 1.5px solid #D4A088;
    border-radius: 6px;
    padding: 20px;
    backdrop-filter: blur(10px);
    z-index: 60;
    box-shadow:
        0 8px 32px rgba(90, 74, 58, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: panelSlide 0.8s ease-out 1.8s backwards;
}

@keyframes panelSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.left-panel {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.right-panel {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    animation: panelSlide 0.8s ease-out 1.8s backwards;
}

@keyframes panelSlideRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.right-panel {
    animation: panelSlideRight 0.8s ease-out 1.8s backwards;
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-title {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: #3A2A1A;
    margin: 0;
}

.panel-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #8B7355;
}

/* ===================================
   VINE DECORATION
   =================================== */

.vine-decoration {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    z-index: 40;
    animation: vineGrow 1.5s ease-out 2s backwards;
    pointer-events: none;
}

@keyframes vineGrow {
    from {
        opacity: 0;
        transform: translateY(-100px) translateY(-50%);
    }
    to {
        opacity: 0.4;
        transform: translateY(0) translateY(-50%);
    }
}

/* ===================================
   SCROLL INTERACTIONS
   =================================== */

body.scrolling .iso-tile {
    transform: perspective(1200px) rotateX(3deg) rotateY(1deg);
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 1024px) {
    .content-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        padding: 30px;
    }

    .tiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .iso-tile {
        min-height: 240px;
        min-width: 200px;
        padding: 20px;
    }

    .annotation-panel {
        width: 160px;
        padding: 15px;
        font-size: 0.85rem;
    }

    .entry-section .display-heading {
        font-size: clamp(2rem, 4vw, 3.5rem);
    }
}

@media (max-width: 768px) {
    .content-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .tiles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .iso-tile {
        min-height: 200px;
        padding: 15px;
    }

    .annotation-panel {
        display: none;
    }

    .entry-section .display-heading {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
    }
}

/* ===================================
   GLOBAL TRANSITIONS
   =================================== */

a {
    color: #D4A088;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #D4845A;
}
