/* 확률.com - Brutalist Probability Garden */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --warm-white: #FAFAF4;
    --grid-white: #FFFFFF;
    --candy-pink: #E060A0;
    --candy-teal: #40C8B8;
    --candy-yellow: #F0C840;
    --candy-violet: #8060D0;
    --brutal-border: #2A2040;
    --text-dark: #2A2040;
    --text-body: #3A3050;
}

body {
    background: var(--warm-white);
    color: var(--text-dark);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    overflow-x: hidden;
}

/* Halftone Texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, rgba(42, 32, 64, 0.03) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
    z-index: 100;
}

/* Hero Section */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
}
.hero-frame {
    text-align: center;
    border: 6px solid var(--brutal-border);
    padding: 40px;
    background: var(--grid-white);
    position: relative;
    max-width: 600px;
    width: 100%;
    filter: sepia(0.2) contrast(1.05);
}
.hero-title {
    font-family: 'Jua', sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    color: var(--text-dark);
    opacity: 0;
    animation: heroDropIn 0.4s ease forwards 0.3s;
}
.hero-sub {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    color: var(--candy-pink);
    display: block;
    margin-bottom: 1rem;
}
@keyframes heroDropIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Probability Tree */
.prob-tree {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-top: 1rem;
}
.branch {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}
.branch.grown {
    animation: branchGrow 0.5s ease forwards;
}
@keyframes branchGrow { to { stroke-dashoffset: 0; } }
.node-end {
    transform: scale(0);
    transform-origin: center;
}
.node-end.bloomed {
    animation: nodeBloom 0.3s ease forwards;
}
@keyframes nodeBloom { to { transform: scale(1); } }
.tree-label {
    font-family: 'Fira Code', monospace;
    opacity: 0;
}
.tree-label.shown {
    animation: labelFade 0.3s ease forwards;
}
@keyframes labelFade { to { opacity: 1; } }

/* Candy Strips */
.candy-strip { width: 100%; }
.strip-pink { height: 16px; background: var(--candy-pink); }
.strip-teal { background: var(--candy-teal); }
.strip-yellow { background: var(--candy-yellow); }

/* Content Frame */
.content-frame {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 6px solid var(--brutal-border);
    background: var(--grid-white);
}

/* Grid Cells */
.grid-cell {
    padding: 24px;
    border: 4px solid var(--brutal-border);
    background: var(--grid-white);
    transition: border-color 0.2s ease;
    opacity: 0;
}
.grid-cell.visible {
    animation: cellReveal 0.4s ease forwards;
}
@keyframes cellReveal { from { opacity: 0; } to { opacity: 1; } }

.grid-cell:hover {
    animation: borderCycle 1s linear infinite;
}
@keyframes borderCycle {
    0% { border-color: var(--candy-pink); }
    25% { border-color: var(--candy-teal); }
    50% { border-color: var(--candy-yellow); }
    75% { border-color: var(--candy-violet); }
    100% { border-color: var(--candy-pink); }
}

/* Typography */
.cell-title {
    font-family: 'Jua', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}
.cell-body {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.8;
    font-weight: 400;
    margin-bottom: 0.75rem;
}
.cell-formula {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: var(--candy-pink);
    display: block;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 3rem 2rem;
}
.footer-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--candy-pink);
}

@media (max-width: 768px) {
    .hero-section { min-height: 70vh; padding: 30px; }
    .hero-frame { padding: 24px; }
    .content-grid { grid-template-columns: 1fr; }
}
