/* persona.quest - Identity Exploration Game */
/* Colors: #1A0D2E, #6B5B95, #E8D5A3, #0D0A1A, #C5B8D4, #8A7BAF, #0A1628 */
/* Fonts: Cinzel (700), Lora (400,600,italic), Josefin Sans (300,400) */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: #C5B8D4;
    background-color: #0D0A1A;
    overflow-x: hidden;
}

/* Starfield canvas */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Room sections */
.room {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
}

.room-void {
    background: #0D0A1A;
}

.room-purple {
    background: #1A0D2E;
}

.room-midnight {
    background: #0A1628;
}

.room-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Doorway arch transitions */
.doorway-arch {
    position: relative;
    z-index: 2;
    margin-top: -1px;
    line-height: 0;
}

.doorway-arch svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* Mirror frames */
.mirror-frame {
    position: relative;
    border-radius: 12px;
    padding: 3px;
    background: conic-gradient(from 0deg, #E8D5A3, #8A7BAF, #6B5B95, #E8D5A3);
    background-size: 100% 100%;
    animation: borderGlow 20s linear infinite;
}

@keyframes borderGlow {
    0% { filter: brightness(0.8); }
    50% { filter: brightness(1.2); }
    100% { filter: brightness(0.8); }
}

.mirror-glass {
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 2;
    transition: background 0.3s ease;
}

.mirror-content {
    position: relative;
    z-index: 1;
    background: rgba(13, 10, 26, 0.85);
    border-radius: 10px;
    padding: 64px 48px;
    text-align: center;
}

/* Hero */
.hero-mirror {
    max-width: 640px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-mirror.visible {
    opacity: 1;
}

.hero-title {
    margin-bottom: 24px;
}

.title-main {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 52px;
    letter-spacing: 0.06em;
    color: #E8D5A3;
    opacity: 0;
}

.title-main.visible {
    opacity: 1;
}

.title-main .letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 0 20px rgba(232, 213, 163, 0.4);
}

.title-main .letter.visible {
    opacity: 1;
}

.title-quest {
    display: block;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 28px;
    letter-spacing: 0.1em;
    color: #8A7BAF;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.title-quest.visible {
    opacity: 1;
}

.hero-tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 18px;
    color: #C5B8D4;
    margin-bottom: 40px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-tagline.visible {
    opacity: 1;
}

/* Ripple overlay */
.ripple-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(232, 213, 163, 0.15);
    animation: rippleExpand 2s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.6;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
        margin-top: -200px;
        margin-left: -200px;
    }
}

/* Buttons */
.btn-enter {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0D0A1A;
    background: #E8D5A3;
    border: none;
    padding: 14px 40px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    opacity: 0;
}

.btn-enter.visible {
    opacity: 1;
}

.btn-enter:hover {
    background: #C5B8D4;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 213, 163, 0.2);
}

/* Persona sections */
.persona-mirror {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.persona-mirror.visible {
    opacity: 1;
    transform: translateY(0);
}

.persona-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8A7BAF;
    display: block;
    margin-bottom: 12px;
}

.persona-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 36px;
    letter-spacing: 0.06em;
    color: #E8D5A3;
    margin-bottom: 20px;
}

.persona-desc {
    font-family: 'Lora', serif;
    font-size: 16px;
    line-height: 1.75;
    color: #C5B8D4;
    margin-bottom: 28px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* Traits */
.persona-traits {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.trait {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #E8D5A3;
    border: 1px solid rgba(232, 213, 163, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.trait:hover {
    border-color: #E8D5A3;
    background: rgba(232, 213, 163, 0.08);
}

/* Persona meter */
.persona-meter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.meter-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8A7BAF;
}

.meter-bar {
    width: 120px;
    height: 4px;
    background: rgba(138, 123, 175, 0.25);
    border-radius: 2px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #6B5B95, #E8D5A3);
    border-radius: 2px;
    width: 0;
    transition: width 1s ease-out;
}

.meter-value {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #E8D5A3;
}

/* CTA Section */
.cta-mirror {
    max-width: 640px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cta-mirror.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: 0.06em;
    color: #E8D5A3;
    margin-bottom: 16px;
}

.cta-desc {
    font-family: 'Lora', serif;
    font-size: 16px;
    color: #C5B8D4;
    margin-bottom: 36px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.btn-begin {
    opacity: 1;
}

/* Footer */
#site-footer {
    position: relative;
    z-index: 1;
    background: #0D0A1A;
    padding: 40px 24px;
    border-top: 1px solid rgba(138, 123, 175, 0.15);
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.footer-logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 16px;
    color: #E8D5A3;
    letter-spacing: 0.06em;
}

.footer-dot {
    color: #8A7BAF;
}

.footer-copy {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: #8A7BAF;
    letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 768px) {
    .title-main {
        font-size: 36px;
    }

    .title-quest {
        font-size: 20px;
    }

    .persona-name {
        font-size: 28px;
    }

    .mirror-content {
        padding: 48px 24px;
    }

    .cta-title {
        font-size: 26px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}
