.home-atmosphere {
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    height: 760px;
    overflow: hidden;
    pointer-events: none;
}

.home-atmosphere img {
    position: absolute;
    top: -60px;
    right: -200px;
    width: min(1000px, 100vw);
    height: auto;
    opacity: 0.25;
    mix-blend-mode: screen;
}

.home-hero {
    padding: 64px 0 50px;
    text-align: center;
}

.home-eyebrow {
    margin: 0 0 16px;
    color: var(--phosphor);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home-title {
    margin: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(3rem, 8.2vw, 7.5rem);
    font-weight: 700;
    letter-spacing: 0.065em;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(125, 255, 147, 0.14);
}

.home-lede {
    margin: 2px 0 0;
    color: var(--phosphor-soft);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.5;
}

.home-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.home-action {
    min-height: 48px;
    padding: 13px 26px;
    font-size: 0.85rem;
    line-height: 1.3;
    letter-spacing: 0.06em;
    background: rgba(3, 12, 7, 0.65);
}

.home-action--primary {
    border-color: var(--phosphor);
    color: var(--phosphor-soft);
}

.home-action--secondary {
    border-color: rgba(255, 113, 221, 0.45);
    color: #ffd8f5;
}

.home-section-heading {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0 0 24px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.home-section-heading::after {
    flex: 1;
    height: 1px;
    background: rgba(126, 215, 255, 0.27);
    content: "";
}

.products-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.33fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, 242px);
    gap: 16px;
}

.product-card {
    --product-accent: var(--phosphor);
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(126, 215, 255, 0.25);
    border-radius: 6px;
    background: rgba(3, 10, 7, 0.94);
    transition: border-color 160ms ease, background 160ms ease;
}

.product-card--tunnel {
    grid-row: 1 / 3;
}

.product-card--repod {
    --product-accent: var(--ice);
}

.product-card--repod .product-copy {
    max-width: 48%;
}

.repod-preview {
    --preview-line: rgba(126, 215, 255, 0.45);
    --preview-line-dim: rgba(126, 215, 255, 0.18);
    position: absolute;
    top: 50%;
    right: 24px;
    width: 45%;
    overflow: hidden;
    border: 1px solid var(--preview-line);
    border-radius: 5px;
    background: #f8f9fd;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    transform: translateY(-50%);
    pointer-events: none;
}

.repod-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.product-card--tools {
    --product-accent: var(--amber);
}

.product-card--tools .product-copy {
    max-width: 48%;
}

.product-card--tools .product-copy h3 {
    width: max-content;
}

.tools-preview {
    --preview-line: rgba(255, 176, 64, 0.55);
    --preview-line-dim: rgba(255, 176, 64, 0.22);
    position: absolute;
    right: 24px;
    bottom: 24px;
    width: 45%;
    overflow: hidden;
    border: 1px solid var(--preview-line);
    border-radius: 2px;
    background: #080d09;
    color: var(--amber);
    font-family: var(--font-body);
    font-weight: 400;
    text-align: left;
    pointer-events: none;
}

.tools-preview-bar {
    display: block;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 176, 64, 0.25);
    font-size: 0.625rem;
    letter-spacing: 0.035em;
    line-height: 1.4;
}

.tools-preview-code {
    display: block;
    padding: 14px;
    font-size: clamp(8px, 0.95vw, 12px);
    line-height: 1.9;
}

.tools-code-line {
    display: block;
    white-space: pre;
}

.tools-code-key {
    color: #d9d5bd;
}

.tools-code-redacted {
    background: var(--amber);
    color: #080d09;
}

.product-card:hover,
.product-card:focus-within {
    border-color: var(--product-accent);
    background: rgba(5, 16, 10, 0.98);
}

.product-card-link {
    position: relative;
    display: flex;
    height: 100%;
    min-height: inherit;
    flex-direction: column;
    padding: 28px;
    color: var(--text);
    text-decoration: none;
}

.product-card-link:focus-visible {
    outline-offset: -5px;
}

.product-art {
    --display-opacity: 0.95;
    position: absolute;
    right: -12px;
    bottom: -40px;
    width: min(400px, 82%);
    height: 300px;
    object-fit: contain;
    object-position: right center;
    opacity: 0.95;
    mix-blend-mode: screen;
    pointer-events: none;
}

.product-card--tunnel .product-art {
    --display-opacity: 1;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 62%;
    opacity: 1;
}

.product-copy,
.product-explore {
    position: relative;
    z-index: 1;
}

.product-copy h3 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 2.5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: 0.005em;
    line-height: 1.12;
}

.product-copy p {
    margin: 12px 0 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
}

.product-card--repod .product-copy p,
.product-card--tools .product-copy p {
    font-size: 0.875rem;
}

.product-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: var(--product-accent);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.045em;
}

.product-status::before {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.product-card.is-flickering .product-status::before {
    animation: home-status-flicker 420ms steps(1, end);
}

.product-card.is-flickering .product-art {
    animation: home-display-flicker 420ms steps(1, end);
}

.product-card.is-flickering .repod-preview,
.product-card.is-flickering .tools-preview {
    animation: home-display-flicker 420ms steps(1, end),
        home-frame-flicker 420ms steps(1, end);
}

@keyframes home-status-flicker {
    0%, 45%, 100% {
        opacity: 1;
    }

    18% {
        opacity: 0.15;
    }
}

@keyframes home-display-flicker {
    0%, 72%, 100% {
        opacity: var(--display-opacity, 1);
        filter: brightness(1);
    }

    18% {
        opacity: 0.35;
        filter: brightness(0.55);
    }

    45% {
        opacity: var(--display-opacity, 1);
        filter: brightness(1.75);
    }
}

@keyframes home-frame-flicker {
    0%, 72%, 100% {
        border-color: var(--preview-line);
    }

    18% {
        border-color: var(--preview-line-dim);
    }

    45% {
        border-color: var(--product-accent);
    }
}

.site-header.is-flickering {
    --chrome-line: rgba(95, 255, 135, 0.3);
    --chrome-line-dim: rgba(95, 255, 135, 0.08);
    --chrome-accent: var(--phosphor);
    --chrome-glow: rgba(125, 255, 147, 0.55);
    --chrome-shadow: 0 18px 50px var(--shadow);
    animation: home-chrome-flicker 420ms steps(1, end);
}

.brand-mark.is-flickering,
.site-nav a.is-flickering,
.site-nav-toggle.is-flickering {
    animation: home-control-flicker 420ms steps(1, end);
}

.home-title.is-flickering {
    animation: home-title-glitch 420ms steps(1, end);
}

.home-action.is-flickering {
    --chrome-line: var(--phosphor);
    --chrome-line-dim: rgba(125, 255, 147, 0.2);
    --chrome-accent: var(--phosphor);
    --chrome-glow: rgba(125, 255, 147, 0.55);
    animation: home-chrome-flicker 420ms steps(1, end);
}

.home-action--secondary.is-flickering {
    --chrome-line: rgba(255, 113, 221, 0.45);
    --chrome-line-dim: rgba(255, 113, 221, 0.12);
    --chrome-accent: var(--magenta);
    --chrome-glow: rgba(255, 79, 216, 0.55);
}

.home-section-heading.is-flickering::after {
    animation: home-divider-flicker 420ms steps(1, end);
}

.home-services.is-flickering {
    --preview-line: rgba(126, 215, 255, 0.27);
    --preview-line-dim: rgba(126, 215, 255, 0.08);
    --product-accent: var(--ice);
    animation: home-frame-flicker 420ms steps(1, end);
}

@keyframes home-chrome-flicker {
    0%, 72%, 100% {
        border-color: var(--chrome-line);
        box-shadow: var(--chrome-shadow, 0 0 0 transparent);
    }

    18% {
        border-color: var(--chrome-line-dim);
        box-shadow: 0 0 0 transparent;
    }

    45% {
        border-color: var(--chrome-accent);
        box-shadow: var(--chrome-shadow, 0 0 0 transparent), 0 0 16px var(--chrome-glow);
    }
}

@keyframes home-control-flicker {
    0%, 72%, 100% {
        opacity: 1;
        filter: brightness(1);
        text-shadow: none;
    }

    18% {
        opacity: 0.3;
        filter: brightness(0.65);
    }

    45% {
        opacity: 1;
        filter: brightness(1.6);
        text-shadow: -1px 0 var(--ice), 1px 0 var(--magenta);
    }
}

@keyframes home-title-glitch {
    0%, 72%, 100% {
        text-shadow: 0 0 20px rgba(125, 255, 147, 0.14);
    }

    18% {
        text-shadow: -4px 0 var(--ice), 4px 0 var(--magenta);
    }

    45% {
        text-shadow: 3px 0 var(--ice), -3px 0 var(--magenta);
    }
}

@keyframes home-divider-flicker {
    0%, 72%, 100% {
        opacity: 1;
        background: rgba(126, 215, 255, 0.27);
        box-shadow: none;
    }

    18% {
        opacity: 0.2;
    }

    45% {
        opacity: 1;
        background: var(--ice);
        box-shadow: 0 0 8px var(--ice);
    }
}

.product-explore {
    display: flex;
    width: fit-content;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    color: var(--product-accent);
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.025em;
}

.home-arrow {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    filter: invert(1);
    opacity: 0.8;
    transition: transform 160ms ease;
}

.product-card-link:hover .home-arrow,
.home-action:hover .home-arrow,
.home-more:hover .home-arrow {
    transform: translateX(3px);
}

.home-services {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    margin: 40px 0 32px;
    padding: 42px 0;
    border-top: 1px solid rgba(126, 215, 255, 0.27);
    border-bottom: 1px solid rgba(126, 215, 255, 0.27);
}

.home-services h2 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.12;
}

.home-service-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 16px 0 0;
    padding: 0;
    color: var(--text);
    font-family: var(--font-copy);
    font-size: 1rem;
    line-height: 1.5;
    list-style: none;
}

.home-service-list li + li {
    border-left: 1px solid rgba(126, 215, 255, 0.3);
    padding-left: 24px;
}

.home-service-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.home-service-actions .home-action {
    gap: 12px;
}

.home-more {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    color: var(--ice);
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .home-services {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .home-service-actions {
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .product-card--tunnel {
        grid-row: auto;
        min-height: 440px;
    }

    .product-card--repod,
    .product-card--tools {
        min-height: 260px;
    }

    .product-card-link {
        min-height: inherit;
        padding: 24px;
    }

    .tools-preview-code {
        font-size: 0.75rem;
        line-height: 1.8;
    }

}

@media (max-width: 760px) {
    .home-hero {
        padding: 64px 0 52px;
    }

    .home-title {
        font-size: clamp(2.5rem, 10vw, 4.8rem);
        letter-spacing: 0.035em;
    }

    .home-eyebrow {
        font-size: 0.66rem;
    }

    .home-lede {
        max-width: 36ch;
        margin: 18px auto 0;
    }

    .home-atmosphere img {
        right: -180px;
        width: 950px;
        opacity: 0.17;
    }

    .home-actions {
        gap: 12px;
    }

    .home-action {
        padding-inline: 18px;
        font-size: 0.76rem;
    }

    .product-copy h3 {
        font-size: clamp(1.5rem, 5.5vw, 2rem);
    }

    .product-copy p {
        font-size: 0.95rem;
    }

    .product-art {
        bottom: -64px;
    }

    .product-card--tunnel .product-art {
        bottom: 0;
        object-position: 60% 60%;
    }

    .home-services {
        margin-top: 36px;
        padding: 32px 0;
    }

    .home-service-list {
        gap: 8px;
        flex-direction: column;
    }

    .home-service-list li + li {
        border-left: 0;
        padding-left: 0;
    }
}

@media (max-width: 520px) {
    .product-card--repod .product-copy,
    .product-card--tools .product-copy {
        max-width: none;
    }

    .product-card--tools .product-copy h3 {
        width: auto;
    }

    .repod-preview,
    .tools-preview {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        margin: 24px 0 12px;
        transform: none;
    }

}

@media (prefers-reduced-motion: reduce) {
    .product-card.is-flickering .product-status::before,
    .product-card.is-flickering .product-art,
    .product-card.is-flickering .repod-preview,
    .product-card.is-flickering .tools-preview,
    .site-header.is-flickering,
    .brand-mark.is-flickering,
    .site-nav a.is-flickering,
    .site-nav-toggle.is-flickering,
    .home-title.is-flickering,
    .home-action.is-flickering,
    .home-section-heading.is-flickering::after,
    .home-services.is-flickering {
        animation: none;
    }

    .product-card,
    .home-arrow {
        transition: none;
    }
}
