/* ============================================
   Kilocode Limited - Custom Styles
   Bootstrap 5 + Custom CSS
   ============================================ */

/* CSS Variables */
:root {
    --kilo-bg: #070A12;
    --kilo-bg-2: #0B0F1C;
    --kilo-accent: #4F6DFF;
    --kilo-text: #F2F5FF;
    --kilo-muted: #A7B1D8;
    --kilo-border: rgba(242, 245, 255, 0.10);
    --font-display: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Typography */
.font-display {
    font-family: var(--font-display);
}

.micro-label {
    font-family: var(--font-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    color: var(--kilo-muted);
}

.headline-hero {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    font-size: clamp(48px, 10vw, 118px);
    color: var(--kilo-text);
    margin-bottom: 1.5rem;
}

.headline-section {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    font-size: clamp(36px, 6vw, 80px);
    color: var(--kilo-text);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(7, 10, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--kilo-border);
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--kilo-text) !important;
}

.nav-link {
    color: var(--kilo-muted) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--kilo-text) !important;
}

.navbar-toggler {
    border-color: var(--kilo-border);
    padding: 0.4rem 0.6rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28242, 245, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    background-color: var(--kilo-accent);
    border-color: var(--kilo-accent);
    color: var(--kilo-text);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #3d5ce6;
    border-color: #3d5ce6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 109, 255, 0.3);
}

.btn-outline-light {
    border-color: rgba(242, 245, 255, 0.25);
    color: var(--kilo-text);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    background-color: rgba(242, 245, 255, 0.1);
    border-color: rgba(242, 245, 255, 0.5);
    transform: translateY(-2px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(7, 10, 18, 0.35), rgba(7, 10, 18, 0.75));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--kilo-muted);
    max-width: 500px;
    margin-bottom: 2rem;
}

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

/* ============================================
   Split Sections
   ============================================ */
.split-section {
    position: relative;
}

.split-image {
    min-height: 500px;
    overflow: hidden;
}

.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 500px;
}

.split-content {
    background-color: var(--kilo-bg);
    min-height: 500px;
}

.split-text {
    max-width: 600px;
}

.split-body {
    font-size: 1.1rem;
    color: var(--kilo-muted);
    margin: 1.5rem 0;
    line-height: 1.7;
}

.link-accent {
    color: var(--kilo-accent);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.link-accent::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--kilo-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.link-accent:hover::after {
    transform: scaleX(1);
}

.link-accent:hover {
    color: var(--kilo-accent);
}

.accent-line {
    width: 80px;
    height: 2px;
    background-color: var(--kilo-accent);
    margin: 1rem 0 1.5rem;
}

/* Hairline divider for split sections */
.split-section .row {
    position: relative;
}

.split-section .row::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background-color: rgba(242, 245, 255, 0.12);
    transform: translateX(-50%);
}

@media (max-width: 991px) {
    .split-section .row::after {
        display: none;
    }
}

/* ============================================
   Capabilities Section
   ============================================ */
.capabilities-section {
    background-color: var(--kilo-bg);
    padding: 100px 0;
}

.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.service-card {
    background: transparent;
    border: 1px solid var(--kilo-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    border-color: rgba(79, 109, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.service-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(79, 109, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: background-color 0.3s ease;
}

.service-card:hover .service-icon {
    background-color: rgba(79, 109, 255, 0.2);
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--kilo-accent);
}

.service-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--kilo-text);
    margin-bottom: 0.75rem;
}

.service-desc {
    color: var(--kilo-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Process Timeline */
.process-section {
    margin-top: 4rem;
}

.process-timeline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.process-icon {
    width: 50px;
    height: 50px;
    background-color: var(--kilo-bg-2);
    border: 1px solid rgba(79, 109, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-icon i {
    font-size: 1.25rem;
    color: var(--kilo-accent);
}

.process-step span {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--kilo-text);
}

.process-connector {
    width: 60px;
    height: 1px;
    background-color: rgba(79, 109, 255, 0.3);
    margin: 0 1rem;
}

.process-step-mobile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    background-color: var(--kilo-bg);
    padding: 100px 0;
    border-top: 1px solid var(--kilo-border);
}

.contact-info {
    space-y: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(79, 109, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.1rem;
    color: var(--kilo-accent);
}

.contact-item a {
    color: var(--kilo-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: var(--kilo-accent);
}

.contact-item p {
    color: var(--kilo-text);
    margin-bottom: 0;
}

.contact-form-wrapper {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--kilo-border);
    border-radius: 16px;
    padding: 2.5rem;
}

.contact-form .form-control,
.contact-form .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--kilo-border);
    border-radius: 10px;
    color: var(--kilo-text);
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--kilo-accent);
    box-shadow: 0 0 0 0.2rem rgba(79, 109, 255, 0.25);
    color: var(--kilo-text);
}

.contact-form .form-control::placeholder {
    color: var(--kilo-muted);
}

.contact-form .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23A7B1D8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.contact-form .form-select option {
    background-color: var(--kilo-bg);
    color: var(--kilo-text);
}

.contact-form textarea.form-control {
    resize: none;
}

.contact-form label {
    margin-bottom: 0.5rem;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(79, 109, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    font-size: 2.5rem;
    color: var(--kilo-accent);
}

.success-message h3 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--kilo-text);
    margin-bottom: 0.5rem;
}

.success-message p {
    color: var(--kilo-muted);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--kilo-bg);
    border-top: 1px solid var(--kilo-border);
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--kilo-text);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-brand:hover {
    color: var(--kilo-accent);
}

.footer-tagline {
    color: var(--kilo-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    max-width: 250px;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--kilo-bg-2);
    border: 1px solid var(--kilo-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kilo-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    color: var(--kilo-accent);
    border-color: rgba(79, 109, 255, 0.3);
}

.footer-title {
    font-family: var(--font-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    color: var(--kilo-muted);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--kilo-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

.footer-email {
    color: var(--kilo-text);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-block;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.footer-email:hover {
    color: var(--kilo-accent);
}

.footer-location {
    color: var(--kilo-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--kilo-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--kilo-muted);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--kilo-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

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

/* ============================================
   Responsive Styles
   ============================================ */
@media (min-width: 992px) {
    .p-lg-6 {
        padding: 4rem !important;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 991px) {
    .headline-hero {
        font-size: clamp(40px, 12vw, 80px);
    }
    
    .headline-section {
        font-size: clamp(32px, 10vw, 60px);
    }
    
    .split-image,
    .split-content {
        min-height: auto;
    }
    
    .split-image img {
        min-height: 350px;
    }
    
    .process-connector {
        width: 30px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .headline-hero {
        font-size: clamp(36px, 14vw, 60px);
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .split-text {
        padding: 2rem 1.5rem !important;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    .capabilities-section,
    .contact-section {
        padding: 60px 0;
    }
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--kilo-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--kilo-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d5ce6;
}

/* Selection */
::selection {
    background-color: rgba(79, 109, 255, 0.3);
    color: var(--kilo-text);
}

/* Focus states */
:focus-visible {
    outline: 2px solid var(--kilo-accent);
    outline-offset: 2px;
}

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