/* ============================================
   SENTRY NETWORK — PREMIUM STYLES
   ============================================ */

:root {
    /* Color Palette - Premium Dark */
    --bg-base: #030408;
    --bg-surface: #0a0d14;
    --bg-surface-elevated: #111520;

    --text-primary: #ffffff;
    --text-secondary: #8b95a5;
    --text-muted: #535c6e;

    --accent-cyan: #00f0ff;
    --accent-cyan-dim: rgba(0, 240, 255, 0.15);
    --accent-blue: #0077ff;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    /* Layout */
    --container-max: 1200px;
    --nav-height: 80px;
}

/* Base Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-base);
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility: honor user motion preference globally */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Utilities */
.text-cyan {
    color: var(--accent-cyan);
}

.text-muted {
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #00f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal[style*="--delay"] {
    transition-delay: var(--delay);
}

/* ---- ADVANCED SVG BACKGROUND ---- */
.bg-svg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.6;
    background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.03) 0%, transparent 60%);
    transition: opacity 0.6s ease, background 0.6s ease;
    will-change: opacity;
}

/* Scroll-driven state changes applied via JS */
.bg-svg-container.phase-ecosystem {
    opacity: 0.85;
    background: radial-gradient(circle at 50% 60%, rgba(0, 240, 255, 0.06) 0%, rgba(0, 119, 255, 0.02) 40%, transparent 70%);
}

.bg-svg {
    width: 100%;
    height: 150%;
    position: absolute;
    top: -25%;
    left: 0;
    transform-origin: center;
    will-change: transform;
}

/* SVG Animations */
.bg-grid-static {
    animation: gridBreathe 8s ease-in-out infinite alternate;
    transition: opacity 0.6s ease;
}

@keyframes gridBreathe {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.pulse-path {
    stroke-dasharray: 100 1000;
    animation: dashPulse 12s linear infinite;
}

.pulse-path.p1 {
    animation-delay: 0s;
    stroke-dasharray: 200 800;
}

.pulse-path.p2 {
    animation-delay: -4s;
    stroke-dasharray: 150 900;
    animation-duration: 15s;
}

.pulse-path.p3 {
    animation-delay: -8s;
    stroke-dasharray: 80 1200;
    animation-duration: 10s;
}

@keyframes dashPulse {
    from {
        stroke-dashoffset: 1100;
    }

    to {
        stroke-dashoffset: -100;
    }
}

.node {
    animation: nodePulse 4s ease-in-out infinite alternate;
    transform-box: fill-box;
    transform-origin: center;
    will-change: transform, opacity;
}

.node.n1 {
    animation-delay: 0s;
}

.node.n2 {
    animation-delay: 1s;
}

.node.n3 {
    animation-delay: 2s;
}

@keyframes nodePulse {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ---- NAVIGATION ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4vw;
    z-index: 100;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background-color: rgba(3, 4, 8, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 28px;
    height: 28px;
    color: var(--accent-cyan);
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-nav {
    background: transparent;
    color: var(--text-primary);
    padding: 0.5rem 0;
    font-size: 0.75rem;
    position: relative;
}

.btn-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.btn-nav:hover::after {
    width: 100%;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid var(--text-primary);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-cyan);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.btn-primary:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-primary:hover {
    border-color: var(--accent-cyan);
    color: var(--bg-base);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-block {
    width: 100%;
}

/* ---- HERO SECTION ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--nav-height) 4vw 0;
    position: relative;
    z-index: 10;
}

.hero-layout {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Advanced Hero SVG Graphic */
.hero-graphic {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.core-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.1));
}

.ring-spin-slow {
    transform-origin: 200px 200px;
    animation: spinRotate 20s linear infinite;
    will-change: transform;
}

.hex-spin {
    transform-origin: 200px 200px;
    animation: spinRotateRev 30s linear infinite;
    will-change: transform;
}

.core-pulse {
    transform-origin: 200px 200px;
    animation: coreScale 3s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

@keyframes spinRotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinRotateRev {
    100% {
        transform: rotate(-360deg);
    }
}

@keyframes coreScale {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ---- PARTNERS ECOSYSTEM ---- */
.partners {
    padding: 8rem 4vw;
    background: transparent;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.partner-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #06080d;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    z-index: 1;
    cursor: pointer;
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-border {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.5s ease;
    z-index: 2;
}

.card:focus-visible {
    box-shadow: 0 0 0 2px var(--accent-cyan);
}

.card-art {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card hover effects — desktop only to avoid tap-flash on touch */
@media (hover: hover) {
    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .card-hosting:hover .card-border {
        background: linear-gradient(135deg, var(--accent-cyan), transparent 60%);
    }

    .card-gaming:hover .card-border {
        background: linear-gradient(135deg, var(--accent-blue), transparent 60%);
    }

    .card:hover .card-art {
        opacity: 1;
        transform: translateY(10px) scale(1.05);
    }
}

.card-art svg {
    width: 100%;
    height: 100%;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    padding-top: 10rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, #06080d 150px, #06080d 100%);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.card-icon {
    width: 32px;
    height: 32px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    transition: all 0.4s ease;
}

@media (hover: hover) {
    .card-hosting:hover .card-icon {
        color: var(--bg-base);
        background: var(--accent-cyan);
        border-color: var(--accent-cyan);
        box-shadow: 0 0 15px var(--accent-cyan-dim);
    }

    .card-gaming:hover .card-icon {
        color: var(--bg-base);
        background: var(--accent-blue);
        border-color: var(--accent-blue);
        box-shadow: 0 0 15px rgba(0, 119, 255, 0.2);
    }
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin: 0;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.action-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .card:hover .card-footer {
        color: var(--text-primary);
    }

    .card:hover .action-icon {
        transform: translateX(4px);
    }
}

/* ---- FOOTER ---- */
.footer {
    padding: 3rem 4vw;
    background-color: rgba(3, 4, 8, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-subtle);
    position: relative;
    z-index: 10;
}

.footer-bottom {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ---- MODAL (Shared) ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(3, 4, 8, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay:not([aria-hidden="true"]) {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #0a0d14;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    position: relative;
    padding: 2.5rem 2rem;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-wide {
    max-width: 720px;
}

.modal-overlay:not([aria-hidden="true"]) .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 2;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: inset 0 0 0 1px var(--accent-cyan);
}

/* Success State */
.modal-success {
    text-align: center;
}

.success-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-cyan);
    margin: 0 auto 1.5rem;
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

/* ---- SERVICE MODALS ---- */
.service-modal-header {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.service-modal-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.75rem;
    color: var(--accent-cyan);
    padding: 7px;
    border: 1px solid var(--accent-cyan-dim);
    border-radius: 10px;
    background: rgba(0, 240, 255, 0.05);
}

.service-modal-icon svg {
    width: 100%;
    height: 100%;
}

.service-modal-header .modal-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.service-modal-header .modal-desc {
    margin-bottom: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.85rem;
}

/* Hosting service grid */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: #06080d;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.service-item:hover {
    background: #111520;
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.service-item-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--accent-cyan);
}

.service-item-icon svg {
    width: 100%;
    height: 100%;
}

.service-item-info h4 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.service-item-info p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Gaming server grid */
.server-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.server-card {
    text-align: center;
    padding: 1rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    background: #06080d;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.server-card:hover {
    border-color: rgba(0, 119, 255, 0.3);
    background: #111520;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.server-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
    font-weight: 600;
}

.server-card-icon {
    width: 28px;
    height: 28px;
    margin: 0 auto 0.5rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.server-card:hover .server-card-icon {
    color: var(--accent-cyan);
}

.server-card-icon svg {
    width: 100%;
    height: 100%;
}

.server-card-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.server-card-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.server-card-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.service-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.service-footer p {
    font-size: 0.75rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .hero-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-desc {
        margin: 0 auto 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-graphic {
        max-width: 400px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .server-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .partner-grid {
        grid-template-columns: 1fr;
    }

    .modal-container {
        padding: 2.5rem 1.5rem;
    }

    .modal-wide {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ---- MOBILE PERFORMANCE OVERRIDES ---- */
/* Target touch devices (phones, tablets) without a real pointer.
   Strips GPU-heavy effects — Gaussian blurs, backdrop-filter layers,
   and continuous keyframe animations — to eliminate mobile jank. */
@media (hover: none) and (pointer: coarse) {
    /* Bypass SVG filter="url(#blurGlow)" — CSS filter wins over the SVG attribute */
    .data-paths,
    .pulse-path,
    .ring-spin-slow,
    .core-pulse {
        filter: none !important;
    }

    /* Remove hero SVG drop-shadow */
    .core-svg {
        filter: none;
    }

    /* Drop backdrop blur; opaque background preserves legibility */
    .nav.scrolled,
    .footer,
    .modal-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background-color: rgba(3, 4, 8, 0.95);
    }
}