/* =========================================================================
   SELEGUS - Premium Dynamic Software Website
   Design System: Deep Tech Dark Mode, Glassmorphism, Neon Accents
========================================================================= */

:root {
    /* Colors */
    --bg-dark: #020617;
    --bg-darker: #000000;
    --bg-card: rgba(15, 23, 42, 0.4);
    
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.5);
    
    --text-main: #f8fafc;
    --text-muted: #94A3B8;
    
    --border-glass: rgba(255, 255, 255, 0.08);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img, svg {
    max-width: 100%;
}

/* Typography elements */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    display: inline-block;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
}

.text-center {
    text-align: center;
}
.text-center .section-desc {
    margin: 0 auto;
}

/* Dynamic Background Layer */
.bg-layer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 40%),
                radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.15), transparent 40%),
                radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.1), transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.bg-layer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.05;
    mix-blend-mode: overlay;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin: 0;
}

.logo span {
    color: var(--primary);
}

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

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
}

.nav-link:not(.btn-primary-outline)::after {
    content: '';
    position: absolute;
    bottom: -4px; right: 0; left: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:not(.btn-primary-outline):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: var(--transition-fast);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    color: #fff;
    box-shadow: 0 10px 25px -5px var(--primary-glow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #a78bfa, var(--primary));
    opacity: 0;
    transition: var(--transition-normal);
    z-index: -1;
}

.btn-primary:hover {
    box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.8);
    transform: translateY(-3px) scale(1.02);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    border-color: var(--secondary);
    background: rgba(6, 182, 212, 0.1);
    transform: translateY(-2px);
}

.btn-primary-outline {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: #fff !important;
}

.btn-primary-outline:hover {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn-block {
    width: 100%;
}

/* Sections */
.section {
    padding: 6rem 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

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

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

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

/* Glass & Hero Visuals */
.glass-panel, .glass-card {
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-panel::after, .glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.03;
    pointer-events: none;
}

.hero-visual {
    position: relative;
    height: 500px;
}

.visual-card {
    position: absolute;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.main-card {
    width: 320px;
    height: 400px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.card-header {
    margin-bottom: 2rem;
}

.points { display: flex; gap: 6px; }
.dots span {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #334155;
    margin-right: 6px;
}
.dots span:nth-child(1) { background: #ef4444; }
.dots span:nth-child(2) { background: #eab308; }
.dots span:nth-child(3) { background: #22c55e; }

.skeleton-line {
    height: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.skeleton-line::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer { 100% { transform: translateX(100%); } }

.skeleton-line.full { width: 100%; }
.skeleton-line.half { width: 60%; }
.skeleton-line.quarter { width: 40%; }

.data-pulse {
    margin-top: auto;
    height: 100px;
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.2) 0%, transparent 100%);
    border-top: 2px solid var(--secondary);
    border-radius: 4px;
    position: relative;
}

.data-pulse::before {
    content: '';
    position: absolute;
    top: -2px; left: 0;
    width: 20%;
    height: 2px;
    background: #fff;
    box-shadow: 0 0 10px #fff;
    animation: scanline 3s infinite linear;
}

@keyframes scanline {
    0% { left: 0%; }
    50% { left: 80%; }
    100% { left: 0%; }
}

.floating-card-1 {
    top: 10%; right: 5%;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: float 6s ease-in-out infinite;
    color: var(--secondary);
    font-weight: 600;
}

.floating-card-2 {
    bottom: 15%; left: 0;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: float 7s ease-in-out infinite reverse;
    color: var(--primary);
    font-weight: 600;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* About Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.stat-card {
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.15);
}

.stat-number {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    padding: 2.5rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.1), transparent 50%);
    opacity: 0;
    transition: var(--transition-normal);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255,255,255,0.15);
}

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

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--primary);
    font-weight: 600;
}

.service-link:hover {
    color: #fff;
}

/* Apps Portfolio */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.app-card {
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: var(--primary-glow);
}

.app-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.app-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform var(--transition-normal);
}

.app-placeholder.gradient-1 {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.app-placeholder.gradient-2 {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.app-placeholder.gradient-3 {
    background: linear-gradient(135deg, #10b981, #059669);
}

.app-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.app-card:hover .app-overlay {
    opacity: 1;
}

.app-card:hover .app-placeholder {
    transform: scale(1.05);
}

.app-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.app-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: var(--text-muted);
}

.app-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.app-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.app-metrics {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.25rem;
    margin-top: auto;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tech Marquee */
.tech-marquee-wrapper {
    margin-top: 3rem;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.tech-marquee {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

.tech-marquee:hover {
    animation-play-state: paused;
}

.tech-item {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    margin: 0 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.tech-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    transform: scale(1.05);
}

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

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.contact-item svg {
    color: var(--primary);
}

.contact-form-wrapper {
    padding: 3rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-control {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-glass);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.floating-label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    pointer-events: none;
}

.form-control:focus ~ .floating-label,
.form-control:valid ~ .floating-label,
.form-control:not(:placeholder-shown) ~ .floating-label {
    top: -0.8rem;
    font-size: 0.8rem;
    color: var(--primary);
}

select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
select.form-control option {
    background: var(--bg-dark);
    color: #fff;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-glass);
    padding: 4rem 0 2rem;
    background: rgba(0,0,0,0.3);
}

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

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

.footer-links h4 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

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

.footer-legal {
    border-top: 1px solid var(--border-glass);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.legal-links a {
    margin-left: 1.5rem;
}

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

/* Scroll Animations Base State */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-up.active, .fade-in-right.active, .fade-in-left.active {
    opacity: 1;
    transform: translate(0);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title { font-size: 3rem; }
    .hero-container, .contact-container { grid-template-columns: 1fr; }
    .hero-visual { height: 400px; margin-top: 3rem; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        height: 100vh; width: 70%;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease;
        border-left: 1px solid var(--border-glass);
    }
    
    .nav-links.active { right: 0; }
    
    .mobile-menu-btn { display: block; }
    .mobile-menu-btn.active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-btn.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .stats-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.5rem; }
    
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
    .footer-legal { flex-direction: column; gap: 1rem; text-align: center; }
}

/* Theme Switcher Styles Base (Shared across themes) */
.theme-switcher {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
}
.theme-btn {
    width: 3.5rem; height: 3.5rem;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    border: 2px solid var(--border-glass, #333);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-fast);
}
.theme-btn:hover {
    transform: scale(1.1);
}
.theme-menu {
    position: absolute;
    bottom: calc(100% + 1rem);
    left: 0;
    background: #0f172a;
    border: 1px solid var(--border-glass, #333);
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: var(--transition-fast);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.theme-menu.active {
    opacity: 1; pointer-events: auto; transform: translateY(0);
}
.theme-option {
    background: transparent;
    border: none;
    color: #94A3B8;
    padding: 0.75rem 1rem;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
    font-family: 'Inter', sans-serif;
}
.theme-option:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.theme-option.active {
    background: var(--primary, #8b5cf6);
    color: #fff;
}
