/* 
  Neural Legacy Design System 
  Theme: Dark Mode, Cyber/AI, Vibrant Accents
*/

:root {
    /* Color Palette */
    --bg-dark: #0a0a0f;
    --bg-surface: #13141c;
    --bg-glass: rgba(19, 20, 28, 0.6);

    /* Vibrant Accents: Neon Cyan and Electric Violet */
    --accent-primary: #00f0ff;
    --accent-secondary: #8a2be2;
    --accent-glow: rgba(0, 240, 255, 0.5);

    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #a0a5b5;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Layout */
    --container-max: 1200px;
    --spacing-section: 6rem;

    /* Effects */
    --glass-blur: blur(12px);
    --border-glass: 1px solid rgba(255, 255, 255, 0.05);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Typography Base */
h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.highlight {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Layout Core */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Background Ambient Glows */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-secondary);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
    bottom: -100px;
    left: -200px;
}

/* Navigation Base */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background var(--transition-smooth), padding var(--transition-smooth);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--border-glass);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--accent-primary);
}

/* Buttons Base */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.7);
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

@media (max-width: 768px) {

    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    /* offset navbar */
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    z-index: 10;
}

.badge {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
    min-height: 4rem;
    /* keep height steady for typing effect */
}

.cursor {
    display: inline-block;
    width: 3px;
    animation: blink 1s step-end infinite;
    color: var(--accent-primary);
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Visual & Glass Cards */
.hero-visual {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-card {
    background: linear-gradient(145deg, rgba(20, 21, 29, 0.6), rgba(10, 10, 15, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.main-card {
    width: 80%;
    height: 70%;
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    animation: float 6s ease-in-out infinite;
}

.card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.code-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.w-80 {
    width: 80%;
}

.w-60 {
    width: 60%;
}

.w-90 {
    width: 90%;
}

.w-40 {
    width: 40%;
}

.glow-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--accent-primary);
    filter: blur(40px);
    opacity: 0.5;
    border-radius: 50%;
}

.float-card-1,
.float-card-2 {
    position: absolute;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 3;
}

.float-card-1 {
    top: 20%;
    left: 0;
    animation: float 5s ease-in-out infinite reverse;
}

.float-card-2 {
    bottom: 20%;
    right: 0;
    animation: float 7s ease-in-out infinite 1s;
}

.icon-box {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    color: white;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay staggered animations */
.hero-content>*:nth-child(1) {
    transition-delay: 0.1s;
}

.hero-content>*:nth-child(2) {
    transition-delay: 0.2s;
}

.hero-content>*:nth-child(3) {
    transition-delay: 0.3s;
}

.hero-content>*:nth-child(4) {
    transition-delay: 0.4s;
}

.hero-visual {
    transition-delay: 0.5s;
}

/* --- Services Section --- */
.services {
    padding: var(--spacing-section) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.services-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.service-category {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.icon-box-large {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.primary-gradient {
    background: linear-gradient(135deg, var(--accent-primary), rgba(0, 240, 255, 0.4));
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.3);
}

.secondary-gradient {
    background: linear-gradient(135deg, var(--accent-secondary), rgba(138, 43, 226, 0.4));
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.3);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.glass-panel:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Service group alternating styles */
.service-category-reverse .category-header {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.service-category-reverse .category-header h3 {
    text-align: right;
}

/* --- About Section --- */
.about {
    padding: var(--spacing-section) 0;
    position: relative;
    background: linear-gradient(to bottom, transparent, rgba(138, 43, 226, 0.05));
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    font-weight: 500;
}

/* About Visual - Abstract Globe */
.about-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-globe {
    position: relative;
    width: 300px;
    height: 300px;
}

.globe-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-color: rgba(0, 240, 255, 0.2);
    animation: rotate 20s linear infinite;
}

.ring-2 {
    width: 80%;
    height: 80%;
    border-color: rgba(138, 43, 226, 0.3);
    animation: rotate 15s linear infinite reverse;
}

.ring-3 {
    width: 60%;
    height: 60%;
    border-top-color: var(--accent-primary);
    border-bottom-color: var(--accent-secondary);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Pin for South Africa roughly on the abstract sphere */
.pin-sa {
    position: absolute;
    bottom: 20%;
    right: 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    z-index: 5;
}

.pulse {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px var(--accent-primary);
}

.pulse::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.pin-sa .label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-card {
    position: absolute;
    bottom: 10%;
    left: 0;
    padding: 1.5rem 2rem;
    z-index: 10;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.stat h3 {
    font-size: 2.5rem;
    margin-bottom: 0.2rem;
}

.stat p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
}

/* --- Contact Section --- */
.contact {
    padding: var(--spacing-section) 0;
    position: relative;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.contact-form select {
    appearance: none;
    cursor: pointer;
}

.contact-form select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* --- Footer --- */
.footer {
    background: #050508;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
}

.footer h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.social-icons a:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a:hover {
    color: var(--text-primary);
}

/* Responsive adjustments for Media Queries */
@media (max-width: 992px) {

    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        align-items: center;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-visual {
        height: 400px;
        margin-top: 2rem;
    }

    /* About */
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-list {
        align-items: center;
    }

    .about-visual {
        order: -1;
        /* Move graphic above text on mobile */
    }

    /* Contact & Footer */
    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-info {
        align-items: center;
        text-align: center;
    }

    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-brand p {
        margin: 1rem auto;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}