﻿/*!

\file site.css

\brief Codemaru 전역 공통 스타일 (배경/타이포/카드/버튼/푸터/캐러셀).

\details

네비게이션 관련(.cm-topbar, .cm-nav 등)은 제외

모바일 네비 토글은 NavMenu.razor.css에서 관리

\author CodeMaru

\date 2025-10-01
*/

:root {
--bg: #0f172a;
--bg-deep: #0b1020;
--surface: #111827;
--surface-2: #0b1223;
--fg: #e5e7eb;
--fg-strong: #ffffff;
--muted: #a3adc2;
--muted-2: #94a3b8;
--brand: #60a5fa;
--brand-strong: #3b82f6;
--border: rgba(255,255,255,.08);
--shadow: 0 10px 30px rgba(0,0,0,.35);
}

{ box-sizing: border-box; }

html, body { height: 100%; }

body {
margin: 0;
background: var(--bg-deep);
color: var(--fg);
font-family: system-ui,"Noto Sans KR",Segoe UI,Helvetica,Arial,sans-serif;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

/* -------- 공통 타이포/링크 -------- */
h1, h2, h3, h4, h5, h6 {
color: var(--fg-strong);
margin: .5rem 0;
}

.lead {
color: var(--muted);
font-size: 1.125rem;
}

a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }

/* -------- Hero -------- */
.cm-hero {
text-align: center;
padding: 3rem 1rem 2rem;
background: linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,0));
border: 1px solid var(--border);
border-radius: 16px;
}
.cm-hero img {
max-height: 180px;
border-radius: 12px;
margin-bottom: .75rem;
}
.cm-hero h1 {
font-size: clamp(2rem,4vw,2.75rem);
font-weight: 900;
letter-spacing: .2px;
}
.cm-hero .lead { margin-top: .4rem; }

/* -------- 카드 그리드 -------- */
.cm-cards {
display: grid;
grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
gap: 1rem;
margin-top: 1.25rem;
}
.cm-card {
display: block;
background: linear-gradient(180deg,var(--surface),var(--surface-2));
border: 1px solid var(--border);
border-radius: 14px;
padding: 1rem;
text-decoration: none;
color: var(--fg);
transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
min-height: 100%;
}
.cm-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow);
border-color: rgba(255,255,255,.14);
}
.cm-card img {
width: 100%;
aspect-ratio: 16/9;
object-fit: cover;
border-radius: 10px;
margin-bottom: .75rem;
}
.cm-card h5 {
color: var(--fg-strong);
font-size: 1.05rem;
font-weight: 800;
margin: .25rem 0 .35rem;
}
.cm-card p {
color: #cbd5e1;
margin: 0 0 .8rem;
font-size: .95rem;
}

/* 버튼 */
.cm-btn {
display: inline-block;
width: 100%;
background: var(--brand);
color: #081026;
border: none;
border-radius: .6rem;
padding: .5rem .75rem;
font-weight: 800;
letter-spacing: .2px;
text-align: center;
transition: transform .12s ease, filter .12s ease, background .12s ease;
}
.cm-btn:hover {
transform: translateY(-1px);
background: var(--brand-strong);
filter: brightness(1.05);
text-decoration: none;
}

/* -------- 캐러셀 -------- */
.cm-carousel {
position: relative;
width: 100%;
height: 360px;
border-radius: 16px;
overflow: hidden;
border: 1px solid var(--border);
background: var(--surface-2);
margin: 0 0 1rem;
}
.cm-carousel-img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: contain;
opacity: 0;
transition: opacity .18s ease;
}
.cm-carousel-img.in { opacity: 1; }
.cm-carousel-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(0,0,0,.45);
border: 0;
color: #fff;
width: 38px;
height: 38px;
line-height: 38px;
border-radius: 999px;
cursor: pointer;
font-size: 20px;
box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.cm-carousel-btn.prev { left: 10px; }
.cm-carousel-btn.next { right: 10px; }
.cm-dots {
position: absolute;
left: 0; right: 0; bottom: 12px;
display: flex; gap: 8px; justify-content: center;
}
.cm-dot {
width: 9px; height: 9px; border-radius: 999px;
border: 1px solid rgba(255,255,255,.7);
background: rgba(255,255,255,.15);
cursor: pointer;
}
.cm-dot.active { background: var(--brand); border-color: var(--brand); }

/* -------- 푸터 -------- */
.cm-footer {
text-align: center;
color: var(--muted);
padding: 2rem 1rem;
}

/* -------- 유틸 -------- */
.text-muted { color: var(--muted) !important; }
.text-strong { color: var(--fg-strong) !important; }
.bg-surface { background: var(--surface) !important; }

/* 라이트박스 오버레이 */
.cm-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    opacity: 0;
    transition: opacity .15s ease;
}

    .cm-lightbox-overlay.in {
        opacity: 1;
    }

/* 컨테이너 */
.cm-lightbox-box {
    position: relative;
    max-width: min(92vw, 1200px);
    max-height: min(88vh, 900px);
    border-radius: 12px;
    background: rgba(10,15,30,.92);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    padding: .75rem;
}

/* 이미지 */
.cm-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
}

/* 닫기 버튼 */
.cm-lightbox-close {
    position: absolute;
    top: 6px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 22px;
    line-height: 36px;
    cursor: pointer;
}

    .cm-lightbox-close:hover {
        background: rgba(255,255,255,.25);
    }

.cm-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 3000;
}

.cm-modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 1200px;
    background: #111;
    border-radius: 12px;
    padding: 1rem;
}

.cm-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 28px;
    cursor: pointer;
}