/* ============================================
   MadDev Labs — Main Stylesheet
   ============================================ */

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

:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #818CF8;
    --accent: #EC4899;
    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --bg: #FFFFFF;
    --bg-alt: #F8FAFC;
    --bg-dark: #0F172A;
    --border: #E2E8F0;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ============================================
   Header
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

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

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 15px;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-ghost {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-dark {
    background: var(--text);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

.btn-dark:hover {
    background: #1E293B;
    transform: translateY(-1px);
}

.btn-dark svg {
    flex-shrink: 0;
}

.btn-white {
    background: white;
    color: var(--text);
    font-size: 16px;
    padding: 16px 36px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.link-subtle {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.link-subtle:hover {
    color: var(--primary);
}

/* ============================================
   Hero
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(99, 102, 241, 0.35);
    top: -150px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(236, 72, 153, 0.2);
    bottom: -150px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-orb-3 {
    width: 350px;
    height: 350px;
    background: rgba(129, 140, 248, 0.25);
    top: 40%;
    left: 45%;
    animation: float 12s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 120px 0 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    color: var(--primary-light);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.05;
    color: white;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 560px;
}

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

/* ============================================
   Stats Banner
   ============================================ */

.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    padding: 64px 0;
}

.stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 42px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Section Shared Styles
   ============================================ */

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

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 16px;
}

.section-label-light {
    color: var(--primary-light);
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-desc {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   Mission / Values
   ============================================ */

.mission {
    padding: 120px 0;
}

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

.value-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all 0.3s ease;
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.value-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary);
}

.value-icon svg {
    width: 28px;
    height: 28px;
}

.value-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.value-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* ============================================
   Products
   ============================================ */

.products {
    padding: 120px 0;
    background: var(--bg-alt);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.product-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.product-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    object-fit: contain;
}

.product-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 12px;
    border-radius: 100px;
}

.product-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.product-meta {
    margin-bottom: 24px;
}

.product-downloads {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.product-downloads svg {
    color: var(--primary);
}

.product-links {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ============================================
   About
   ============================================ */

.about {
    padding: 120px 0;
}

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

.about-text .section-label {
    margin-bottom: 20px;
}

.about-text h2 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
}

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

.about-text blockquote {
    margin-top: 32px;
    padding: 24px 28px;
    border-left: 4px solid var(--primary);
    background: var(--bg-alt);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 17px;
    font-style: italic;
    color: var(--text);
    font-weight: 500;
    line-height: 1.7;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 24px;
}

.highlight-card {
    display: flex;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.highlight-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-glow);
}

.highlight-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.08));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.highlight-icon svg {
    width: 22px;
    height: 22px;
}

.highlight-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.highlight-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   Contact
   ============================================ */

.contact {
    padding: 120px 0;
    background: var(--bg-dark);
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact h2 {
    font-size: 38px;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.contact p {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 36px;
}

.contact-email {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 20px;
}

.contact-email a {
    color: var(--primary-light);
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: #0B1120;
    color: white;
    padding: 64px 0 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 80px;
    padding-bottom: 48px;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 16px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.footer-nav {
    display: flex;
    gap: 64px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #CBD5E1;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
}

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

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

/* ============================================
   Legal Pages
   ============================================ */

.legal-page {
    padding: 120px 0 24px;
}

.legal-page h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.legal-page .last-updated {
    color: var(--text-muted);
    margin-bottom: 48px;
}

.legal-content {
    max-width: 800px;
}

.legal-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
}

.legal-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.legal-content ul {
    color: var(--text-secondary);
    margin-left: 24px;
    margin-bottom: 16px;
}

.legal-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* ============================================
   404 Error Page
   ============================================ */

.error-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    overflow: hidden;
}

.error-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.error-code {
    font-size: 160px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

.error-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.error-desc {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-top {
        flex-direction: column;
        gap: 48px;
    }

    .footer-brand {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding: 140px 0 80px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .error-code {
        font-size: 120px;
    }

    .stats-grid {
        flex-wrap: wrap;
        gap: 32px;
    }

    .stat-divider {
        display: none;
    }

    .stat {
        flex: 1 1 40%;
    }

    .section-title {
        font-size: 32px;
    }

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

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

    .about-text h2 {
        font-size: 32px;
    }

    .contact h2 {
        font-size: 28px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 32px;
    }

    .mission,
    .products,
    .about,
    .contact {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 34px;
    }

    .error-code {
        font-size: 96px;
    }

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

    .hero-actions .btn {
        text-align: center;
        justify-content: center;
    }

    .stat-number {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .highlight-card {
        flex-direction: column;
        gap: 12px;
    }
}
