/* ============================================
   Lux Civica - Modern Dark Theme
   ============================================ */

/* CSS Variables */
:root {
    --color-bg: #0c0c14;
    --color-bg-secondary: #111119;
    --color-bg-tertiary: #181822;
    --color-surface: #1e1e2c;
    --color-surface-hover: #262636;
    
    --color-text: #ffffff;
    --color-text-secondary: #a0a8b8;
    --color-text-muted: #6b7080;
    
    --color-accent: #203c86;
    --color-accent-light: #2d52b0;
    --color-accent-lighter: #4a6fd0;
    --color-accent-secondary: #4a6fd0;
    --color-accent-tertiary: #203c86;
    
    --gradient-primary: linear-gradient(135deg, #203c86 0%, #4a6fd0 100%);
    --gradient-secondary: linear-gradient(135deg, #4a6fd0 0%, #6b8ce0 100%);
    --gradient-hero: radial-gradient(ellipse at top, #151530 0%, #0c0c14 50%);
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(32, 60, 134, 0.2);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --container-width: 1200px;
    --section-padding: 120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-normal);
}

.nav.scrolled {
    background: rgba(12, 12, 20, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 0;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 44px;
    width: auto;
}

.footer .logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
    background: var(--color-accent);
    color: #ffffff !important;
    font-weight: 600;
}

.nav-cta:hover {
    background: var(--color-accent-light);
    box-shadow: 0 0 20px rgba(32, 60, 134, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition-fast);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 100px 0 60px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: #203c86;
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #4a6fd0;
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #6b8ce0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.15;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(32, 60, 134, 0.15);
    border: 1px solid rgba(74, 111, 208, 0.3);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-accent-lighter);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent-lighter);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #4a6fd0 0%, #8baaf0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--color-text-muted);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--color-text-muted);
    border-radius: 2px;
    animation: scroll 1.5s ease-in-out infinite;
}

@keyframes scroll {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(32, 60, 134, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px;
}

.section-label {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(32, 60, 134, 0.15);
    border: 1px solid rgba(74, 111, 208, 0.25);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent-lighter);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

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

/* ============================================
   Solutions Section
   ============================================ */
.solutions {
    background: var(--color-bg-secondary);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 80px;
}

.solution-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.solution-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

.card-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: var(--transition-normal);
}

.solution-card:hover .card-glow {
    opacity: 1;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(32, 60, 134, 0.08), transparent 40%);
}

.card-content {
    position: relative;
    z-index: 1;
    padding: 40px;
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 60, 134, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-accent-lighter);
}

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

.card-description {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.card-features {
    margin-bottom: 28px;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.feature-check {
    color: var(--color-accent-lighter);
    font-weight: 600;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-accent-lighter);
    font-weight: 600;
    transition: var(--transition-fast);
}

.card-link:hover {
    gap: 12px;
}

/* Capabilities */
.capabilities {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.capability {
    text-align: center;
    padding: 32px 24px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.capability-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 60, 134, 0.15);
    border-radius: var(--radius-md);
}

.capability-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-accent-lighter);
}

.capability h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

/* ============================================
   Technology Section
   ============================================ */
.technology {
    background: var(--color-bg);
}

.tech-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.tech-item {
    display: flex;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.tech-number {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent-lighter);
    opacity: 0.6;
}

.tech-info h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tech-info p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Code Preview */
.code-preview {
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

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

.code-body {
    padding: 20px;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
}

.code-keyword { color: #7aa2f7; }
.code-type { color: #e0af68; }
.code-function { color: #7dcfff; }
.code-comment { color: #565f89; font-style: italic; }

/* ============================================
   About Section
   ============================================ */
.about {
    background: var(--color-bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.about-content .section-label {
    margin-bottom: 16px;
}

.about-text {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-image {
    position: relative;
}

.image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.image-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #203c86 0%, #4a6fd0 50%, #203c86 100%);
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
}

.about-photo {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    object-position: center 35%;
    display: block;
    border-radius: var(--radius-lg);
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    background: var(--color-bg);
    padding: 100px 0;
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 60px;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
}

.cta-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-text {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    background: var(--color-bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
}

.contact-centered {
    max-width: 480px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 60, 134, 0.15);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent-lighter);
}

.contact-details h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-details p,
.contact-details a {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.contact-details a:hover {
    color: var(--color-accent-lighter);
}

/* Contact Form */
.contact-form {
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--color-bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent-lighter);
    box-shadow: 0 0 0 3px rgba(32, 60, 134, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-bg);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-tagline {
    color: var(--color-text-muted);
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-showcase,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .capabilities {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tech-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        gap: 20px;
        transition: var(--transition-normal);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.25rem;
        padding: 16px 32px;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .capabilities {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .contact-form {
        padding: 24px;
    }
    
    .cta-content {
        padding: 40px 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .card-content {
        padding: 24px;
    }
    
    .tech-item {
        flex-direction: column;
        gap: 12px;
    }
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
