.hero-v2 {
    padding: 96px 40px 104px;
}

.hero-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.hero-v2 h1 {
    margin: 0 0 24px;
    font-size: 50px;
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-align: left;
}

.hero-v2-subtitle {
    max-width: 470px;
    margin: 0 0 40px;
    font-size: 20px;
    line-height: 1.55;
    color: var(--text-secondary);
    text-wrap: pretty;
}

.hero-v2-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-v2-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    font-size: 18px;
}

/* "Why Lunar": a small thumbnail of the video's poster, so it reads as a video. */
.hero-v2-btn--video {
    gap: 14px;
    padding: 6px 26px 6px 6px;
}

.hero-v2-thumb {
    position: relative;
    flex: none;
    width: 80px;
    height: 45px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: var(--surface-card);
    container-type: inline-size;
    pointer-events: none;
}

.hero-v2-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
    color: #05070c;
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease;
}

.hero-v2-thumb-play svg {
    margin-left: 2px;
}

.hero-v2-btn--video:hover .hero-v2-thumb-play,
.hero-v2-btn--video:focus-visible .hero-v2-thumb-play {
    transform: translate(-50%, -50%) scale(1.1);
}

.hero-v2-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.hero-v2-btn:hover .hero-v2-arrow {
    transform: translateX(3px);
}

@media (max-width: 1024px) {
    .hero-v2 {
        padding: 72px 40px 80px;
    }

    .hero-v2-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-v2 h1 {
        font-size: 48px;
    }

    .hero-v2-subtitle {
        max-width: 560px;
    }
}

@media (max-width: 768px) {
    .hero-v2 {
        padding: 48px 20px 60px;
    }

    .hero-v2 h1 {
        font-size: 40px;
        text-wrap: balance;
    }

    .hero-v2-br {
        display: none;
    }

    .hero-v2-subtitle {
        margin-bottom: 32px;
        font-size: 18px;
    }

    .hero-v2-ctas {
        flex-direction: column;
    }

    .hero-v2-btn {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-v2-thumb-play,
    .hero-v2-arrow,
    .hf-repo {
        transition: none;
    }
}

.video-modal {
    position: fixed;
    inset: 0;
    width: min(1100px, calc(100vw - 80px), calc((100vh - 160px) * 16 / 9));
    max-width: none;
    max-height: none;
    margin: auto;
    height: fit-content;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.video-modal::backdrop {
    background: rgba(6, 9, 15, 0.88);
    backdrop-filter: blur(6px);
}

.video-modal[open] {
    animation: video-modal-in 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes video-modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
}

.video-modal .video-title,
.video-modal .video-description {
    display: none;
}

.video-modal .video-player {
    margin: 0;
}

.video-modal-close {
    position: absolute;
    top: -52px;
    right: 0;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.video-modal-close:hover {
    border-color: var(--el-cyan);
}

.video-modal-close:focus-visible {
    outline: 2px solid var(--el-cyan);
    outline-offset: 2px;
}

.has-video-modal {
    overflow: hidden;
}

@media (max-width: 768px) {
    .video-modal {
        width: calc(100vw - 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .video-modal[open] {
        animation: none;
    }
}

.hero-v2-eyebrow {
    margin: 0 0 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.hero-v2-eyebrow strong {
    font-weight: 800;
    color: var(--el-green);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .hero-v2-eyebrow {
        font-size: 14px;
    }
}

.hf {
    margin: 0;
    min-width: 0;
}

.hf-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
}

.hf-step {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.hf-prompt {
    align-self: stretch;
    container-type: inline-size;
}

.hf-typed {
    min-height: 36px;
    margin: 10px 0 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-strong);
    /* Size to the animation column so longer prompts fit while typing. */
    font-size: clamp(12px, 4.3cqi, 24px);
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
}

.hf-typed [data-hg-typed] {
    opacity: var(--out, 1);
}

.hf-caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    background: var(--el-cyan);
    vertical-align: -0.15em;
    opacity: var(--caret, 0);
}

.hf-stem {
    position: relative;
    width: 2px;
    height: 32px;
}

.hf-stem {
    background: var(--border-strong);
}

.hf-stem::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2px;
    background: var(--el-cyan);
    opacity: calc(0.75 * var(--out, 1));
    transform-origin: top;
}

.hf-stem--1::before {
    transform: scaleY(var(--s1, 0));
}

.hf-stem--2::before {
    transform: scaleY(var(--s2, 0));
}

.hf-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 999px;
    background: #0b1f1b;
    white-space: nowrap;
    opacity: calc((0.28 + 0.72 * var(--g, 0)) * var(--out, 1));
}

.hf-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px 5px 8px;
    border-radius: 999px;
    background: rgba(0, 255, 136, 0.12);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--type-policy);
}

.hf-badge::before {
    content: '✓';
    font-weight: 900;
}

.hf-pill-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.hf-field {
    align-self: stretch;
    margin-top: 6px;
    opacity: calc((0.35 + 0.65 * var(--f, 0)) * var(--out, 1));
}

.hf-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.hf-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.hf-count b {
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.hf-feed {
    position: relative;
    height: 150px;
    overflow: hidden;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    mask-image: linear-gradient(to bottom, transparent, black 45%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 45%);
}

.hf-feed-list {
    will-change: transform;
}

.hf-repo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 30px;
    padding: 0 8px 0 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.hf-repo b {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-strong);
}

.hf-repo.is-pass {
    color: var(--text-secondary);
}

.hf-repo.is-pass b,
.hf-repo.is-fix b {
    width: auto;
    height: auto;
    background: none;
    font-family: Roboto, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.hf-repo.is-pass b {
    color: var(--success);
}

.hf-repo.is-pass b::before {
    content: '✓ pass';
}

.hf-repo.is-fix {
    color: var(--text-primary);
}

.hf-repo.is-fix b {
    color: var(--warning);
}

.hf-repo.is-fix b::before {
    content: '! fix';
}

.hf-scanline {
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    height: 30px;
    border-left: 2px solid var(--el-cyan);
    background: var(--glow-cyan-10);
    pointer-events: none;
}

.hf-repo.is-scanning {
    color: var(--text-primary);
}

.hf-repo.is-scanning b {
    width: auto;
    height: auto;
    background: none;
    font-size: 12px;
    color: var(--el-cyan);
}

.hf-repo.is-scanning b::before {
    content: 'scanning…';
}

.hf-result {
    margin: 14px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    opacity: var(--res, 0);
}

.hf-pass {
    color: var(--success);
}

.hf-fix {
    color: var(--warning);
}

@media (max-width: 1024px) {
    .hf-stage {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hf-typed {
        min-height: 30px;
        font-size: clamp(12px, 4.3cqi, 18px);
    }

    .hf-pill {
        padding: 8px 12px 8px 8px;
    }

    .hf-pill-name {
        font-size: 15px;
    }

    .hf-repo {
        font-size: 13px;
    }
}

.nowrap {
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .hero-v2-br {
        display: none;
    }

    .hero-v2 h1 {
        text-wrap: balance;
    }
}
