/* ===== GUIDE COMMON BASE CSS ===== */
/* Version: 2026.04 */
/* 공통 디자인 토큰, 리셋, 레이아웃, 네비게이션, 히어로, 섹션, 푸터, 반응형 */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Background */
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --bg-surface: #16161f;
    --bg-section-alt: #0d0d14;

    /* Text */
    --text: #e8e8ed;
    --text-secondary: #9898a8;
    --text-muted: #6a6a7a;

    /* Border */
    --border: #2a2a3a;
    --border-light: #1e1e2e;

    /* Color Palette */
    --blue: #4f8ff7;
    --blue-dim: #4f8ff720;
    --purple: #a78bfa;
    --purple-dim: #a78bfa20;
    --green: #34d399;
    --green-dim: #34d39920;
    --orange: #fb923c;
    --orange-dim: #fb923c20;
    --red: #f87171;
    --red-dim: #f8717120;
    --yellow: #fbbf24;
    --yellow-dim: #fbbf2420;
    --cyan: #22d3ee;
    --cyan-dim: #22d3ee20;
    --pink: #f472b6;
    --pink-dim: #f472b620;

    /* Accent - 각 가이드에서 override */
    --accent: var(--blue);
    --accent-dim: var(--blue-dim);

    /* Gradients - 각 가이드에서 override */
    --gradient-1: linear-gradient(135deg, #4f8ff7, #a78bfa);

    /* Typography */
    --font-sans: 'Inter', 'Noto Sans KR', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Radius */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadow */
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

code {
    font-family: var(--font-mono);
    background: var(--bg-surface);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: var(--cyan);
}

strong { font-weight: 700; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== READING PROGRESS ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-1);
    z-index: 1001;
    transition: width 0.1s;
    width: 0%;
}

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s;
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: white;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    text-decoration: none;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
    border-radius: 1px;
}

/* ===== LANG TOGGLE ===== */
.lang-toggle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 12px;
    flex-shrink: 0;
}

.lang-toggle:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
}

/* i18n.js 용 lang-btn */
.lang-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.lang-btn.active {
    color: var(--text);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(79, 143, 247, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 143, 247, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

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

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-dim);
    border: 1px solid rgba(79, 143, 247, 0.3);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
}

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

.hero-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(79, 143, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(79, 143, 247, 0.4);
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    text-decoration: none;
}

/* ===== HERO SCROLL INDICATOR ===== */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-scroll-line {
    width: 2px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: 2px;
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--bg-section-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    padding: 4px 14px;
    background: var(--accent-dim);
    border: 1px solid rgba(79, 143, 247, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 60px;
}

.subsection-desc {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-section-alt);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}

.footer-content {
    display: flex;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-main {
    flex: 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.footer-main p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== VERSION BADGE ===== */
.footer-version {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        padding: 16px 24px;
        gap: 12px;
        border-bottom: 1px solid var(--border);
    }

    .nav-toggle {
        display: flex;
    }

    .hero-stats { gap: 24px; }
    .hero-stat-number { font-size: 2rem; }

    .footer-content { flex-direction: column; gap: 32px; }
}

@media (max-width: 480px) {
    .section { padding: 60px 0; }
    .container { padding: 0 16px; }
    .hero { padding: 100px 0 60px; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .hero-actions { flex-direction: column; align-items: center; }
}
