/*
 * MaxCpm Main Stylesheet
 * 
 * Based on dark, futuristic glassmorphism B2B design.
 */

/* ==========================================================================
   Variables
   ========================================================================== */
   :root {
    --color-bg: #05050A;
    --color-bg-light: #0A0A1A;
    --color-surface: rgba(255, 255, 255, 0.03);
    --color-surface-hover: rgba(255, 255, 255, 0.08);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-light: rgba(255, 255, 255, 0.2);
    
    --color-text-main: #FFFFFF;
    --color-text-muted: #A1A1AA;
    
    --color-purple: #A78BFA;
    --color-blue: #60A5FA;
    --color-green: #34D399;
    
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --container-width: 1280px;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html.maxcpm-reduced-motion *,
html.maxcpm-reduced-motion *::before,
html.maxcpm-reduced-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

body {
    margin: 0;
    font-family: var(--font-heading);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    line-height: 1.2;
    font-weight: 800;
}

p {
    margin: 0 0 var(--space-sm);
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s ease;
}

ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--color-text-muted); }
.text-purple { color: var(--color-purple); }
.text-blue { color: var(--color-blue); }
.text-green { color: var(--color-green); }
.text-black { color: #000000; }

.font-mono { font-family: var(--font-mono); }

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }

.py-xl {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.glass-panel {
    background: var(--color-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: 24px;
}

.border-purple { border-color: rgba(167, 139, 250, 0.4); }
.border-purple-light { border-color: rgba(167, 139, 250, 0.2); }
.border-blue { border-color: rgba(96, 165, 250, 0.4); }
.border-blue-light { border-color: rgba(96, 165, 250, 0.2); }
.border-green { border-color: var(--color-green); }
.border-green-light { border-color: rgba(52, 211, 153, 0.2); }

.shadow-purple { box-shadow: 0 0 40px rgba(167, 139, 250, 0.15); }
.shadow-blue { box-shadow: 0 0 40px rgba(96, 165, 250, 0.15); }
.shadow-green { box-shadow: 0 0 40px rgba(52, 211, 153, 0.3); }

/* ==========================================================================
   Components
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    font-family: var(--font-heading);
}

.btn--primary {
    background-color: var(--color-text-main);
    color: var(--color-bg);
}

.btn--primary:hover {
    background-color: #e5e5e5;
}

.btn--gradient {
    background: linear-gradient(90deg, var(--color-purple), var(--color-blue));
    color: #000;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

.btn--gradient:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(96, 165, 250, 0.25);
}

.btn--gradient:active {
    transform: translateY(0);
}

.btn--large {
    padding: 20px 48px;
    font-size: 1.125rem;
    font-weight: 700;
}

.btn--small {
    padding: 8px 20px;
    font-size: 0.875rem;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.badge--glow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-purple);
}

.badge--purple {
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: var(--color-purple);
    font-family: var(--font-mono);
}

/* ==========================================================================
   Header & Sticky Nav
   ========================================================================== */
.sticky-nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    z-index: 100;
}

.sticky-nav__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding: 0 24px;
}

.sticky-nav__logo a {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 2px;
}

.sticky-nav__menu ul {
    display: flex;
    gap: 24px;
}

.sticky-nav__menu a {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.sticky-nav__menu a:hover {
    color: var(--color-text-main);
}

/* Fallback Header */
.site-header {
    padding: 24px 0;
    border-bottom: 1px solid var(--color-border);
}

.site-logo a {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 2px;
}

/* ==========================================================================
   Sections & Layout
   ========================================================================== */
.section-title {
    font-size: 3rem;
    letter-spacing: -1px;
    margin-bottom: var(--space-sm);
}

.section-desc {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* Hero */
.hero {
    position: relative;
    padding: 180px 0 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__bg-mesh {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.15), transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(167, 139, 250, 0.15), transparent 40%);
    z-index: -1;
    animation: mesh-shift 18s ease-in-out infinite alternate;
}

@keyframes mesh-shift {
    0% {
        filter: hue-rotate(0deg);
        transform: scale(1);
        opacity: 1;
    }
    100% {
        filter: hue-rotate(25deg);
        transform: scale(1.06);
        opacity: 0.92;
    }
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero__title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -3px;
    margin: 24px 0;
}

.hero__desc-box {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
}

.hero__desc-line {
    width: 4px;
    background: var(--color-purple);
    border-radius: 2px;
    flex-shrink: 0;
}

.hero__desc {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 500px;
}

.trust-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.avatars {
    display: flex;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--color-bg);
    margin-left: -12px;
}
.avatar:first-child { margin-left: 0; }

.hero__visual {
    position: relative;
    height: 500px;
}

.lottie-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 40px;
    background: rgba(255,255,255,0.02);
    position: relative;
    overflow: hidden;
}

.lottie-container::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 30% 40%, rgba(167, 139, 250, 0.12), transparent 45%),
                radial-gradient(circle at 70% 60%, rgba(96, 165, 250, 0.1), transparent 50%);
    animation: lottie-glow 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.lottie-container lottie-player {
    position: relative;
    z-index: 1;
}

@keyframes lottie-glow {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
    100% { transform: translate(2%, -2%) rotate(3deg); opacity: 1; }
}

.floating-badge {
    position: absolute;
    padding: 16px 24px;
    border-radius: 20px;
    font-weight: 700;
}

.f-badge-1 { top: 10%; left: -5%; animation: float 6s ease-in-out infinite; }
.f-badge-2 { bottom: 15%; right: -5%; animation: float 8s ease-in-out infinite reverse; transition: box-shadow 0.3s ease; }

.floating-badge:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Marquee */
.clients {
    padding: 80px 0;
    border-bottom: 1px solid var(--color-border);
}

.clients__title {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 48px;
    letter-spacing: 1px;
}

.marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: flex;
}

.marquee__inner {
    display: flex;
    gap: 80px;
    animation: marquee 20s linear infinite;
    padding: 0 40px;
}

.marquee span {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Results */
.results {
    padding: 120px 0;
    border-bottom: 1px solid var(--color-border);
}

.results__grid {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 64px;
}

.result-card {
    padding: 64px 40px;
    border-radius: 32px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.3s ease;
}

.result-card:hover {
    transform: translateY(-6px);
}

.result-card__value {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
}
.result-card.border-purple .result-card__value { color: var(--color-text-main); } /* White text as per design */

/* Mission */
.mission {
    padding: 120px 0;
}

.mission__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: center;
}

.mission__subtitle {
    color: var(--color-purple);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.mission__title {
    font-size: 3rem;
    letter-spacing: -1px;
    margin-bottom: 32px;
}

.mission__desc {
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

.mission__stats {
    padding: 40px;
    border-radius: 32px;
}

.mission__stats-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* Conditions */
.conditions {
    padding: 120px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.gradient-bg {
    background: linear-gradient(180deg, #1e0b36 0%, #05050A 100%);
}

.conditions__grid {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin-top: 80px;
    flex-wrap: wrap;
}

.c-card {
    width: 380px;
    padding: 40px;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 480px;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.3s ease, background 0.3s ease;
}

.c-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    background: var(--color-surface-hover);
}

.c-card--green:hover {
    background: linear-gradient(45deg, var(--color-green), #10B981);
    box-shadow: 0 24px 60px rgba(52, 211, 153, 0.35);
}

.c-card__top {
    margin-bottom: 40px;
}

.c-card__icon {
    margin-bottom: 24px;
}

.c-card__title {
    font-size: 2rem;
}

.c-card__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.c-card__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 1rem;
}

.c-card--green {
    background: linear-gradient(45deg, var(--color-green), #10B981);
}

/* Algorithm */
.algorithm {
    padding: 120px 0;
    border-bottom: 1px solid var(--color-border);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 80px;
    align-items: center;
}

.t-step {
    display: flex;
    gap: 80px;
    width: 100%;
    max-width: 1000px;
    align-items: center;
}

.t-step--reverse {
    flex-direction: row-reverse;
}

.t-step__text {
    flex: 1;
}

.t-step__title {
    font-size: 2rem;
    margin-bottom: 16px;
}

.t-step__visual {
    flex: 1;
    height: 240px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Payment */
.payment {
    padding: 120px 0;
    border-bottom: 1px solid var(--color-border);
}

.payment__grid {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.pay-card {
    background: #000;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 40px;
    width: 400px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.pay-card:hover {
    transform: translateY(-4px);
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.pay-card__title {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.pay-card__desc {
    color: var(--color-text-muted);
}

/* CTA Section */
.cta-section {
    padding: 120px 0;
}

.cta-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 40px;
    padding: 80px;
    text-align: center;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.cta-box:hover {
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 0 80px rgba(96, 165, 250, 0.08);
}

.cta-box__title {
    font-size: 3.5rem;
    letter-spacing: -1px;
    margin-bottom: 32px;
}

.cta-box__desc {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 800px;
    margin: 0 auto 48px;
}

.shadow-glow {
    box-shadow: 0 10px 30px rgba(167, 139, 250, 0.3);
}

/* Footer */
.site-footer {
    padding: 60px 0;
    border-top: 1px solid var(--color-border);
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.site-footer__links ul {
    display: flex;
    gap: 32px;
}

/* ==========================================================================
   Scroll reveal & motion preferences
   ========================================================================== */
.js-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-reveal.is-visible {
    opacity: 1;
    transform: none;
}

.hero__content .js-reveal:nth-child(1) { transition-delay: 0s; }
.hero__content .js-reveal:nth-child(2) { transition-delay: 0.08s; }
.hero__content .js-reveal:nth-child(3) { transition-delay: 0.16s; }
.hero__content .js-reveal:nth-child(4) { transition-delay: 0.24s; }

.hero__visual.js-reveal {
    transition-delay: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
    .js-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .hero__inner, .mission__inner, .t-step {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 40px;
    }
    
    .t-step--reverse {
        flex-direction: column;
    }

    .hero__title { font-size: 3.5rem; }
    .hero__visual { height: 400px; }
    
    .conditions__grid, .payment__grid, .results__grid {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .sticky-nav__menu { display: none; }
    .hero__title { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    .cta-box__title { font-size: 2.5rem; }
    
    .site-footer__inner {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
}
