﻿/* ==========================================================
   PackForge
   Hero Section
   Version: 1.0.0
========================================================== */



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

.mh-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 760px;
    padding: var(--section-padding) 0;
    overflow: hidden;
}

    .mh-hero > .container {
        position: relative;
        z-index: var(--z-content);
    }

.mh-hero__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.mh-hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}



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

.mh-hero__background {
    position: absolute;
    inset: 0;
    z-index: var(--z-background);
    overflow: hidden;
    pointer-events: none;
}



/* ==========================================================
   Gradient
========================================================== */

.mh-hero__gradient {
    position: absolute;
    top: -260px;
    right: -220px;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: var(--gradient-glow);
}



/* ==========================================================
   Glow
========================================================== */

.mh-hero__glow {
    position: absolute;
    left: -120px;
    bottom: -180px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: rgba(59,130,246,.10);
    filter: blur(140px);
}



/* ==========================================================
   Grid
========================================================== */

.mh-hero__grid {
    position: absolute;
    inset: 0;
    opacity: .045;
    background-image: linear-gradient( rgba(255,255,255,.10) 1px, transparent 1px ), linear-gradient( 90deg, rgba(255,255,255,.10) 1px, transparent 1px );
    background-size: 40px 40px;
}



/* ==========================================================
   Badge
========================================================== */

.mh-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    width: fit-content;
    padding: .70rem 1.10rem;
    border: 1px solid rgba(59,130,246,.18);
    border-radius: var(--radius-pill);
    background: rgba(59,130,246,.08);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    backdrop-filter: blur(var(--glass-blur));
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

    .mh-hero__badge:hover {
        transform: translateY(-2px);
        border-color: rgba(59,130,246,.35);
        background: rgba(59,130,246,.12);
    }

.mh-hero__badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 12px rgba(59,130,246,.70);
}



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

.mh-hero__title {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(3.2rem,5vw,4.8rem);
    font-weight: var(--font-extrabold);
    line-height: 1.08;
    letter-spacing: -.03em;
}

    .mh-hero__title span {
        display: block;
        color: var(--color-primary);
    }



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

.mh-hero__description {
    max-width: 590px;
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}
/* ==========================================================
   Hero Search
========================================================== */

.mh-hero__search {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    height: 68px;
    padding: 0 var(--space-6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur));
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

    .mh-hero__search:hover {
        border-color: var(--border-hover);
        background: var(--bg-glass-hover);
    }

    .mh-hero__search:focus-within {
        border-color: var(--color-primary);
        box-shadow: var(--focus-ring);
    }

.mh-hero__search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mh-hero__search input {
    flex: 1;
    color: var(--text-primary);
    background: transparent;
}

    .mh-hero__search input::placeholder {
        color: var(--text-muted);
    }

.mh-hero__shortcut {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .45rem .80rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.05);
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    font-weight: var(--font-semibold);
    white-space: nowrap;
    user-select: none;
}

/* ==========================================================
   Hero Actions
========================================================== */
.mh-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}



/* ==========================================================
   Primary Button
========================================================== */
.mh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 54px;
    padding: 0 1.6rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-weight: var(--font-semibold);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
    cursor: pointer;
}

    .mh-btn:hover {
        transform: translateY(-2px);
    }



/* Primary */

.mh-btn--primary {
    color: #fff;
    border: 1px solid transparent;
    background: var(--gradient-primary);
}

    .mh-btn--primary:hover {
        box-shadow: var(--shadow-primary);
    }



/* Secondary */

.mh-btn--secondary {
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,.04);
}

    .mh-btn--secondary:hover {
        border-color: var(--border-hover);
        background: rgba(255,255,255,.08);
    }



/* ==========================================================
   Trust Section
========================================================== */

.mh-hero__trust {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-6);
    margin-top: var(--space-2);
}

.mh-trust-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
}

    .mh-trust-item i {
        color: var(--color-success);
        font-size: 1rem;
    }
/* ==========================================================
   Hero Terminal
========================================================== */

.mh-terminal {
    position: relative;
    width: 100%;
    max-width: 620px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: var(--bg-surface);
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

    .mh-terminal:hover {
        transform: translateY(-6px);
        border-color: var(--border-hover);
        box-shadow: 0 40px 90px rgba(0,0,0,.45);
    }

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

.mh-terminal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,.03);
}

.mh-terminal__traffic {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mh-terminal__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mh-terminal__dot--red {
    background: #ff5f57;
}

.mh-terminal__dot--yellow {
    background: #febc2e;
}

.mh-terminal__dot--green {
    background: #28c840;
}

.mh-terminal__title {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
}

/* ==========================================================
   Body
========================================================== */

.mh-terminal__body {
    padding: 30px;
    min-height: 280px;
    font-family: Consolas, "Cascadia Code", "Fira Code", monospace;
}

/* ==========================================================
   Command Line
========================================================== */

.mh-terminal__line {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
    color: var(--text-primary);
    font-size: var(--font-size-md);
}

.mh-terminal__prompt {
    color: var(--color-success);
    font-weight: var(--font-bold);
    user-select: none;
}

#terminal-command {
    min-height: 24px;
}

/* ==========================================================
   Cursor
========================================================== */

.mh-terminal__cursor {
    width: 8px;
    height: 20px;
    background: var(--text-primary);
    animation: mh-terminal-cursor .9s infinite;
}

@keyframes mh-terminal-cursor {

    0%,45% {
        opacity: 1;
    }

    46%,100% {
        opacity: 0;
    }
}

/* ==========================================================
   Output
========================================================== */

.mh-terminal__output {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mh-terminal__status {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(12px);
    animation: mh-terminal-output .5s ease forwards;
}

    .mh-terminal__status:nth-child(1) {
        animation-delay: .2s;
    }

    .mh-terminal__status:nth-child(2) {
        animation-delay: .5s;
    }

    .mh-terminal__status:nth-child(3) {
        animation-delay: .8s;
    }

    .mh-terminal__status i {
        color: var(--color-success);
        font-size: 1rem;
    }

@keyframes mh-terminal-output {

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.mh-terminal__footer {
    display: flex;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(255,255,255,.02);
}

/* ==========================================================
   Copy Button
========================================================== */

.mh-terminal__copy {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: .85rem 1.20rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    transition: transform var(--transition), box-shadow var(--transition);
}

    .mh-terminal__copy:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-primary);
    }

    .mh-terminal__copy:active {
        transform: translateY(0);
    }
/* ==========================================================
   Hero Polish
========================================================== */

.mh-hero__content > * {
    animation: mh-fade-up .7s ease both;
}

    .mh-hero__content > *:nth-child(1) {
        animation-delay: .05s;
    }

    .mh-hero__content > *:nth-child(2) {
        animation-delay: .15s;
    }

    .mh-hero__content > *:nth-child(3) {
        animation-delay: .25s;
    }

    .mh-hero__content > *:nth-child(4) {
        animation-delay: .35s;
    }

    .mh-hero__content > *:nth-child(5) {
        animation-delay: .45s;
    }

    .mh-hero__content > *:nth-child(6) {
        animation-delay: .55s;
    }

    .mh-hero__content > *:nth-child(7) {
        animation-delay: .65s;
    }

.mh-terminal {
    animation: mh-fade-right .9s ease both;
}

@keyframes mh-fade-up {

    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mh-fade-right {

    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}



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

@media (max-width: 1199.98px) {

    .mh-hero {
        min-height: auto;
    }

    .mh-hero__title {
        font-size: clamp(2.8rem, 5vw, 4rem);
    }

    .mh-terminal {
        max-width: 100%;
    }
}



@media (max-width: 991.98px) {

    .mh-hero {
        padding: 100px 0 80px;
        text-align: center;
    }

    .mh-hero__content {
        align-items: center;
    }

    .mh-hero__description {
        max-width: 680px;
    }

    .mh-hero__search {
        width: 100%;
        max-width: 680px;
    }

    .mh-hero__actions,
    .mh-hero__trust {
        justify-content: center;
    }

    .mh-hero__visual {
        margin-top: var(--space-10);
    }

    .mh-terminal {
        margin-inline: auto;
    }

    .mh-hero__gradient {
        right: -320px;
    }
}



@media (max-width: 767.98px) {

    .mh-hero {
        padding: 80px 0 60px;
    }

    .mh-hero__title {
        font-size: clamp(2.2rem, 8vw, 3rem);
    }

    .mh-hero__description {
        font-size: var(--font-size-md);
    }

    .mh-hero__search {
        height: 60px;
        padding-inline: var(--space-4);
    }

    .mh-hero__shortcut {
        display: none;
    }

    .mh-terminal__body {
        padding: var(--space-6);
    }

    .mh-terminal__footer {
        justify-content: center;
    }

    .mh-terminal__copy {
        width: 100%;
        justify-content: center;
    }
}



@media (max-width: 575.98px) {

    .mh-hero {
        padding: 3rem 0;
    }

        .mh-hero > .container {
            width: 100%;
            max-width: 100%;
            padding-inline: 1rem;
        }

    .mh-hero__content,
    .mh-hero__visual {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .mh-hero__content {
        align-items: stretch;
        text-align: center;
        gap: 1.5rem;
    }

    .mh-hero__badge {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding-inline: .75rem;
        white-space: normal;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .mh-hero__title {
        width: 100%;
        max-width: 100%;
        font-size: clamp(2rem, 9vw, 2.5rem);
        line-height: 1.12;
        overflow-wrap: anywhere;
    }

    .mh-hero__description {
        width: 100%;
        max-width: 100%;
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .mh-hero__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

        .mh-hero__actions .mh-btn {
            width: 100%;
        }

    .mh-hero__trust {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }

    .mh-trust,
    .mh-trust-item {
        min-width: 0;
        white-space: normal;
    }

    .mh-hero__visual {
        margin-top: 2rem;
    }

    .mh-terminal {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .mh-terminal__header,
    .mh-terminal__footer {
        padding-inline: var(--space-4);
    }

    .mh-terminal__body {
        min-height: 240px;
    }
}



/* ==========================================================
   Accessibility
========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}