/* ============================================
   SNIPERX — 3D IMMERSIVE LANDING
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000;
    --fg: #e4e6ea;
    --dim: #444;
    --muted: #1a1a1f;
    --accent: #1d9bf0;
    --accent2: #00e5ff;
    --green: #00e676;
    --yellow: #ffab00;
    --red: #ff1744;
    --glow: rgba(29, 155, 240, 0.25);
    --glow-strong: rgba(29, 155, 240, 0.5);
    --display: 'Syne', sans-serif;
    --body: 'Space Grotesk', sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #000;
    color: var(--fg);
    font-family: var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
    cursor: crosshair;
}

::selection {
    background: var(--accent);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== 3D CANVAS ===== */
#scene3d {
    position: fixed;
    inset: 0;
    z-index: 0;
}

/* ===== SCANLINE ===== */
.scanline {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px,
            rgba(0, 0, 0, 0.015) 2px, rgba(0, 0, 0, 0.015) 4px);
}

/* ===== CONTENT LAYER ===== */
.content-layer {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAV ===== */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    opacity: 0;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

#logoCanvas {
    width: 28px;
    height: 28px;
}

.nav-name {
    font-family: var(--display);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    color: var(--dim);
    transition: color 0.3s;
}

.nav:hover .nav-name {
    color: var(--fg);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    border: 1px solid rgba(0, 230, 118, 0.1);
    background: rgba(0, 230, 118, 0.04);
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

.status-text {
    font-family: var(--mono);
    font-size: 0.48rem;
    font-weight: 600;
    color: var(--green);
    letter-spacing: 0.12em;
    opacity: 0.7;
}

.nav-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--dim);
    transition: all 0.3s;
}

.nav-icon-btn:hover {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--fg);
    transform: scale(1.05);
}

.nav-cta {
    font-family: var(--body);
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.55rem 1.4rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--dim);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.nav-cta:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 40px rgba(29, 155, 240, 0.1), inset 0 0 20px rgba(29, 155, 240, 0.03);
    transform: translateY(-1px);
}

/* ===== HERO ===== */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    perspective: 1200px;
}

.hero-inner {
    transform-style: preserve-3d;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--mono);
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--dim);
    margin-bottom: 3rem;
    opacity: 0;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.01);
}

.badge-ring {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--glow);
    animation: pulse 2.5s ease-in-out infinite;
}

/* ===== TITLE ===== */
.hero-title {
    font-family: var(--display);
    line-height: 0.92;
    margin-bottom: 2.5rem;
}

.title-row {
    overflow: hidden;
    display: block;
}

.title-word {
    display: inline-block;
    font-size: clamp(4.5rem, 13vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--fg);
    opacity: 0;
    transform: translateY(100%) rotateX(-20deg);
    transform-origin: bottom center;
    position: relative;
}

.title-word.dim {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 400;
    color: var(--dim);
    font-style: italic;
    letter-spacing: -0.02em;
}

.title-word.accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 60px var(--glow));
}

/* Glitch layer */
.title-word.accent::before,
.title-word.accent::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
}

.title-word.accent::before {
    animation: glitch1 4s ease-in-out infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.title-word.accent::after {
    animation: glitch2 4s ease-in-out infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch1 {

    0%,
    90%,
    100% {
        opacity: 0;
        transform: none;
    }

    92% {
        opacity: 0.8;
        transform: translateX(3px) skewX(-2deg);
    }

    94% {
        opacity: 0;
        transform: translateX(-2px);
    }

    96% {
        opacity: 0.6;
        transform: translateX(1px) skewX(1deg);
    }

    98% {
        opacity: 0;
    }
}

@keyframes glitch2 {

    0%,
    88%,
    100% {
        opacity: 0;
        transform: none;
    }

    91% {
        opacity: 0.6;
        transform: translateX(-3px) skewX(2deg);
    }

    93% {
        opacity: 0;
        transform: translateX(2px);
    }

    95% {
        opacity: 0.7;
        transform: translateX(-1px) skewX(-1deg);
    }

    97% {
        opacity: 0;
    }
}

/* ===== HERO SUB ===== */
.hero-sub {
    font-size: 1rem;
    color: var(--dim);
    font-weight: 400;
    line-height: 1.7;
    max-width: 380px;
    margin: 0 auto 2.5rem;
    opacity: 0;
}

/* ===== HERO CTA ===== */
.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
}

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--body);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.95rem 2.4rem;
    border-radius: 14px;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 0 0 1px rgba(29, 155, 240, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}

.btn-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-main:hover::before {
    transform: translateX(100%);
}

.btn-main:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 0 60px rgba(29, 155, 240, 0.25),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(29, 155, 240, 0.5);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    position: relative;
    z-index: 1;
    display: flex;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-main:hover .btn-icon {
    transform: translateX(5px);
}

.btn-secondary {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--dim);
    padding: 0.6rem 0;
    position: relative;
    transition: color 0.3s;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
    color: var(--accent);
}

.btn-secondary:hover::after {
    width: 100%;
}

/* ===== 3D TERMINAL ===== */
.terminal-section {
    padding: 0 0 4rem;
    perspective: 1000px;
}

.terminal-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-inner {
    position: relative;
    background: rgba(4, 4, 8, 0.75);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}

.terminal-inner::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
    z-index: 3;
}

.terminal-reflection {
    position: absolute;
    bottom: -40px;
    left: 5%;
    right: 5%;
    height: 40px;
    background: linear-gradient(180deg, rgba(29, 155, 240, 0.03), transparent);
    border-radius: 0 0 20px 20px;
    filter: blur(8px);
    transform: scaleY(-0.3);
    opacity: 0.4;
}

.terminal-chrome {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(255, 255, 255, 0.008);
}

.chrome-dots {
    display: flex;
    gap: 5px;
}

.chrome-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.3s;
}

.terminal-3d:hover .chrome-dots span:nth-child(1) {
    background: #ff5f57;
    box-shadow: 0 0 8px rgba(255, 95, 87, 0.3);
}

.terminal-3d:hover .chrome-dots span:nth-child(2) {
    background: #febc2e;
    box-shadow: 0 0 8px rgba(254, 188, 46, 0.3);
}

.terminal-3d:hover .chrome-dots span:nth-child(3) {
    background: #28c840;
    box-shadow: 0 0 8px rgba(40, 200, 64, 0.3);
}

.chrome-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    color: #333;
    text-transform: uppercase;
    flex: 1;
}

.chrome-pulse {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.chrome-tag {
    font-family: var(--mono);
    font-size: 0.42rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 3px 10px;
    border-radius: 5px;
    background: rgba(29, 155, 240, 0.06);
    color: var(--accent);
    border: 1px solid rgba(29, 155, 240, 0.08);
}

.terminal-body {
    padding: 1rem 1.3rem 2rem;
    font-family: var(--mono);
    font-size: 0.63rem;
    line-height: 2.1;
    min-height: 200px;
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: none;
}

.terminal-body::-webkit-scrollbar {
    display: none;
}

.terminal-bottom-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(transparent, rgba(4, 4, 8, 0.95));
    pointer-events: none;
    z-index: 2;
}

/* Terminal lines */
.term-line {
    opacity: 0;
    animation: lineIn 0.4s ease forwards;
    padding: 1px 6px;
    border-radius: 4px;
    margin: 0 -6px;
    transition: background 0.3s;
}

@keyframes lineIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.term-line .time {
    color: #1a1a1f;
}

.term-line .tag {
    color: #333;
}

.term-line .tweet {
    color: #333;
}

.term-line .ca {
    color: var(--yellow);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 171, 0, 0.2);
}

.term-line .success {
    color: var(--green);
    font-weight: 600;
    text-shadow: 0 0 12px rgba(0, 230, 118, 0.15);
}

.term-line .info {
    color: #1a1a1f;
}

.term-line.ca-flash {
    background: linear-gradient(90deg, rgba(255, 171, 0, 0.05) 0%, transparent 70%);
    border-left: 2px solid var(--yellow);
    padding-left: 10px;
}

.term-line.land-flash {
    background: linear-gradient(90deg, rgba(0, 230, 118, 0.04) 0%, transparent 70%);
    border-left: 2px solid var(--green);
    padding-left: 10px;
}

/* ===== FLOATING MONITORS ===== */
.floating-monitors {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.monitor {
    position: absolute;
    left: var(--mx);
    top: var(--my);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    background: rgba(4, 4, 8, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 100px;
    opacity: 0;
    animation: monitorFloat 18s var(--md) ease-in-out infinite;
    white-space: nowrap;
    transform-style: preserve-3d;
}

.monitor img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(29, 155, 240, 0.1);
}

.monitor-info {
    display: flex;
    flex-direction: column;
}

.monitor-name {
    font-size: 0.55rem;
    font-weight: 600;
    color: #555;
}

.monitor-tag {
    font-family: var(--mono);
    font-size: 0.38rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 0.1em;
    opacity: 0.5;
}

@keyframes monitorFloat {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.92) rotateX(5deg);
    }

    5% {
        opacity: 0.3;
        transform: translateY(0) scale(1) rotateX(0);
    }

    50% {
        opacity: 0.12;
        transform: translateY(-12px) scale(0.98);
    }

    95% {
        opacity: 0.3;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(15px) scale(0.92) rotateX(-5deg);
    }
}

/* ===== FOOTER ===== */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    font-family: var(--mono);
    font-size: 0.5rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #222;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    opacity: 0;
}

.footer a {
    color: var(--dim);
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--accent);
}

.sep {
    opacity: 0.2;
}

.dim-text {
    color: #181818;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .content-layer {
        padding: 0 1.2rem;
    }

    .monitor {
        display: none;
    }

    .nav-status {
        display: none;
    }
}

@media (max-width: 480px) {
    .title-word {
        font-size: 3.5rem !important;
    }

    .title-word.dim {
        font-size: 2rem !important;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
}