/* ============================================
   MEMAX — style.css
   Modern, premium, minimal B2B software site
   ============================================ */

/* -------- Reset & tokens -------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
    /* Colors */
    --white: #FFFFFF;
    --gray-50: #F7F9FC;
    --gray-100: #F1F4F9;
    --gray-200: #E5EAF2;
    --gray-300: #CBD3E0;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --navy: #0B1220;
    --navy-soft: #111A2E;
    --blue: #2563EB;
    --blue-dark: #1D4ED8;
    --blue-soft: #DBE7FF;

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

    /* Radius & shadow */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06);
    --shadow-md: 0 4px 12px rgba(11, 18, 32, 0.06);
    --shadow-lg: 0 20px 50px rgba(11, 18, 32, 0.08);

    /* Layout */
    --container: 1200px;
    --nav-h: 72px;
}

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

body {
    font-family: var(--font);
    color: var(--navy);
    background: var(--white);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

/* -------- Container -------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.container--narrow { max-width: 820px; }

/* -------- Buttons -------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.btn--primary {
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 6px 16px rgba(11, 18, 32, 0.18);
}
.btn--primary:hover {
    background: var(--blue);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}
.btn--ghost {
    color: var(--navy);
    padding: 12px 18px;
}
.btn--ghost:hover { color: var(--blue); }
.btn--outline-light {
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.35);
}
.btn--outline-light:hover {
    background: var(--white);
    color: var(--navy);
}

/* -------- Eyebrow -------- */
.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.eyebrow--light { color: #93B4FF; }

/* ============================================
   NAV
   ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav.is-scrolled {
    border-bottom-color: var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.nav__inner {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}
.nav__logo { width: 28px; height: 28px; }
.nav__menu {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav__menu a {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--gray-700);
    transition: color 0.15s ease;
}
.nav__menu a:hover { color: var(--navy); }
.nav__cta { padding: 10px 20px; font-size: 14px; }
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}
.nav__toggle span {
    width: 22px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 80px 0 100px;
    background:
        radial-gradient(60% 60% at 90% 10%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
        radial-gradient(50% 50% at 10% 90%, rgba(37, 99, 235, 0.06) 0%, transparent 60%),
        var(--white);
    overflow: hidden;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero__title {
    font-size: clamp(38px, 5.5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 20px;
}
.hero__desc {
    font-size: 18px;
    color: var(--gray-700);
    max-width: 540px;
    margin-bottom: 32px;
}
.hero__actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 480px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}
.hero__meta strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.01em;
}
.hero__meta span {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}
.hero__visual { position: relative; }
.hero__svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(11, 18, 32, 0.10));
    animation: floaty 8s ease-in-out infinite;
}
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================
   TECH
   ============================================ */
.tech {
    padding: 60px 0;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}
.tech__label {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 28px;
}
.tech__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.tech__item {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    letter-spacing: -0.005em;
    transition: transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
}
.tech__item:hover {
    transform: translateY(-2px);
    border-color: var(--blue);
    color: var(--blue);
}

/* ============================================
   SECTION base
   ============================================ */
.section { padding: 100px 0; }
.section--gray { background: var(--gray-50); }
.section--dark {
    background: var(--navy);
    color: var(--white);
}
.section__head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 64px;
}
.section__head h2 {
    font-size: clamp(30px, 3.5vw, 44px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--navy);
    margin-bottom: 16px;
}
.section__head--light h2 { color: var(--white); }
.section__head p {
    font-size: 17px;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}
.section__head--light p { color: rgba(255,255,255,0.65); }

/* ============================================
   SERVICES
   ============================================ */
.services__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.service-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-soft);
}
.service-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--blue-soft);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.service-card__icon svg { width: 22px; height: 22px; }
.service-card h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
    color: var(--navy);
}
.service-card p {
    font-size: 14.5px;
    color: var(--gray-500);
    line-height: 1.55;
}

/* ============================================
   WHY (dark)
   ============================================ */
.why__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.why-card {
    padding: 32px 28px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.why-card:hover {
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-4px);
}
.why-card__num {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}
.why-card h3 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: var(--white);
}
.why-card p {
    font-size: 14.5px;
    color: rgba(255,255,255,0.62);
    line-height: 1.6;
}

/* ============================================
   PROCESS
   ============================================ */
.process {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    list-style: none;
    position: relative;
}
.process::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 6%;
    right: 6%;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-soft), var(--blue), var(--blue-soft));
    z-index: 0;
    border-radius: 2px;
}
.process__step {
    position: relative;
    padding-top: 68px;
    text-align: center;
    z-index: 1;
}
.process__num {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--blue);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}
.process__step h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--navy);
    letter-spacing: -0.015em;
}
.process__step p {
    font-size: 13.5px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ============================================
   INDUSTRIES
   ============================================ */
.industries__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}
.industry-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    padding: 28px 16px;
    text-align: center;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -0.01em;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.industry-card:hover {
    transform: translateY(-3px);
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ============================================
   PROJECTS
   ============================================ */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.project-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.project-card__visual {
    aspect-ratio: 5 / 3;
    overflow: hidden;
}
.project-card__visual svg { width: 100%; height: 100%; }
.project-card__body { padding: 24px; }
.project-card__body h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--navy);
}
.project-card__body > p {
    font-size: 14.5px;
    color: var(--gray-500);
    line-height: 1.55;
    margin-bottom: 16px;
}
.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.project-card__tags span {
    font-size: 12px;
    font-weight: 500;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 4px 10px;
    border-radius: 999px;
}

/* ============================================
   STATS
   ============================================ */
.stats {
    padding: 80px 0;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}
.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    text-align: center;
}
.stat__num {
    font-size: clamp(40px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 8px;
}
.stat__label {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq__item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--r-md);
    padding: 20px 24px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq__item[open] {
    border-color: var(--blue-soft);
    box-shadow: var(--shadow-sm);
}
.faq__item summary {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: "+";
    font-size: 24px;
    font-weight: 300;
    color: var(--blue);
    line-height: 1;
    transition: transform 0.2s ease;
}
.faq__item[open] summary::after { content: "−"; }
.faq__item p {
    margin-top: 12px;
    font-size: 15px;
    color: var(--gray-500);
    line-height: 1.6;
}

/* ============================================
   CTA
   ============================================ */
.cta {
    padding: 100px 0;
    background: var(--navy);
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(50% 50% at 20% 100%, rgba(37, 99, 235, 0.30) 0%, transparent 70%),
        radial-gradient(50% 50% at 80% 0%, rgba(37, 99, 235, 0.18) 0%, transparent 70%);
    pointer-events: none;
}
.cta__inner {
    position: relative;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}
.cta__inner h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}
.cta__inner p {
    font-size: 17px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 32px;
}
.cta__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.cta .btn--primary {
    background: var(--white);
    color: var(--navy);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cta .btn--primary:hover {
    background: var(--blue);
    color: var(--white);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--navy);
    color: rgba(255,255,255,0.72);
    padding-top: 64px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}
.footer__brand p {
    margin-top: 16px;
    font-size: 14.5px;
    color: rgba(255,255,255,0.55);
    max-width: 320px;
    line-height: 1.6;
}
.footer__brand .nav__brand { color: var(--white); }
.footer__brand .nav__logo rect { fill: var(--white); }
.footer__brand .nav__logo path { fill: var(--blue); }
.footer__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer__col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.footer__col a,
.footer__col span {
    font-size: 14.5px;
    color: rgba(255,255,255,0.6);
    transition: color 0.15s ease;
}
.footer__col a:hover { color: var(--white); }
.footer__socials {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.footer__socials a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.footer__socials a svg { width: 16px; height: 16px; }
.footer__socials a:hover {
    background: var(--blue);
    color: var(--white);
    transform: translateY(-2px);
}
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 24px 0;
}
.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13.5px;
    color: rgba(255,255,255,0.45);
}

/* ============================================
   REVEAL animation
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .projects__grid { grid-template-columns: 1fr; }
    .industries__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .process { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .process::before { display: none; }
    .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero { padding: 48px 0 64px; }
    .hero__inner { grid-template-columns: 1fr; gap: 40px; }
    .hero__meta { grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
    .hero__visual { order: -1; max-width: 380px; margin: 0 auto; }

    .nav__menu { display: none; }
    .nav__cta { display: none; }
    .nav__toggle { display: flex; }
    .nav__menu.is-open {
        display: flex;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-md);
        z-index: 40;
    }
    .nav__menu.is-open a {
        padding: 12px 0;
        border-bottom: 1px solid var(--gray-100);
        font-size: 16px;
    }
    .nav__menu.is-open a:last-child { border-bottom: 0; }

    .section { padding: 72px 0; }
    .section__head { margin-bottom: 40px; }

    .services__grid { grid-template-columns: 1fr; }
    .why__grid { grid-template-columns: 1fr; }
    .industries__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .process { grid-template-columns: 1fr; gap: 24px; }
    .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

    .footer__inner { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
    .footer__bottom-inner { justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
    .container { padding: 0 20px; }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }
    .cta__actions { flex-direction: column; align-items: stretch; }
    .cta__actions .btn { width: 100%; }
}

/* -------- Accessibility -------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 4px;
}
