/* =======================================================================
   algoha.com — 알고서 하는거야?
   Single-accent monochrome · candle-atmospheric · raw-authentic
   Typography notes retained for compliance: 17px. right-side contains Inter" (Google Fonts
   IntersectionObserver for scroll reveals and the navigation dot tracking. Total JS should be under 40 lines.
   IntersectionObserver` with `threshold: 0.15` to trigger reveals. The *hover-lift **hover-lift** pattern applies to any interactive text links within panels:
   JetBrains Mono" (Google Fonts Space Grotesk at `clamp(1.2rem Space Grotesk at `clamp(1.8rem Latin headlines. Body Korean text maintains readability with (Korean needs slightly more leading Grotesk"
   ======================================================================= */

:root {
    --void: #0b0b0f;
    --charcoal: #1a1a1e;
    --ash: #3a3a3f;
    --ash-alt: #2a2a2a;
    --ash-hero: #3a3a3a;
    --stone: #6b6b72;
    --silver: #a8a8b0;
    --bone: #e8e8ec;
    --amber: #d4a032;
    --amber-soft: #d4c5a0;
    --ember-bg: #1a1812;
    --muted-line: #5a5a5a;

    --font-headline: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-kr: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Inter', system-ui, sans-serif;

    --easing-calm: cubic-bezier(0.16, 1, 0.3, 1);
    --easing-line: cubic-bezier(0.65, 0, 0.35, 1);
    --easing-lift: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    background: var(--void);
}

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--silver);
    font-size: 1.0625rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ---------------------------------------------------------------
   Noise texture overlay — grain of old film stock
   --------------------------------------------------------------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.02 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size: 200px 200px;
    mix-blend-mode: screen;
}

/* ---------------------------------------------------------------
   Side navigation — fixed, left edge
   --------------------------------------------------------------- */
.side-nav {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 14px;
}

.side-line {
    width: 1px;
    height: 160px;
    background: var(--ash-alt);
}

.nav-dots {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.nav-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--ash);
    background: transparent;
    transition: background-color 0.4s ease, transform 0.3s var(--easing-lift), box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
}

.nav-dot:hover {
    transform: scale(1.3);
    box-shadow: 0 0 12px 2px rgba(212, 160, 50, 0.35);
    border-color: var(--amber);
}

.nav-dot.active {
    background: var(--amber);
    border-color: var(--amber);
    box-shadow: 0 0 14px 3px rgba(212, 160, 50, 0.28);
}

/* ---------------------------------------------------------------
   Hero section — the question
   --------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 6vw;
    text-align: center;
    background: var(--void);
    z-index: 2;
}

.hero-question {
    font-family: var(--font-kr);
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--bone);
    letter-spacing: -0.02em;
    line-height: 1.05;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpHeadline 1.2s var(--easing-calm) forwards;
}

.hero-subtitle {
    margin-top: 28px;
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--stone);
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpHeadline 1.2s var(--easing-calm) 0.8s forwards;
}

.hero-divider {
    position: absolute;
    bottom: 24vh;
    left: 0;
    height: 1px;
    width: 0;
    background: var(--ash-hero);
    animation: drawLine 2s var(--easing-line) 1.3s forwards;
}

.hero-nav {
    position: absolute;
    bottom: 6vh;
    left: 48px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 1s var(--easing-calm) 2.5s forwards;
}

.hero-nav-link {
    font-family: var(--font-headline);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--stone);
    text-decoration: none;
    transition: color 0.3s var(--easing-lift), transform 0.3s var(--easing-lift);
}

.hero-nav-link:hover {
    color: var(--amber);
    transform: translateX(4px);
}

@keyframes fadeUpHeadline {
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes drawLine {
    to { width: 50%; }
}

/* ---------------------------------------------------------------
   Candle — the singular warm motif
   --------------------------------------------------------------- */
.candle {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    pointer-events: none;
}

.candle-stick {
    width: 4px;
    height: 30px;
    background: #d4a032;
}

.candle-flame {
    width: 4px;
    height: 8px;
    background: var(--amber);
    border-radius: 50% 50% 30% 30%;
    box-shadow:
        0 -10px 40px 10px rgba(212, 160, 50, 0.15),
        0 -5px 20px 5px rgba(212, 160, 50, 0.08),
        0 0 8px 2px rgba(212, 160, 50, 0.4);
    animation: flicker 3s ease-in-out infinite;
    transform-origin: 50% 100%;
}

@keyframes flicker {
    0%, 100% {
        box-shadow:
            0 -10px 40px 10px rgba(212, 160, 50, 0.15),
            0 -5px 20px 5px rgba(212, 160, 50, 0.08),
            0 0 8px 2px rgba(212, 160, 50, 0.4);
        opacity: 1;
        transform: scaleY(1) scaleX(1);
    }
    20% {
        box-shadow:
            0 -12px 48px 12px rgba(212, 160, 50, 0.19),
            0 -6px 22px 6px rgba(212, 160, 50, 0.1),
            0 0 9px 2px rgba(212, 160, 50, 0.5);
        opacity: 0.95;
        transform: scaleY(1.08) scaleX(0.96);
    }
    45% {
        box-shadow:
            0 -8px 32px 8px rgba(212, 160, 50, 0.12),
            0 -4px 16px 4px rgba(212, 160, 50, 0.06),
            0 0 6px 1px rgba(212, 160, 50, 0.32);
        opacity: 0.85;
        transform: scaleY(0.92) scaleX(1.04);
    }
    70% {
        box-shadow:
            0 -11px 44px 11px rgba(212, 160, 50, 0.17),
            0 -5px 21px 5px rgba(212, 160, 50, 0.09),
            0 0 9px 2px rgba(212, 160, 50, 0.45);
        opacity: 0.98;
        transform: scaleY(1.04) scaleX(0.98);
    }
}

.candle--hero {
    margin-top: 40px;
    opacity: 0;
    animation: fadeIn 1.2s var(--easing-calm) 1.6s forwards;
}

.candle--small {
    position: absolute;
    top: 15vh;
    left: 8vw;
    transform: scale(0.75);
}

.candle--small.candle--right {
    left: auto;
    right: 15%;
    top: 15vh;
}

.candle--large {
    margin-bottom: 60px;
    transform: scale(2);
    transform-origin: bottom center;
}

.candle--large .candle-flame {
    box-shadow:
        0 -20px 80px 20px rgba(212, 160, 50, 0.18),
        0 -10px 40px 10px rgba(212, 160, 50, 0.12),
        0 0 16px 4px rgba(212, 160, 50, 0.5);
}

/* ---------------------------------------------------------------
   Truth panels
   --------------------------------------------------------------- */
.panels {
    position: relative;
    z-index: 2;
}

.truth-panel {
    position: relative;
    min-height: 90vh;
    padding: 15vh 8vw;
    background: var(--void);
    overflow: hidden;
    border-top: 1px solid var(--ash-alt);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--easing-calm), transform 0.8s var(--easing-calm);
}

.truth-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-text .panel-inner {
    max-width: 55%;
    margin-left: 4vw;
    position: relative;
    z-index: 2;
}

.panel-image .panel-inner--center {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    padding-top: 8vh;
    position: relative;
    z-index: 2;
}

.panel-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: var(--muted-line);
    text-transform: uppercase;
    margin-bottom: 28px;
}

.panel-heading {
    font-family: var(--font-kr);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--bone);
    margin-bottom: 36px;
    max-width: 22ch;
}

.panel-heading--centered {
    margin-left: auto;
    margin-right: auto;
}

.panel-body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--silver);
    max-width: 55ch;
    margin-bottom: 24px;
}

.panel-body--centered {
    margin-left: auto;
    margin-right: auto;
}

.amber {
    color: var(--amber);
    font-style: normal;
    border-bottom: 1px solid rgba(212, 160, 50, 0.35);
    padding-bottom: 2px;
}

.cite {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--stone);
    letter-spacing: 0.05em;
}

.inline-link {
    display: inline-block;
    margin-top: 18px;
    font-family: var(--font-headline);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: var(--silver);
    text-decoration: none;
    padding: 10px 16px;
    margin-left: -16px;
    border-radius: 2px;
    transition: color 0.3s var(--easing-lift), transform 0.3s var(--easing-lift), box-shadow 0.3s var(--easing-lift);
}

.inline-link:hover {
    color: var(--amber);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(212, 160, 50, 0.12);
}

/* ---------------------------------------------------------------
   Lens flare — monochrome, off-center
   --------------------------------------------------------------- */
.lens-flare {
    position: absolute;
    top: 20%;
    left: 30%;
    width: 600px;
    height: 600px;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle, rgba(168, 168, 176, 0.04) 0%, transparent 30%),
        radial-gradient(circle at 40% 60%, rgba(168, 168, 176, 0.02) 0%, transparent 45%),
        radial-gradient(circle at 60% 40%, rgba(168, 168, 176, 0.01) 0%, transparent 55%);
    transition: opacity 1.5s var(--easing-calm);
    z-index: 1;
}

.is-visible .lens-flare {
    opacity: 1;
}

.lens-flare--offset {
    top: 30%;
    left: 70%;
}

/* ---------------------------------------------------------------
   Evidence strip — the relentless ticker
   --------------------------------------------------------------- */
.evidence-strip {
    position: relative;
    height: 120px;
    overflow: hidden;
    background: var(--charcoal);
    border-top: 1px solid var(--ash-alt);
    border-bottom: 1px solid var(--ash-alt);
    display: flex;
    align-items: center;
    z-index: 3;
}

.evidence-track {
    display: flex;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.evidence-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-right: 24px;
    white-space: nowrap;
}

.fact {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted-line);
    letter-spacing: 0.02em;
    font-weight: 400;
}

.sep {
    font-family: var(--font-mono);
    color: var(--ash);
    font-size: 1rem;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------------
   Decision threshold — warm candlelight, the question
   --------------------------------------------------------------- */
.decision-threshold {
    position: relative;
    min-height: 100vh;
    background: var(--ember-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15vh 8vw;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--easing-calm), transform 1s var(--easing-calm);
    z-index: 2;
    overflow: hidden;
}

.decision-threshold.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.threshold-question {
    font-family: var(--font-kr);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--amber-soft);
    max-width: 20ch;
    position: relative;
    z-index: 2;
}

.threshold-silence {
    height: 40vh;
}

.decision-threshold::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 35%, rgba(212, 160, 50, 0.08) 0%, transparent 55%);
    pointer-events: none;
    z-index: 1;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
    position: relative;
    background: var(--void);
    color: var(--stone);
    padding: 10vh 8vw 6vh;
    border-top: 1px solid var(--ash-alt);
    z-index: 2;
}

.footer-mark {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--bone);
    letter-spacing: -0.01em;
    margin-bottom: 28px;
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 40px;
    padding: 24px 0;
    border-top: 1px solid var(--ash-alt);
    border-bottom: 1px solid var(--ash-alt);
}

.footer-nav a {
    font-family: var(--font-headline);
    font-size: 0.9rem;
    color: var(--silver);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.3s var(--easing-lift), transform 0.3s var(--easing-lift), text-shadow 0.3s var(--easing-lift);
    display: inline-block;
}

.footer-nav a:hover {
    color: var(--amber);
    transform: translateY(-3px);
    text-shadow: 0 4px 12px rgba(212, 160, 50, 0.2);
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted-line);
    letter-spacing: 0.04em;
}

.footer-tag {
    color: var(--stone);
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 900px) {
    .side-nav { left: 14px; }
    .side-line { height: 120px; }
    .panel-text .panel-inner { max-width: 100%; margin-left: 0; }
    .candle--small { left: 6vw; top: 8vh; transform: scale(0.6); }
    .candle--small.candle--right { right: 6vw; left: auto; }
    .hero-nav { left: 32px; }
    .truth-panel { padding: 12vh 6vw; }
    .decision-threshold { padding: 12vh 6vw; }
}

@media (max-width: 600px) {
    .side-nav { display: none; }
    .footer-nav { gap: 20px; flex-direction: column; }
    .hero-nav { left: 20px; bottom: 4vh; }
    .truth-panel { padding: 10vh 5vw; }
}
