/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0A0F0D;
    color: #C4D4C8;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Bungee', cursive;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #F0E8D8;
    font-weight: 400;
}

.tagline-container {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: #E8C547;
}

/* Navigation Eye */
.nav-eye {
    position: fixed;
    top: 2rem;
    left: 2rem;
    width: 32px;
    height: 32px;
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    animation: fadeIn 1s ease-in-out 1s forwards;
}

.eye-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(232, 197, 71, 0.2));
}

.eye-iris {
    transition: fill 0.3s ease, transform 0.2s ease;
}

.eye-pupil {
    transition: transform 0.2s ease;
}

.nav-eye:hover .eye-iris {
    fill: #E8C547;
}

.nav-eye:hover .eye-pupil {
    transform: scale(1.4);
}

.eyelid-top,
.eyelid-bottom {
    opacity: 0;
    animation: blink 8s ease-in-out infinite 2s;
}

@keyframes blink {
    0%, 10%, 90%, 100% {
        opacity: 0;
    }
    5%, 95% {
        opacity: 1;
    }
}

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

/* Radial Menu */
.radial-menu {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 999;
    width: 32px;
    height: 32px;
}

.radial-menu.hidden {
    pointer-events: none;
}

.menu-items {
    position: relative;
    width: 100%;
    height: 100%;
}

.menu-item {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(18, 26, 20, 0.95);
    border: 2px solid #E8C547;
    text-decoration: none;
    color: #E8C547;
    font-size: 0.8rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    opacity: 0;
    transform: translate(0, 0) scale(0);
    transition: all 0.3s ease;
}

.radial-menu:not(.hidden) .menu-item {
    opacity: 1;
    transform: scale(1);
}

.menu-item:hover {
    background-color: rgba(232, 197, 71, 0.1);
    box-shadow: 0 0 12px rgba(232, 197, 71, 0.4);
}

.menu-icon {
    display: none;
}

.menu-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Lair Sections */
.lair {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lair-1 {
    height: 100vh;
    background-color: #0A0F0D;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="15" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/><circle cx="75" cy="25" r="15" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/><circle cx="50" cy="50" r="15" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/><circle cx="25" cy="75" r="15" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/><circle cx="75" cy="75" r="15" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/></svg>');
    animation: rotatePattern 20s linear infinite;
}

.lair-2 {
    min-height: 150vh;
    background-color: #0A0F0D;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,10 90,35 90,85 50,110 10,85 10,35" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/></svg>');
    animation: rotatePattern 25s linear infinite;
}

.lair-3 {
    height: 100vh;
    background-color: #0A0F0D;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,10 90,35 70,90 30,90 10,35" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/></svg>');
    animation: rotatePattern 30s linear infinite;
}

.lair-4 {
    min-height: 200vh;
    background-color: #0A0F0D;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="20" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/></svg>');
    animation: rotatePattern 35s linear infinite;
}

.lair-5 {
    height: 80vh;
    background-color: #121A14;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,10 61,39 90,39 68,61 79,90 50,68 21,90 32,61 10,39 39,39" fill="none" stroke="rgba(45, 90, 61, 0.04)" stroke-width="1"/></svg>');
    animation: rotatePattern 40s linear infinite;
}

@keyframes rotatePattern {
    from {
        background-position: 0 0;
        transform: rotate(0deg);
    }
    to {
        background-position: 100px 100px;
        transform: rotate(0.5deg);
    }
}

.lair-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

/* Lair 1: The Entrance */
.lair-1 .lair-content {
    flex-direction: column;
    gap: 2rem;
}

.hero-text {
    font-size: clamp(4rem, 10vw, 9rem);
    line-height: 1;
    letter-spacing: 0.08em;
    animation: heroAssemble 1s ease-out 0.6s forwards;
    opacity: 0;
    text-shadow: 0 0 40px rgba(232, 197, 71, 0.3);
    animation: heroAssemble 1s ease-out 0.6s forwards, goldGlow 4s ease-in-out 0.6s infinite;
}

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

@keyframes goldGlow {
    0%, 100% {
        text-shadow: 0 0 40px rgba(232, 197, 71, 0.2);
    }
    50% {
        text-shadow: 0 0 40px rgba(232, 197, 71, 0.4);
    }
}

.rotating-tagline {
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    opacity: 0;
    animation: fadeIn 1s ease-in-out 1s forwards, rotateTagline 6s ease-in-out 1s infinite;
    min-height: 2rem;
}

@keyframes rotateTagline {
    0%, 100% {
        opacity: 1;
    }
    20%, 80% {
        opacity: 1;
    }
    85%, 95% {
        opacity: 0;
    }
}

/* Lair 2: The Workshop */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    width: 100%;
    padding: 4rem 0;
}

.project-card {
    width: 60vw;
    background-color: #121A14;
    border: 2px solid #E8C547;
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card.card-1,
.project-card.card-3 {
    margin-left: 15vw;
}

.project-card.card-2,
.project-card.card-4 {
    margin-left: calc(100% - 60vw - 15vw);
}

.project-card:hover {
    box-shadow: 0 0 30px rgba(232, 197, 71, 0.3);
    transform: scale(1) perspective(800px) rotateX(5deg);
}

.card-title {
    font-size: clamp(1.5rem, 2vw, 1.8rem);
}

.card-description {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: #C4D4C8;
}

.monster-silhouette {
    margin-top: 0.5rem;
}

/* Ripple animation trigger */
.project-card.visible {
    animation: rippleIn 0.6s ease-out forwards;
}

@keyframes rippleIn {
    from {
        opacity: 0;
        transform: scale(0);
        clip-path: circle(0% at 50% 50%);
    }
    to {
        opacity: 1;
        transform: scale(1);
        clip-path: circle(100% at 50% 50%);
    }
}

/* Lair 3: The Philosophy */
.philosophy-statements {
    display: flex;
    flex-direction: column;
    gap: clamp(4rem, 8vh, 8rem);
    width: 100%;
    padding: 2rem;
}

.philosophy-statement {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.2;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease;
}

.philosophy-statement.revealed {
    opacity: 1;
    transform: translateY(0);
}

.connector-line {
    height: 80px;
    display: none;
}

.drawing-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawLine 1s ease-out forwards;
}

@keyframes drawLine {
    from {
        stroke-dashoffset: 100;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Lair 4: The Gallery */
.gallery-container {
    position: relative;
    width: 100%;
    height: 300vh;
    padding: 4rem 2rem;
}

.gallery-item {
    position: absolute;
    width: clamp(20vw, 25vw, 35vw);
    height: clamp(20vw, 25vw, 35vw);
    border: 6px solid;
    border-color: var(--jewel);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(10, 15, 13, 0.4);
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.4s ease;
    overflow: hidden;
}

.gallery-item:hover {
    box-shadow: 0 0 30px rgba(232, 197, 71, 0.4);
    border-color: #E8C547;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Golden spiral positioning */
.item-1 { top: 10%; left: 5%; }
.item-2 { top: 25%; right: 8%; }
.item-3 { top: 45%; left: 12%; }
.item-4 { top: 60%; right: 5%; }
.item-5 { top: 80%; left: 8%; }
.item-6 { top: 95%; right: 10%; }

.gradient-blob {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, var(--jewel) 0%, transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(232, 197, 71, 0.3) 0%, transparent 50%);
    animation: blobShift 8s ease-in-out infinite;
}

@keyframes blobShift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(10px, -10px) scale(1.05);
    }
}

/* Lair 5: The Exit */
.lair-5 .lair-content {
    flex-direction: column;
    gap: 2rem;
}

.closing-statement {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.miris-logo {
    animation: gentlePulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(232, 197, 71, 0.3));
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.95;
    }
}

.exit-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.exit-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #E8C547;
    border-radius: 50%;
    color: #E8C547;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.exit-link:hover {
    background-color: rgba(232, 197, 71, 0.1);
    box-shadow: 0 0 12px rgba(232, 197, 71, 0.4);
    transform: translateY(-3px);
}

.exit-link svg {
    width: 20px;
    height: 20px;
}

/* Background Creatures */
.background-creatures {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.gradient-creature {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(60px);
}

.creature-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    background: radial-gradient(circle, #7B4FA2 0%, transparent 70%);
    animation: drift1 15s ease-in-out infinite;
}

.creature-2 {
    width: 400px;
    height: 400px;
    top: 40%;
    right: 8%;
    background: radial-gradient(circle, #C43D4E 0%, transparent 70%);
    animation: drift2 18s ease-in-out infinite;
}

.creature-3 {
    width: 350px;
    height: 350px;
    bottom: 15%;
    left: 20%;
    background: radial-gradient(circle, #2E6B9E 0%, transparent 70%);
    animation: drift3 20s ease-in-out infinite;
}

@keyframes drift1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -20px); }
    50% { transform: translate(0, 40px); }
    75% { transform: translate(-30px, -10px); }
}

@keyframes drift2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-40px, 20px); }
    50% { transform: translate(20px, -30px); }
    75% { transform: translate(10px, 30px); }
}

@keyframes drift3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, 30px); }
    50% { transform: translate(-30px, 10px); }
    75% { transform: translate(40px, -20px); }
}

/* Responsive */
@media (max-width: 768px) {
    .project-card {
        width: 90vw;
    }

    .project-card.card-1,
    .project-card.card-2,
    .project-card.card-3,
    .project-card.card-4 {
        margin-left: 5vw;
    }

    .gallery-item {
        width: 70vw !important;
        height: 70vw !important;
        left: 15vw !important;
        top: auto !important;
        right: auto !important;
    }

    .philosophy-statement {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
}
