/* =============================================================
   FACETAG // GLOBAL STYLES
   ============================================================= */

:root {
    --bg-base: #060810;
    --bg-panel: #0c1220;
    --bg-panel-2: #111a2e;
    --border-line: #1a2540;
    --border-line-2: #243358;
    --accent-cyan: #00e5ff;
    --accent-cyan-dim: #00aabb;
    --accent-magenta: #ff2bd6;
    --accent-amber: #ffb627;
    --accent-green: #29ff8d;
    --accent-red: #ff3b6a;
    --text-primary: #e6f4ff;
    --text-secondary: #7d92b3;
    --text-muted: #4a5b7a;
    --grid-line: rgba(0, 229, 255, 0.04);
}

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

html, body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-cyan); color: var(--bg-base); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan-dim); }

/* === BACKGROUND LAYERS === */
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 229, 255, 0.08), transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 43, 214, 0.05), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* particle canvas */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

/* === LOADING SCREEN === */
.boot-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.6s, visibility 0.6s;
}

.boot-screen.done { opacity: 0; visibility: hidden; }

/* 부팅 스크린 로고 이미지 */
.boot-logo-img {
    width: 84px; height: 84px;
    object-fit: contain;
    filter:
        brightness(0) saturate(100%)
        invert(83%) sepia(78%) saturate(1842%) hue-rotate(135deg) brightness(105%) contrast(101%)
        drop-shadow(0 0 12px var(--accent-cyan));
    animation: boot-logo-pulse 2s ease-in-out infinite;
}

@keyframes boot-logo-pulse {
    0%, 100% { transform: scale(1); filter:
        brightness(0) saturate(100%)
        invert(83%) sepia(78%) saturate(1842%) hue-rotate(135deg) brightness(100%) contrast(101%)
        drop-shadow(0 0 8px var(--accent-cyan)); }
    50% { transform: scale(1.05); filter:
        brightness(0) saturate(100%)
        invert(83%) sepia(78%) saturate(1842%) hue-rotate(135deg) brightness(120%) contrast(101%)
        drop-shadow(0 0 24px var(--accent-cyan)); }
}

.boot-logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: 8px;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px var(--accent-cyan);
}

.boot-bar {
    width: 240px;
    height: 2px;
    background: var(--border-line);
    overflow: hidden;
    position: relative;
}

.boot-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    animation: boot-load 1.4s ease-in-out;
}

@keyframes boot-load {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.boot-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 3px;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

/* === HEADER === */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-line);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(6, 8, 16, 0.7);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.25s ease;
    will-change: padding;
    transform: translateZ(0);
}

header.shrink { padding: 12px 32px; }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 40px; height: 40px;
    border: 1.5px solid var(--accent-cyan);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3), inset 0 0 12px rgba(0, 229, 255, 0.05);
    animation: logo-pulse 3s ease-in-out infinite;
    background: rgba(0, 229, 255, 0.04);
    flex-shrink: 0;
}

@keyframes logo-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(0, 229, 255, 0.3), inset 0 0 12px rgba(0, 229, 255, 0.05); }
    50% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.6), inset 0 0 16px rgba(0, 229, 255, 0.15); }
}

/* HUD 코너 마커 (로고 박스 4모서리) */
.brand-logo::before, .brand-logo::after {
    content: '';
    position: absolute;
    background: var(--accent-cyan);
}
.brand-logo::before { width: 8px; height: 1.5px; top: -1.5px; left: -1.5px; }
.brand-logo::after { width: 1.5px; height: 8px; top: -1.5px; left: -1.5px; }

/* 로고 이미지 — 검정→흰색 + 시안 글로우 */
.brand-logo img {
    width: 28px; height: 28px;
    object-fit: contain;
    filter:
        brightness(0) saturate(100%)
        invert(83%) sepia(78%) saturate(1842%) hue-rotate(135deg) brightness(101%) contrast(101%)
        drop-shadow(0 0 3px rgba(0, 229, 255, 0.6));
    transition: filter 0.3s;
}

.brand:hover .brand-logo img {
    filter:
        brightness(0) saturate(100%)
        invert(83%) sepia(78%) saturate(1842%) hue-rotate(135deg) brightness(115%) contrast(101%)
        drop-shadow(0 0 6px rgba(0, 229, 255, 0.9));
}

/* 폴백: 기존 inline SVG 사용 시 */
.brand-logo svg { width: 22px; height: 22px; stroke: var(--accent-cyan); }

.brand-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 4px;
}
.brand-text span { color: var(--accent-cyan); }

.brand-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 2px;
}

nav { display: flex; gap: 28px; align-items: center; }

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
    position: relative;
}

nav a:hover, nav a.active { color: var(--accent-cyan); }

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0; right: 0;
    height: 1px;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border-line);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
}

.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 1.6s ease-in-out infinite;
}

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

/* === HERO === */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

.hero-tag {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 24px;
    background: rgba(0, 229, 255, 0.04);
    animation: tag-glow 2.4s ease-in-out infinite;
}

@keyframes tag-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(0, 229, 255, 0); }
    50% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.3); }
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(32px, 6vw, 72px);
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.05;
    margin-bottom: 24px;
    background: linear-gradient(180deg, #fff 0%, #7da7d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 .highlight {
    background: linear-gradient(180deg, var(--accent-cyan) 0%, #00657a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.hero-cta {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === GLITCH TEXT EFFECT === */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

.glitch::before {
    color: var(--accent-cyan);
    -webkit-text-fill-color: var(--accent-cyan);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    transform: translate(0);
    animation: glitch-1 4s infinite linear alternate-reverse;
    opacity: 0.55;
}

.glitch::after {
    color: var(--accent-magenta);
    -webkit-text-fill-color: var(--accent-magenta);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    transform: translate(0);
    animation: glitch-2 3.6s infinite linear alternate-reverse;
    opacity: 0.55;
}

@keyframes glitch-1 {
    0%, 88%, 100% { transform: translate(0); clip-path: inset(0 0 0 0); }
    90% { transform: translate(-3px, 1px); clip-path: inset(20% 0 60% 0); }
    92% { transform: translate(2px, -1px); clip-path: inset(50% 0 30% 0); }
    94% { transform: translate(-2px, 2px); clip-path: inset(70% 0 10% 0); }
    96% { transform: translate(3px, 0); clip-path: inset(10% 0 80% 0); }
}

@keyframes glitch-2 {
    0%, 88%, 100% { transform: translate(0); clip-path: inset(0 0 0 0); }
    90% { transform: translate(3px, -1px); clip-path: inset(40% 0 40% 0); }
    93% { transform: translate(-2px, 1px); clip-path: inset(60% 0 20% 0); }
    96% { transform: translate(1px, -2px); clip-path: inset(20% 0 70% 0); }
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: transparent;
    border: 1px solid var(--border-line);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before { left: 100%; }

.btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.04);
}

.btn-primary {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.08);
}

.btn-primary:hover {
    background: var(--accent-cyan);
    color: var(--bg-base);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.5);
}

/* === SECTION GENERIC === */
.section {
    padding: 80px 0;
    position: relative;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-tag::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent-cyan);
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #fff 0%, #7da7d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    max-width: 720px;
    margin-bottom: 48px;
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* === METRIC BAR === */
.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border-line);
    border-bottom: 1px solid var(--border-line);
    background: rgba(12, 18, 32, 0.5);
}

.metric {
    padding: 24px 28px;
    border-right: 1px solid var(--border-line);
    position: relative;
    overflow: hidden;
}

.metric:last-child { border-right: none; }

.metric::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    transform: translateX(-100%);
    animation: metric-sweep 4s ease-in-out infinite;
}

.metric:nth-child(2)::after { animation-delay: 1s; }
.metric:nth-child(3)::after { animation-delay: 2s; }
.metric:nth-child(4)::after { animation-delay: 3s; }

@keyframes metric-sweep {
    0%, 70%, 100% { transform: translateX(-100%); }
    30% { transform: translateX(100%); }
}

.metric-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.metric-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value .unit {
    font-size: 14px;
    color: var(--accent-cyan);
    margin-left: 4px;
}

/* === CARD === */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border-line);
    padding: 28px;
    position: relative;
    transition: border-color 0.3s, transform 0.3s;
}

.card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-4px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 12px; height: 12px;
    border-top: 1px solid var(--accent-cyan);
    border-left: 1px solid var(--accent-cyan);
}
.card::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 12px; height: 12px;
    border-bottom: 1px solid var(--accent-cyan);
    border-right: 1px solid var(--accent-cyan);
}

/* === FOOTER === */
footer {
    border-top: 1px solid var(--border-line);
    padding: 40px 0 24px;
    margin-top: 80px;
    background: rgba(6, 8, 16, 0.6);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-line);
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-logo-img {
    width: 32px; height: 32px;
    object-fit: contain;
    filter:
        brightness(0) saturate(100%)
        invert(83%) sepia(78%) saturate(1842%) hue-rotate(135deg) brightness(101%) contrast(101%)
        drop-shadow(0 0 4px rgba(0, 229, 255, 0.5));
}

.footer-col h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

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

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--accent-cyan); }

.footer-col p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* === HUD CORNERS UTILITY === */
.hud-corners {
    position: relative;
}

.hud-corners > .corner-tl,
.hud-corners > .corner-tr,
.hud-corners > .corner-bl,
.hud-corners > .corner-br {
    position: absolute;
    width: 16px; height: 16px;
    border-color: var(--accent-cyan);
    pointer-events: none;
    z-index: 3;
}

.hud-corners > .corner-tl { top: 6px; left: 6px; border-top: 2px solid; border-left: 2px solid; }
.hud-corners > .corner-tr { top: 6px; right: 6px; border-top: 2px solid; border-right: 2px solid; }
.hud-corners > .corner-bl { bottom: 6px; left: 6px; border-bottom: 2px solid; border-left: 2px solid; }
.hud-corners > .corner-br { bottom: 6px; right: 6px; border-bottom: 2px solid; border-right: 2px solid; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .container { padding: 0 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    header { padding: 16px; }
    nav { display: none; }
    .status-badge { display: none; }
    .hero { padding: 48px 0 32px; }
    .footer-grid { grid-template-columns: 1fr; }
    .metrics { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; }
}