/* kakuritsu.com - Probability Visualization */

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

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.8;
    color: #E8E8F0;
    background: #0E1420;
    overflow-x: hidden;
}

/* Probability Scale Navigation */
#prob-scale {
    position: fixed;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
}

.scale-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: #7888A0;
}

.scale-track {
    width: 2px;
    height: 200px;
    background: rgba(74, 158, 224, 0.15);
    position: relative;
    border-radius: 1px;
}

#scale-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #4A9EE0;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74, 158, 224, 0.5);
    transition: top 0.1s ease;
}

/* Data Labels */
.data-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    color: #4A9EE0;
    margin-bottom: 0.5rem;
}

/* =============================================
   HERO: Distribution Field
   ============================================= */

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #0E1420;
    overflow: hidden;
}

#dot-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.field-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #4A9EE0;
    border-radius: 50%;
    animation: drift 3s ease-in-out infinite alternate;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(var(--dx, 1px), var(--dy, 1px)); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.kanji-label {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #E860A0;
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

#hero-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.02em;
    color: #E8E8F0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#hero-title.visible {
    opacity: 1;
}

.hero-sub {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    color: #7888A0;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-sub.visible {
    opacity: 1;
}

/* =============================================
   Formula Ticker
   ============================================= */

.formula-ticker {
    width: 100%;
    height: 48px;
    background: #1A2030;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 60s linear infinite;
}

.ticker-track.reverse {
    animation-direction: reverse;
}

.ticker-track span {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    color: #4A9EE0;
    opacity: 0.5;
    padding: 0 3rem;
}

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

/* =============================================
   Content Sections
   ============================================= */

.content-section {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6rem 3rem 6rem 15vw;
    min-height: 80vh;
    position: relative;
    gap: 4rem;
}

.content-section.dense-bg {
    background: #0E1420;
    background-image: radial-gradient(circle, rgba(74, 158, 224, 0.03) 1px, transparent 1px);
    background-size: 16px 16px;
}

.content-section.sparse-bg {
    background: #1A2030;
    background-image: radial-gradient(circle, rgba(74, 158, 224, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
}

.section-text {
    max-width: 720px;
    flex: 1;
}

.section-text h2 {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.02em;
    color: #E8E8F0;
    margin-bottom: 1.2rem;
}

.section-text p {
    margin-bottom: 1rem;
    color: #E8E8F0;
}

/* Side Diagrams */
.side-diagram {
    width: 200px;
    flex-shrink: 0;
    margin-top: 3rem;
    transform: scale(0.8);
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.side-diagram.visible {
    transform: scale(1);
    opacity: 1;
}

.diagram-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: #7888A0;
    margin-top: 0.5rem;
    text-align: center;
}

/* Scatter Plot */
.scatter-plot {
    width: 200px;
    height: 100px;
    position: relative;
}

.scatter-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #30B8A0;
    border-radius: 50%;
    opacity: 0.3;
}

/* Fade In */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   Footer
   ============================================= */

#site-footer {
    padding: 4rem 2rem;
    text-align: center;
    background: #0E1420;
}

.footer-formula {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: #E89040;
    margin-bottom: 0.5rem;
}

.footer-text {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1rem;
    color: #7888A0;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 900px) {
    .content-section { flex-direction: column; padding: 4rem 2rem; }
    .side-diagram { margin-top: 1rem; }
    #prob-scale { display: none; }
}
