/* ═══════════════════════════════════════════════
   MAXNXI — Design System
   Dark professional theme with blue accent
   ═══════════════════════════════════════════════ */

:root {
    /* Backgrounds */
    --bg-primary: #0a0a0b;
    --bg-secondary: #0e0e11;
    --bg-card: #141418;
    --bg-elevated: #1a1a20;

    /* Accent */
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --accent-gradient: linear-gradient(135deg, #3b82f6, #7c3aed);

    /* Text */
    --text-primary: #eeeef0;
    --text-secondary: #8a8a99;
    --text-muted: #55555f;

    /* Borders & Surfaces */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(59, 130, 246, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.08);

    /* Layout */
    --max-width: 1200px;
    --nav-height: 72px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-normal: 0.4s var(--ease-out);
    --transition-slow: 0.6s var(--ease-out);
}

/* ── Reset & Base ────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

ul, ol {
    list-style: none;
}

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

/* ── Typography ──────────────────────────────── */

h1, h2, h3, h4 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

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

/* ── Container ───────────────────────────────── */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ──────────────────────────────── */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.nav.scrolled {
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-fast);
}

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

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 1rem;
    padding: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.lang-switch a {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lang-switch a:hover {
    color: var(--text-secondary);
}

.lang-switch a.active {
    background: var(--accent);
    color: #fff;
}

.lang-switch a.active::after {
    display: none;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
    border-radius: 1px;
}

.nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero ────────────────────────────────────── */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + 2rem) 24px 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.3);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
}

/* ── Sections ────────────────────────────────── */

section {
    padding: 6rem 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-label::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--accent);
}

.section-title {
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3.5rem;
}

.section-header-center {
    text-align: center;
}

.section-header-center .section-desc {
    margin-left: auto;
    margin-right: auto;
}

/* ── Services Grid ───────────────────────────── */

.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

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

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.service-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Portfolio / Apps ────────────────────────── */

.portfolio {
    background: var(--bg-primary);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.app-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.app-card-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
}

.app-card-header .app-status {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    margin-top: 2px;
}

.app-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.app-tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.app-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.app-actions .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    flex: 1;
    justify-content: center;
}

.btn-coming-soon {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: default;
    opacity: 0.6;
}

.btn-coming-soon:hover {
    transform: none;
}

/* ── About ───────────────────────────────────── */

.about {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 700px;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.about-stat h4 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.about-stat p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Contact CTA ─────────────────────────────── */

.contact {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.contact-inner {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.contact-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
}

.contact-inner h2 {
    margin-bottom: 1rem;
}

.contact-inner p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.contact-inner .btn {
    font-size: 1rem;
    padding: 16px 32px;
}

/* ── Footer ──────────────────────────────────── */

.footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

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

.footer-brand p {
    font-size: 0.9rem;
    margin-top: 0.75rem;
    max-width: 280px;
}

.footer-col h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 4px 0;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

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

.footer-bottom .lang-switch {
    margin-left: 0;
}

/* ── Animations ──────────────────────────────── */

.animate {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .animate {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
}

/* ── Apps Full Page ──────────────────────────── */

.apps-hero {
    padding: calc(var(--nav-height) + 3rem) 0 3rem;
    text-align: center;
    background: var(--bg-secondary);
}

.apps-hero h1 {
    margin-bottom: 1rem;
}

.apps-hero p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.apps-list {
    padding: 4rem 0;
}

.app-card-full {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all var(--transition-normal);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
}

.app-card-full:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.app-card-full .app-icon {
    width: 72px;
    height: 72px;
    font-size: 2rem;
    border-radius: 18px;
}

.app-card-full h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.app-card-full .app-status {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.app-card-full p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.app-features {
    margin-bottom: 1.5rem;
}

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

.app-features li::before {
    content: '~';
    color: var(--accent);
    font-weight: 700;
}

/* ── Web Examples (portfolio of sites) ───────── */

.web-examples {
    padding-top: 0;
}

.web-examples .section-header-center {
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.web-card {
    grid-template-columns: 360px 1fr;
}

.web-card-preview {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: border-color var(--transition-fast), transform var(--transition-normal);
}

.web-card-preview:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
}

.web-card-preview img {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
}

.web-card .app-actions .btn {
    flex: 0 0 auto;
}

@media (max-width: 900px) {
    .web-card {
        grid-template-columns: 1fr;
    }
}

/* ── Legal Pages ─────────────────────────────── */

.legal-page {
    padding: calc(var(--nav-height) + 2rem) 0 4rem;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.legal-content h1 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.legal-content .last-updated {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2rem;
}

.legal-content h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content h3 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.legal-content ul,
.legal-content ol {
    margin-left: 1.5rem;
    list-style: disc;
}

/* ── Responsive ──────────────────────────────── */

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

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    section {
        padding: 4rem 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-elevated);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transition: right var(--transition-normal);
        border-left: 1px solid var(--border);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links .lang-switch {
        margin-left: 0;
        margin-top: 1rem;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: calc(var(--nav-height) + 4rem) 24px 4rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .app-card-full {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

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

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

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

    .app-actions {
        flex-direction: column;
    }

    .contact-inner {
        padding: 3rem 1.5rem;
    }
}
