/* ============================================
   monopole.design - Bauhaus Design Language
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #FFFFFF;
    color: #1A1A1A;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* --- Grid Overlay --- */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* --- Structural Labels --- */
.struct-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    color: #8A8A8A;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 16px;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

/* --- Logotype --- */
#logotype {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 5vw, 72px);
    color: #1A1A1A;
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    line-height: 1.1;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeInLogotype 600ms ease-out 600ms forwards;
}

#logotype .dot {
    color: #E03020;
}

@keyframes fadeInLogotype {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* --- Hero Structural Labels --- */
#label-hero-coords {
    position: absolute;
    bottom: 80px;
    left: 40px;
    z-index: 10;
}

#label-hero-viewport {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 10;
}

/* --- Draggable Shapes --- */
.draggable {
    position: absolute;
    cursor: grab;
    z-index: 5;
    user-select: none;
    -webkit-user-select: none;
    transition: filter 0.15s ease;
    opacity: 0;
}

.draggable:active {
    cursor: grabbing;
}

.draggable.is-dragging {
    cursor: grabbing;
    filter: drop-shadow(0 4px 12px rgba(26,26,26,0.15));
    z-index: 20;
}

/* Initial positions (set via data attributes, finalized via JS) */
#shape-red-circle {
    animation: shapeEnterRight 400ms ease-out 100ms forwards;
}

#shape-blue-rect {
    animation: shapeEnterLeft 400ms ease-out 200ms forwards;
}

#shape-yellow-tri {
    animation: shapeEnterBottom 400ms ease-out 300ms forwards;
}

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

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

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

/* Pulse to indicate interactivity */
.draggable.pulse {
    animation: pulseHint 600ms ease-in-out 1200ms 1;
}

@keyframes pulseHint {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* --- Scroll Indicator --- */
#scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: scrollBounce 2s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Content Sections --- */
.content-section {
    position: relative;
    padding: 120px 40px;
    min-height: 60vh;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-inner {
    max-width: 1200px;
}

/* Asymmetric Layout Variations */
.section-left .section-inner {
    max-width: 70%;
    margin-left: 0;
    margin-right: auto;
}

.section-right .section-inner {
    max-width: 40%;
    margin-left: auto;
    margin-right: 0;
}

.section-center-right .section-inner {
    max-width: 55%;
    margin-left: auto;
    margin-right: 10%;
}

.section-left-narrow .section-inner {
    max-width: 50%;
    margin-left: 0;
    margin-right: auto;
}

.section-full .section-inner {
    max-width: 90%;
    margin: 0 auto;
}

/* Section Borders (Primary Colors) */
#section-form {
    border-left: 4px solid #E03020;
}

#section-grid {
    border-right: 4px solid #2040A0;
}

#section-color {
    border-left: 4px solid #F0C010;
}

#section-type {
    border-left: 4px solid #1A1A1A;
}

#section-manifesto {
    border-top: 4px solid #E03020;
    border-bottom: 4px solid #2040A0;
}

/* Slide-in Variations */
.section-left {
    transform: translateX(-60px);
}

.section-left.visible {
    transform: translateX(0);
}

.section-right {
    transform: translateX(60px);
}

.section-right.visible {
    transform: translateX(0);
}

.section-center-right {
    transform: translateX(40px);
}

.section-center-right.visible {
    transform: translateX(0);
}

.section-left-narrow {
    transform: translateX(-40px);
}

.section-left-narrow.visible {
    transform: translateX(0);
}

.section-full {
    transform: translateY(40px);
}

.section-full.visible {
    transform: translateY(0);
}

/* --- Section Illustrations --- */
.section-illustration {
    margin-bottom: 32px;
}

/* --- Headings --- */
h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3.5vw, 48px);
    color: #1A1A1A;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

/* --- Body Text --- */
.content-section p {
    color: #1A1A1A;
    max-width: 600px;
    margin-bottom: 16px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* --- Manifesto Grid --- */
.manifesto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.manifesto-item {
    padding: 48px 40px;
    position: relative;
}

.manifesto-number {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 6vw, 80px);
    position: absolute;
    top: 16px;
    right: 24px;
    opacity: 0.1;
    line-height: 1;
}

.manifesto-item p {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 24px);
    line-height: 1.4;
    max-width: 400px;
}

.manifesto-red {
    background: #E03020;
    color: #FFFFFF;
}

.manifesto-red .manifesto-number {
    color: #FFFFFF;
}

.manifesto-red p {
    color: #FFFFFF;
}

.manifesto-blue {
    background: #2040A0;
    color: #FFFFFF;
}

.manifesto-blue .manifesto-number {
    color: #FFFFFF;
}

.manifesto-blue p {
    color: #FFFFFF;
}

.manifesto-yellow {
    background: #F0C010;
    color: #1A1A1A;
}

.manifesto-yellow .manifesto-number {
    color: #1A1A1A;
}

.manifesto-yellow p {
    color: #1A1A1A;
}

.manifesto-black {
    background: #1A1A1A;
    color: #FFFFFF;
}

.manifesto-black .manifesto-number {
    color: #FFFFFF;
}

.manifesto-black p {
    color: #FFFFFF;
}

/* --- Footer --- */
#footer {
    padding: 60px 40px;
    text-align: center;
    border-top: 2px solid rgba(26,26,26,0.08);
}

.footer-shapes {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #8A8A8A;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #logotype {
        left: 20px;
        font-size: clamp(28px, 8vw, 48px);
    }

    #label-hero-coords {
        left: 20px;
        bottom: 60px;
    }

    #label-hero-viewport {
        right: 20px;
        top: 20px;
    }

    .content-section {
        padding: 80px 20px;
    }

    .section-left .section-inner,
    .section-right .section-inner,
    .section-center-right .section-inner,
    .section-left-narrow .section-inner {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

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

    .draggable svg {
        width: 120px;
        height: auto;
    }

    #shape-blue-rect svg {
        width: 180px;
    }

    #footer {
        padding: 40px 20px;
    }
}
