/*** 메인 히어로 (index.html) — Premium Futuristic Smart Factory Design ***/
.gh-hero {
    --gh-bg-1: #040914;
    --gh-bg-2: #0a1936;
    --gh-blue: #2563eb;
    --gh-blue-light: #3b82f6;
    --gh-cyan: #38bdf8;
    --gh-cyan-bright: #7dd3fc;
    --gh-green: #4ade80;
    --gh-ink: #f8fafc;
    --gh-muted: #cbd5e1;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 86px);
    display: flex;
    align-items: center;
    padding: 4.5rem 0 5.5rem;
    color: var(--gh-ink);
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(5, 12, 28, 0.68) 42%, rgba(6, 15, 34, 0.22) 75%, rgba(4, 9, 20, 0.45) 100%),
        radial-gradient(800px 500px at 73% 82%, rgba(56, 189, 248, 0.22), transparent 65%),
        url('../img/hero-bg-pro.jpg') center center / cover no-repeat;
}

/* 미세 하이테크 그리드 오버레이 */
.gh-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, .03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 30% 50%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 50%, #000 20%, transparent 75%);
    pointer-events: none;
}

.gh-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.45;
}

/* 마우스 따라다니는 스포트라이트 */
.gh-spot {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 40%), rgba(56, 189, 248, .08), transparent 60%);
    transition: background .1s;
}

.gh-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 3rem;
    align-items: center;
}

@media (max-width: 991.98px) {
    .gh-inner { grid-template-columns: 1fr; }
    .gh-hero { min-height: auto; padding: 4.5rem 0 5rem; }
}

/* 좌측 상단 배지: SINCE 2000 · INDUSTRIAL AUTOMATION */
.gh-badge {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 1.2rem;
    border: 1px solid rgba(56, 189, 248, .48);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(10, 20, 42, .88), rgba(23, 47, 96, .55));
    box-shadow: 0 0 22px rgba(56, 189, 248, .2), inset 0 1px 0 rgba(255, 255, 255, .18);
    backdrop-filter: blur(10px);
    font: 600 .8rem/1 'Roboto', sans-serif;
    letter-spacing: .15em;
    color: #e2e8f0;
}

.gh-pulse {
    width: 6px;
    height: 15px;
    border-radius: 99px;
    background: linear-gradient(180deg, #7dd3fc, #2563eb);
    box-shadow: 0 0 10px #38bdf8, 0 0 4px #ffffff;
    animation: gh-pulse 2s infinite;
}

@keyframes gh-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 12px #38bdf8, 0 0 4px #ffffff; }
    50% { opacity: 0.65; box-shadow: 0 0 6px #38bdf8; }
}

/* 메인 타이틀 */
.gh-title {
    margin: 1.6rem 0 1.35rem;
    font-size: clamp(2.6rem, 4.8vw, 4.25rem);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -.025em;
    color: #ffffff;
    text-shadow: 0 8px 30px rgba(0, 0, 0, .65);
}

.gh-grad {
    background: linear-gradient(180deg, #bae6fd 0%, #38bdf8 55%, #0284c7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(56, 189, 248, .38));
}

/* 서브 리드 문구 */
.gh-lead {
    font-size: 1.22rem;
    line-height: 1.75;
    color: #cbd5e1;
    max-width: 540px;
    margin-bottom: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}

.gh-rotate {
    display: inline-block;
    color: #38bdf8;
    font-weight: 800;
    text-shadow: 0 0 16px rgba(56, 189, 248, .45);
    transition: opacity .35s, transform .35s;
}

.gh-rotate.out {
    opacity: 0;
    transform: translateY(8px);
}

.gh-lead-bar {
    width: 68px;
    height: 3.5px;
    border-radius: 99px;
    background: linear-gradient(90deg, #38bdf8 0%, #2563eb 70%, transparent 100%);
    box-shadow: 0 0 14px rgba(56, 189, 248, .75);
    margin-top: 1.1rem;
}

/* 액션 버튼 그룹 */
.gh-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .9rem;
    margin-top: 2.3rem;
}

.gh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .88rem 1.55rem;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
}

.gh-btn-primary {
    border-radius: 999px;
    padding: .85rem 1.35rem .85rem 1.6rem;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #1d4ed8 100%);
    border: 1.5px solid rgba(147, 197, 253, .75);
    color: #ffffff;
    box-shadow:
        0 0 30px rgba(37, 99, 235, .8),
        0 10px 25px -8px rgba(0, 0, 0, .7),
        inset 0 1px 2px rgba(255, 255, 255, .45);
}

.gh-btn-primary:hover {
    color: #ffffff;
    transform: translateY(-3px);
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #2563eb 100%);
    box-shadow:
        0 0 40px rgba(56, 189, 248, .95),
        0 14px 30px -8px rgba(0, 0, 0, .8),
        inset 0 1px 2px rgba(255, 255, 255, .6);
}

.gh-btn-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    margin-left: .65rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.gh-btn-ghost {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .48);
    color: #e2e8f0;
    background: rgba(11, 20, 38, .72);
    backdrop-filter: blur(12px);
    box-shadow:
        0 10px 25px -10px rgba(0, 0, 0, .65),
        inset 0 1px 0 rgba(255, 255, 255, .2),
        inset 0 -1px 0 rgba(56, 189, 248, .28);
}

.gh-btn-ghost:hover {
    color: #ffffff;
    border-color: rgba(56, 189, 248, .75);
    background: rgba(20, 36, 68, .85);
    transform: translateY(-3px);
    box-shadow:
        0 14px 30px -10px rgba(0, 0, 0, .75),
        0 0 20px rgba(56, 189, 248, .3),
        inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* 우측 모니터 패널 & 탭 영역 */
.gh-panel-wrap {
    perspective: 1400px;
    position: relative;
}

/* 하단 홀로그램 받침대 발광 효과 보강 */
.gh-panel-wrap::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -26px;
    height: 45px;
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, .55) 0%, rgba(37, 99, 235, .25) 45%, transparent 75%);
    filter: blur(12px);
    pointer-events: none;
    z-index: 1;
}

/* 상단 탭 버튼 바 */
.gh-panel-tabs {
    display: flex;
    gap: .6rem;
    margin-bottom: .9rem;
    position: relative;
    z-index: 10;
}

.gh-tab-btn {
    background: rgba(11, 20, 38, .82);
    border: 1px solid rgba(148, 163, 184, .38);
    color: #cbd5e1;
    font: 700 .8rem/1 'Roboto', sans-serif;
    letter-spacing: .04em;
    padding: .58rem 1.15rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all .25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.gh-tab-btn i {
    font-size: .85rem;
    color: #94a3b8;
    transition: color .25s;
}

.gh-tab-btn:hover {
    background: rgba(23, 39, 70, .9);
    border-color: rgba(56, 189, 248, .55);
    color: #ffffff;
    transform: translateY(-1px);
}

.gh-tab-btn:hover i {
    color: #38bdf8;
}

.gh-tab-btn.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, .92), rgba(29, 78, 216, .85));
    border: 1.5px solid #60a5fa;
    color: #ffffff;
    box-shadow:
        0 0 24px rgba(59, 130, 246, .75),
        0 6px 20px rgba(0, 0, 0, .5),
        inset 0 1px 1px rgba(255, 255, 255, .38);
}

.gh-tab-btn.active i {
    color: #ffffff;
}

/* 패널 공통 프레임 */
.gh-panel {
    padding: 1.35rem 1.45rem;
    border-radius: 20px;
    border: 1.5px solid rgba(56, 189, 248, .62);
    background: linear-gradient(165deg, rgba(12, 22, 42, .94), rgba(6, 12, 24, .97));
    backdrop-filter: blur(18px);
    box-shadow:
        0 30px 70px -15px rgba(0, 0, 0, .9),
        0 0 38px rgba(56, 189, 248, .26),
        inset 0 1px 0 rgba(255, 255, 255, .22);
}

.gh-stack {
    position: relative;
    z-index: 2;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .2s ease-out;
    transform-style: preserve-3d;
}

.gh-win-a,
.gh-win-b,
.gh-win-c {
    position: relative;
    width: 100%;
    min-height: 472px;
    box-sizing: border-box;
    margin: 0;
}

.gh-stack .gh-panel.panel-hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 패널 상단 헤더 (맥 스타일 신호등 + 타이틀 + 전체화면 링크) */
.gh-panel-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    font: 700 .8rem/1 'Roboto', sans-serif;
    letter-spacing: .1em;
    color: #f8fafc;
}

.gh-head-title {
    color: #f8fafc;
    font-weight: 800;
}

.gh-dots { display: inline-flex; gap: 6px; }
.gh-dots i { width: 10px; height: 10px; border-radius: 50%; }
.gh-dots i:first-child { background: #ff5f56; box-shadow: 0 0 6px rgba(255, 95, 86, .6); }
.gh-dots i:nth-child(2) { background: #ffbd2e; box-shadow: 0 0 6px rgba(255, 189, 46, .6); }
.gh-dots i:last-child { background: #27c93f; box-shadow: 0 0 6px rgba(39, 201, 63, .6); }

.gh-live {
    margin-left: auto;
    color: var(--gh-cyan);
    animation: gh-blink 1.6s infinite;
}

@keyframes gh-blink { 50% { opacity: .35; } }

.gh-more {
    margin-left: auto;
    color: #cbd5e1;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    transition: color .2s;
}

.gh-more i {
    color: #38bdf8;
}

.gh-more:hover {
    color: #38bdf8;
}

.gh-panel-label {
    margin: .75rem 0 .7rem;
    font-size: .82rem;
    font-weight: 500;
    color: #cbd5e1;
}

/* 3D 시뮬레이터 뷰포트 영역 */
.gh-3d-frame-wrap {
    width: 100%;
    height: 270px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #070b14;
    border: 1px solid rgba(56, 189, 248, .25);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, .8);
    margin-bottom: .9rem;
}

.gh-3d-hero-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    pointer-events: auto;
}

/* 파형 및 NC 툴패스 SVG 스타일 */
.gh-wave {
    width: 100%;
    height: 270px;
    border-radius: 14px;
    background: #070b14;
    border: 1px solid rgba(56, 189, 248, .25);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, .8);
    margin-bottom: .9rem;
}

.gh-wave path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.gh-wave .wx { stroke: #ff7f50; }
.gh-wave .wy { stroke: var(--gh-cyan); }
.gh-wave .wz { stroke: #ffc36b; }

/* 하단 4개 측정 지표 카드 그리드 */
.gh-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .65rem;
}

.gh-grid.four {
    grid-template-columns: repeat(4, 1fr);
    gap: .6rem;
}

.gh-cell {
    padding: .7rem .75rem;
    border-radius: 12px;
    background: rgba(15, 25, 48, .78);
    border: 1px solid rgba(148, 163, 184, .22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.gh-cell-top {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .35rem;
}

.gh-cell-top i {
    color: #38bdf8;
    font-size: .82rem;
}

.gh-cell span {
    display: inline-block;
    font-size: .74rem;
    font-weight: 600;
    color: #cbd5e1;
}

.gh-cell b {
    display: block;
    font: 800 1.08rem/1.1 'Roboto', sans-serif;
    color: #ffffff;
    letter-spacing: -.01em;
}

.gh-cell b.val-cyan {
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56, 189, 248, .35);
}

.gh-cell b.val-green,
.gh-cell b.ok {
    color: #4ade80;
    text-shadow: 0 0 12px rgba(74, 222, 128, .35);
}

/* NC 툴패스 뷰포트 */
.gh-nc {
    width: 100%;
    height: 200px;
    border-radius: 14px;
    background: radial-gradient(ellipse at center, rgba(30, 50, 80, .55), rgba(0, 0, 0, .45));
    border: 1px solid rgba(56, 189, 248, .25);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, .8);
    margin-bottom: .6rem;
}

.gh-nc .stock-top { fill: rgba(120, 160, 210, .14); stroke: rgba(160, 200, 245, .35); stroke-width: 1; }
.gh-nc .stock-side { fill: rgba(70, 100, 145, .22); stroke: rgba(160, 200, 245, .28); stroke-width: 1; }
.gh-nc .stock-side.dark { fill: rgba(40, 65, 100, .3); }
.gh-nc .plan { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 1.2; stroke-dasharray: 3 3; }
.gh-nc .rapid { fill: none; stroke: #ffc36b; stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .75; }
.gh-nc .groove { fill: none; stroke: rgba(6, 16, 31, .85); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.gh-nc .cut { fill: none; stroke: var(--gh-cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(79, 209, 197, .6)); }
.gh-nc .spindle { stroke: rgba(255, 255, 255, .55); stroke-width: 2; stroke-linecap: round; }
.gh-nc .tool { fill: #ff7f50; stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 0 6px #ff7f50); }

.gh-gcode {
    margin-top: 0;
    margin-bottom: .9rem;
    padding: .5rem .8rem;
    height: 3.8rem;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(0, 0, 0, .3);
    font: 500 .75rem/1.35rem Consolas, 'Courier New', monospace;
    color: var(--gh-muted);
    white-space: nowrap;
}

.gh-gcode div:last-child { color: #fff; }
.gh-gcode div:last-child::before { content: '▶ '; color: #38bdf8; }

/* 스크롤 안내 */
.gh-scroll {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    z-index: 2;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border: 2px solid rgba(148, 163, 184, .4);
    border-radius: 14px;
}

.gh-scroll span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: #38bdf8;
    animation: gh-scroll 1.8s infinite;
}

@keyframes gh-scroll {
    0% { opacity: 0; transform: translateY(0); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}

/* --- 대형 3D 디지털 트윈 시뮬레이터 섹션 --- */
.sim-section {
    background: linear-gradient(180deg, #040914 0%, #0a172c 50%, #040914 100%);
    position: relative;
    overflow: hidden;
    padding: 5.5rem 0 6rem;
    border-top: 1px solid rgba(56, 189, 248, .2);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sim-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, .03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.sim-header {
    text-align: center;
    max-width: 1060px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 2;
}

.sim-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 1rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, .1);
    border: 1px solid rgba(56, 189, 248, .3);
    color: #38bdf8;
    font: 600 .75rem/1 'JetBrains Mono', monospace;
    letter-spacing: .1em;
    margin-bottom: 1rem;
}

.sim-title {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -.02em;
    word-break: keep-all;
}

.sim-title .glow-cyan {
    display: inline-block;
    white-space: nowrap;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sim-desc {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    word-break: keep-all;
}

.sim-box-wrapper {
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, .75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, .35);
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, .8), 0 0 40px rgba(56, 189, 248, .15);
    overflow: hidden;
}

.sim-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.4rem;
    background: rgba(15, 23, 42, .95);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sim-top-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    font: 600 .8rem/1 'JetBrains Mono', monospace;
    color: #e2e8f0;
}

.sim-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(34, 197, 94, .15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, .3);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
}

.sim-live-tag span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    animation: gh-blink 1.4s infinite;
}

.sim-controls-help {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: .75rem;
    color: #94a3b8;
}

.sim-controls-help span i {
    color: #38bdf8;
    margin-right: 4px;
}

.sim-action-btn {
    background: rgba(56, 189, 248, .15);
    border: 1px solid rgba(56, 189, 248, .4);
    color: #38bdf8;
    padding: .45rem 1rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}

.sim-action-btn:hover {
    background: #38bdf8;
    color: #070b14;
    box-shadow: 0 0 16px rgba(56, 189, 248, .5);
}

.sim-iframe-wrap {
    width: 100%;
    height: 860px;
    position: relative;
    background: #070b14;
}

@media (max-width: 991.98px) {
    .sim-iframe-wrap { height: 500px; }
    .sim-controls-help { display: none; }
}

@media (max-width: 575.98px) {
    .sim-iframe-wrap { height: 420px; }
}

.sim-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.sim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 2;
}

.sim-card {
    background: rgba(15, 23, 42, .65);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    padding: 1.4rem;
    backdrop-filter: blur(10px);
    transition: all .25s;
}

.sim-card:hover {
    border-color: rgba(56, 189, 248, .35);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}

.sim-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .25);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.sim-card h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .5rem;
}

.sim-card p {
    font-size: .85rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .gh-grad, .gh-pulse, .gh-live, .gh-scroll span { animation: none; }
    .gh-stack { transition: none; }
}
