/**
 * Shared animated visual (homepage + about page)
 */
.ab26-anim {
    --ab26-a: #8fbf5a;
    --ab26-ad: #6bb832;
    --ab26-paper: #F5F1E6;
    position: relative;
    aspect-ratio: 3 / 2;
    min-height: 280px;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(ellipse 55% 50% at 20% 15%, rgba(107, 184, 50, 0.16), transparent 55%),
        radial-gradient(ellipse 45% 45% at 85% 80%, rgba(143, 191, 90, 0.1), transparent 50%),
        linear-gradient(160deg, #14161d 0%, #0c0d12 100%);
}

.ab26-anim__glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 60% 40%, rgba(107, 184, 50, 0.12), transparent 45%);
    animation: ab26AnimGlow 8s ease-in-out infinite;
    pointer-events: none;
}

.ab26-anim__grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(245, 241, 230, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 241, 230, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 20%, transparent 75%);
    pointer-events: none;
}

.ab26-anim__stage {
    position: absolute;
    inset: 8% 6% 16%;
    display: grid;
    place-items: center;
}

.ab26-anim__ring {
    position: absolute;
    width: min(92%, 340px);
    height: auto;
    opacity: 0.9;
    animation: ab26AnimSpin 42s linear infinite;
    pointer-events: none;
}

.ab26-anim__browser {
    position: relative;
    z-index: 2;
    width: min(72%, 320px);
    border-radius: 12px;
    border: 1px solid rgba(143, 191, 90, 0.28);
    background: rgba(10, 10, 15, 0.85);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    animation: ab26AnimFloat 6.5s ease-in-out infinite;
}

.ab26-anim__chrome {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(245, 241, 230, 0.08);
}

.ab26-anim__chrome > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(245, 241, 230, 0.22);
}

.ab26-anim__chrome > span:nth-child(1) { background: rgba(205, 106, 46, 0.7); }
.ab26-anim__chrome > span:nth-child(2) { background: rgba(143, 191, 90, 0.55); }
.ab26-anim__chrome > span:nth-child(3) { background: rgba(107, 184, 50, 0.75); }

.ab26-anim__url {
    margin-left: 0.45rem;
    flex: 1;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: rgba(245, 241, 230, 0.55);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ab26-anim__viewport {
    padding: 0.7rem 0.75rem 0.85rem;
    display: grid;
    gap: 0.55rem;
}

.ab26-anim__nav {
    display: flex;
    gap: 0.35rem;
}

.ab26-anim__nav i {
    display: block;
    height: 5px;
    width: 18%;
    border-radius: 999px;
    background: rgba(245, 241, 230, 0.18);
    animation: ab26AnimPulse 3.2s ease-in-out infinite;
}

.ab26-anim__nav i:nth-child(2) { animation-delay: 0.2s; width: 14%; }
.ab26-anim__nav i:nth-child(3) { animation-delay: 0.4s; width: 16%; }
.ab26-anim__nav i:nth-child(4) { animation-delay: 0.6s; width: 12%; margin-left: auto; background: rgba(107, 184, 50, 0.45); }

.ab26-anim__hero-block {
    display: grid;
    gap: 0.4rem;
    padding: 0.55rem 0.6rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(107, 184, 50, 0.14), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(143, 191, 90, 0.18);
}

.ab26-anim__line {
    height: 7px;
    border-radius: 999px;
    background: rgba(245, 241, 230, 0.28);
}

.ab26-anim__line--lg { width: 72%; }
.ab26-anim__line--md { width: 48%; background: rgba(245, 241, 230, 0.16); }

.ab26-anim__cta-pill {
    width: 38%;
    height: 12px;
    margin-top: 0.15rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ab26-ad), var(--ab26-a));
    animation: ab26AnimPulse 2.8s ease-in-out infinite;
}

.ab26-anim__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.ab26-anim__card {
    height: 36px;
    border-radius: 7px;
    border: 1px solid rgba(245, 241, 230, 0.08);
    background: rgba(255, 255, 255, 0.03);
    animation: ab26AnimRise 4.8s ease-in-out infinite;
}

.ab26-anim__card:nth-child(2) { animation-delay: 0.35s; }
.ab26-anim__card:nth-child(3) { animation-delay: 0.7s; }

.ab26-anim__code {
    position: absolute;
    z-index: 3;
    right: 2%;
    bottom: 4%;
    width: min(48%, 190px);
    border-radius: 10px;
    border: 1px solid rgba(143, 191, 90, 0.25);
    background: rgba(8, 9, 12, 0.92);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: ab26AnimFloat 7.2s ease-in-out infinite reverse;
    transform-origin: center;
}

.ab26-anim__code-bar {
    display: flex;
    gap: 0.3rem;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid rgba(245, 241, 230, 0.08);
}

.ab26-anim__code-bar span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(245, 241, 230, 0.2);
}

.ab26-anim__code-body {
    margin: 0;
    padding: 0.5rem 0.55rem 0.65rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: clamp(0.52rem, 1.1vw, 0.68rem);
    line-height: 1.45;
    color: rgba(245, 241, 230, 0.72);
    white-space: pre-wrap;
}

.ab26-anim__code-body .c-kw { color: var(--ab26-a); }
.ab26-anim__code-body .c-var { color: var(--ab26-paper); }
.ab26-anim__code-body .c-key { color: rgba(245, 241, 230, 0.55); }
.ab26-anim__code-body .c-str { color: #c9e39a; }
.ab26-anim__code-body .c-fn { color: #9fd46a; }

.ab26-anim__caret {
    display: inline-block;
    width: 0.45em;
    height: 1em;
    margin-left: 1px;
    vertical-align: -0.1em;
    background: var(--ab26-a);
    animation: ab26AnimBlink 1s steps(1) infinite;
}

.ab26-anim__node {
    position: absolute;
    z-index: 1;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ab26-ad);
    box-shadow: 0 0 0 4px rgba(107, 184, 50, 0.15);
    animation: ab26AnimOrbit 12s ease-in-out infinite;
}

.ab26-anim__node--1 { top: 12%; left: 10%; animation-duration: 10s; }
.ab26-anim__node--2 { top: 18%; right: 12%; background: var(--ab26-a); animation-duration: 13s; animation-delay: -2s; }
.ab26-anim__node--3 { bottom: 22%; left: 8%; animation-duration: 11s; animation-delay: -4s; }
.ab26-anim__node--4 { top: 48%; right: 6%; width: 7px; height: 7px; animation-duration: 9s; animation-delay: -1s; }

.ab26-anim__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.85rem;
    margin: 0;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(245, 241, 230, 0.45);
    z-index: 4;
}

@keyframes ab26AnimFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes ab26AnimSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ab26AnimGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}

@keyframes ab26AnimPulse {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

@keyframes ab26AnimRise {
    0%, 100% { transform: translateY(0); opacity: 0.75; }
    50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes ab26AnimOrbit {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(6px, -8px); }
    66% { transform: translate(-5px, 5px); }
}

@keyframes ab26AnimBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@media (max-width: 640px) {
    .ab26-anim__code { width: min(56%, 160px); }
    .ab26-anim__browser { width: min(78%, 280px); }
}

@media (prefers-reduced-motion: reduce) {
    .ab26-anim__glow,
    .ab26-anim__ring,
    .ab26-anim__browser,
    .ab26-anim__code,
    .ab26-anim__nav i,
    .ab26-anim__cta-pill,
    .ab26-anim__card,
    .ab26-anim__node,
    .ab26-anim__caret {
        animation: none !important;
    }
}
