/* ==========================================================
   XRWorld 공통 디자인 시스템 (VR 테마)
   index.html / operation_mode.html / contacts.html 공용
   ========================================================== */

:root {
    --bg:            #070b16;
    --bg-soft:       #0c1223;
    --panel:         rgba(255, 255, 255, 0.045);
    --panel-strong:  rgba(255, 255, 255, 0.075);
    --line:          rgba(140, 170, 230, 0.18);
    --line-bright:   rgba(140, 170, 230, 0.38);

    --cyan:    #22d3ee;
    --violet:  #c084fc;
    --emerald: #34d399;
    --amber:   #fbbf24;

    --text:       #e7eefc;
    --text-muted: #93a4c4;
    --text-dim:   #6b7c9c;

    --radius:    18px;
    --radius-lg: 26px;
    --maxw:      1180px;
    --header-h:  68px;

    --font: 'Pretendard', 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }

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

/* 페이지 전체에 은은하게 깔리는 네온 배경 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(720px 520px at 12% -8%,  rgba(34, 211, 238, 0.17), transparent 62%),
        radial-gradient(680px 520px at 92% 6%,   rgba(192, 132, 252, 0.16), transparent 62%),
        radial-gradient(900px 700px at 50% 108%, rgba(52, 211, 153, 0.10), transparent 62%);
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(120, 160, 230, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 160, 230, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
}

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

/* ---------------- 헤더 ---------------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 clamp(18px, 5vw, 56px);
    background: rgba(7, 11, 22, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}
.logo span {
    background: linear-gradient(100deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav { display: flex; align-items: center; gap: clamp(6px, 2vw, 22px); flex-wrap: wrap; }
.nav a {
    position: relative;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 2px;
    transition: color 0.25s;
    white-space: nowrap;
}
.nav a:hover { color: var(--text); }
.nav a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    transition: width 0.25s;
}
.nav a:not(.nav-cta):hover::after { width: 100%; }

.nav-cta {
    padding: 9px 20px !important;
    border-radius: 999px;
    color: #04121a !important;
    background: linear-gradient(100deg, var(--cyan), #7ee8fa);
    font-weight: 800;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.35);
}
.nav-cta:hover { filter: brightness(1.08); }

/* ---------------- 히어로 ---------------- */
.hero {
    position: relative;
    min-height: clamp(540px, 82vh, 780px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: calc(var(--header-h) + 70px) 6vw 90px;
    overflow: hidden;
}
.hero--compact { min-height: clamp(360px, 48vh, 470px); padding-bottom: 60px; }

/* 원근감 있는 그리드 바닥 (VR 공간 느낌) */
.hero-floor {
    position: absolute;
    left: -30%; right: -30%; bottom: -10px;
    height: 52%;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(192, 132, 252, 0.22) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(340px) rotateX(64deg);
    transform-origin: bottom center;
    -webkit-mask-image: linear-gradient(to top, #000 8%, transparent 88%);
    mask-image: linear-gradient(to top, #000 8%, transparent 88%);
    animation: floorScroll 7s linear infinite;
    pointer-events: none;
}
@keyframes floorScroll { to { background-position: 0 64px, 0 0; } }

.hero-content { position: relative; z-index: 2; max-width: 900px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 18px;
    margin-bottom: 26px;
    border-radius: 999px;
    border: 1px solid var(--line-bright);
    background: var(--panel);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}
.badge .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero h1 {
    font-size: clamp(2.1rem, 5.4vw, 3.9rem);
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -1.6px;
    margin-bottom: 22px;
}
.grad {
    background: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--emerald));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p {
    font-size: clamp(1rem, 2.1vw, 1.16rem);
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }

/* ---------------- 버튼 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.22s, box-shadow 0.22s, background 0.22s, border-color 0.22s;
}
.btn-primary {
    color: #04121a;
    background: linear-gradient(100deg, var(--cyan), #8b7dfc);
    box-shadow: 0 10px 34px rgba(34, 211, 238, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 42px rgba(34, 211, 238, 0.42); }
.btn-ghost {
    color: var(--text);
    background: var(--panel);
    border-color: var(--line-bright);
}
.btn-ghost:hover { transform: translateY(-2px); background: var(--panel-strong); border-color: var(--cyan); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------------- 섹션 공통 ---------------- */
.section { padding: clamp(64px, 9vw, 110px) clamp(18px, 5vw, 56px); }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.center { text-align: center; }

.eyebrow {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 14px;
}
.section-title {
    font-size: clamp(1.7rem, 3.6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 14px;
}
.section-subtitle {
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 48px;
    font-size: 1.02rem;
}

/* ---------------- 글래스 카드 ---------------- */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 22px;
}
.card {
    position: relative;
    padding: 34px 30px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: left;
    transition: transform 0.28s, border-color 0.28s, background 0.28s;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 24px; right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    transition: opacity 0.28s;
}
.card:hover { transform: translateY(-6px); border-color: var(--line-bright); background: var(--panel-strong); }
.card:hover::before { opacity: 1; }
.card-icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    margin-bottom: 18px;
    border-radius: 13px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.3);
    font-size: 1.25rem;
}
.card h3 { font-size: 1.16rem; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.card p { color: var(--text-muted); font-size: 0.96rem; }

/* ---------------- 푸터 ---------------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 48px clamp(18px, 5vw, 56px);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.92rem;
    background: rgba(4, 7, 14, 0.6);
}
.site-footer a { color: var(--cyan); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p + p { margin-top: 8px; }

/* ---------------- 반응형 ---------------- */
@media (max-width: 760px) {
    .site-header { height: auto; flex-direction: column; gap: 10px; padding: 12px 18px; }
    :root { --header-h: 118px; }
    .nav { justify-content: center; }
    .hero-floor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
