/* =========================
   Hero (scoped)
   ========================= */

.hero {
    padding: var(--s-20) 0 var(--s-16);
    position: relative;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    gap: var(--s-8);
    align-items: start;
}

/* Subtle background glow */
.hero::before {
    content: "";
    position: absolute;
    inset: -200px -200px auto -200px;
    height: 520px;
    background:
            radial-gradient(closest-side, rgba(93, 220, 255, 0.22), transparent 70%),
            radial-gradient(closest-side, rgba(167, 139, 250, 0.18), transparent 70%);
    pointer-events: none;
    filter: blur(2px);
}

/* Kicker */
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    width: fit-content;

    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);

    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
}

/* Headline */
.hero h1 {
    margin-top: var(--s-2);
    max-width: 18ch;
}

/* Subheadline */
.hero-sub {
    max-width: 60ch;
    font-size: 1.05rem;
    color: var(--muted);
    margin: 0;
}

/* Actions */
.hero-actions {
    display: flex;
    gap: var(--s-4);
    flex-wrap: wrap;
    margin-top: var(--s-2);
}

.hero-actions .btn {
    min-width: 180px;
}

/* Highlights list */
.hero-badges {
    list-style: none;
    padding: 0;
    margin: var(--s-6) 0 0;

    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
}

.hero-badges li {
    margin: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;

    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);

    font-weight: 600;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        padding: var(--s-16) 0 var(--s-12);
    }

    .hero h1 {
        max-width: 22ch;
    }

    .hero-actions .btn {
        min-width: 0;
        width: 100%;
    }

    .hero-badges {
        gap: var(--s-2);
    }

    .hero-badges li {
        width: 100%;
        border-radius: 14px;
    }
}

/* Scrolling "code" background layer */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    /* A lightweight "code-like" texture made of short bars */
    background:
            linear-gradient(to bottom, rgba(15, 17, 21, 0.65), rgba(15, 17, 21, 0.92)),
            repeating-linear-gradient(
                    0deg,
                    rgba(255, 255, 255, 0.06) 0px,
                    rgba(255, 255, 255, 0.06) 1px,
                    transparent 1px,
                    transparent 18px
            ),
            repeating-linear-gradient(
                    90deg,
                    transparent 0px,
                    transparent 22px,
                    rgba(93, 220, 255, 0.10) 22px,
                    rgba(93, 220, 255, 0.10) 26px,
                    transparent 26px,
                    transparent 70px
            );

    opacity: 0.55;
    transform: translateZ(0);

    /* animate the “scroll” */
    background-size: auto, auto, 260px 260px;
    animation: codeScroll 14s linear infinite;
}

/* Make sure hero content is above the background */
.hero-inner {
    position: relative;
    z-index: 1;
}

@keyframes codeScroll {
    from { background-position: 0 0, 0 0, 0 0; }
    to   { background-position: 0 0, 0 260px, 260px 260px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero::after { animation: none; }
}

/* Terminal code background */
.terminal-bg {
    position: absolute;
    inset: -20px;
    z-index: 0;
    pointer-events: none;

    /* Fade it out top/bottom like a real overlay */
    mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 75%, transparent 100%);

    opacity: 0.35;
}

.terminal-code {
    margin: 0;
    padding: 0;

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.55;

    color: rgba(120, 255, 165, 0.55); /* terminal-green vibe */
    text-shadow: 0 0 18px rgba(120, 255, 165, 0.12);

    /* subtle “terminal glass” */
    background: radial-gradient(700px 340px at 40% 0%, rgba(120, 255, 165, 0.08), transparent 60%);
    border-radius: 18px;

    /* keep it behind the text */
    transform: translateZ(0);
    white-space: pre;
}

/* Ensure hero content stays above terminal bg */
.hero-inner {
    position: relative;
    z-index: 1;
}

/* Terminal code background */
.terminal-bg {
    position: absolute;
    inset: -20px;
    z-index: 0;
    pointer-events: none;

    /* Fade top/bottom */
    mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 75%, transparent 100%);

    opacity: 0.6;
}

/* Scanlines overlay */
.terminal-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background:
            repeating-linear-gradient(
                    to bottom,
                    rgba(255, 255, 255, 0.05) 0px,
                    rgba(255, 255, 255, 0.05) 1px,
                    transparent 2px,
                    transparent 6px
            );
    opacity: 0.12;
    animation: scanMove 6s linear infinite;
}

@keyframes scanMove {
    from { transform: translateY(-6px); }
    to   { transform: translateY(6px); }
}

.terminal-code {
    position: relative;
    margin: 0;
    padding: var(--s-10);

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.55;

    color: rgba(120, 255, 165, 0.62);
    text-shadow: 0 0 18px rgba(120, 255, 165, 0.10);

    background:
            radial-gradient(700px 340px at 40% 0%, rgba(120, 255, 165, 0.10), transparent 60%),
            rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;

    /* behave like a terminal viewport */
    max-height: 360px;
    overflow: hidden;
    white-space: pre-wrap;
    transform: translateZ(0);
}

/* Blinking cursor */
.terminal-cursor {
    display: inline-block;
    width: 0.65ch;
    height: 1.2em;
    margin-left: 0.25ch;
    vertical-align: -0.15em;

    background: rgba(120, 255, 165, 0.55);
    box-shadow: 0 0 16px rgba(120, 255, 165, 0.20);
    border-radius: 2px;

    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Ensure hero content stays above terminal bg */
.hero-inner {
    position: relative;
    z-index: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .terminal-bg::before { animation: none; }
    .terminal-cursor { animation: none; }
}

