/* ============================================================
   MUJUN.QUEST - POP ART HUD AESTHETIC
   Colors: #B8A8C8, #FFE0E8, #D8D0C0, #2A2A2A, #E0F5E8, #EDE0F5, #E88090, #FFF5D6
   Fonts: Bungee (display), Bitter (h2), Space Mono (code), Inter (body)
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #2A2A2A;
    color: #2A2A2A;
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: 0.01em;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1 {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    letter-spacing: 0.03em;
    color: #2A2A2A;
    text-transform: uppercase;
    text-shadow: none;
    line-height: 1.2;
}

h2 {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    letter-spacing: 0em;
    color: #2A2A2A;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

h3 {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #2A2A2A;
    margin-bottom: 0.5rem;
}

p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: #2A2A2A;
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

/* ============================================================
   HUD FRAME & CORNER BRACKETS
   ============================================================ */

#hud-frame {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #FFFBF0;
    overflow: hidden;
}

.corner-bracket {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 3px solid #2A2A2A;
    z-index: 100;
}

.corner-bracket.top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.corner-bracket.top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.corner-bracket.bottom-left {
    bottom: 80px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.corner-bracket.bottom-right {
    bottom: 80px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* ============================================================
   STATUS DOT (Pulse Animation)
   ============================================================ */

.status-dot {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 12px;
    height: 12px;
    background-color: #E88090;
    border-radius: 50%;
    border: 2px solid #2A2A2A;
    z-index: 101;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* ============================================================
   CONTENT CONTAINER & POP-ART PANELS
   ============================================================ */

#content-container {
    position: relative;
    width: 100%;
    padding: 60px 20px;
    z-index: 10;
}

.pop-art-panel {
    border: 3px solid #2A2A2A;
    position: relative;
    padding: 3rem 2.5rem;
    background-size: 8px 8px;
    background-position: 0 0;
    box-shadow: none;
}

/* Halftone dot pattern for panels */
.pop-art-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(212, 180, 180, 0.3) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
    z-index: 1;
    border: 3px solid #2A2A2A;
    margin: -3px;
}

.pop-art-panel > * {
    position: relative;
    z-index: 2;
}

/* Main Panel - Yellow */
.main-panel {
    position: relative;
    width: 70%;
    margin-left: 10%;
    min-height: 80vh;
    background-color: #FFF5D6;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.main-panel::before {
    background-image: radial-gradient(circle, #E8DC90 1px, transparent 1px);
}

#main-title {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #2A2A2A;
}

.subtitle {
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    color: #2A2A2A;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

#intro-section {
    margin-bottom: 2rem;
}

#intro-section h2 {
    margin-top: 1.5rem;
}

#intro-section p {
    margin-bottom: 1.2rem;
}

/* Nested Panels inside Main Panel */
.nested-panel {
    border: 2px solid #2A2A2A;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    background-size: 8px 8px;
}

.nested-panel::before {
    background-image: radial-gradient(circle, rgba(160, 140, 160, 0.4) 1px, transparent 1px);
    background-size: 8px 8px;
    border: 2px solid #2A2A2A;
    margin: -2px;
}

.nested-yellow {
    background-color: #FFF5D6;
}

.nested-yellow::before {
    background-image: radial-gradient(circle, #E8DC90 1px, transparent 1px);
}

.nested-pink {
    background-color: #FFE0E8;
}

.nested-pink::before {
    background-image: radial-gradient(circle, #FF9AAD 1px, transparent 1px);
}

.nested-panel h3 {
    margin-bottom: 0.8rem;
}

.nested-panel p {
    margin-bottom: 0.8rem;
}

.dot-pattern-indicator {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: #2A2A2A;
    text-align: center;
    margin-top: 0.8rem;
    opacity: 0.6;
}

/* Overlapping Panel - Pink */
.overlap-panel {
    position: absolute;
    top: 15%;
    right: -10%;
    width: 30%;
    min-height: 40vh;
    background-color: #FFE0E8;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.overlap-panel::before {
    background-image: radial-gradient(circle, #FF9AAD 1px, transparent 1px);
}

.overlap-panel h2 {
    margin-bottom: 1.5rem;
}

.contradiction-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #2A2A2A;
}

.contradiction-item:last-child {
    border-bottom: none;
}

.contradiction-item h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.contradiction-item p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ============================================================
   DATA RIBBON (Bottom HUD Element)
   ============================================================ */

.data-ribbon {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #E0F5E8;
    border: 3px solid #2A2A2A;
    border-bottom: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 99;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: #2A2A2A;
}

.ribbon-text {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-ribbon 20s linear infinite;
    padding-right: 50px;
}

@keyframes scroll-ribbon {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ============================================================
   POST-HUD CONTENT SECTION
   ============================================================ */

#extra-section {
    position: relative;
    width: 100%;
    padding: 80px 40px 60px;
    background-color: #FFFBF0;
    margin-top: 20vh;
    z-index: 5;
}

.section-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.grid-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.grid-item {
    border: 3px solid #2A2A2A;
    padding: 2rem;
    position: relative;
    background-size: 8px 8px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.grid-item::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    border: 3px solid #2A2A2A;
    margin: -3px;
}

.grid-item > * {
    position: relative;
    z-index: 2;
}

.item-blue {
    background-color: #EDE0F5;
}

.item-blue::before {
    background-image: radial-gradient(circle, #C4B5E0 1px, transparent 1px);
}

.item-green {
    background-color: #E0F5E8;
}

.item-green::before {
    background-image: radial-gradient(circle, #A8E0CC 1px, transparent 1px);
}

.item-lavender {
    background-color: #B8A8C8;
    color: #FFFBF0;
}

.item-lavender h3,
.item-lavender p {
    color: #FFFBF0;
}

.item-lavender::before {
    background-image: radial-gradient(circle, #9080A8 1px, transparent 1px);
}

.grid-item h3 {
    margin-bottom: 1rem;
}

.grid-item p {
    margin-bottom: 0;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

#cta-section {
    position: relative;
    width: 100%;
    padding: 60px 40px;
    background-color: #2A2A2A;
    z-index: 5;
}

.cta-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.cta-panel {
    border: 3px solid #FFFBF0;
    padding: 3rem 2.5rem;
    background-color: #D8D0C0;
    position: relative;
    text-align: center;
    background-size: 8px 8px;
}

.cta-panel::before {
    background-image: radial-gradient(circle, #B8A098 1px, transparent 1px);
    border: 3px solid #FFFBF0;
    margin: -3px;
}

.cta-panel > * {
    position: relative;
    z-index: 2;
}

.cta-panel h2 {
    color: #2A2A2A;
    margin-bottom: 1rem;
}

.cta-panel p {
    color: #2A2A2A;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ============================================================
   BUTTON STYLES
   ============================================================ */

.cta-button {
    background-color: #2A2A2A;
    color: #FFFBF0;
    border: 2px solid #2A2A2A;
    padding: 1rem 2.5rem;
    font-family: 'Bungee', cursive;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
}

.cta-button:hover {
    background-color: #FFFBF0;
    color: #2A2A2A;
    transform: scale(1.05);
}

.cta-button:active {
    transform: scale(0.98);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 1024px) {
    .main-panel {
        width: 85%;
        margin-left: 7.5%;
        min-height: auto;
    }

    .overlap-panel {
        position: relative;
        top: auto;
        right: auto;
        width: 85%;
        margin-left: 7.5%;
        margin-top: 2rem;
        z-index: 2;
    }

    #content-container {
        padding-bottom: 80px;
    }
}

@media (max-width: 768px) {
    .corner-bracket {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }

    .status-dot {
        width: 10px;
        height: 10px;
        border-width: 2px;
    }

    .main-panel,
    .overlap-panel {
        width: 90%;
        margin-left: 5%;
        padding: 1.5rem;
    }

    .main-panel {
        min-height: auto;
    }

    .pop-art-panel {
        padding: 1.5rem;
    }

    .grid-items {
        grid-template-columns: 1fr;
    }

    #extra-section,
    #cta-section {
        padding: 40px 20px;
    }

    .data-ribbon {
        height: 50px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .corner-bracket {
        width: 20px;
        height: 20px;
    }

    .corner-bracket.top-left {
        top: 10px;
        left: 10px;
    }

    .corner-bracket.top-right {
        top: 10px;
        right: 10px;
    }

    .corner-bracket.bottom-left,
    .corner-bracket.bottom-right {
        bottom: 60px;
    }

    .status-dot {
        top: 15px;
        right: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .main-panel,
    .overlap-panel {
        width: 95%;
        margin-left: 2.5%;
        padding: 1rem;
    }

    .pop-art-panel {
        padding: 1rem;
    }

    .data-ribbon {
        height: 40px;
        font-size: 0.65rem;
        bottom: -3px;
    }
}

/* ============================================================
   ANIMATION & TRANSITIONS
   ============================================================ */

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.main-panel {
    animation: slide-in-left 0.8s ease-out 0.2s backwards;
}

.overlap-panel {
    animation: slide-in-right 0.8s ease-out 0.4s backwards;
}

.grid-item {
    animation: fade-in 0.6s ease-out backwards;
}

.grid-item:nth-child(1) {
    animation-delay: 0.2s;
}

.grid-item:nth-child(2) {
    animation-delay: 0.4s;
}

.grid-item:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
