/* kakuritsu.com - Probability / Generative Art */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0C0C10;
    color: #C0B8A8;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* Hero section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-title {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 44px;
    font-weight: 500;
    color: #E8E0D0;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: gaussianFadeIn 1.5s ease-in-out 2s forwards;
}

.hero-dot-com {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: #7EB8DA;
    display: block;
    margin-top: 8px;
    opacity: 0;
    animation: gaussianFadeIn 0.8s ease-in-out 3.5s forwards;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #2A2A32;
    letter-spacing: 0.1em;
    z-index: 1;
}

@keyframes gaussianFadeIn {
    0% { opacity: 0; transform: translateY(8px); }
    20% { opacity: 0.1; }
    80% { opacity: 0.9; }
    100% { opacity: 1; transform: translateY(0); }
}

/* Side navigation */
.side-nav {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-item {
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-number {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: #2A2A32;
    transition: color 0.3s;
    width: 24px;
    text-align: center;
}

.nav-item.active .nav-number {
    color: #E8E0D0;
}

.nav-item.active .nav-number::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7EB8DA;
    transform: translateY(-50%);
}

.nav-tooltip {
    position: absolute;
    left: 36px;
    white-space: nowrap;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 12px;
    color: #C0B8A8;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.nav-item:hover .nav-tooltip {
    opacity: 1;
}

.nav-item:hover .nav-number {
    color: #E8E0D0;
}

/* Magazine sections */
.magazine-section {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.text-column {
    padding: 80px 48px 80px 72px;
    position: relative;
    display: flex;
    align-items: center;
}

.text-content {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.watermark-symbol {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 200px;
    color: #2A2A32;
    opacity: 0.08;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s;
}

.watermark-symbol:hover {
    opacity: 0.2;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 500;
    color: #E8E0D0;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
}

.section-body {
    margin-bottom: 16px;
}

.section-formula {
    font-family: 'Fira Code', monospace;
    font-size: 15px;
    color: #7EB8DA;
    padding: 16px 0;
    text-align: center;
}

.math {
    font-style: italic;
}

/* Canvas column */
.canvas-column {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Section divider */
.section-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    grid-column: 1 / -1;
}

.wave-divider {
    width: 100%;
    height: 100%;
}

.wave-path {
    fill: none;
    stroke: #2A2A32;
    stroke-width: 1;
}

/* Dot pattern background */
.text-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #2A2A32 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: 8px 8px;
    opacity: 0.3;
    pointer-events: none;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 48px 24px;
    border-top: 1px solid #2A2A32;
}

.footer-text {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: #2A2A32;
}

/* Responsive */
@media (max-width: 768px) {
    .magazine-section {
        grid-template-columns: 1fr;
    }

    .canvas-column {
        height: 50vh;
    }

    .text-column {
        padding: 48px 24px;
    }

    .side-nav {
        display: none;
    }

    .hero-heading {
        font-size: 32px;
    }

    .section-heading {
        font-size: 22px;
    }

    .watermark-symbol {
        font-size: 120px;
    }
}
