/* ============================================
   CreaNext Homepage — Premium Styles
   Prefix: hm-
   ============================================ */

:root {
    --hm-grad: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --hm-grad-wide: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    --hm-card: rgba(255, 255, 255, 0.03);
    --hm-border: rgba(255, 255, 255, 0.08);
    --hm-radius: 16px;
    --hm-muted: #a1a1aa;
}

[data-theme="light"] {
    --hm-card: rgba(255, 255, 255, 0.7);
    --hm-border: rgba(0, 0, 0, 0.08);
    --hm-muted: #526071;
}

/* =========================================
   HERO
   ========================================= */
.hm-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 2rem) 2rem 4rem;
    position: relative;
    overflow: hidden;
}

/* Animated gradient orbs */
.hm-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.hm-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 70%);
    top: -10%;
    left: -10%;
    animation: hmOrb1 12s ease-in-out infinite;
}

.hm-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent 70%);
    bottom: -5%;
    right: -5%;
    animation: hmOrb2 15s ease-in-out infinite;
}

.hm-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3), transparent 70%);
    top: 40%;
    left: 60%;
    animation: hmOrb3 10s ease-in-out infinite;
}

@keyframes hmOrb1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(80px, 40px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 80px) scale(0.9);
    }
}

@keyframes hmOrb2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-60px, -40px) scale(1.15);
    }

    66% {
        transform: translate(40px, -60px) scale(0.85);
    }
}

@keyframes hmOrb3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-80px, 50px) scale(1.2);
    }
}

/* Grid pattern */
.hm-grid-bg {
    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;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
}

[data-theme="light"] .hm-grid-bg {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

/* Floating particles */
.hm-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hm-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.6);
    animation: hmFloat 8s ease-in-out infinite;
}

.hm-particle:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.hm-particle:nth-child(2) {
    left: 25%;
    top: 70%;
    animation-delay: 1s;
    animation-duration: 9s;
    background: rgba(139, 92, 246, 0.6);
}

.hm-particle:nth-child(3) {
    left: 50%;
    top: 30%;
    animation-delay: 2s;
    animation-duration: 6s;
    width: 3px;
    height: 3px;
}

.hm-particle:nth-child(4) {
    left: 70%;
    top: 60%;
    animation-delay: 3s;
    animation-duration: 10s;
    background: rgba(236, 72, 153, 0.5);
}

.hm-particle:nth-child(5) {
    left: 85%;
    top: 25%;
    animation-delay: 0.5s;
    animation-duration: 8s;
    width: 5px;
    height: 5px;
    background: rgba(59, 130, 246, 0.4);
}

.hm-particle:nth-child(6) {
    left: 15%;
    top: 80%;
    animation-delay: 4s;
    animation-duration: 11s;
    background: rgba(139, 92, 246, 0.4);
    width: 3px;
    height: 3px;
}

.hm-particle:nth-child(7) {
    left: 90%;
    top: 80%;
    animation-delay: 2.5s;
    animation-duration: 7s;
}

.hm-particle:nth-child(8) {
    left: 40%;
    top: 85%;
    animation-delay: 1.5s;
    animation-duration: 9s;
    background: rgba(236, 72, 153, 0.4);
    width: 5px;
    height: 5px;
}

@keyframes hmFloat {

    0%,
    100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-40px) translateX(15px) scale(1.5);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-20px) translateX(-10px) scale(1);
        opacity: 0.5;
    }

    75% {
        transform: translateY(-50px) translateX(20px) scale(1.3);
        opacity: 0.7;
    }
}

.hm-hero .container {
    position: relative;
    z-index: 1;
}

.hm-hero h1 {
    font-size: 4.2rem;
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -1px;
}

.hm-gradient {
    background: var(--hm-grad-wide);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: hmGradShift 4s ease-in-out infinite;
}

@keyframes hmGradShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Typed text cursor */
.hm-typed-wrap {
    display: inline;
}

.typed-text {
    color: var(--accent-color);
}

.typed-cursor {
    color: var(--accent-color);
}

.hm-hero-sub {
    font-size: 1.15rem;
    color: var(--hm-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hm-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Scroll indicator */
.hm-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--hm-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: hmBounce 2s ease-in-out infinite;
    z-index: 1;
}

.hm-scroll-hint i {
    font-size: 1rem;
}

@keyframes hmBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateX(-50%) translateY(8px);
        opacity: 1;
    }
}

/* =========================================
   SERVICES
   ========================================= */
.hm-section {
    padding: 6rem 0;
}

.hm-section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3b82f6;
    margin-bottom: 0.75rem;
}

.hm-section-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.hm-section-sub {
    color: var(--hm-muted);
    font-size: 1.05rem;
    max-width: 550px;
    line-height: 1.7;
}

.hm-section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.hm-section-header .hm-section-sub {
    margin: 0 auto;
}

/* Service Cards */
.hm-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.hm-service-card {
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 2rem 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.hm-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hm-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.hm-service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59, 130, 246, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.hm-service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 40px rgba(59, 130, 246, 0.05);
}

.hm-service-card:hover::before {
    transform: scaleX(1);
}

.hm-service-card:hover::after {
    opacity: 1;
}

.hm-service-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    transition: transform 0.3s;
}

.hm-service-card:hover .hm-service-icon {
    transform: scale(1.1) rotate(-3deg);
}

.hm-icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.hm-icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.hm-icon-green {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.hm-icon-amber {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.hm-icon-pink {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.hm-icon-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.hm-service-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.hm-service-card p {
    font-size: 0.88rem;
    color: var(--hm-muted);
    line-height: 1.6;
}

.hm-service-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #3b82f6;
    margin-top: 1rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s;
}

.hm-service-card:hover .hm-service-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   SHOWCASE / BENTO GRID
   ========================================= */
.hm-showcase {
    padding: 6rem 0;
}

.hm-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.hm-bento-card {
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.hm-bento-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.hm-bento-1 {
    grid-column: span 7;
}

.hm-bento-2 {
    grid-column: span 5;
}

.hm-bento-3 {
    grid-column: span 4;
}

.hm-bento-4 {
    grid-column: span 4;
}

.hm-bento-5 {
    grid-column: span 4;
}

.hm-bento-card .hm-bento-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.hm-bento-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.hm-bento-card p {
    font-size: 0.9rem;
    color: var(--hm-muted);
    line-height: 1.6;
}

/* Mini visual inside bento cards */
.hm-bento-visual {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid var(--hm-border);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #22c55e;
    line-height: 1.8;
    overflow: hidden;
}

[data-theme="light"] .hm-bento-visual {
    background: rgba(0, 0, 0, 0.05);
    color: #16a34a;
}

.hm-bento-bar-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.hm-bento-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--hm-border);
    overflow: hidden;
    position: relative;
}

.hm-bento-bar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hm-bento-bar-fill.visible {
    width: var(--bar-width);
}

.hm-bar-blue {
    background: var(--hm-grad);
}

.hm-bar-purple {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.hm-bar-pink {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

.hm-bento-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--hm-muted);
    margin-bottom: 0.2rem;
}

/* Counter animation (bento-3) */
.hm-bento-counter {
    margin-top: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    font-family: 'Inter', sans-serif;
}

.hm-counter-num {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #22c55e, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.hm-counter-dash {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--hm-muted);
}

.hm-counter-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hm-muted);
    margin-left: 0.15rem;
}

/* Chat bubble animation (bento-4) */
.hm-bento-chat {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hm-chat-bubble {
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    font-size: 0.75rem;
    line-height: 1.5;
    max-width: 85%;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hm-chat-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hm-chat-left {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--hm-border);
    border-bottom-left-radius: 4px;
    color: var(--hm-muted);
}

[data-theme="light"] .hm-chat-left {
    background: rgba(0, 0, 0, 0.04);
}

.hm-chat-right {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.08));
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-bottom-right-radius: 4px;
    color: var(--text-main);
}

/* Trust badges animation (bento-5) */
.hm-bento-trust {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hm-trust-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.1);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--hm-muted);
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hm-trust-badge.visible {
    opacity: 1;
    transform: translateX(0);
}

.hm-trust-badge i {
    color: #06b6d4;
    font-size: 0.85rem;
}

/* =========================================
   TECH STACK MARQUEE
   ========================================= */
.hm-stack {
    padding: 3.5rem 0;
    overflow: hidden;
    border-top: 1px solid var(--hm-border);
    border-bottom: 1px solid var(--hm-border);
}

.hm-stack-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--hm-muted);
    margin-bottom: 1.5rem;
}

.hm-marquee-wrap {
    position: relative;
}

.hm-marquee-wrap::before,
.hm-marquee-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.hm-marquee-wrap::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.hm-marquee-wrap::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

[data-theme="light"] .hm-marquee-wrap::before {
    background: linear-gradient(to right, #f0f2f5, transparent);
}

[data-theme="light"] .hm-marquee-wrap::after {
    background: linear-gradient(to left, #f0f2f5, transparent);
}

.hm-marquee {
    display: flex;
    gap: 1.5rem;
    animation: hmScroll 35s linear infinite;
    width: max-content;
}

.hm-marquee-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border-radius: 50px;
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--hm-muted);
    transition: all 0.3s;
}

.hm-marquee-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text-main);
    background: rgba(59, 130, 246, 0.05);
}

.hm-marquee-item i {
    font-size: 1.1rem;
    color: var(--text-main);
}

@keyframes hmScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   CTA
   ========================================= */
.hm-cta {
    padding: 5rem 0;
}

.hm-cta-box {
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: 24px;
    padding: 5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hm-cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--hm-grad-wide);
}

.hm-cta-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hm-cta-box h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    position: relative;
    letter-spacing: -0.5px;
}

.hm-cta-box p {
    color: var(--hm-muted);
    max-width: 480px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    line-height: 1.7;
    position: relative;
}

.hm-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .hm-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hm-bento-1,
    .hm-bento-2,
    .hm-bento-3,
    .hm-bento-4,
    .hm-bento-5 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .hm-hero h1 {
        font-size: 2.6rem;
    }

    .hm-hero-sub {
        font-size: 1rem;
    }

    .hm-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hm-services-grid {
        grid-template-columns: 1fr;
    }

    .hm-bento {
        display: flex;
        flex-direction: column;
    }

    .hm-section-title {
        font-size: 1.8rem;
    }

    .hm-cta-box {
        padding: 3rem 1.5rem;
    }

    .hm-cta-box h2 {
        font-size: 1.6rem;
    }

    .hm-scroll-hint {
        display: none;
    }

    .hm-orb-1,
    .hm-orb-2,
    .hm-orb-3 {
        opacity: 0.25;
    }
}

@media (max-width: 480px) {
    .hm-hero h1 {
        font-size: 2rem;
    }

    .hm-section-title {
        font-size: 1.5rem;
    }
}

