:root {
    --deep-space: #0d0d1a;
    --electric-violet: #c084fc;
    --cream: #f5e6d3;
    --nebula-purple: #a855f7;
    --slate: #94a3b8;
    --light-gray: #e2e8f0;
    --dark-navy: #1a1a3e;
    --bright-purple: #7c3aed;
    --twilight-blue: #6366f1;
}

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

html {
    scroll-behavior: smooth;
    font-size: clamp(14px, 2vw, 18px);
}

body {
    font-family: 'Commissioner', sans-serif;
    background-color: var(--deep-space);
    color: var(--light-gray);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
    font-weight: 400;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='200' height='200' fill='%23ffffff' filter='url(%23grain)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
    mix-blend-mode: soft-light;
    z-index: 1;
    animation: grain-shift 0.8s steps(1, end) infinite;
}

@keyframes grain-shift {
    0% { background-position: 0 0; }
    25% { background-position: 10px 5px; }
    50% { background-position: -3px 8px; }
    75% { background-position: 7px -2px; }
    100% { background-position: 0 0; }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--deep-space);
    z-index: 2;
    overflow: hidden;
}

.geometric-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.shape {
    position: absolute;
    opacity: 0.3;
    animation: rotate-shape 20s linear infinite;
}

.shape.circle {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--electric-violet), var(--nebula-purple));
    border-radius: 50%;
    top: 15%;
    left: 12%;
    animation: rotate-shape 20s linear infinite, float-shape 6s ease-in-out infinite;
}

.shape.triangle {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 180px solid var(--bright-purple);
    top: 60%;
    right: 15%;
    opacity: 0.25;
    animation: rotate-shape 18s linear infinite reverse, float-shape 7s ease-in-out infinite;
}

.shape.parallelogram {
    width: 180px;
    height: 120px;
    background: linear-gradient(45deg, var(--nebula-purple), var(--electric-violet));
    transform: skewX(-20deg);
    bottom: 20%;
    left: 20%;
    opacity: 0.35;
    animation: rotate-shape 22s linear infinite, float-shape 8s ease-in-out infinite;
}

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

@keyframes float-shape {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(30px); }
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    animation: fade-in 1.2s ease-out 0.6s both;
}

.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 800;
    color: var(--electric-violet);
    margin: 0;
    text-shadow: 0 0 30px rgba(192, 132, 252, 0.5),
                 0 0 60px rgba(168, 85, 247, 0.3);
    letter-spacing: -0.02em;
    animation: pulse-weight 2s ease-in-out infinite;
}

.hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--slate);
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    animation: fade-in 1.2s ease-out 0.8s both;
}

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

@keyframes pulse-weight {
    0%, 100% { font-weight: 800; }
    50% { font-weight: 300; }
}

/* Broken Grid Section */
.broken-grid-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--dark-navy) 0%, var(--deep-space) 100%);
    position: relative;
    z-index: 2;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.grid-item {
    padding: 2rem;
    border: 1px solid rgba(192, 132, 252, 0.2);
    border-radius: 12px;
    background: rgba(26, 26, 62, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.grid-item h2 {
    font-weight: 700;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 1rem;
    color: var(--electric-violet);
    text-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}

.grid-item p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--slate);
}

/* Broken grid: intentional misalignment */
.item-1 { grid-column: 2 / 7; }
.item-2 { grid-column: 5 / 10; }
.item-3 { grid-column: 10 / 13; }
.item-4 { grid-column: 1 / 6; }
.item-5 { grid-column: 6 / 12; }

.grid-item:hover {
    background: rgba(192, 132, 252, 0.1);
    border-color: rgba(192, 132, 252, 0.5);
    box-shadow: 0 0 30px rgba(192, 132, 252, 0.2);
    transform: translateY(-4px);
}

.feature-box {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--electric-violet), var(--nebula-purple));
    border-radius: 8px;
    text-align: center;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature-label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cream);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.feature-box p {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--cream);
}

/* Narrative Section */
.narrative-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--deep-space) 0%, var(--dark-navy) 100%);
    position: relative;
    z-index: 2;
}

.narrative-content {
    max-width: 900px;
    margin: 0 auto;
}

.narrative-block {
    padding: 3rem;
    border-left: 4px solid var(--electric-violet);
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
}

.narrative-block h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--electric-violet);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.narrative-block p {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--light-gray);
    font-weight: 300;
}

/* Interactive Zone */
.interactive-zone {
    padding: 6rem 2rem;
    background: var(--deep-space);
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.interactive-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    border: 2px solid rgba(192, 132, 252, 0.3);
    border-radius: 16px;
    background: rgba(26, 26, 62, 0.6);
    min-width: 150px;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
}

.interactive-item span {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--slate);
}

.icon-circle,
.icon-square,
.icon-triangle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--electric-violet), var(--nebula-purple));
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

.icon-square {
    border-radius: 8px;
}

.icon-triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid var(--bright-purple);
    background: none;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(192, 132, 252, 0.5); }
    50% { box-shadow: 0 0 30px rgba(192, 132, 252, 0.8); }
}

.hover-pulse:hover .icon-circle {
    animation: pulse-intense 0.5s ease-in-out;
}

@keyframes pulse-intense {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.counter-rotate .icon-square {
    animation: counter-spin 4s linear infinite;
}

@keyframes counter-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.gradient-shift:hover {
    border-color: var(--electric-violet);
    background: rgba(192, 132, 252, 0.15);
}

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(192, 132, 252, 0.2);
    position: relative;
    z-index: 2;
}

footer p {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--slate);
    letter-spacing: 0.05em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .item-1 { grid-column: 1 / 7; }
    .item-2 { grid-column: 1 / 7; }
    .item-3 { grid-column: 7 / 13; }
    .item-4 { grid-column: 1 / 7; }
    .item-5 { grid-column: 7 / 13; }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr);
    }

    .item-1,
    .item-2,
    .item-3,
    .item-4,
    .item-5 {
        grid-column: 1 / 7;
    }

    .interactive-zone {
        flex-direction: column;
    }

    .hero-title {
        font-size: clamp(2.5rem, 8vw, 5rem);
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .hero {
        height: 80vh;
    }

    .broken-grid-section,
    .narrative-section,
    .interactive-zone {
        padding: 3rem 1rem;
    }

    .grid-item {
        padding: 1.5rem;
    }

    .narrative-block {
        padding: 1.5rem;
    }
}
