/* hwaklyul.com - Fintech Trust Blue */
/* Palette: #f8fafc, #ffffff, #1d4ed8, #dbeafe, #1e293b, #64748b, #e2e8f0, #16a34a */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #f8fafc;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    color: #1e293b;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.hero-metric {
    text-align: center;
}

.metric-value {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 7rem);
    color: #1d4ed8;
    display: block;
    line-height: 1;
    position: relative;
}

.metric-value::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: #1d4ed8;
    margin: 0.5rem auto 0;
    opacity: 0.3;
}

.metric-label {
    font-size: 1rem;
    color: #64748b;
    display: block;
    margin-top: 1rem;
    letter-spacing: 0.05em;
}

.hero-sub-metrics {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 1rem 2rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.sub-metric {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.sub-prefix {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
}

.sub-value {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #1d4ed8;
}

.sub-divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
}

/* ===== ANALYSIS SECTION ===== */
.analysis {
    padding: 6rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.analysis-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto;
}

.panels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.08);
}

.panel-bar {
    height: 4px;
    background: #1d4ed8;
}

.panel-content {
    padding: 1.5rem;
}

.panel-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.panel-metric {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.panel-prefix {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #64748b;
}

.panel-value {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #1d4ed8;
    line-height: 1;
    position: relative;
}

.panel-value::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1d4ed8;
    opacity: 0.25;
}

.panel-value.positive {
    color: #16a34a;
}

.panel-value.positive::after {
    background: #16a34a;
}

.panel-text {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.6;
    margin-top: 1rem;
}

/* Confidence Bar */
.confidence-bar {
    margin-bottom: 0.5rem;
}

.confidence-track {
    position: relative;
    height: 8px;
    background: #dbeafe;
    border-radius: 4px;
    overflow: visible;
}

.confidence-fill {
    height: 100%;
    background: #1d4ed8;
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

.confidence-marker {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 14px;
    background: #1e293b;
    border-radius: 1px;
    transform: translateX(-1px);
}

.confidence-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: 0.65rem;
    color: #64748b;
}

/* Distribution Bars */
.distribution-bars {
    margin-bottom: 0.5rem;
}

.dist-bar-group {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 60px;
}

.dist-bar {
    flex: 1;
    background: #dbeafe;
    border-radius: 2px 2px 0 0;
    height: 0;
    transition: height 0.8s ease;
}

/* Prediction Rows */
.prediction-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.prediction-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prediction-label {
    font-size: 0.7rem;
    color: #64748b;
    width: 80px;
    flex-shrink: 0;
}

.prediction-bar-track {
    flex: 1;
    height: 6px;
    background: #dbeafe;
    border-radius: 3px;
    overflow: hidden;
}

.prediction-bar-fill {
    height: 100%;
    background: #1d4ed8;
    border-radius: 3px;
    width: 0;
    transition: width 1s ease;
}

.prediction-val {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    color: #1d4ed8;
    width: 30px;
    text-align: right;
}

/* Bayes Visual */
.bayes-visual {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.bayes-prior,
.bayes-posterior {
    flex: 1;
}

.bayes-label {
    font-size: 0.65rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.25rem;
}

.bayes-bar-track {
    height: 8px;
    background: #dbeafe;
    border-radius: 4px;
    overflow: hidden;
}

.bayes-bar-fill {
    height: 100%;
    background: #1d4ed8;
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

.bayes-arrow {
    font-size: 1.2rem;
    color: #64748b;
    flex-shrink: 0;
}

/* ===== DISTRIBUTION SECTION ===== */
.distribution {
    padding: 6rem 2rem;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.bell-curve-container {
    position: relative;
    max-width: 500px;
    margin: 3rem auto 0;
}

.bell-curve {
    position: relative;
    width: 100%;
    height: 180px;
}

.bell-fill {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 170px;
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.8) 0%, rgba(248, 250, 252, 0) 100%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.bell-outline {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 170px;
    border: 2.5px solid #1d4ed8;
    border-bottom: none;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: transparent;
}

.bell-baseline {
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    position: relative;
}

.sigma-markers {
    position: relative;
    width: 100%;
    height: 40px;
    margin-top: 0.25rem;
}

.sigma-mark {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
}

.sigma-line {
    width: 1px;
    height: 12px;
    background: #e2e8f0;
    margin: 0 auto;
}

.sigma-line-center {
    background: #1d4ed8;
    height: 16px;
}

.sigma-label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.2rem;
    font-family: 'Inter', sans-serif;
}

.sigma-label-mu {
    color: #1d4ed8;
    font-weight: 700;
}

.distribution-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.dist-stat {
    text-align: center;
}

.dist-stat-value {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1d4ed8;
    display: block;
}

.dist-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
    margin-top: 0.25rem;
}

/* ===== TRUST SECTION ===== */
.trust {
    padding: 6rem 2rem;
    text-align: center;
}

.trust-shields {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.shield {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.shield-icon {
    width: 32px;
    height: 38px;
    background: #1d4ed8;
    clip-path: polygon(50% 0%, 100% 20%, 100% 65%, 50% 100%, 0% 65%, 0% 20%);
    transition: transform 0.3s ease;
}

.shield:hover .shield-icon {
    transform: scale(1.1);
}

.shield-text {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.trust-statement {
    max-width: 500px;
    margin: 0 auto 3rem;
}

.trust-headline {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.trust-sub {
    font-size: 0.85rem;
    color: #64748b;
}

.trust-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    max-width: 400px;
    margin: 0 auto;
}

.trust-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
}

.trust-copy {
    font-size: 0.7rem;
    color: #64748b;
}

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

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

/* Stagger animation for panels */
.panels-grid .panel:nth-child(1) { transition-delay: 0s; }
.panels-grid .panel:nth-child(2) { transition-delay: 0.1s; }
.panels-grid .panel:nth-child(3) { transition-delay: 0.2s; }
.panels-grid .panel:nth-child(4) { transition-delay: 0.3s; }

/* Hero entrance animation */
.hero .brand {
    animation: heroFadeDown 0.8s ease forwards;
}

.hero .hero-metric {
    animation: heroFadeUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero .hero-sub-metrics {
    animation: heroFadeUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

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

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

/* Metric counting animation handled by JS */
.metric-value {
    transition: color 0.3s ease;
}

/* Distribution stat stagger */
.distribution-stats .dist-stat:nth-child(1) { transition-delay: 0s; }
.distribution-stats .dist-stat:nth-child(2) { transition-delay: 0.15s; }
.distribution-stats .dist-stat:nth-child(3) { transition-delay: 0.3s; }
