/* NexusW.R - ROG Cyberpunk Style v2 */
:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --rog-red: #ff003c; /* ROG 风格红 */
    --rog-blue: #00e0ff; /* 赛博蓝 */
    --gray-dark: #111111;
    --gray-mid: #222222;
    --gray-light: #888888;
    --border-color: rgba(255, 255, 255, 0.15);
    --font-main: "Impact", "Arial Black", sans-serif; /* 硬朗标题字体 */
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 基础重置 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; } /* 交给Lenis处理 */

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* --- 全局特效层 --- */
.noise-overlay {
    position: fixed; inset: 0; pointer-events: none; z-index: 999;
    opacity: 0.04; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAA5OTkAAABMTExERERmZmYzMzNmZmYAAAC80RXYAAAACHRSTlMzAJmZzMxmZvYz1O0AAAAJcEhZcwAAFiUAABYlAUlSJPAAAAA6SURBVDjLY2AYBaNgKLgCg8EUDNwBBlYGFjQ2EwM7G4OJCQODCQuDiQUDI4OFCQODhQWNiY2BgZ2BAQAmXw+x21/2OQAAAABJRU5ErkJggg==');
}
.scanlines {
    position: fixed; inset: 0; pointer-events: none; z-index: 998;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
}
.grid-background {
    position: fixed; inset: 0; z-index: -2;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* --- 自定义光标 --- */
.rog-cursor {
    position: fixed; top: 0; left: 0; width: 8px; height: 8px; background: var(--rog-red);
    transform: translate(-50%, -50%); pointer-events: none; z-index: 10001;
}
.cursor-follower {
    position: fixed; top: 0; left: 0; width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5); transform: translate(-50%, -50%);
    pointer-events: none; z-index: 10000; transition: width 0.2s, height 0.2s, border-color 0.2s;
}
body.hover-active .cursor-follower {
    width: 60px; height: 60px; border-color: var(--rog-red); background: rgba(255, 0, 60, 0.1);
    mix-blend-mode: exclusion;
}

/* --- 滚动进度条 (HUD) --- */
.rog-scroll-bar {
    position: fixed; right: 10px; top: 50%; transform: translateY(-50%);
    height: 30vh; width: 4px; background: rgba(255,255,255,0.1); z-index: 100;
    display: flex; flex-direction: column; justify-content: space-between;
}
.rog-scroll-progress { width: 100%; background: var(--rog-red); height: 0%; transition: height 0.1s linear; }
.bar-deco { width: 10px; height: 2px; background: var(--rog-red); position: relative; left: -3px; }

/* --- 导航栏 --- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 900; padding: 25px 0;
    transition: transform 0.3s, background 0.3s;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-family: var(--font-main); font-size: 24px; letter-spacing: 2px; display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 32px; }
.highlight { color: var(--rog-red); }

.nav-menu { display: flex; gap: 40px; list-style: none; }
.nav-link {
    text-decoration: none; color: var(--text-color); font-weight: 700; font-size: 14px;
    text-transform: uppercase; position: relative; overflow: hidden; display: block;
    padding: 5px 0;
}
.nav-link::before {
    content: attr(data-text); position: absolute; top: 100%; left: 0;
    color: var(--rog-red); transition: top 0.3s var(--ease-out);
}
.nav-link:hover::before { top: 0; }
.nav-link:hover { color: transparent; }
.hamburger { display: none; flex-direction: column; gap: 6px; }
.hamburger .line { width: 30px; height: 3px; background: white; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }

/* --- Hero Section --- */
.hero {
    height: 100vh; position: relative; display: flex; align-items: center;
    overflow: hidden;
}
.hero-bg-wrapper { position: absolute; inset: 0; z-index: -1; }
.hero-bg { width: 100%; height: 110%; object-fit: cover; filter: grayscale(100%) contrast(1.1); transform-origin: center; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.7) 60%, rgba(5,5,5,0.3) 100%);
}

.hero-text-wrapper { position: relative; z-index: 2; max-width: 900px; padding-left: 20px; }
.cyber-badge {
    display: inline-block; padding: 6px 16px; background: var(--rog-red); color: white;
    font-weight: bold; font-family: monospace; font-size: 12px; letter-spacing: 3px; margin-bottom: 24px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.hero-title {
    font-family: var(--font-main); font-size: 88px; line-height: 1.2; text-transform: uppercase;
    margin-bottom: 30px; letter-spacing: -2px;
}
.line-mask { overflow: hidden; display: block; padding-bottom: 10px; }
.line-mask span { display: block; }
.stroke-text { -webkit-text-stroke: 2px white; color: transparent; transition: all 0.3s; }
.hero:hover .stroke-text { color: rgba(255,255,255,0.1); }
.highlight-red { color: var(--rog-red); text-shadow: 0 0 20px rgba(255, 0, 60, 0.4); }
.hero-desc {
    font-size: 18px; color: var(--gray-light); margin-bottom: 40px; border-left: 3px solid var(--rog-red);
    padding-left: 24px; max-width: 500px; line-height: 1.6;
}

/* ROG Button */
.rog-btn {
    position: relative; display: inline-flex; justify-content: center; align-items: center;
    padding: 16px 48px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.3);
    color: white; text-decoration: none; font-weight: bold; text-transform: uppercase; letter-spacing: 2px;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    transition: all 0.3s; overflow: hidden; cursor: none;
}
.rog-btn:hover { border-color: var(--rog-red); background: rgba(255,0,60,0.1); }
.btn-glitch {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--rog-red); color: black; display: flex; align-items: center; justify-content: center;
    transform: translateX(-105%) skewX(-15deg); transition: transform 0.4s var(--ease-out);
}
.rog-btn:hover .btn-glitch { transform: translateX(0) skewX(-15deg); }

.deco-text-bg {
    position: absolute; bottom: -60px; right: -20px; font-size: 240px; font-family: var(--font-main);
    color: rgba(255,255,255,0.02); z-index: 0; white-space: nowrap; pointer-events: none;
    -webkit-text-stroke: 1px rgba(255,255,255,0.05);
}

/* --- Section Global --- */
.section { padding: 140px 0; position: relative; }
.dark-section { background: rgba(10,10,10,0.5); border-top: 1px solid #111; border-bottom: 1px solid #111; }

.section-header { margin-bottom: 80px; position: relative; }
.section-title { font-family: var(--font-main); font-size: 56px; text-transform: uppercase; line-height: 1; }
.cn-sub {
    font-size: 14px; font-family: monospace; color: var(--rog-blue); display: block;
    margin-top: 10px; letter-spacing: 2px;
}
.rog-line {
    width: 60px; height: 6px; background: var(--rog-red); margin-top: 24px;
    position: relative;
}
.rog-line::after {
    content: ''; position: absolute; right: -20px; top: 0; width: 10px; height: 6px; background: rgba(255,255,255,0.2);
}

/* --- Projects List (Enhanced Animation) --- */
.projects-list { display: flex; flex-direction: column; gap: 120px; }
.rog-card {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: center;
    opacity: 0; /* JS控制显示 */
}
.rog-card:nth-child(even) { grid-template-columns: 1fr 1.5fr; }
.rog-card:nth-child(even) .card-visual { order: 2; }

.card-visual {
    position: relative; height: 450px; overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 95% 100%, 0 100%);
    background: #000;
}
.scan-mask {
    position: absolute; inset: 0; background: var(--rog-red); z-index: 5;
    transform: scaleX(0); transform-origin: left; pointer-events: none;
}
.card-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; opacity: 0.8; }
.rog-card:hover .card-visual img { transform: scale(1.1); opacity: 1; }
.card-overlay {
    position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    transition: 0.3s;
}

.card-meta { color: var(--rog-blue); font-weight: 700; font-family: monospace; letter-spacing: 2px; margin-bottom: 15px; }
.card-title { font-size: 42px; margin-bottom: 24px; text-transform: uppercase; font-family: var(--font-main); }
.card-desc { color: var(--gray-light); margin-bottom: 32px; line-height: 1.8; font-size: 16px; border-left: 1px solid #333; padding-left: 20px; }
.rog-link {
    color: white; text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 10px;
    font-size: 14px; letter-spacing: 1px; transition: color 0.3s;
}
.rog-link:hover { color: var(--rog-red); }

/* --- Services (Modules) --- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-box {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
    padding: 40px 30px; position: relative; transition: all 0.4s; height: 100%;
}
.service-box:hover { background: rgba(255,255,255,0.06); transform: translateY(-10px); border-color: rgba(255,255,255,0.2); }
.service-box::before {
    content: attr(data-index); position: absolute; top: 20px; right: 20px;
    font-family: var(--font-main); font-size: 24px; color: rgba(255,255,255,0.05);
}
.service-box .icon { font-size: 36px; margin-bottom: 24px; filter: grayscale(1); transition: 0.3s; }
.service-box:hover .icon { filter: grayscale(0); }
.service-box h3 { font-size: 20px; margin-bottom: 12px; font-weight: 700; }
.service-box p { color: var(--gray-light); font-size: 14px; line-height: 1.6; }
.corner-deco {
    position: absolute; bottom: 0; right: 0; width: 0; height: 0;
    border-bottom: 20px solid var(--rog-red); border-left: 20px solid transparent; opacity: 0; transition: 0.3s;
}
.service-box:hover .corner-deco { opacity: 1; }

/* --- New Gallery Section --- */
.gallery-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; grid-auto-rows: 250px;
}
.gallery-item.large { grid-column: span 2; grid-row: span 2; }
.gallery-item { opacity: 0; /* JS Animation */ }

.gallery-inner {
    width: 100%; height: 100%; position: relative; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1); transition: border-color 0.3s;
}
.gallery-inner:hover { border-color: var(--rog-blue); }
.gallery-inner img {
    width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.2);
    transition: all 0.5s;
}
.gallery-inner:hover img { filter: grayscale(0) contrast(1); transform: scale(1.05); }

.gallery-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(100%); transition: transform 0.4s var(--ease-out);
}
.gallery-inner:hover .gallery-overlay { transform: translateY(0); }
.gallery-txt h4 { font-family: var(--font-main); font-size: 20px; color: white; margin-bottom: 5px; }
.gallery-txt p { font-family: monospace; color: var(--rog-blue); font-size: 12px; }

/* --- Tech Strip --- */
.tech-strip {
    display: flex; justify-content: space-between; border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 30px 0;
    opacity: 0.5; transition: opacity 0.3s;
}
.tech-strip:hover { opacity: 1; }
.tech-item { font-family: var(--font-main); font-size: 24px; color: #444; }

/* --- Contact & Forms --- */
.contact-section { background: #000; overflow: hidden; }
.contact-bg-overlay {
    position: absolute; inset: 0; opacity: 0.15;
    background: repeating-linear-gradient(-45deg, #111, #111 10px, #000 10px, #000 20px);
}
.contact-container { position: relative; z-index: 2; display: flex; gap: 80px; }
.contact-left { flex: 1; }
.contact-right { flex: 0.8; display: flex; align-items: center; }

.contact-left h2 { font-family: var(--font-main); font-size: 64px; margin-bottom: 10px; color: white; }
.contact-left p { color: var(--gray-light); margin-bottom: 40px; font-family: monospace; }

.rog-form { display: flex; flex-direction: column; gap: 30px; }
.input-group { position: relative; }
.rog-input {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid #333;
    padding: 15px 0; color: white; font-family: var(--font-body); font-size: 16px;
    transition: border-color 0.3s;
}
.rog-input:focus { outline: none; }
.input-border {
    position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--rog-red); transition: width 0.4s var(--ease-out);
}
.rog-input:focus + .input-border { width: 100%; }

.contact-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
    padding: 40px; width: 100%; position: relative;
}
.contact-card::before {
    content: ''; position: absolute; top: -1px; left: -1px; width: 20px; height: 20px;
    border-top: 3px solid var(--rog-blue); border-left: 3px solid var(--rog-blue);
}
.contact-card h3 { font-family: var(--font-main); margin-bottom: 30px; font-size: 24px; }
.info-row { display: flex; justify-content: space-between; border-bottom: 1px solid #222; padding: 15px 0; font-family: monospace; }
.info-row .label { color: #666; }
.info-row .val { color: var(--rog-blue); font-weight: bold; }

/* --- Partners Marquee --- */
.partners-marquee { overflow: hidden; white-space: nowrap; padding: 60px 0; }
.marquee-content { display: inline-block; }
.marquee-content span {
    font-family: var(--font-main); font-size: 48px; color: rgba(255,255,255,0.15); margin: 0 30px;
    transition: color 0.3s;
}
.marquee-content span:hover { color: rgba(255,255,255,0.8); }
.separator { color: var(--rog-red); font-weight: bold; }

/* --- Footer & Social --- */
.footer { background: #020202; border-top: 1px solid #111; padding: 60px 0 30px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer-logo { font-family: var(--font-main); font-size: 32px; color: white; margin-bottom: 10px; letter-spacing: -1px; }
.copyright { color: #444; font-size: 12px; font-family: monospace; }
.footer-links h4 { color: #666; font-size: 12px; margin-bottom: 20px; letter-spacing: 1px; }

.social-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
.social-btn {
    display: flex; align-items: center; gap: 10px; padding: 10px 15px;
    background: rgba(255,255,255,0.03); border: 1px solid #222; color: #aaa;
    text-decoration: none; font-size: 12px; font-weight: 700; transition: all 0.3s;
    font-family: monospace;
}
.social-btn:hover { background: var(--rog-red); color: black; border-color: var(--rog-red); }
.social-btn .icon { font-size: 14px; }

/* --- 响应式 --- */
@media (max-width: 1024px) {
    .hero-title { font-size: 60px; }
    .rog-card, .rog-card:nth-child(even) { grid-template-columns: 1fr; }
    .card-visual { order: -1 !important; height: 300px; }
    .contact-container { flex-direction: column; }
    .services-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .hamburger { display: flex; }
    .hero-title { font-size: 42px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item.large { grid-column: span 1; grid-row: span 1; }
    .footer-grid { grid-template-columns: 1fr; }
    .rog-scroll-bar { display: none; }
}