/* ==========================================================================
   hwakryul.com — Probability Corporate Meditation
   Design System: Complementary Tension, Oversized Display, Layered Depth
   ========================================================================== */

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #1C1F26;
    color: #C8CCD6;
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.75;
    font-weight: 400;
    letter-spacing: 0;
}

/* ==========================================================================
   Color Palette (Design System)
   ========================================================================== */

:root {
    /* Background and structure */
    --bg-deep: #1C1F26;          /* Ink Charcoal */
    --bg-surface: #242833;        /* Slate Dark */
    --grid-line: #2A2E38;         /* Graphite */
    --grid-line-bright: #3A4250;  /* Grid line bright/active state */

    /* Text colors */
    --text-body: #C8CCD6;         /* Silver Mist */
    --text-muted: #6B7280;        /* Fog Gray */
    --text-bright: #F0F2F5;       /* Assertion White */

    /* Accent colors */
    --accent-warm: #D4A84B;       /* Probability Gold */
    --accent-cool: #4A7B9D;       /* Inference Blue */
    --underline-color: #E8C97A;   /* Pale Gold */

    /* Bokeh colors */
    --bokeh-warm-light: #D4A84B;  /* Probability Gold */
    --bokeh-warm-dark: #B8923A;   /* Amber Glow */
    --bokeh-cool-light: #4A7B9D;  /* Inference Blue */
    --bokeh-cool-dark: #3A6B85;   /* Deep Teal */

    /* Utility */
    --error-color: #9D4A5E;       /* Quiet Rose */
}

/* ==========================================================================
   Typography System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300&family=Noto+Sans+KR:wght@300;400&family=Space+Grotesk:wght@500&family=IBM+Plex+Mono:wght@400&display=swap');

/* Display typeface (Outfit) - Light for display, ExtraLight for oversized */
.display-hero {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-size: 280px;
    font-weight: 200;
    letter-spacing: 0.04em;
    line-height: 0.92;
    color: var(--text-bright);
    text-align: center;
}

.section-heading {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-size: 120px;
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--text-body);
    margin-bottom: 2rem;
}

.card-heading {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: var(--text-bright);
    margin-bottom: 1rem;
}

/* Body typeface (Noto Sans KR) - Regular and Light */
.body-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-body);
    margin-bottom: 1.5rem;
}

.annotation-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-body);
}

.annotation-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* Numerical display (Space Grotesk) - Medium */
.number-display {
    font-family: 'Space Grotesk', monospace;
    font-size: 240px;
    font-weight: 500;
    line-height: 1;
    color: var(--accent-warm);
    letter-spacing: -0.02em;
}

.number-unit {
    font-family: 'Space Grotesk', monospace;
    font-size: 60px;
    font-weight: 500;
    color: var(--accent-warm);
    margin-left: 0.5rem;
}

/* Navigation label (IBM Plex Mono) */
.nav-label {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    z-index: 100;
    transform-origin: right center;
    pointer-events: none;
}

.nav-label.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   Layout and Depth Planes
   ========================================================================== */

#bokeh-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    will-change: transform;
}

.grid-plane {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(90deg, rgba(42, 46, 56, 0.4) 1px, transparent 1px),
        linear-gradient(0deg, rgba(42, 46, 56, 0.4) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    will-change: transform;
}

#content-container {
    position: relative;
    z-index: 10;
    width: 100%;
}

.content-container {
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Chamber Base Styles
   ========================================================================== */

.chamber {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    will-change: transform;
}

.chamber-content {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 20;
}

/* ==========================================================================
   Chamber 1: Assertion (Hero)
   ========================================================================== */

.chamber-assertion {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 120vh;
}

.hero-text {
    position: relative;
    text-align: center;
}

.hero-text .underline-draw {
    margin-top: 2rem;
    animation: drawLine 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes drawLine {
    from {
        stroke-dasharray: 400;
        stroke-dashoffset: 400;
    }
    to {
        stroke-dasharray: 400;
        stroke-dashoffset: 0;
    }
}

/* ==========================================================================
   Chamber 2: Evidence (About)
   ========================================================================== */

.chamber-evidence {
    background: transparent;
}

.asymmetric-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.wide-column {
    display: flex;
    flex-direction: column;
}

.narrow-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.annotation-block {
    padding: 1.5rem;
    border-left: 2px solid var(--accent-cool);
    padding-left: 1rem;
}

.viz-element {
    opacity: 0.6;
}

/* ==========================================================================
   Chamber 3: Inference (Methodology)
   ========================================================================== */

.chamber-inference {
    background: transparent;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

.card {
    padding: 2rem;
    background: rgba(36, 40, 51, 0.5);
    border: 1px solid rgba(74, 123, 157, 0.2);
    position: relative;
    transform: rotate(calc(var(--card-rotation) * 1deg));
    transition: all 0.3s ease-out;
    will-change: transform;
}

.card-1 {
    --card-rotation: 2;
    transform: rotate(2deg);
}

.card-2 {
    --card-rotation: 0;
    transform: rotate(0deg);
    margin-top: 1.5rem;
}

.card-3 {
    --card-rotation: -2;
    transform: rotate(-2deg);
}

.card:hover {
    background: rgba(36, 40, 51, 0.8);
    border-color: rgba(74, 123, 157, 0.4);
}

.card .underline-draw-small {
    margin-top: 1.5rem;
    opacity: 0;
    animation: drawLineSmall 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.card-1 .underline-draw-small {
    animation-delay: 0.2s;
}

.card-2 .underline-draw-small {
    animation-delay: 0.4s;
}

.card-3 .underline-draw-small {
    animation-delay: 0.6s;
}

@keyframes drawLineSmall {
    0% {
        stroke-dasharray: 120;
        stroke-dashoffset: 120;
        opacity: 1;
    }
    to {
        stroke-dasharray: 120;
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* ==========================================================================
   Chamber 4: Outcome (Results)
   ========================================================================== */

.chamber-outcome {
    background: transparent;
    padding: 80px 40px;
}

.single-column {
    max-width: 900px;
    margin: 0 auto;
}

.outcome-block {
    display: flex;
    flex-direction: column;
    margin-bottom: 6rem;
    gap: 1.5rem;
}

.large-number {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.outcome-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 24px;
    line-height: 1.6;
    color: var(--text-body);
    max-width: 600px;
}

/* ==========================================================================
   Chamber 5: Contact (Footer)
   ========================================================================== */

.chamber-contact {
    background: transparent;
    min-height: 80vh;
    padding-bottom: 100px;
}

.grid-emphasis {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-block .label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-block .value {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-bright);
}

/* ==========================================================================
   Foreground Accents (Plane 3)
   ========================================================================== */

#foreground-accents {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    will-change: transform;
}

.transition-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: rgba(74, 123, 157, 0.4);
    left: 0;
}

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

@media (max-width: 768px) {
    .display-hero {
        font-size: 120px;
    }

    .section-heading {
        font-size: 56px;
    }

    .card-heading {
        font-size: 28px;
    }

    .number-display {
        font-size: 120px;
    }

    .number-unit {
        font-size: 32px;
    }

    .asymmetric-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .chamber {
        padding: 40px 24px;
    }

    .outcome-text {
        font-size: 18px;
    }

    .nav-label {
        font-size: 11px;
        right: 16px;
    }

    .grid-plane {
        background-size: 40px 40px;
    }
}

@media (max-width: 480px) {
    .display-hero {
        font-size: 80px;
    }

    .section-heading {
        font-size: 36px;
    }

    .card-heading {
        font-size: 20px;
    }

    .number-display {
        font-size: 80px;
    }

    .number-unit {
        font-size: 24px;
    }

    .chamber {
        padding: 30px 16px;
    }

    .body-text {
        font-size: 16px;
        line-height: 1.65;
    }

    .outcome-text {
        font-size: 16px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-label {
        display: none;
    }
}

/* ==========================================================================
   Animations and Micro-interactions
   ========================================================================== */

/* Scroll-triggered reveal animations */
.chamber {
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

/* Underline draw on hover */
.card-heading {
    position: relative;
}

.card-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-warm);
    transition: width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    opacity: 0;
}

.card:hover .card-heading::after {
    width: 100%;
    opacity: 0.7;
}

/* Grid intersection pulse animation */
@keyframes gridPulse {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.4;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Grid line brightening on content overlap */
.chamber-content {
    position: relative;
}

.chamber-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow: 0 0 40px 0 rgba(58, 66, 80, 0.6);
    opacity: 0;
}

/* Performance optimizations */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.chamber {
    will-change: opacity, transform;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.opacity-muted {
    opacity: 0.6;
}
