@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --background: #050505;
    --foreground: #ffffff;
    --accent-purple: #8b5cf6;
    --accent-purple-dim: rgba(139, 92, 246, 0.1);
    --accent-cyan: #06b6d4;
    --accent-cyan-dim: rgba(6, 182, 212, 0.1);
    --accent-gold: #fbbf24;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-dim: #a1a1aa;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --container-padding: clamp(1rem, 5vw, 2.5rem);
}

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

html,
body {
    max-width: 100vw;
    overflow-x: hidden;
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
}

h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
}

/* Utilities */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

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

.accent-gradient {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    padding: 1rem 2rem;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    color: white;
    font-weight: 700;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 99px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: var(--glass-border);
    transform: translateY(-2px);
}

.section-padding {
    padding: clamp(3rem, 12vw, 10rem) 0;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

nav {
    display: flex;
    align-items: center;
}

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

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }

    header .btn-primary {
        display: inline-flex !important;
    }
}

header .btn-primary {
    display: none;
}

.nav-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--text-dim);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--foreground);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.sub-header {
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.6rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-wrapper {
    display: flex;
    width: 200%;
}

.ticker-text {
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-right: 1.5rem;
}

@media (max-width: 768px) {
    .ticker-wrapper {
        animation: marquee 20s linear infinite;
    }
}

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

    100% {
        transform: translateX(-50%);
    }
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
}

/* Grid Layouts */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 3vw, 2.5rem);
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1.5rem, 4vw, 3rem);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: clamp(1.5rem, 5vw, 4rem);
}

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

/* Cards */
.glass-card {
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: clamp(24px, 4vw, 40px);
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1100;
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu .nav-link {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: white;
}

/* Protection */
.no-select {
    user-select: none;
}

.img-protection {
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    opacity: 0.02;
    pointer-events: none;
    z-index: 9999;
    background: url("https://grainy-gradients.vercel.app/noise.svg");
    filter: contrast(150%) brightness(100%);
}

/* Social Icons */
.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon:hover {
    background: var(--accent-purple-dim);
    border-color: var(--accent-purple);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.km-logo {
    height: 40px;
    width: auto;
}

@media (min-width: 768px) {
    .km-logo {
        height: 48px;
    }
}