/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a28;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text: #e4e4e7;
    --text-muted: #8b8b9e;
    --text-dim: #52526a;
    --white: #ffffff;
    --primary: #8b5cf6;
    --primary-glow: rgba(139,92,246,0.3);
    --accent: #6366f1;
    --cyan: #06b6d4;
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { border: none; cursor: pointer; font-family: inherit; }

/* Accessibility & Focus-visible styles */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

/* Skip link styling */
.skip-link {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 9999;
    font-weight: 600;
    font-size: 0.9rem;
    transition: top 0.2s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.skip-link:focus {
    top: 0;
    outline: none;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section { padding: 120px 0; position: relative; }

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

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 16px;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--white);
}

.section-desc { color: var(--text-muted); font-size: 1.1rem; }

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

.link { color: var(--primary); border-bottom: 1px solid transparent; transition: var(--transition); }
.link:hover { border-bottom-color: var(--primary); }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 24px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--primary-glow);
}

.btn-ghost {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--border-hover);
}

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

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

.logo-icon { font-size: 1.5rem; }
.logo-accent { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.05); }

.nav-toggle { display: none; background: none; }

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
    position: relative;
}
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle.active .hamburger { background: transparent; }
.nav-toggle.active .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle.active .hamburger::after { top: 0; transform: rotate(-45deg); }

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}
.hero-glow-1 {
    width: 600px; height: 600px;
    background: var(--accent);
    top: -200px; left: -100px;
    opacity: 0.15;
}
.hero-glow-2 {
    width: 500px; height: 500px;
    background: var(--primary);
    bottom: -200px; right: -100px;
    opacity: 0.12;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border-radius: 100px;
    background: rgba(139,92,246,0.08);
    border: 1px solid rgba(139,92,246,0.2);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

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

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--white); }
.stat-plus { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

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

.scroll-indicator {
    width: 24px; height: 40px;
    border-radius: 12px;
    border: 2px solid var(--border-hover);
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-dot {
    width: 4px; height: 8px;
    border-radius: 2px;
    background: var(--primary);
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.3; }
}

/* ========== SERVICES ========== */
.services { background: var(--bg); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

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

.service-card.featured {
    border-color: rgba(139,92,246,0.3);
    background: linear-gradient(180deg, rgba(139,92,246,0.08), var(--bg-card));
}

.card-badge {
    position: absolute;
    top: 16px; right: 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--gradient);
    color: var(--white);
}

.service-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99,102,241,0.1);
    color: var(--accent, #6366f1);
    margin-bottom: 24px;
    border: 1px solid rgba(99,102,241,0.15);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.service-card > p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-features li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
}

/* ========== ABOUT ========== */
.about { background: linear-gradient(180deg, var(--bg) 0%, #0d0d15 100%); }

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

.about-content h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--white);
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 1rem;
}

.about-values { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }

.value-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.value-item:hover { border-color: var(--border-hover); }
.value-icon { font-size: 1.5rem; }
.value-item strong { display: block; color: var(--white); font-size: 0.95rem; }
.value-item span { font-size: 0.85rem; color: var(--text-muted); }

/* Code Window */
.code-window {
    background: #0d0d15;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

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

.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }
.code-title { font-size: 0.8rem; color: var(--text-dim); }

.code-body {
    padding: 24px;
    font-size: 0.85rem;
    line-height: 1.9;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    overflow-x: auto;
    color: var(--text-muted);
}

.code-keyword { color: #c084fc; }
.code-class { color: #67e8f9; }
.code-func { color: #fbbf24; }
.code-string { color: #86efac; }
.code-comment { color: var(--text-dim); }

/* ========== CONTACT ========== */
.contact { background: var(--bg); }

.contact-grid {
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-card:hover { border-color: var(--border-hover); }

.contact-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139,92,246,0.1);
    color: var(--primary);
    flex-shrink: 0;
}

.contact-card strong { display: block; color: var(--white); font-size: 0.9rem; margin-bottom: 2px; }
.contact-card a, .contact-card span { font-size: 0.85rem; color: var(--text-muted); }
.contact-card a:hover { color: var(--primary); }



/* ========== PRIVACY ========== */
.privacy { background: linear-gradient(180deg, var(--bg) 0%, #0d0d15 100%); }

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
}

.privacy-block { margin-bottom: 28px; }
.privacy-block:last-of-type { margin-bottom: 0; }

.privacy-block h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.privacy-block p { color: var(--text-muted); font-size: 0.92rem; }

.privacy-update {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: right;
}

/* ========== FOOTER ========== */
.footer {
    background: #08080d;
    border-top: 1px solid var(--border);
    padding: 64px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 64px;
    padding-bottom: 48px;
}

.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 16px; line-height: 1.7; }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.footer-col h4 { font-size: 0.85rem; font-weight: 700; color: var(--white); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }

.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 0.88rem; color: var(--text-muted); transition: var(--transition); }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
}

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

/* ========== ANIMATIONS ========== */
/* Fallback: without JS, all content is fully visible */
[data-animate] { opacity: 1; transform: none; }

/* Only hide elements when JS is confirmed ready — prevents "indexed without content" */
html.js-ready [data-animate] { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js-ready [data-animate].visible { opacity: 1; transform: translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 968px) {
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .footer-links { grid-template-columns: repeat(3, 1fr); }
    .hero-stats { gap: 24px; }
}

@media (max-width: 768px) {
    .section { padding: 80px 0; }
    .section-header { margin-bottom: 48px; }

    .nav-links {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(10,10,15,0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    .nav-links.open { opacity: 1; visibility: visible; }
    .nav-links a { font-size: 1.2rem; padding: 14px 32px; }
    .nav-toggle { display: block; z-index: 1001; }

    .hero-stats { flex-direction: column; gap: 20px; }
    .stat-divider { width: 40px; height: 1px; }

    .services-grid { grid-template-columns: 1fr; }
    .privacy-content { padding: 28px; }
    .footer-links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero-description { font-size: 1rem; }
    .footer-links { grid-template-columns: 1fr; }
}
