:root {
    /* Logo-Derived Palette */
    --apx-green: #4ade80;
    /* Bright Green */
    --apx-teal: #0d9488;
    /* Deep Teal */
    --apx-orange: #f97316;
    /* Vibrant Orange */
    --apx-red: #ef4444;
    /* Red */

    /* Dark Theme Base */
    --bg-dark: #020617;
    /* Darker than slate, almost black aka 'Rich Black' */
    --bg-card: #0f172a;
    /* Slate 900 */
    --bg-card-hover: #1e293b;
    /* Slate 800 */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--apx-green) 0%, var(--apx-teal) 40%, var(--apx-orange) 100%);
    --gradient-text: linear-gradient(to right, var(--apx-green), var(--apx-teal), var(--apx-orange), var(--apx-red));
    --gradient-glow: radial-gradient(circle, rgba(74, 222, 128, 0.15) 0%, rgba(249, 115, 22, 0.05) 100%);

    /* Layout */
    --container-width: 1400px;
    --section-padding: 4rem 0;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 2rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientMove 5s linear infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 650px;
    margin-bottom: 2.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    border: none;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(74, 222, 128, 0.3), 0 0 40px rgba(74, 222, 128, 0.1);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 30px rgba(74, 222, 128, 0.6), 0 0 60px rgba(249, 115, 22, 0.3);
        transform: scale(1.03);
    }
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--apx-orange) 0%, var(--apx-red) 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--apx-green);
    transform: translateY(-3px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    /* Adjust based on actual logo aspect ratio */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: #fff;
}

.nav-links .btn-primary,
.nav-links .btn-primary:hover {
    color: #fff !important;
}

.hamburger {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

/* Inner Hero Styles - Unified */
.inner-hero {
    position: relative;
    padding: 10rem 0 6rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    /* Consistent height */
    background: var(--bg-dark);
}

.inner-hero canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

.inner-hero .nav-container {
    position: relative;
    z-index: 2;
}


.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    max-width: 700px;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 20px;
    color: var(--apx-green);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.hero-visual {
    position: relative;
    perspective: 1000px;
}

.hero-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.hero-card:hover {
    transform: rotateY(0) rotateX(0) translateY(-10px);
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: var(--gradient-brand);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 0;
    pointer-events: none;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.icon-green {
    background: rgba(74, 222, 128, 0.1);
    color: var(--apx-green);
}

.icon-orange {
    background: rgba(249, 115, 22, 0.1);
    color: var(--apx-orange);
}

.icon-blue {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

/* Services Section */
.section {
    padding: var(--section-padding);
    position: relative;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: var(--container-width);
    margin: 2rem auto 0;
    padding: 0 2rem;
    justify-items: center;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.card:hover {
    transform: translateY(-10px);
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3);
}

/* Gradient border effect on hover */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card h3 {
    color: #fff;
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--apx-green);
    font-weight: 600;
    font-size: 0.9rem;
}

.link-arrow i {
    transition: transform 0.3s ease;
}

.card:hover .link-arrow i {
    transform: translateX(5px);
}

/* Why Us Section */
.split-section {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.why-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.why-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: var(--apx-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 0.9rem;
    margin-top: 0.2rem;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

.why-content h4 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.why-content p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* CTA Band */
.cta-section {
    margin: 4rem 2rem;
    background: linear-gradient(to right, #0f172a, #111a2f);
    border-radius: var(--radius-lg);
    padding: 5rem 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(74, 222, 128, 0.05), transparent 70%);
}

.cta-grid {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
footer {
    background: #000;
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--apx-green);
}

.copy-row {
    max-width: var(--container-width);
    margin: 4rem auto 0;
    padding: 2rem 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-visual {
        display: none;
    }

    /* Simplify for tablet */
    .split-section {
        grid-template-columns: 1fr;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        padding: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Standardization for Inner Pages to Fix Mismatches */
.section h2 {
    font-size: 2.5rem;
    /* Standard H2 */
    margin-bottom: 2rem;
}

/* Feature Box (Matches Card Style) */
.feature-box {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.feature-box h3 {
    font-size: 1.25rem;
}

.feature-box p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Responsive Grid */
@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ================================
   Enhanced Mobile Responsive Fixes
   ================================ */

/* Tablet breakpoint - 2 columns max */
@media (max-width: 900px) {

    .card-grid,
    .container .card-grid,
    div .card-grid,
    section .card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

/* Mobile breakpoint - single column */
@media (max-width: 768px) {

    .card-grid,
    .container .card-grid,
    div .card-grid,
    section .card-grid,
    [class*="card-grid"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 1rem !important;
        max-width: 100% !important;
    }

    .card,
    .value-card {
        padding: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .card h3,
    .value-card h3 {
        font-size: 1.2rem;
    }

    .card p,
    .value-card p {
        font-size: 0.95rem;
    }

    /* Fix section padding on mobile */
    .section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    /* Fix split section for mobile */
    .split-section {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1rem !important;
    }

    /* Better hero text on mobile */
    .inner-hero {
        padding: 8rem 0 4rem;
        min-height: auto;
    }

    .lead {
        font-size: 1.1rem;
    }

    /* CTA section mobile fix */
    .cta-section {
        margin: 2rem 1rem;
        padding: 3rem 1.5rem;
    }

    /* Footer mobile fix */
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand p {
        max-width: 100%;
        margin: 1rem auto;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .card-grid,
    .container .card-grid {
        padding: 0 0.5rem !important;
    }
}

/* ================================
   Hero Command Center Animation
   ================================ */
.command-center {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.command-center:hover {
    transform: rotateY(0) rotateX(0);
}

.command-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--apx-green), var(--apx-teal), var(--apx-orange));
}

.module {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.module-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--apx-green);
    box-shadow: 0 0 10px var(--apx-green);
    animation: blink 2s infinite;
}

/* --- Cyber Module --- */
.cyber-visual {
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.scan-line {
    width: 2px;
    height: 100%;
    background: var(--apx-teal);
    position: absolute;
    left: 0;
    box-shadow: 0 0 15px var(--apx-teal);
    animation: scan 3s linear infinite;
}

.threat-dot {
    width: 4px;
    height: 4px;
    background: var(--apx-red);
    position: absolute;
    top: 50%;
    left: 70%;
    border-radius: 50%;
    opacity: 0;
    animation: threatAppear 3s infinite 1.5s;
}

/* --- Auto Module --- */
.auto-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.node {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apx-orange);
    z-index: 1;
}

.flow-line {
    position: absolute;
    top: 50%;
    left: 32px;
    right: 32px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
}

.packet {
    width: 6px;
    height: 6px;
    background: var(--apx-orange);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 32px;
    transform: translateY(-50%);
    box-shadow: 0 0 10px var(--apx-orange);
    animation: packetMove 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* --- Server Module --- */
.server-bars {
    display: flex;
    gap: 4px;
    height: 30px;
    align-items: flex-end;
}

.bar {
    flex: 1;
    background: var(--apx-green);
    opacity: 0.5;
    border-radius: 2px;
    animation: equalize 1s ease-in-out infinite alternate;
}

/* Animations */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes scan {
    0% {
        left: -5%;
    }

    100% {
        left: 105%;
    }
}

@keyframes threatAppear {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    20% {
        opacity: 1;
        transform: scale(1.5);
    }

    100% {
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes packetMove {
    0% {
        left: 40px;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        left: calc(100% - 40px);
        opacity: 0;
    }
}

@keyframes equalize {
    0% {
        height: 20%;
    }

    100% {
        height: 100%;
    }
}

/* Mobile Adjustment for Hero Visual */
@media (max-width: 968px) {
    .hero-visual {
        display: block;
        /* Ensure container is visible */
        margin-top: 3rem;
        display: flex;
        justify-content: center;
    }

    .command-center {
        display: block;
        /* Show it! */
        transform: scale(0.9);
        /* Scale down slightly for tablets */
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .command-center {
        transform: scale(0.75);
        /* Scale down more for phones */
        transform-origin: center top;
        max-width: 100%;
        margin-bottom: -40px;
        /* Offset the scaling white space */
    }

    .hero-visual {
        margin-top: 2rem;
        perspective: none;
        /* Flatten 3D effect on mobile for performance/clarity */
    }
}
/* Breadcrumbs */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--apx-teal);
}

.breadcrumb i {
    font-size: 0.7rem;
    opacity: 0.5;
}
