/* ===========================
   Aipuro — Design System
   =========================== */

:root {
    /* Colors */
    --c-bg: #0a0a0f;
    --c-bg-alt: #12121a;
    --c-surface: #1a1a25;
    --c-surface-hover: #22222f;
    --c-border: rgba(255, 255, 255, 0.08);
    --c-border-light: rgba(255, 255, 255, 0.12);
    --c-text: #e8e8ed;
    --c-text-muted: #8888a0;
    --c-text-dim: #5a5a72;
    --c-accent: #e85d26;
    --c-accent-light: #f0845a;
    --c-accent-glow: rgba(232, 93, 38, 0.3);
    --c-gradient-1: #e85d26;
    --c-gradient-2: #1a1a2e;
    --c-gradient-3: #f0845a;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --section-pad: 120px;
    --container-width: 1200px;

    /* Transitions */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===========================
   Reset & Base
   =========================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

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

/* ===========================
   Utility
   =========================== */

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

.section {
    padding: var(--section-pad) 0;
    position: relative;
}

.section__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section__label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--c-accent-light);
    margin-bottom: 16px;
}

.section__title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.section__desc {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    line-height: 1.7;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s var(--ease);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--c-gradient-1), var(--c-gradient-2));
    color: #fff;
    box-shadow: 0 4px 24px var(--c-accent-glow);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--c-accent-glow);
}

.btn--outline {
    background: transparent;
    color: var(--c-text);
    border: 1px solid var(--c-border-light);
}

.btn--outline:hover {
    background: var(--c-surface);
    border-color: var(--c-accent-light);
    color: var(--c-accent-light);
}

.btn--lg {
    padding: 18px 36px;
    font-size: 1.05rem;
    border-radius: 14px;
}

/* ===========================
   Navigation
   =========================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s var(--ease);
    background: transparent;
}

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

.nav__container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    display: flex;
    align-items: center;
}

.nav__logo-img {
    height: 36px;
    width: auto;
    filter: invert(1);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav__link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-text-muted);
    transition: all 0.2s var(--ease);
}

.nav__link:hover {
    color: var(--c-text);
    background: var(--c-surface);
}

.nav__link--cta {
    background: var(--c-surface);
    color: var(--c-accent-light);
    border: 1px solid var(--c-border-light);
    margin-left: 8px;
}

.nav__link--cta:hover {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
}

/* Mobile Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__toggle span {
    width: 24px;
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

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

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.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 80% 60% at 50% 40%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

.hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.hero__glow--1 {
    width: 600px;
    height: 600px;
    background: var(--c-gradient-1);
    top: -200px;
    right: -100px;
    opacity: 0.15;
}

.hero__glow--2 {
    width: 500px;
    height: 500px;
    background: var(--c-gradient-2);
    bottom: -200px;
    left: -100px;
    opacity: 0.1;
}

.hero__container {
    position: relative;
    text-align: center;
    max-width: 860px;
}

.hero__logo {
    height: 140px;
    width: auto;
    filter: invert(1);
    margin-bottom: 36px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    animation: fadeUp 0.8s var(--ease) both;
}

@media (max-width: 768px) {
    .hero__logo {
        height: 90px;
    }
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
    animation: fadeUp 0.8s var(--ease) 0.1s both;
}

.hero__title--gradient {
    background: linear-gradient(135deg, #e85d26, #f0845a, #ffb088);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--c-text-muted);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 40px;
    animation: fadeUp 0.8s var(--ease) 0.2s both;
}

.hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s var(--ease) 0.3s both;
}

/* ===========================
   Cards (Services)
   =========================== */

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

.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    padding: 36px;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--c-gradient-1), var(--c-gradient-2));
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.card:hover {
    border-color: var(--c-border-light);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.card__icon {
    width: 48px;
    height: 48px;
    color: var(--c-accent-light);
    margin-bottom: 20px;
}

.card__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card__text {
    font-size: 0.95rem;
    color: var(--c-text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

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

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

.card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-accent);
}

/* ===========================
   Process
   =========================== */

.process {
    background: var(--c-bg-alt);
}

.process__timeline {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.process__timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 39px;
    width: 2px;
    background: linear-gradient(to bottom, var(--c-accent), var(--c-gradient-2));
    opacity: 0.3;
}

.process__step {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 32px 0;
}

.process__number {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-accent-light);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    position: relative;
    z-index: 1;
}

.process__content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    padding-top: 4px;
}

.process__content p {
    font-size: 1rem;
    color: var(--c-text-muted);
    line-height: 1.7;
}

/* ===========================
   Technologies
   =========================== */

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

.tech__category {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    padding: 32px;
}

.tech__category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-accent-light);
    margin-bottom: 16px;
}

.tech__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech__tag {
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--c-text-muted);
    transition: all 0.2s var(--ease);
}

.tech__tag:hover {
    border-color: var(--c-accent);
    color: var(--c-accent-light);
}

/* ===========================
   CTA
   =========================== */

.cta {
    background: var(--c-bg-alt);
}

.cta__content {
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.cta__title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.cta__text {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    line-height: 1.7;
    margin-bottom: 36px;
}

.cta__actions {
    margin-bottom: 48px;
}

.cta__details {
    display: flex;
    justify-content: center;
    gap: 64px;
    color: var(--c-text-muted);
    font-size: 0.9rem;
}

.cta__detail strong {
    color: var(--c-text);
}

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

.footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--c-border);
}

.footer__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.footer__tagline {
    font-size: 0.85rem;
    color: var(--c-text-dim);
    margin-top: 8px;
}

.footer__links {
    display: flex;
    gap: 24px;
}

.footer__links a {
    font-size: 0.9rem;
    color: var(--c-text-muted);
    transition: color 0.2s;
}

.footer__links a:hover {
    color: var(--c-accent-light);
}

.footer__bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--c-border);
    font-size: 0.8rem;
    color: var(--c-text-dim);
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Scroll-triggered animations */
[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

@media (max-width: 768px) {
    :root {
        --section-pad: 80px;
    }

    /* Mobile nav */
    .nav__toggle {
        display: flex;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--c-bg-alt);
        border-left: 1px solid var(--c-border);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 24px 24px;
        gap: 4px;
        transition: right 0.4s var(--ease);
    }

    .nav__menu.is-open {
        right: 0;
    }

    .nav__link {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .nav__link--cta {
        margin-left: 0;
        margin-top: 12px;
        text-align: center;
        justify-content: center;
    }

    /* Toggle active state */
    .nav__toggle.is-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav__toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .nav__toggle.is-active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Grids */
    .services__grid,
    .tech__grid {
        grid-template-columns: 1fr;
    }

    /* Hero */
    .hero {
        padding: 100px 24px 60px;
        min-height: auto;
    }

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

    /* Process */
    .process__timeline::before {
        display: none;
    }

    .process__step {
        flex-direction: column;
        gap: 16px;
    }

    .process__number {
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
        border-radius: 16px;
    }

    /* CTA */
    .cta__details {
        flex-direction: column;
        gap: 24px;
    }

    /* Footer */
    .footer__content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer__links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    :root {
        --section-pad: 60px;
    }

    .card {
        padding: 28px;
    }
}
