/* 
    NetworkOS - Telecom SaaS Platform Styles 
    Hybrid Dark/Light theme, High-End Technical Aesthetic
*/

:root {
    /* Color Palette - iQom Branded */
    --iqom-black: #0A0A0A;
    --iqom-dark: #111111;
    --iqom-grey-dark: #1A1A1A;
    --iqom-grey: #2A2A2A;
    --iqom-grey-light: #6B7280;
    --iqom-light: #F5F5F5;
    --iqom-white: #FFFFFF;

    --iqom-accent-primary: #D1D5DB;
    --iqom-accent-secondary: #9CA3AF;
    --iqom-border: #262626;
    --iqom-red: #ad39f1;
    /* Solid brand red */
    --iqom-red-dark: #B3000C;

    /* Theme Mapping */
    --bg-dark: var(--iqom-black);
    --bg-card: var(--iqom-dark);
    --bg-card-hover: var(--iqom-grey-dark);

    --bg-light: var(--iqom-light);
    --bg-light-alt: var(--iqom-light);

    --text-primary: var(--iqom-white);
    --text-secondary: var(--iqom-grey-light);
    --text-inverse: var(--iqom-black);
    --text-inverse-muted: var(--iqom-grey);

    /* Accents */
    --accent-primary: var(--iqom-red);
    --accent-primary-hover: var(--iqom-red-dark);
    --accent-secondary: var(--iqom-red);
    --accent-gradient: linear-gradient(135deg, var(--iqom-red), var(--iqom-red));

    /* Borders */
    --border-dark: var(--iqom-border);
    --border-light: var(--iqom-grey-light);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Outfit', var(--font-sans);

    /* Spacing & Layout */
    --container-max: 1200px;
    --section-pad: 100px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Theme Overrides */
.theme-dark {
    --bg-dark: var(--iqom-black);
    --bg-light: var(--iqom-black);
    --bg-light-alt: var(--iqom-black);
    --text-primary: var(--iqom-white);
    --text-secondary: var(--iqom-grey-light);
    --text-inverse: var(--iqom-white);
    --text-inverse-muted: var(--iqom-grey-light);
}

/* RESETS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.section-header {
    margin-bottom: 4rem;
    max-width: 600px;
}

.section-header.text-center {
    margin-inline: auto;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
    font-family: var(--font-sans);
    border: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(227, 0, 15, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(227, 0, 15, 0.5);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition-fast);
}

.navbar.scrolled {
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.logo-icon {
    height: 88px;
    width: auto;
}

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

.nav-links a {
    color: #4B5563;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--iqom-black);
}

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

.navbar .btn-outline {
    color: #374151;
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar .btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #374151;
    transition: var(--transition-fast);
}

/* HERO SECTION */
.hero {
    position: relative;
    padding-top: 180px;
    padding-bottom: 120px;
    overflow: hidden;
}

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

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(227, 0, 15, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(227, 0, 15, 0.2);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-headline {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subheadline {
    font-size: 1.25rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

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

/* Abstract Network Animation CSS */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.network-animation {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.node {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: var(--transition-smooth);
    animation: float 6s ease-in-out infinite;
}

.node::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: var(--accent-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.5;
}

.node-sim {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.node-api {
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100px;
    height: 100px;
    background: var(--accent-gradient);
    animation-delay: 1s;
}

.node-api::before {
    display: none;
}

.node-pbx {
    bottom: 20%;
    left: 70%;
    animation-delay: 2s;
}

.node-net {
    top: 10%;
    right: 10%;
    animation-delay: 3s;
}

.connection {
    position: absolute;
    background: var(--border-dark);
    height: 2px;
    z-index: -1;
    overflow: hidden;
}

/* connection visual paths to be positioned via js or statically for demo */
.connection::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    animation: dataFlow 2s linear infinite;
}

@keyframes dataFlow {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

@keyframes float {

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

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

.hero-background-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(227, 0, 15, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

/* CORE MESSAGE */
.core-message {
    padding: 6rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
}

.message-text {
    font-size: 2.5rem;
    font-weight: 400;
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-primary);
    line-height: 1.4;
}

/* FEATURES SECTION */
.features {
    padding: var(--section-pad) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-card-hover);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.feature-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    margin-top: 1.5rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.link-arrow:hover {
    gap: 0.75rem;
}

.highlight-card {
    background: linear-gradient(180deg, rgba(20, 21, 26, 1) 0%, rgba(227, 0, 15, 0.05) 100%);
    border-color: rgba(227, 0, 15, 0.3);
}

/* PBX ECOSYSTEM */
.pbx-ecosystem {
    padding: var(--section-pad) 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0c0d12 100%);
}

.pbx-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.pbx-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(227, 0, 15, 0.3), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.pbx-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-dark);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px #10b981;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.pbx-features {
    display: grid;
    gap: 1.5rem;
}

.pbx-feature-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.pbx-feature-item .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pbx-feature-item .value {
    color: var(--text-primary);
    font-weight: 500;
}

/* HOW IT WORKS */
.how-it-works {
    padding: var(--section-pad) 0;
    background: var(--bg-light);
    color: var(--text-inverse);
}

.how-it-works p {
    color: var(--text-inverse-muted);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 4rem;
    position: relative;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    margin: 0 auto 1.5rem;
    color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--border-light);
    margin-top: 32px;
    position: relative;
    z-index: 1;
    min-width: 50px;
}

/* USE CASES */
.use-cases {
    padding: var(--section-pad) 0;
}

.layout-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.use-case-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.use-case-list li {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.use-case-list strong {
    color: var(--text-primary);
}

.bullet {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

.technical-box {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 3rem;
}

.tech-list {
    list-style: none;
}

.tech-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tech-list li:last-child {
    border-bottom: none;
}

.tech-list li::before {
    content: '✓';
    color: var(--accent-primary);
    font-weight: bold;
}

/* PRICING */
.pricing-cta {
    padding: var(--section-pad) 0;
}

.cta-card {
    background: var(--accent-gradient);
    border-radius: 24px;
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4xKSIvPjwvc3ZnPg==');
    opacity: 0.5;
}

.cta-card h2,
.cta-card p {
    position: relative;
    z-index: 2;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.cta-card .btn {
    position: relative;
    z-index: 2;
}

.cta-card .btn-primary {
    background: var(--accent-gradient);
    color: white;
}

/* FINAL CTA */
.final-cta {
    padding: 6rem 0 8rem;
    border-top: 1px solid var(--border-dark);
}

.final-cta h2 {
    font-size: 3.5rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* FOOTER */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-dark);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

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

.footer-bottom {
    border-top: 1px solid var(--border-dark);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-headline {
        font-size: 3.5rem;
    }
}

@media (max-width: 850px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

    .layout-split {
        grid-template-columns: 1fr;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .step-connector {
        width: 2px;
        min-height: 40px;
        height: 40px;
        margin-top: 0;
    }

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

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

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-headline {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

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

/* ANIMATIONS ON SCROLL UTILITY CLASS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* MODALS */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    border: 1px solid var(--border-dark);
    transform: translateY(20px);
    transition: var(--transition-smooth);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--iqom-red);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--iqom-red);
    box-shadow: 0 0 0 2px rgba(227, 0, 15, 0.2);
}

.honeypot {
    display: none !important;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.form-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 20px;
}

.form-message.success {
    color: #10B981;
}

.form-message.error {
    color: var(--iqom-red);
}

[data-modal-target] {
    cursor: pointer;
}