/* ==============================================
   hwaglyul.com - Probability Visualization
   Design: Generative Art meets Fintech Trust
   ============================================== */

/* Root Colors and Variables */
:root {
    --color-teal: #20c8aa;
    --color-gold: #e8b44c;
    --color-navy: #111a2e;
    --color-dark-navy: #0c1220;
    --color-slate-blue: #8b7fd4;
    --color-deep-navy: #1e2a42;
    --color-light-gray: #c8d0e0;
    --color-off-white: #f0f0f0;

    --font-display: 'Playfair Display', serif;
    --font-body: 'Crimson Pro', serif;
    --font-code: 'Fira Code', monospace;
    --font-accent: 'Space Grotesk', sans-serif;

    --transition-smooth: 0.3s ease-in-out;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-dark-navy);
    color: var(--color-light-gray);
    line-height: 1.8;
    font-size: 0.95rem;
    overflow-x: hidden;
}

/* Canvas Container */
.canvas-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-dark-navy) 0%, var(--color-deep-navy) 100%);
    position: relative;
}

/* ============================================
   HERO SECTION - DISTRIBUTION VISUALIZATION
   ============================================ */

.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-dark-navy) 0%, var(--color-deep-navy) 50%, var(--color-navy) 100%);
}

.distribution-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#distribution-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(32, 200, 170, 0.1));
}

#bell-curve {
    opacity: 0.9;
    transition: all 0.05s linear;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-gold);
    opacity: 0.7;
    box-shadow: 0 0 8px rgba(232, 180, 76, 0.6);
}

.hero-text {
    position: relative;
    z-index: 3;
    text-align: center;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.domain-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-off-white);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.korean-subtitle {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--color-teal);
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(32, 200, 170, 0.3);
}

.tagline {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    color: var(--color-light-gray);
    letter-spacing: 1px;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeIn 0.8s ease-out;
}

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

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--color-off-white);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-teal), var(--color-gold));
    margin: 15px auto 0;
}

.section-description {
    color: var(--color-slate-blue);
    font-family: var(--font-accent);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Distributions Section */
.distributions {
    background-color: var(--color-navy);
    border-top: 1px solid rgba(32, 200, 170, 0.1);
}

.distribution-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: linear-gradient(135deg, rgba(32, 200, 170, 0.05), rgba(139, 127, 212, 0.05));
    border: 1px solid rgba(32, 200, 170, 0.15);
    padding: 30px;
    border-radius: 8px;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.card:hover {
    border-color: rgba(32, 200, 170, 0.4);
    background: linear-gradient(135deg, rgba(32, 200, 170, 0.1), rgba(139, 127, 212, 0.1));
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(32, 200, 170, 0.15);
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-teal);
    margin-bottom: 15px;
    font-weight: 700;
}

.card p {
    color: var(--color-light-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.math-notation {
    display: block;
    font-family: var(--font-code);
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--color-gold);
    padding: 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* Interactive Section */
.interactive {
    background-color: var(--color-deep-navy);
    border-top: 1px solid rgba(139, 127, 212, 0.1);
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.demo-item {
    background: linear-gradient(135deg, rgba(139, 127, 212, 0.05), rgba(232, 180, 76, 0.02));
    border: 1px solid rgba(139, 127, 212, 0.15);
    padding: 30px;
    border-radius: 8px;
    transition: all var(--transition-smooth);
}

.demo-item:hover {
    border-color: rgba(139, 127, 212, 0.4);
    background: linear-gradient(135deg, rgba(139, 127, 212, 0.1), rgba(232, 180, 76, 0.05));
}

.demo-item h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-slate-blue);
    margin-bottom: 15px;
    font-weight: 700;
}

.demo-item p {
    color: var(--color-light-gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.demo-button {
    background: linear-gradient(135deg, var(--color-teal), #1a9a8f);
    color: var(--color-dark-navy);
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: var(--font-accent);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.demo-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(32, 200, 170, 0.3);
}

.demo-button:active {
    transform: scale(0.98);
}

.control-group {
    margin: 15px 0;
}

.control-group label {
    display: block;
    color: var(--color-light-gray);
    font-family: var(--font-accent);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-slate-blue), var(--color-teal));
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-gold);
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: 0 0 10px rgba(232, 180, 76, 0.5);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(232, 180, 76, 0.8);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-gold);
    cursor: pointer;
    border: none;
    transition: all var(--transition-smooth);
    box-shadow: 0 0 10px rgba(232, 180, 76, 0.5);
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(232, 180, 76, 0.8);
}

/* Educational Section */
.educational {
    background-color: var(--color-navy);
    border-top: 1px solid rgba(32, 200, 170, 0.1);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.educational-card {
    background: linear-gradient(135deg, rgba(32, 200, 170, 0.02), rgba(139, 127, 212, 0.02));
    border-left: 3px solid var(--color-teal);
    padding: 25px;
    border-radius: 4px;
    transition: all var(--transition-smooth);
}

.educational-card:hover {
    background: linear-gradient(135deg, rgba(32, 200, 170, 0.08), rgba(139, 127, 212, 0.08));
    border-left-color: var(--color-gold);
    transform: translateX(5px);
}

.educational-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-teal);
    margin-bottom: 12px;
    font-weight: 700;
}

.educational-card p {
    color: var(--color-light-gray);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Beauty Section */
.beauty {
    background: linear-gradient(135deg, var(--color-deep-navy), var(--color-navy));
    border-top: 1px solid rgba(139, 127, 212, 0.1);
}

.beauty-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.beauty-text p {
    color: var(--color-light-gray);
    margin-bottom: 25px;
    line-height: 2;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.beauty-text p:first-of-type {
    color: var(--color-teal);
    font-style: italic;
    font-family: var(--font-accent);
}

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

.footer {
    background-color: var(--color-dark-navy);
    border-top: 1px solid rgba(32, 200, 170, 0.1);
    padding: 40px 20px;
    text-align: center;
    color: var(--color-slate-blue);
}

.footer p {
    font-family: var(--font-accent);
    font-size: 0.9rem;
    margin: 8px 0;
}

.footer .subtitle {
    font-size: 0.85rem;
    color: var(--color-light-gray);
    opacity: 0.7;
}

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

@media (max-width: 768px) {
    .content-section {
        padding: 40px 20px;
    }

    .distribution-cards,
    .demo-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .domain-title {
        font-size: 2rem;
    }

    .korean-subtitle {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .card,
    .demo-item,
    .educational-card {
        padding: 20px;
    }

    .hero-text {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .domain-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .korean-subtitle {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .card h3,
    .demo-item h3,
    .educational-card h3 {
        font-size: 1.1rem;
    }

    .content-section {
        padding: 30px 15px;
    }

    body {
        font-size: 0.9rem;
    }
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(32, 200, 170, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(32, 200, 170, 0.6));
    }
}

.glow-effect {
    animation: glow 3s ease-in-out infinite;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}
