/* ===================================
   WebBridge.AI
   =================================== */
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('../assets/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('../assets/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --ink: #06090f;
    --text: #f2f5fa;
    --text-muted: #b6c0ce;
    --accent: #ffb454;
    --ai: #7fd4ff;
    --gutter: clamp(1.25rem, 5vw, 5rem);
    --content: 72rem;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--ink);
    color: var(--text);
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ===================================
   Hero
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
}

/* The video sits under the copy in normal flow, so the two can never overlap.
   On big screens it stops growing where its cards (1660 of its 1800 px) line up
   with the sections, and the spare height goes above the headline and below it. */
.hero-media {
    position: relative;
    flex: 1 1 0;
    width: 100%;
    max-width: calc(var(--content) * 1800 / 1660);
    min-height: min(calc(100vw * 600 / 1800), 26rem);
    max-height: calc(var(--content) * 600 / 1660);
    margin: 0 auto auto;
    background: url('../assets/hero/en/wide-poster.jpg') center / contain no-repeat;
}

html[lang="sk"] .hero-media {
    background-image: url('../assets/hero/sk/wide-poster.jpg');
}

.motion .hero-media,
html[lang="sk"].motion .hero-media {
    background-image: none;
}

.hero-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-content {
    padding-inline: var(--gutter);
}

/* Logo, language switch and footer line up with the sections on big screens. */
.site-header,
.site-footer {
    padding-inline: max(var(--gutter), (100% - var(--content)) / 2);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: auto;
    padding-top: clamp(1.25rem, 3vh, 2.25rem);
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-switch a {
    display: block;
    border-radius: 5px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.lang-switch a:hover,
.lang-switch a[aria-current] {
    opacity: 1;
}

.lang-switch a[aria-current] {
    box-shadow: 0 0 0 2px var(--ink), 0 0 0 3.5px var(--text-muted);
}

.lang-switch img {
    display: block;
    border-radius: 4px;
}

.logo {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.logo-web {
    color: var(--accent);
}

.logo-highlight {
    color: var(--ai);
}

.hero-content {
    text-align: center;
    padding-top: clamp(1.25rem, 4vh, 3.5rem);
    padding-bottom: 1.25rem;
    animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content h1 {
    font-size: clamp(2.6rem, 2rem + 3.4vw, 5rem);
    font-weight: 600;
    line-height: 1.03;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.hero-content p {
    max-width: 58rem;
    margin: 1rem auto 0;
    color: var(--text-muted);
    font-size: clamp(1.05rem, 1rem + 0.2vw, 1.2rem);
    line-height: 1.45;
    text-wrap: balance;
}

.hero-content p + p {
    margin-top: 0.4rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.9rem 1.7rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background: #ffc980;
}

.btn-ghost {
    background: rgba(6, 9, 15, 0.5);
    box-shadow: inset 0 0 0 1px rgba(242, 245, 250, 0.32);
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(242, 245, 250, 0.1);
}

/* ===================================
   Sections
   =================================== */
.icon-sprite {
    display: none;
}

.icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.section {
    --node: 3.5rem;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    max-width: calc(var(--content) + 2 * var(--gutter));
    margin-inline: auto;
    padding: clamp(4rem, 9vw, 7rem) var(--gutter) clamp(3rem, 6vw, 5rem);
    scroll-margin-top: 1rem;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section h2 {
    max-width: 18em;
    margin-top: 0.75rem;
    font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.75rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.how-intro {
    max-width: 42rem;
    margin-top: 1.25rem;
    color: var(--text-muted);
    font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
    line-height: 1.5;
    text-wrap: pretty;
}

/* The rail runs from the web colour to the AI colour, like the threads in the animation. */
.pipeline {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.pipeline::before {
    content: '';
    position: absolute;
    top: 0.75rem;
    bottom: 0.75rem;
    left: calc(var(--node) / 2 - 1px);
    width: 2px;
    background: linear-gradient(180deg, var(--accent), #f2efe6 50%, var(--ai));
    opacity: 0.55;
}

.pipeline-fill {
    display: none;
}

.pipeline-pill {
    position: relative;
    z-index: 1;
    margin-left: calc(var(--node) / 2);
    transform: translateX(-50%);
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
}

.pipeline-task {
    background: var(--accent);
    box-shadow: 0 0 22px rgba(255, 180, 84, 0.45);
}

.pipeline-solution {
    background: var(--ai);
    box-shadow: 0 0 22px rgba(127, 212, 255, 0.45);
}

.layers {
    width: 100%;
    list-style: none;
}

.layer {
    --color: color-mix(in srgb, var(--ai) var(--mix), var(--accent));
    position: relative;
    display: grid;
    grid-template-columns: var(--node) minmax(0, 1fr) minmax(0, 22rem);
    gap: 1.5rem clamp(1.25rem, 3vw, 2.5rem);
    align-items: start;
    padding-block: clamp(1.75rem, 3vw, 2.5rem);
}

.layer + .layer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: calc(var(--node) + clamp(1.25rem, 3vw, 2.5rem));
    height: 1px;
    background: rgba(242, 245, 250, 0.09);
}

.layer-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--node);
    height: var(--node);
    border-radius: 50%;
    background: var(--ink);
    box-shadow: inset 0 0 0 1.5px var(--color), 0 0 26px -6px var(--color);
    color: var(--color);
}

.layer-icon .icon {
    width: 1.55rem;
    height: 1.55rem;
}

.layer h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.7rem;
    font-size: clamp(1.5rem, 1.3rem + 0.7vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.15;
}

.layer-num {
    color: var(--color);
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0;
}

.layer-full {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
}

.layer-what {
    max-width: 36rem;
    margin-top: 0.6rem;
    font-size: 1.15rem;
    line-height: 1.45;
    text-wrap: pretty;
}

.layer-without {
    max-width: 36rem;
    margin-top: 0.6rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.45;
    text-wrap: pretty;
}

.layer-without strong {
    color: var(--text);
    font-weight: 600;
}

/* A small working illustration of each layer, tinted along the rail. */
.demo {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.15rem 1.1rem;
    border-radius: 0.9rem;
    background: rgba(242, 245, 250, 0.03);
    box-shadow: inset 0 0 0 1px rgba(242, 245, 250, 0.08);
    font-size: 0.95rem;
    line-height: 1.35;
}

.demo ul {
    list-style: none;
}

.demo .icon {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    stroke-width: 2.6;
}

.demo-title {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.demo-rows {
    display: grid;
    gap: 0.45rem;
}

.demo-rows li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.demo-rows .is-ok .icon {
    color: var(--color);
}

.demo-rows .is-no {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(182, 192, 206, 0.5);
}

.demo-bars {
    display: grid;
    gap: 0.6rem;
}

.demo-bar {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
}

.demo-bar i {
    display: block;
    width: var(--w);
    min-width: 4px;
    height: 0.6rem;
    border-radius: 99px;
    background: var(--color);
}

.demo-bar b {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 400;
}

.demo-routes {
    display: grid;
    gap: 0.7rem;
}

.demo-routes li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.45rem;
}

.demo-routes span {
    flex-basis: 100%;
}

.demo-routes .icon {
    color: var(--color);
}

.demo-routes b {
    padding: 0.05rem 0.5rem;
    border-radius: 99px;
    box-shadow: inset 0 0 0 1px var(--color);
    color: var(--color);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
}

.demo-doc {
    display: grid;
    gap: 0.45rem;
}

.demo-doc i {
    display: block;
    width: var(--w);
    height: 0.4rem;
    border-radius: 99px;
    background: rgba(242, 245, 250, 0.12);
}

.demo-doc mark {
    margin-inline: -0.35rem;
    padding: 0.25rem 0.35rem;
    border-radius: 0.3rem;
    background: color-mix(in srgb, var(--color) 20%, transparent);
    box-shadow: inset 2px 0 0 var(--color);
    color: var(--text);
}

.demo-tag {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color);
    font-size: 0.85rem;
}

.demo-code {
    display: grid;
    gap: 0.3rem;
    font-family: var(--mono);
    font-size: 0.86rem;
    line-height: 1.4;
}

.demo-code code {
    color: var(--color);
    font-family: inherit;
}

.demo-code div {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.5rem;
}

.demo-code dt {
    color: var(--color);
}

.demo-result {
    padding-left: 0.75rem;
    border-left: 2px solid var(--color);
}

.demo-text {
    font-size: 1rem;
    line-height: 1.5;
}

.demo-redact {
    position: relative;
    display: inline-block;
    padding-inline: 0.2em;
}

.demo-redact::after {
    content: '';
    position: absolute;
    inset: 0.1em 0;
    border-radius: 0.15em;
    background: var(--color);
    transform-origin: left;
}

.demo-trace {
    display: grid;
    gap: 0.35rem;
}

.demo-trace-row {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.demo-trace-row div {
    height: 0.55rem;
    border-radius: 99px;
    background: rgba(242, 245, 250, 0.05);
}

.demo-trace-row i {
    display: block;
    width: var(--w);
    height: 100%;
    margin-left: var(--x);
    border-radius: 99px;
    background: var(--color);
}

.demo-total {
    font-family: var(--mono);
    font-size: 0.86rem;
    text-align: right;
}

.how-note {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Services */
.services {
    padding-bottom: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: clamp(2rem, 4vw, 3rem);
    list-style: none;
}

.service {
    --color: color-mix(in srgb, var(--ai) var(--mix), var(--accent));
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(242, 245, 250, 0.03);
    box-shadow: inset 0 0 0 1px rgba(242, 245, 250, 0.08);
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--color) 14%, transparent);
    color: var(--color);
}

.service-icon .icon {
    width: 1.4rem;
    height: 1.4rem;
}

.service h3 {
    margin-top: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.service p {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.45;
    text-wrap: pretty;
}

/* Common questions */
.faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    gap: 2rem clamp(2rem, 5vw, 5rem);
    padding-bottom: 0;
}

.faq-item {
    border-bottom: 1px solid rgba(242, 245, 250, 0.1);
}

.faq-item:first-child {
    border-top: 1px solid rgba(242, 245, 250, 0.1);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 1.25rem;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.25;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-item .icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
    transition: transform 0.25s ease;
}

.faq-item[open] .icon {
    transform: rotate(45deg);
}

.faq-item p {
    max-width: 38rem;
    padding-bottom: 1.4rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.closing {
    padding-top: clamp(3rem, 6vw, 5rem);
}

.how-close {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    padding: clamp(1.75rem, 4vw, 3rem);
    border-radius: 1.25rem;
    background: linear-gradient(100deg, rgba(255, 180, 84, 0.1), rgba(127, 212, 255, 0.1));
    box-shadow: inset 0 0 0 1px rgba(242, 245, 250, 0.1);
}

.how-close h2 {
    margin-top: 0;
    font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem);
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1.5rem;
    padding-block: 1.25rem;
    border-top: 1px solid rgba(242, 245, 250, 0.09);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
}

.site-footer a {
    text-underline-offset: 3px;
}

/* ===================================
   404
   =================================== */
/* No video here, so the copy sits in the middle of the screen. */
.not-found .hero-content {
    margin-bottom: auto;
    padding-bottom: clamp(3rem, 12vh, 7rem);
}

/* The web's threads (amber) and the AI's threads (blue) meet at the missing page. */
.not-found-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    max-width: 44rem;
    margin: 0 auto clamp(1.5rem, 4vh, 2.5rem);
    font-size: clamp(4.5rem, 3rem + 7vw, 9rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
}

.not-found-threads {
    flex: 1 1 0;
    min-width: 0;
    max-width: 12rem;
    height: 0.75em;
    color: var(--accent);
    fill: none;
    stroke-width: 1.5;
}

.not-found-threads path {
    vector-effect: non-scaling-stroke;
}

.not-found-threads-ai {
    color: var(--ai);
    transform: scaleX(-1);
}

.not-found .hero-content h1 {
    font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.8rem);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

/* Portrait screens get their own composition, with the web above the AI field. */
@media (max-aspect-ratio: 1/1) {
    .hero-media {
        min-height: calc(min(100vw, var(--content) * 1800 / 1660) * 1000 / 900);
        max-height: calc(var(--content) * 1800 / 1660 * 1000 / 900);
        background-image: url('../assets/hero/en/tall-poster.jpg');
    }

    html[lang="sk"] .hero-media {
        background-image: url('../assets/hero/sk/tall-poster.jpg');
    }

    .motion .hero-media,
    html[lang="sk"].motion .hero-media {
        background-image: none;
    }
}

/* Short laptop windows: leave more of the screen to the animation. */
@media (max-height: 820px) and (min-aspect-ratio: 1/1) {
    .hero-content {
        padding-top: 1.25rem;
    }

    .hero-content h1 {
        font-size: 3.4rem;
    }

    .hero-content p {
        max-width: none;
        margin-top: 0.5rem;
        font-size: 1.05rem;
    }

    .hero-actions {
        margin-top: 1rem;
    }

    .hero-actions .btn {
        padding: 0.7rem 1.5rem;
    }
}

/* Narrow screens: the illustration moves under its explanation. */
@media (max-width: 860px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .faq {
        grid-template-columns: minmax(0, 1fr);
    }

    .section {
        --node: 2.9rem;
    }

    .layer {
        grid-template-columns: var(--node) minmax(0, 1fr);
        gap: 1rem;
    }

    .demo {
        grid-column: 2;
    }

    .layer + .layer::before {
        left: calc(var(--node) + 1rem);
    }

    .layer-icon .icon {
        width: 1.3rem;
        height: 1.3rem;
    }
}

/* Small screens: the footer stacks into three lines instead of wrapping unevenly. */
@media (max-width: 640px) {
    .site-footer,
    .footer-info {
        flex-direction: column;
    }

    .site-footer {
        align-items: flex-start;
    }
}

/* Phones: keep the buttons side by side. */
@media (max-width: 480px) {
    .hero-content {
        padding-top: 1rem;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

    .hero-content p {
        margin-top: 0.7rem;
        font-size: 1rem;
        text-wrap: pretty;
    }

    .hero-actions {
        flex-wrap: nowrap;
        margin-top: 1.1rem;
    }

    .hero-actions .btn {
        padding: 0.8rem 1.15rem;
        font-size: 1rem;
        white-space: nowrap;
    }

    .services-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-content {
        animation: none;
    }
}

/* ===================================
   Scroll animations
   =================================== */
/* main.js sets .reveal only when motion is welcome, so without it everything is simply visible. */
.reveal .eyebrow,
.reveal .service,
.reveal .faq-item,
.reveal .section > h2,
.reveal .faq-head h2,
.reveal .how-intro,
.reveal .how-note,
.reveal .how-close,
.reveal .layer-main,
.reveal .demo {
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal .eyebrow:not(.is-in),
.reveal .service:not(.is-in),
.reveal .faq-item:not(.is-in),
.reveal .section > h2:not(.is-in),
.reveal .faq-head h2:not(.is-in),
.reveal .how-intro:not(.is-in),
.reveal .how-note:not(.is-in),
.reveal .how-close:not(.is-in),
.reveal .layer:not(.is-in) .layer-main,
.reveal .layer:not(.is-in) .demo {
    opacity: 0;
    transform: translateY(18px);
}

.reveal .demo,
.reveal .service:nth-child(3n + 2) {
    transition-delay: 0.12s;
}

.reveal .service:nth-child(3n) {
    transition-delay: 0.24s;
}

/* The task travels down the rail with the reader. */
.reveal .pipeline {
    --progress: 0;
}

.reveal .pipeline::before {
    opacity: 0.16;
}

.reveal .pipeline-fill {
    position: absolute;
    top: 0.75rem;
    bottom: 0.75rem;
    left: calc(var(--node) / 2 - 1px);
    display: block;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), #f2efe6 50%, var(--ai));
    clip-path: inset(0 0 calc((1 - var(--progress)) * 100%) 0);
}

.reveal .pipeline::after {
    content: '';
    position: absolute;
    top: calc(0.75rem + (100% - 1.5rem) * var(--progress) - 4px);
    left: calc(var(--node) / 2 - 4px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
    box-shadow: 0 0 14px 3px color-mix(in srgb, var(--ai) calc(var(--progress) * 100%), var(--accent));
}

.reveal .layer-icon {
    transition: box-shadow 0.4s ease, color 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal .layer:not(.is-reached) .layer-icon {
    box-shadow: inset 0 0 0 1.5px rgba(242, 245, 250, 0.16);
    color: rgba(242, 245, 250, 0.35);
    transform: scale(0.9);
}

.reveal .pipeline-solution {
    transition: opacity 0.4s ease, box-shadow 0.4s ease;
}

.reveal .pipeline-solution:not(.is-reached) {
    box-shadow: none;
    opacity: 0.35;
}

/* Each illustration plays out what its layer does. */
.reveal .demo-rows li,
.reveal .demo-routes li,
.reveal .demo-prompt .demo-code div,
.reveal .demo-tools .demo-result,
.reveal .demo-tag,
.reveal .demo-total,
.reveal .demo-bar b {
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal .layer:not(.is-in) .demo-rows li,
.reveal .layer:not(.is-in) .demo-routes li,
.reveal .layer:not(.is-in) .demo-prompt .demo-code div,
.reveal .layer:not(.is-in) .demo-tools .demo-result {
    opacity: 0;
    transform: translateX(-8px);
}

.reveal .layer:not(.is-in) .demo-tag,
.reveal .layer:not(.is-in) .demo-total,
.reveal .layer:not(.is-in) .demo-bar b {
    opacity: 0;
}

.reveal .demo-rows li:nth-child(1),
.reveal .demo-routes li:nth-child(1),
.reveal .demo-prompt .demo-code div:nth-child(1) {
    transition-delay: 0.3s;
}

.reveal .demo-rows li:nth-child(2),
.reveal .demo-prompt .demo-code div:nth-child(2) {
    transition-delay: 0.55s;
}

.reveal .demo-routes li:nth-child(2) {
    transition-delay: 0.75s;
}

.reveal .demo-rows li:nth-child(3),
.reveal .demo-prompt .demo-code div:nth-child(3) {
    transition-delay: 0.8s;
}

/* Cache: the first answer really takes 1.2 s, the cached one is almost instant. */
.demo-bar i {
    transform-origin: left;
}

.reveal .demo-bar i {
    transition: transform 1.2s linear 0.3s;
}

.reveal .demo-bar:nth-child(2) i {
    transition: transform 0.1s linear 1.7s;
}

.reveal .layer:not(.is-in) .demo-bar i {
    transform: scaleX(0);
}

.reveal .demo-bar:nth-child(1) b {
    transition-delay: 1.5s;
}

.reveal .demo-bar:nth-child(2) b {
    transition-delay: 1.8s;
}

/* RAG: the passage it found gets highlighted. */
.reveal .demo-doc mark {
    background: linear-gradient(color-mix(in srgb, var(--color) 20%, transparent), color-mix(in srgb, var(--color) 20%, transparent)) left / 100% 100% no-repeat;
    transition: background-size 0.8s ease 0.45s;
}

.reveal .layer:not(.is-in) .demo-doc mark {
    background-size: 0 100%;
}

.reveal .demo-rag .demo-tag {
    transition-delay: 1.2s;
}

/* Tools: the call goes out, then the result comes back. */
.reveal .demo-tools .demo-result {
    transition-delay: 0.8s;
}

/* Guardrails: the address is visible for a moment, then gets hidden. */
.reveal .demo-redact::after {
    transition: transform 0.5s ease 1.1s;
}

.reveal .layer:not(.is-in) .demo-redact::after {
    transform: scaleX(0);
}

.reveal .demo-guardrails .demo-tag {
    transition-delay: 1.5s;
}

/* Observability: the steps of the request run one after another. */
.demo-trace-row i {
    transform-origin: left;
}

.reveal .demo-trace-row i {
    transition: transform 0.35s ease;
}

.reveal .layer:not(.is-in) .demo-trace-row i {
    transform: scaleX(0);
}

.reveal .demo-trace-row:nth-child(1) i {
    transition-delay: 0.25s;
}

.reveal .demo-trace-row:nth-child(2) i {
    transition-delay: 0.45s;
}

.reveal .demo-trace-row:nth-child(3) i {
    transition-delay: 0.7s;
}

.reveal .demo-trace-row:nth-child(4) i {
    transition-delay: 1s;
}

.reveal .demo-trace-row:nth-child(5) i {
    transition-delay: 1.25s;
}

.reveal .demo-total {
    transition-delay: 1.5s;
}
