:root {
    --hm-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
    --hm-detect: #16a34a;
    --hm-detect-fill: rgba(22, 163, 74, 0.05);
    --hm-chip: #22c55e;
    --hm-chip-ink: #052e16;
    --hm-line: #d4d4d8;
    --hm-figure: #52525b;
}

[data-theme="dark"] {
    --hm-detect: #4ade80;
    --hm-detect-fill: rgba(74, 222, 128, 0.06);
    --hm-chip: #4ade80;
    --hm-chip-ink: #052e16;
    --hm-line: #3f3f46;
    --hm-figure: #a1a1aa;
}

.home-page ::selection {
    background: var(--hm-chip);
    color: var(--hm-chip-ink);
}

.home-page .btn { border-radius: 4px; }

.hm-btn-primary {
    background: var(--accent);
    color: var(--bg-page);
    border-color: var(--accent);
}

.hm-btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.hm-hero {
    padding: 52px 0 88px;
}

.hm-hero-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.hm-eyebrow,
.hm-hero-meta {
    font-family: var(--hm-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.hm-title {
    font-size: clamp(38px, 6vw, 88px);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 0.99;
    color: var(--text-primary);
    margin: 0;
    width: max-content;
    max-width: 100%;
}

.hm-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
    margin-bottom: -0.06em;
}

.hm-line-inner { display: block; }

.hm-hero-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin: 30px 0 44px;
}

.hm-lead {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 46ch;
}

.hm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.hm-hud {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 11px 2px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-family: var(--hm-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    white-space: nowrap;
}

.hm-hud-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.hm-hud-cell:nth-last-child(2) { margin-left: auto; }

.hm-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hm-detect);
}

.hm-anim .hm-dot { animation: hmBlink 2.4s steps(2, jump-none) infinite; }

@keyframes hmBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.hm-feed {
    position: relative;
    margin: 24px 0 0;
}

.hm-feed .video-wrap {
    max-width: none;
    border-radius: 4px;
}

.hm-feed-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 9px;
    font-family: var(--hm-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hm-mark {
    position: absolute;
    width: 9px;
    height: 9px;
    color: var(--text-muted);
    opacity: 0.8;
    pointer-events: none;
}

.hm-mark::before,
.hm-mark::after {
    content: '';
    position: absolute;
    background: currentColor;
}

.hm-mark::before {
    left: 4px;
    top: 0;
    width: 1px;
    height: 9px;
}

.hm-mark::after {
    left: 0;
    top: 4px;
    width: 9px;
    height: 1px;
}

.hm-mark-tl { top: -5px; left: -5px; }
.hm-mark-tr { top: -5px; right: -5px; }
.hm-mark-bl { bottom: -5px; left: -5px; }
.hm-mark-br { bottom: -5px; right: -5px; }


.hm-reviews {
    padding-top: 96px;
}

.hm-reviews-viewport {
    position: relative;
    margin-top: 4px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.hm-reviews-track {
    display: flex;
    align-items: center;
    gap: 16px;
    width: max-content;
    margin-top: 24px;
}

.hm-review {
    flex: none;
    margin: 0;
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.hm-review img {
    display: block;
    height: auto;
    max-height: 88px;
    width: auto;
    max-width: 460px;
    border-radius: 3px;
    user-select: none;
}

.hm-anim .hm-reviews-track {
    animation: hmMarquee 70s linear infinite;
}

.hm-anim .hm-reviews-viewport:hover .hm-reviews-track,
.hm-anim .hm-reviews-viewport:focus-within .hm-reviews-track {
    animation-play-state: paused;
}

@keyframes hmMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

:root:not(.hm-anim) .hm-reviews-viewport {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
}

.hm-caps {
    padding-top: 96px;
}

.hm-caps-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.hm-caps-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hm-caps-count {
    font-family: var(--hm-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.hm-cap {
    display: grid;
    grid-template-columns: 64px minmax(0, 5fr) minmax(0, 7fr);
    gap: 44px;
    padding: 64px 0;
    border-top: 1px solid var(--border);
}

.hm-cap--text {
    grid-template-columns: 64px minmax(0, 1fr);
}

.hm-cap-index {
    font-family: var(--hm-mono);
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 8px;
}

.hm-cap-title {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.hm-cap-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 46ch;
}

.hm-cap-specs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    padding: 0;
}

.hm-cap-specs li {
    font-family: var(--hm-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.hm-cap-panel {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px;
    align-self: start;
}

.dgm {
    display: block;
    width: 100%;
    height: auto;
}

.dgm text {
    font-family: var(--hm-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dgm-txt { fill: var(--text-muted); }
.dgm-txt-detect { fill: var(--hm-detect); }
.dgm-txt-center { text-anchor: middle; }

.dgm-hair { stroke: var(--hm-line); stroke-width: 1; }
.dgm-frame { stroke: var(--hm-line); stroke-width: 1.25; }

.dgm-figure {
    stroke: var(--hm-figure);
    fill: var(--hm-figure);
}

.dgm-dash {
    stroke: var(--text-muted);
    stroke-width: 1.5;
    stroke-dasharray: 5 6;
    fill: none;
}

.dgm-boxmuted {
    stroke: var(--hm-line);
    stroke-width: 1.25;
    stroke-dasharray: 4 4;
}

.dgm-detectbox {
    stroke: var(--hm-detect);
    stroke-width: 1.5;
    fill: var(--hm-detect-fill);
}

.dgm-detectstroke {
    stroke: var(--hm-detect);
    stroke-width: 2;
    fill: none;
}

.dgm-corners { stroke-width: 2.5; }

.dgm-chip rect { fill: var(--hm-chip); }

.dgm-chip text {
    fill: var(--hm-chip-ink);
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
}

.dgm-reticlemuted { stroke: var(--text-muted); stroke-width: 2; fill: none; }
.dgm-reticledetect { stroke: var(--hm-detect); stroke-width: 2; fill: none; }

.d-miss { stroke: var(--text-muted); stroke-width: 2; }

.hw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hw-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hw-shot {
    position: relative;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hw-shot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hw-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    padding-left: 2px;
}

.hm-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding: 72px 0 16px;
}

.hm-cta-title {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.hm-cta-lead {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* detection overlay */
.dt {
    position: fixed;
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-out);
}

.dt-edge {
    position: absolute;
    inset: 0;
    border: 1px solid var(--hm-detect);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s var(--ease-out) 0.1s;
}

.dt-c {
    position: absolute;
    width: 13px;
    height: 13px;
    opacity: 0;
    transform: scale(1.5);
    transition: opacity 0.22s var(--ease-out), transform 0.3s var(--ease-out);
}

.dt-c::before,
.dt-c::after {
    content: '';
    position: absolute;
    background: var(--hm-detect);
}

.dt-c::before { width: 2px; height: 13px; }
.dt-c::after { width: 13px; height: 2px; }

.dt-c-tl { top: -2px; left: -2px; }
.dt-c-tl::before { left: 0; top: 0; }
.dt-c-tl::after { left: 0; top: 0; }
.dt-c-tr { top: -2px; right: -2px; }
.dt-c-tr::before { right: 0; top: 0; }
.dt-c-tr::after { right: 0; top: 0; }
.dt-c-bl { bottom: -2px; left: -2px; }
.dt-c-bl::before { left: 0; bottom: 0; }
.dt-c-bl::after { left: 0; bottom: 0; }
.dt-c-br { bottom: -2px; right: -2px; }
.dt-c-br::before { right: 0; bottom: 0; }
.dt-c-br::after { right: 0; bottom: 0; }

.dt-chip {
    position: absolute;
    left: -2px;
    top: 0;
    transform: translateY(calc(-100% - 8px)) translateY(5px);
    background: var(--hm-chip);
    color: var(--hm-chip-ink);
    font-family: var(--hm-mono);
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 2px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s var(--ease-out) 0.12s, transform 0.3s var(--ease-out) 0.12s;
}

.dt-chip-inside { transform: translateY(8px) translateY(5px); }

.dt.on .dt-edge { opacity: 0.65; }
.dt.on .dt-c { opacity: 1; transform: scale(1); }
.dt.on .dt-chip { opacity: 1; transform: translateY(calc(-100% - 8px)); }
.dt.on .dt-chip-inside { transform: translateY(8px); }
.dt.off { opacity: 0; }

.hm-anim .hm-line-inner {
    transform: translateY(115%);
}

.hm-anim.hm-in .hm-line-inner {
    transform: translateY(0);
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.hm-anim.hm-in .hm-line:nth-child(1) .hm-line-inner { transition-delay: 0.08s; }
.hm-anim.hm-in .hm-line:nth-child(2) .hm-line-inner { transition-delay: 0.16s; }

.hm-anim .hm-rise {
    opacity: 0;
    transform: translateY(14px);
}

.hm-anim.hm-in .hm-rise {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s var(--ease-out), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.hm-anim.hm-in .hm-eyebrow { transition-delay: 0.05s; }
.hm-anim.hm-in .hm-hero-meta { transition-delay: 0.1s; }
.hm-anim.hm-in .hm-lead { transition-delay: 0.42s; }
.hm-anim.hm-in .hm-actions { transition-delay: 0.5s; }
.hm-anim.hm-in .hm-hud { transition-delay: 0.6s; }
.hm-anim.hm-in .hm-feed { transition-delay: 0.68s; }


.hm-anim .hm-cap-copy,
.hm-anim .hm-cap-panel,
.hm-anim .hm-cap-index {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s var(--ease-out), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.hm-anim .hm-cap.is-in .hm-cap-copy,
.hm-anim .hm-cap.is-in .hm-cap-panel,
.hm-anim .hm-cap.is-in .hm-cap-index {
    opacity: 1;
    transform: translateY(0);
}

.hm-anim .hm-cap.is-in .hm-cap-panel { transition-delay: 0.1s; }


.hm-anim .d-ghost,
.hm-anim .d-now,
.hm-anim .d-vec,
.hm-anim .d-vec-head,
.hm-anim .d-vec-label,
.hm-anim .d-pred,
.hm-anim .d-pane-l,
.hm-anim .d-pane-r,
.hm-anim .d-input,
.hm-anim .hw-card {
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
}

.hm-anim .hm-cap.is-in .d-ghost-1 { opacity: 0.18; transition-delay: 0.35s; }
.hm-anim .hm-cap.is-in .d-ghost-2 { opacity: 0.45; transition-delay: 0.47s; }
.hm-anim .hm-cap.is-in .d-now { opacity: 1; transition-delay: 0.59s; }
.hm-anim .hm-cap.is-in .d-vec,
.hm-anim .hm-cap.is-in .d-vec-head,
.hm-anim .hm-cap.is-in .d-vec-label { opacity: 1; transition-delay: 0.85s; }
.hm-anim .hm-cap.is-in .d-pred { opacity: 1; transition-delay: 1.05s; }

.hm-anim .hm-cap.is-in .d-pane-l { opacity: 1; transition-delay: 0.35s; }
.hm-anim .hm-cap.is-in .d-pane-r { opacity: 1; transition-delay: 0.6s; }
.hm-anim .hm-cap.is-in .d-input { opacity: 1; transition-delay: 0.9s; }

.hm-anim .hm-cap.is-in .hw-card { opacity: 1; }
.hm-anim .hm-cap.is-in .hw-card:nth-child(1) { transition-delay: 0.3s; }
.hm-anim .hm-cap.is-in .hw-card:nth-child(2) { transition-delay: 0.4s; }
.hm-anim .hm-cap.is-in .hw-card:nth-child(3) { transition-delay: 0.5s; }
.hm-anim .hm-cap.is-in .hw-card:nth-child(4) { transition-delay: 0.6s; }

:root:not(.hm-anim) .d-ghost-1 { opacity: 0.18; }
:root:not(.hm-anim) .d-ghost-2 { opacity: 0.45; }

.hm-anim .hm-cap.is-in .dgm-dash {
    animation: hmDash 2.2s linear infinite;
    animation-delay: 1.1s;
}

@keyframes hmDash {
    to { stroke-dashoffset: -22; }
}

@media (hover: none) {
    #hudCursor { display: none; }
}

@media (max-width: 960px) {
    .hm-cap {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 48px 0;
    }
    .hm-cap-index { padding-top: 0; }
    .hm-cap-desc { max-width: none; }
}

@media (max-width: 768px) {
    .hm-hero { padding: 32px 0 64px; }
    .hm-hero-meta { display: none; }
    .hm-hero-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        margin: 24px 0 32px;
    }
    .hm-actions { width: 100%; }
    .hm-actions .btn { flex: 1; min-width: 140px; }
    .hm-hud { gap: 20px; overflow: hidden; }
    .hm-reviews { padding-top: 64px; }
    .hm-caps { padding-top: 64px; }
    .hm-cap-panel { padding: 16px; }
    .hm-cta { padding: 56px 0 8px; }
}

@media (max-width: 520px) {
    .hw-grid { grid-template-columns: 1fr; }
    .hw-card { padding: 14px 16px; }
}

@media (max-width: 400px) {
    .site-nav .container { padding: 0 16px; }
    .site-nav-links { gap: 0; }
    .nav-link { padding: 6px 8px; }
    .home-page { overflow-x: clip; }
}