/* monopole.tech - Watercolor Technology Garden */
/* Colors: #E8D0C8, #B8A098, #2A1018, #E8D8C0, #60A080, #201018, #4A3040, #8A3050 */
/* Fonts: Abril Fatface, Nunito, JetBrains Mono */

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

html { scroll-behavior: smooth; }

body {
    background: #201018;
    color: #E8D0C8;
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
}

/* Garden Gate Opening */
#garden-gate {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #2A1018;
    z-index: 1000;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1s ease 1.5s;
}

#garden-gate::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 0; height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 160, 128, 0.15) 0%, transparent 70%);
    animation: washExpand 1.5s ease forwards;
}

#garden-gate.done { opacity: 0; }

@keyframes washExpand {
    to { width: 120vmax; height: 120vmax; }
}

/* Header */
#site-header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

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

.site-title {
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #E8D0C8;
}

.site-subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: #B8A098;
    margin-top: 0.5rem;
}

/* Module Grid */
#module-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Tech Modules */
.tech-module {
    background: #2A1018;
    border: 1px solid #4A3040;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.tech-module.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Watercolor wash */
.tech-module::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at var(--wash-x, 50%) var(--wash-y, 50%), rgba(96, 160, 128, 0.08) 0%, transparent 60%),
                radial-gradient(circle at calc(100% - var(--wash-x, 50%)) calc(100% - var(--wash-y, 50%)), rgba(138, 48, 80, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.tall { grid-row: span 2; }

.module-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #60A080;
    display: block;
    margin-bottom: 0.75rem;
}

.module-title {
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #E8D0C8;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.module-body {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #B8A098;
}

/* Diagrams */
.module-diagram {
    margin-top: 1.5rem;
    text-align: center;
}

.watercolor-svg {
    width: 100%;
    max-width: 200px;
    height: auto;
}

/* Code Snippet */
.code-snippet {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(32, 16, 24, 0.5);
    border-left: 2px solid #60A080;
}

.code-snippet code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #E8D8C0;
    display: block;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    #module-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .span-2, .span-4 { grid-column: span 1; }
    .tall { grid-row: span 1; }
}
