/* hwaglyul.com - Probability Observatory */
/* Colors: #E8E8E8 #2AD4A8 #0D0D12 #C0C0C0 #1A1A24 #7B7B8A #D4602A #3A3A42 #3A3A3A */
/* Fonts: Space Grotesk, IBM Plex Serif, Inter, IBM Plex Mono */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #0D0D12;
    color: #E8E8E8;
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ====================== */
/* TYPOGRAPHY              */
/* ====================== */

.spread-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(40px, 6vw, 96px);
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #E8E8E8;
}

.spread-body {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.7;
    color: #C0C0C0;
    max-width: 520px;
    margin-bottom: 1.5em;
}

.body-emphasis {
    font-weight: 600;
    color: #E8E8E8;
}

.annotation-marker {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2AD4A8;
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #2AD4A8;
    border-radius: 2px;
    margin-bottom: 20px;
}

.annotation-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #7B7B8A;
    margin-left: 12px;
}

/* ====================== */
/* LAYOUT - SPREADS        */
/* ====================== */

.spread {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.spread-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 60px;
    align-items: center;
}

.spread-grid-full {
    grid-template-columns: 1fr;
    text-align: center;
}

.spread-number {
    margin-bottom: 30px;
}

/* ====================== */
/* SPREAD 1 - HERO         */
/* ====================== */

.spread-hero {
    background: linear-gradient(135deg, #0D0D12 0%, #1A1A24 50%, #0D0D12 100%);
    flex-direction: column;
}

.spread-hero .spread-grid {
    grid-template-columns: 1.2fr 0.8fr;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bell-curve-hero {
    width: 100%;
    max-width: 700px;
    height: auto;
}

.floating-symbols {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.symbol {
    position: absolute;
    font-family: 'IBM Plex Serif', serif;
    font-style: italic;
    color: #7B7B8A;
    opacity: 0;
    animation: symbolFloat 8s ease-in-out infinite;
}

.symbol-1 { top: 10%; left: 15%; font-size: 24px; animation-delay: 0s; }
.symbol-2 { top: 25%; right: 20%; font-size: 32px; animation-delay: 1.5s; }
.symbol-3 { bottom: 30%; left: 25%; font-size: 28px; animation-delay: 3s; }
.symbol-4 { top: 15%; right: 35%; font-size: 36px; animation-delay: 4.5s; }
.symbol-5 { bottom: 20%; right: 15%; font-size: 40px; animation-delay: 6s; }

@keyframes symbolFloat {
    0%, 100% { opacity: 0; transform: translateY(10px); }
    20%, 80% { opacity: 0.4; }
    50% { opacity: 0.7; transform: translateY(-10px); }
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.domain-lockup {
    margin-bottom: 24px;
}

.korean-accent {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(14px, 2vw, 20px);
    letter-spacing: 0.3em;
    color: #2AD4A8;
    margin-bottom: 8px;
}

.domain-name {
    display: inline;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 7vw, 112px);
    letter-spacing: -0.04em;
    line-height: 1;
    color: #E8E8E8;
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 40%, #E8E8E8 60%, #7B7B8A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.domain-tld {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 7vw, 112px);
    letter-spacing: -0.04em;
    line-height: 1;
    color: #D4602A;
}

.hero-subtitle {
    font-family: 'IBM Plex Serif', serif;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 400;
    font-style: italic;
    color: #7B7B8A;
    margin-bottom: 40px;
}

.hero-annotation {
    display: flex;
    align-items: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #2AD4A8, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ====================== */
/* SPREAD 2 - COIN FLIP    */
/* ====================== */

.spread-coin {
    background: #1A1A24;
}

.spread-coin .spread-grid {
    grid-template-columns: 0.8fr 1.2fr;
}

.coin-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.coin-container {
    perspective: 600px;
    width: 180px;
    height: 180px;
    cursor: pointer;
}

.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.coin.flipping {
    animation: coinFlip 0.8s ease-in-out;
}

.coin.show-tails {
    transform: rotateX(180deg);
}

@keyframes coinFlip {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(900deg) scale(1.1); }
    100% { transform: rotateX(1800deg); }
}

@keyframes coinFlipTails {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(900deg) scale(1.1); }
    100% { transform: rotateX(1980deg); }
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 64px;
}

.coin-heads {
    background: linear-gradient(135deg, #C0C0C0 0%, #E8E8E8 30%, #7B7B8A 60%, #E8E8E8 80%, #C0C0C0 100%);
    color: #1A1A24;
    border: 3px solid #E8E8E8;
    box-shadow: 0 0 30px rgba(42, 212, 168, 0.15), inset 0 0 20px rgba(255,255,255,0.1);
}

.coin-tails {
    background: linear-gradient(135deg, #3A3A42 0%, #7B7B8A 30%, #3A3A42 60%, #7B7B8A 80%, #3A3A42 100%);
    color: #E8E8E8;
    border: 3px solid #7B7B8A;
    transform: rotateX(180deg);
    box-shadow: 0 0 30px rgba(212, 96, 42, 0.15), inset 0 0 20px rgba(255,255,255,0.05);
}

.trial-counter {
    text-align: center;
}

.trial-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #7B7B8A;
}

.trial-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 48px;
    color: #E8E8E8;
    line-height: 1.1;
}

.ratio-display {
    width: 100%;
    max-width: 300px;
}

.ratio-bar {
    width: 100%;
    height: 4px;
    background: #3A3A42;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.ratio-fill {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, #2AD4A8, #D4602A);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ratio-labels {
    display: flex;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #7B7B8A;
}

.ratio-h { color: #2AD4A8; }
.ratio-t { color: #D4602A; }

.margin-note {
    margin-top: 40px;
    padding-left: 20px;
    border-left: 1px solid #3A3A42;
}

.note-korean {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    color: #7B7B8A;
    margin-bottom: 4px;
}

.note-translation {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3A3A3A;
}

/* ====================== */
/* SPREAD 3 - DISTRIBUTIONS */
/* ====================== */

.spread-distributions {
    background: linear-gradient(180deg, #0D0D12 0%, #1A1A24 100%);
    padding: 80px 0;
}

.distributions-header {
    margin-bottom: 60px;
}

.distribution-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.dist-card {
    background: linear-gradient(180deg, rgba(58, 58, 66, 0.3) 0%, rgba(13, 13, 18, 0.8) 100%);
    border: 1px solid #3A3A42;
    border-radius: 4px;
    padding: 30px 24px;
    transition: border-color 0.4s ease, transform 0.4s ease;
    cursor: default;
}

.dist-card:hover {
    border-color: #7B7B8A;
    transform: translateY(-4px);
}

.dist-svg {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.dist-label {
    text-align: left;
}

.dist-name {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #E8E8E8;
    margin-bottom: 8px;
}

.dist-formula {
    display: block;
    font-family: 'IBM Plex Mono', 'IBM Plex Serif', monospace;
    font-size: 12px;
    color: #7B7B8A;
    font-style: normal;
}

.distributions-note {
    margin: 40px auto 0;
    display: inline-block;
    border-left: none;
    border-top: 1px solid #3A3A42;
    padding: 20px 0 0 0;
    text-align: center;
}

/* ====================== */
/* SPREAD 4 - GALTON BOARD */
/* ====================== */

.spread-galton {
    background: #0D0D12;
}

.galton-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

#galton-canvas {
    width: 100%;
    max-width: 500px;
    height: auto;
    border: 1px solid #3A3A42;
    border-radius: 4px;
    background: rgba(26, 26, 36, 0.5);
}

.galton-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0D0D12;
    background: #2AD4A8;
    border: none;
    padding: 14px 36px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.galton-btn:hover {
    background: #E8E8E8;
    transform: translateY(-2px);
}

.galton-btn:active {
    transform: translateY(0);
}

/* ====================== */
/* SPREAD 5 - CONVERGENCE  */
/* ====================== */

.spread-convergence {
    background: linear-gradient(180deg, #1A1A24 0%, #0D0D12 100%);
}

.convergence-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 40px;
}

.convergence-title {
    margin-bottom: 60px;
}

.blur-word {
    display: inline-block;
    filter: blur(8px);
    opacity: 0.3;
    transition: filter 0.8s ease, opacity 0.8s ease;
    margin-right: 0.2em;
}

.blur-word.focused {
    filter: blur(0);
    opacity: 1;
}

.convergence-visual {
    margin: 60px 0;
}

.convergence-svg {
    width: 100%;
    height: auto;
}

.convergence-body {
    font-family: 'IBM Plex Serif', serif;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 400;
    color: #C0C0C0;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 60px;
    text-align: center;
}

.convergence-korean {
    margin-top: 60px;
}

.large-korean {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(64px, 12vw, 180px);
    letter-spacing: -0.02em;
    line-height: 1;
    background: linear-gradient(135deg, #E8E8E8 0%, #7B7B8A 30%, #E8E8E8 60%, #C0C0C0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.korean-subtitle {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7B7B8A;
}

/* ====================== */
/* FOOTER                  */
/* ====================== */

.site-footer {
    padding: 60px 40px;
    border-top: 1px solid #3A3A42;
    background: #0D0D12;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #7B7B8A;
}

.footer-domain {
    color: #E8E8E8;
    font-weight: 500;
}

.footer-divider {
    color: #3A3A42;
}

/* ====================== */
/* BLUR-FOCUS ANIMATION    */
/* ====================== */

.spread {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.spread.in-view {
    opacity: 1;
    transform: translateY(0);
}

.spread-hero {
    opacity: 1;
    transform: none;
}

/* ====================== */
/* RESPONSIVE              */
/* ====================== */

@media (max-width: 1024px) {
    .distribution-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .spread-grid {
        grid-template-columns: 1fr;
        padding: 60px 30px;
        gap: 40px;
    }

    .spread-hero .spread-grid,
    .spread-coin .spread-grid {
        grid-template-columns: 1fr;
    }

    .distribution-cards {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .hero-visual {
        order: -1;
    }

    .domain-name,
    .domain-tld {
        font-size: clamp(36px, 10vw, 64px);
    }
}
