/* ==========================================================================
   Landing page: header, hero machine, flow, features, roles, CTA, footer.
   Colours and fonts come from theme.css tokens.
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body.landing {
    margin: 0;
    background: var(--cl-background);
    color: var(--cl-foreground);
    font-family: var(--cl-font);
    overflow-x: hidden;
}

.landing .container {
    width: min(1200px, 100% - 2rem);
    margin: 0 auto;
}

/* ---- Header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--cl-background) 85%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cl-border-soft);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 68px;
}

.site-header .brand img {
    height: 34px;
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.site-nav a {
    color: var(--cl-foreground);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color .15s ease;
}

.site-nav a:hover {
    color: var(--cl-primary);
}

.site-nav .btn {
    padding: .55rem 1.2rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius);
    color: var(--cl-foreground);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--cl-card);
        border-bottom: 1px solid var(--cl-border);
        display: none;
        padding: .5rem 1rem 1rem;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: .75rem .25rem;
        border-bottom: 1px solid var(--cl-border-soft);
    }

    .site-nav .btn {
        margin-top: .75rem;
        text-align: center;
    }
}

/* ---- Hero: headline and step guide beside the 3D curtain line ---- */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    color: var(--cl-background);
    background-color: var(--cl-stage);
    background-image:
        radial-gradient(70% 60% at 8% 0%, color-mix(in srgb, var(--cl-stage-accent) 42%, transparent), transparent 62%),
        radial-gradient(60% 60% at 100% 100%, color-mix(in srgb, var(--cl-destructive) 30%, transparent), transparent 62%);
}

@media (min-width: 1200px) {
    .hero {
        grid-template-columns: minmax(430px, 33%) minmax(0, 1fr);
        min-height: max(700px, calc(100vh - 68px));
    }
}

/* Stage floor fading into the distance. */
.hero::before {
    content: "";
    position: absolute;
    left: -50%;
    right: -50%;
    bottom: -12%;
    height: 58%;
    background-image:
        linear-gradient(color-mix(in srgb, var(--cl-background) 22%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--cl-background) 14%, transparent) 1px, transparent 1px);
    background-size: 44px 44px;
    transform: perspective(420px) rotateX(62deg);
    transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
    mask-image: linear-gradient(to top, #000 10%, transparent 90%);
    opacity: .4;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem max(1.25rem, calc((100vw - 1200px) / 2 + 1rem)) 2rem;
}

@media (min-width: 1200px) {
    .hero-copy {
        /* Sits close to the left edge so the model gets most of the width, but never
           closer than the chat button pinned bottom-left. */
        padding: 2.5rem 1rem 2.5rem clamp(5.5rem, 5.5vw, 7rem);
    }
}

.hero-copy .kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--cl-font-mono);
    font-size: 10.5px;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--cl-stage-highlight);
    font-weight: 700;
}

.hero-copy .kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--cl-stage-highlight);
    box-shadow: 0 0 12px var(--cl-stage-highlight);
}

.hero-copy h1 {
    margin: .9rem 0 0;
    font-size: clamp(2.1rem, 3.5vw, 3.2rem);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--cl-background);
}

.hero-copy h1 span {
    color: var(--cl-stage-highlight);
}

.hero-copy .lede {
    margin: 1rem 0 0;
    max-width: 30rem;
    font-size: 1.06rem;
    line-height: 1.6;
    color: color-mix(in srgb, var(--cl-background) 80%, transparent);
}

.hero-copy .actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.4rem;
}

/* Page-load entrance: the copy rises in, one line after the other. */
.hero-copy > * {
    animation: heroRise .8s cubic-bezier(.2, .8, .2, 1) backwards;
}

.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(2) { animation-delay: .14s; }
.hero-copy > :nth-child(3) { animation-delay: .23s; }
.hero-copy > :nth-child(4) { animation-delay: .32s; }
.hero-copy > :nth-child(5) { animation-delay: .44s; }

@keyframes heroRise {
    from { opacity: 0; transform: translateY(22px); }
}

/* Step guide: which of the five steps the machine is showing, in plain words. */
.step-guide {
    margin-top: 1.8rem;
    max-width: 31rem;
    padding: 1rem 1.1rem 1.1rem;
    background: color-mix(in srgb, var(--cl-stage) 55%, transparent);
    border: 1px solid color-mix(in srgb, var(--cl-background) 16%, transparent);
    border-radius: var(--cl-radius-lg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.step-guide-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--cl-background) 65%, transparent);
}

.step-guide-head button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .55rem;
    border: 1px solid color-mix(in srgb, var(--cl-background) 22%, transparent);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.step-guide-head button:hover {
    background: color-mix(in srgb, var(--cl-background) 14%, transparent);
    color: var(--cl-background);
}

.step-guide-head button[hidden] {
    display: none;
}

.stepper {
    --step: 0;
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: .9rem 0 1rem;
}

/* The line under the dots, and the part of it already travelled. */
.stepper::before,
.stepper::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 10%;
    height: 2px;
    border-radius: 2px;
}

.stepper::before {
    width: 80%;
    background: color-mix(in srgb, var(--cl-background) 18%, transparent);
}

.stepper::after {
    width: calc(var(--step) * 20%);
    background: var(--cl-stage-highlight);
    transition: width .5s cubic-bezier(.2, .8, .2, 1);
}

.stepper button {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: 0;
    border: 0;
    background: none;
    color: color-mix(in srgb, var(--cl-background) 60%, transparent);
    font-family: var(--cl-font);
    font-size: .76rem;
    font-weight: 500;
    cursor: pointer;
    transition: color .2s ease;
}

.stepper button i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cl-stage);
    border: 2px solid color-mix(in srgb, var(--cl-background) 24%, transparent);
    font-family: var(--cl-font-mono);
    font-style: normal;
    font-size: .8rem;
    font-weight: 700;
    transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.stepper button:hover {
    color: var(--cl-background);
}

.stepper button.done i {
    border-color: var(--cl-stage-highlight);
    color: var(--cl-stage-highlight);
}

.stepper button.active {
    color: var(--cl-background);
    font-weight: 700;
}

.stepper button.active i {
    background: var(--cl-stage-highlight);
    border-color: var(--cl-stage-highlight);
    color: var(--cl-stage);
    transform: scale(1.12);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--cl-stage-highlight) 20%, transparent);
}

.step-body {
    min-height: 6.6rem;
}

.step-body.swap > * {
    animation: stepSwap .45s cubic-bezier(.2, .8, .2, 1) backwards;
}

.step-body.swap > :nth-child(2) { animation-delay: .05s; }
.step-body.swap > :nth-child(3) { animation-delay: .1s; }

@keyframes stepSwap {
    from { opacity: 0; transform: translateX(10px); }
}

.step-who {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cl-stage-accent) 40%, transparent);
    color: var(--cl-background);
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.step-body h2 {
    margin: .55rem 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cl-background);
}

.step-body p {
    margin: .3rem 0 0;
    font-size: .93rem;
    line-height: 1.5;
    color: color-mix(in srgb, var(--cl-background) 78%, transparent);
}

.step-out {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .7rem;
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cl-stage-highlight);
}

/* The 3D frame. */
.machine {
    position: relative;
    min-height: 560px;
    font-family: var(--cl-font);
    opacity: 0;
    transform: scale(.97);
    transition: opacity .9s ease .1s, transform 1.1s cubic-bezier(.2, .8, .2, 1) .1s;
}

.machine.ready {
    opacity: 1;
    transform: none;
}

.machine #scene,
.machine #scene canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: pan-y;
    cursor: grab;
}

/* On the split layout the frame's left edge dissolves into the stage, so a
   close-up never ends in a hard line beside the headline. */
@media (min-width: 1200px) {
    .machine #scene {
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%);
        mask-image: linear-gradient(90deg, transparent 0, #000 12%);
    }
}

.machine .status {
    position: absolute;
    z-index: 6;
    left: 20px;
    top: 20px;
    padding: .4rem .75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cl-stage) 60%, transparent);
    border: 1px solid color-mix(in srgb, var(--cl-background) 16%, transparent);
    pointer-events: none;
}

.machine .hint {
    position: absolute;
    z-index: 6;
    right: 20px;
    bottom: 26px;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: .6;
    pointer-events: none;
}

@media (max-width: 1280px) {
    .machine .hint {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .machine {
        height: 78vh;
        min-height: 540px;
        max-height: 700px;
    }

    .machine nav.camera-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .step-guide,
    .hero-copy .lede {
        max-width: none;
    }
}

@media (max-width: 520px) {
    .machine nav.mode-bar button {
        padding: .45rem .55rem;
        font-size: .76rem;
    }

    .machine nav.mode-bar button svg {
        display: none;
    }

    .stepper button {
        font-size: .68rem;
    }
}

/* Panels share one glass style. */
.machine .panel {
    position: absolute;
    z-index: 6;
    background: color-mix(in srgb, var(--cl-stage) 55%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--cl-background) 18%, transparent);
    border-radius: var(--cl-radius-lg);
    color: var(--cl-background);
}

.machine .status {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: .85;
}

.machine .status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cl-secondary);
    box-shadow: 0 0 10px var(--cl-secondary);
    animation: machinePulse 1.6s ease-in-out infinite;
}

@keyframes machinePulse {
    50% { opacity: .35; }
}

/* Journey panel (One curtain mode). */
.machine #journey {
    right: 20px;
    top: 18px;
    width: min(330px, calc(100% - 40px));
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .25rem .8rem;
    align-items: center;
    padding: .8rem 1rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.machine #journey.visible {
    opacity: 1;
    transform: none;
}

.machine .journey-icon {
    --cl-primary: var(--cl-stage-accent);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--cl-radius);
    background: var(--cl-primary);
    color: var(--cl-primary-foreground);
}

.machine #journey strong {
    display: block;
    font-size: .95rem;
}

.machine #journey small {
    display: block;
    font-size: .78rem;
    opacity: .75;
}

.machine #journey .track {
    grid-column: 1 / -1;
    height: 4px;
    margin-top: .4rem;
    background: color-mix(in srgb, var(--cl-background) 20%, transparent);
    border-radius: 2px;
    overflow: hidden;
}

.machine #journey .track i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--cl-stage-highlight);
    transition: width .3s linear;
}

/* Numbered station labels, pinned above each station. The active step opens up. */
.machine #labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.machine .station-label {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transform: translate(-9999px, -9999px);
    transition: opacity .3s ease;
    will-change: transform;
}

.machine .station-label .stem {
    position: absolute;
    left: 0;
    top: -26px;
    width: 1px;
    height: 26px;
    background: linear-gradient(to top, transparent, color-mix(in srgb, var(--cl-background) 60%, transparent));
}

.machine .label-card {
    position: absolute;
    left: 0;
    bottom: 26px;
    transform: translateX(-50%);
    padding: .28rem .6rem .28rem .3rem;
    background: color-mix(in srgb, var(--cl-stage) 78%, transparent);
    border: 1px solid color-mix(in srgb, var(--cl-background) 22%, transparent);
    border-radius: 999px;
    color: var(--cl-background);
    white-space: nowrap;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color .3s ease, border-color .3s ease, border-radius .3s ease, padding .3s ease, box-shadow .3s ease;
}

.machine .label-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-weight: 600;
    font-size: .8rem;
}

.machine .label-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--cl-background) 16%, transparent);
    font-family: var(--cl-font-mono);
    font-size: .72rem;
    font-weight: 700;
    transition: background-color .3s ease, color .3s ease;
}

.machine .label-meta {
    display: none;
    font-family: var(--cl-font-mono);
    font-size: 9.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.machine .station-label.active {
    z-index: 2;
}

.machine .station-label.active .label-card {
    padding: .45rem .8rem .5rem .45rem;
    border-radius: var(--cl-radius-lg);
    background: color-mix(in srgb, var(--cl-stage) 88%, transparent);
    border-color: var(--cl-stage-highlight);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cl-stage-highlight) 18%, transparent), 0 12px 30px rgba(0, 0, 0, .4);
}

.machine .station-label.active .label-title span {
    background: var(--cl-stage-highlight);
    color: var(--cl-stage);
}

.machine .station-label.active .label-meta {
    display: block;
    margin: .25rem 0 0 1.9rem;
    opacity: .8;
    animation: stepSwap .35s ease backwards;
}

/* Tooltip on hover. */
.machine #tooltip {
    position: absolute;
    z-index: 8;
    max-width: 260px;
    padding: .6rem .8rem;
    background: var(--cl-card);
    color: var(--cl-foreground);
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius);
    box-shadow: var(--cl-shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}

.machine #tooltip.visible {
    opacity: 1;
}

.machine #tooltip strong {
    display: block;
    font-size: .85rem;
    color: var(--cl-primary);
}

.machine #tooltip p {
    margin: .2rem 0 0;
    font-size: .8rem;
    line-height: 1.4;
}

/* Controls. */
.machine .controls {
    position: absolute;
    z-index: 7;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    width: max-content;
    max-width: calc(100% - 32px);
}

.machine nav.mode-bar,
.machine nav.camera-row {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .3rem;
    background: color-mix(in srgb, var(--cl-stage) 60%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--cl-background) 18%, transparent);
    border-radius: var(--cl-radius-lg);
}

.machine nav button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .85rem;
    border: 0;
    border-radius: var(--cl-radius);
    background: transparent;
    color: var(--cl-background);
    font-family: var(--cl-font);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.machine nav button svg {
    width: 14px;
    height: 14px;
}

.machine nav button:hover {
    background: color-mix(in srgb, var(--cl-background) 14%, transparent);
}

.machine nav button[aria-pressed="true"] {
    background: var(--cl-stage-accent);
    color: var(--cl-primary-foreground);
    box-shadow: var(--cl-shadow);
}

.machine nav.camera-row {
    padding: .25rem .4rem;
}

.machine nav.camera-row button {
    padding: .35rem .65rem;
    font-size: .78rem;
}

.machine .caption {
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    opacity: .6;
    padding: 0 .4rem;
}

.machine .divider {
    width: 1px;
    height: 18px;
    background: color-mix(in srgb, var(--cl-background) 25%, transparent);
    margin: 0 .3rem;
}

.machine #play {
    width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--cl-background) 14%, transparent);
}

.machine #play .icon-play { display: none; }
.machine #play.paused .icon-pause { display: none; }
.machine #play.paused .icon-play { display: block; }

.machine #loading {
    position: absolute;
    inset: 0;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--cl-stage);
    color: var(--cl-background);
    font-family: var(--cl-font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: opacity .5s ease, visibility .5s ease;
}

.machine #loading i {
    width: 34px;
    height: 34px;
    border: 3px solid color-mix(in srgb, var(--cl-background) 25%, transparent);
    border-top-color: var(--cl-stage-highlight);
    border-radius: 50%;
    animation: machineSpin 1s linear infinite;
}

@keyframes machineSpin {
    to { transform: rotate(360deg); }
}

.machine #loading.done {
    opacity: 0;
    visibility: hidden;
}

.machine #error {
    display: none;
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 1.2rem 1.5rem;
    background: var(--cl-card);
    color: var(--cl-foreground);
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-lg);
    text-align: center;
}

/* ---- Sections ---- */
.section {
    padding: 5rem 0;
}

.section-head {
    max-width: 640px;
    margin-bottom: 2.5rem;
}

.section .kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--cl-primary);
    font-weight: 700;
}

.section .kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--cl-primary);
}

.section h2 {
    margin: .6rem 0 0;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.01em;
}

.section .lead {
    margin: .8rem 0 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--cl-muted-foreground);
}

.section.alt {
    background: var(--cl-card);
    border-top: 1px solid var(--cl-border-soft);
    border-bottom: 1px solid var(--cl-border-soft);
}

/* Flow steps mirror the five stations. */
.flow-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.flow-step {
    position: relative;
    padding: 1.3rem 1.2rem 1.4rem;
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-lg);
    box-shadow: var(--cl-shadow);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.flow-step:hover,
.flow-step.active {
    transform: translateY(-4px);
    box-shadow: var(--cl-shadow-lg);
    border-color: var(--cl-primary);
}

.flow-step .num {
    display: block;
    white-space: nowrap;
    font-family: var(--cl-font-mono);
    font-size: 10.5px;
    letter-spacing: 1px;
    color: var(--cl-primary);
    font-weight: 700;
}

.flow-step .icon {
    width: 44px;
    height: 44px;
    margin: .8rem 0 .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--cl-radius);
    background: var(--cl-primary-soft);
    color: var(--cl-primary);
    font-size: 1.1rem;
}

.flow-step h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.flow-step p {
    margin: .5rem 0 0;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--cl-muted-foreground);
}

.flow-step .out {
    display: inline-block;
    margin-top: .9rem;
    padding: .2rem .55rem;
    border-radius: var(--cl-radius);
    background: var(--cl-destructive-soft);
    color: var(--cl-destructive);
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (max-width: 1100px) {
    .flow-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    .flow-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .flow-grid { grid-template-columns: 1fr; }
}

/* Features. */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature {
    padding: 1.5rem;
    background: var(--cl-background);
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-lg);
    box-shadow: var(--cl-shadow);
}

.feature .icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--cl-radius);
    background: var(--cl-primary);
    color: var(--cl-primary-foreground);
    box-shadow: var(--cl-shadow);
}

.feature h3 {
    margin: 1rem 0 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.feature p {
    margin: .5rem 0 0;
    font-size: .95rem;
    line-height: 1.55;
    color: var(--cl-muted-foreground);
}

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

@media (max-width: 560px) {
    .feature-grid { grid-template-columns: 1fr; }
}

/* Roles. */
.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.role {
    padding: 1.6rem;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-lg);
    background: var(--cl-card);
    box-shadow: var(--cl-shadow);
}

.role .tag {
    display: inline-block;
    padding: .25rem .7rem;
    border-radius: var(--cl-radius);
    font-family: var(--cl-font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--cl-primary);
    color: var(--cl-primary-foreground);
}

.role h3 {
    margin: 1rem 0 .4rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.role ul {
    margin: .8rem 0 0;
    padding: 0;
    list-style: none;
}

.role li {
    position: relative;
    padding: .35rem 0 .35rem 1.4rem;
    font-size: .95rem;
    color: var(--cl-foreground);
    border-bottom: 1px solid var(--cl-border-soft);
}

.role li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .85rem;
    width: 8px;
    height: 8px;
    background: var(--cl-destructive);
    border-radius: 2px;
}

.role li:last-child {
    border-bottom: 0;
}

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

/* Stats strip. */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
}

.stat {
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius-lg);
    background: var(--cl-card);
}

.stat strong {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat span {
    display: block;
    margin-top: .3rem;
    font-size: .85rem;
    color: var(--cl-muted-foreground);
}

@media (max-width: 700px) {
    .stats { grid-template-columns: 1fr 1fr; }
}

/* CTA. */
.cta {
    position: relative;
    overflow: hidden;
    padding: 3.5rem;
    border-radius: var(--cl-radius-lg);
    background: var(--cl-stage);
    color: var(--cl-background);
    background-image:
        radial-gradient(70% 90% at 0% 0%, color-mix(in srgb, var(--cl-stage-accent) 50%, transparent), transparent 60%),
        radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--cl-destructive) 40%, transparent), transparent 60%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    color: var(--cl-background);
}

.cta p {
    margin: .6rem 0 0;
    color: color-mix(in srgb, var(--cl-background) 80%, transparent);
    max-width: 36rem;
}

.cta .actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.hero .btn-primary,
.cta .btn-primary {
    background-color: var(--cl-stage-accent) !important;
    border-color: var(--cl-stage-accent) !important;
}

.hero .btn-primary:hover,
.cta .btn-primary:hover {
    background-color: var(--cl-stage-highlight) !important;
    border-color: var(--cl-stage-highlight) !important;
    color: var(--cl-stage) !important;
}

.landing .btn-ghost {
    background: transparent !important;
    border: 1px solid color-mix(in srgb, var(--cl-background) 45%, transparent) !important;
    color: var(--cl-background) !important;
}

.landing .btn-ghost:hover {
    background: color-mix(in srgb, var(--cl-background) 14%, transparent) !important;
}

.landing .btn-lg {
    padding: .75rem 1.5rem;
    font-size: 1rem;
}

.demo-note {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.2rem;
    padding: .5rem .8rem;
    border: 1px dashed var(--cl-stage-highlight);
    border-radius: var(--cl-radius);
    background: color-mix(in srgb, var(--cl-stage-highlight) 14%, transparent);
    color: var(--cl-stage-highlight);
    font-size: .85rem;
}

/* ---- Footer (same structure as the air-sync footer) ---- */
.site-footer {
    position: relative;
    padding-top: 2rem;
    border-top: 4px solid var(--cl-destructive);
    background: var(--cl-stage);
    background-image: linear-gradient(135deg, var(--cl-stage) 0%, color-mix(in srgb, var(--cl-stage) 70%, var(--cl-stage-accent)) 100%);
    color: var(--cl-background);
}

.site-footer .footer-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 90px 0 30px;
    border-bottom: 1px solid color-mix(in srgb, var(--cl-background) 10%, transparent);
}

.site-footer .left-content {
    width: 30%;
    max-width: 28rem;
}

.site-footer .left-content img {
    height: 48px;
    width: auto;
    margin-bottom: 1rem;
}

.site-footer .left-content p {
    margin: 0;
    color: color-mix(in srgb, var(--cl-background) 85%, transparent);
    line-height: 1.6;
}

.site-footer .right-content {
    width: 40%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.site-footer .right-content p {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cl-background);
}

.site-footer .footer-menu {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.site-footer .footer-menu li {
    margin-bottom: 10px;
}

.site-footer .footer-menu a {
    color: color-mix(in srgb, var(--cl-background) 65%, var(--cl-muted));
    font-size: 18px;
    text-decoration: none;
    transition: color .2s ease;
}

.site-footer .footer-menu a:hover {
    color: var(--cl-background);
}

.site-footer .social-container {
    padding: 1.5rem 0;
    color: var(--cl-background);
}

.site-footer .vis-social a:hover,
.site-footer .vis-social a:focus-visible {
    background: var(--cl-stage-accent);
    border-color: var(--cl-stage-accent);
}

@media (max-width: 768px) {
    .site-footer .footer-container {
        padding-top: 48px;
    }

    .site-footer .right-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .site-footer .footer-container {
        flex-direction: column;
    }

    .site-footer .left-content,
    .site-footer .right-content {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Leave room for the chat launcher in the hero's bottom-left corner. */
.machine .footer .wordmark {
    padding-left: 74px;
}

@media (max-width: 900px) {
    .machine .controls {
        left: 12px;
        right: 12px;
        bottom: 92px;
        transform: none;
        width: auto;
        max-width: none;
    }

    .machine nav.mode-bar,
    .machine nav.camera-row {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .machine nav button {
        padding: .45rem .6rem;
        font-size: .8rem;
        white-space: nowrap;
    }
}


/* ==========================================================================
   Motion: scroll progress, header state, reveal-on-scroll, counters.
   Only active once the page script has added .js to <html>, so the page is
   complete without it.
   ========================================================================== */
.scroll-progress {
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 2px;
    width: 100%;
    transform: scaleX(var(--scroll, 0));
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--cl-iris), var(--cl-destructive));
    pointer-events: none;
}

.site-header {
    transition: box-shadow .3s ease, background-color .3s ease;
}

.site-header.scrolled {
    background: color-mix(in srgb, var(--cl-background) 94%, transparent);
    box-shadow: 0 10px 30px -18px rgba(42, 39, 64, .45);
}

.site-nav a:not(.btn) {
    position: relative;
}

.site-nav a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: var(--cl-primary);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.site-nav a:not(.btn):hover::after,
.site-nav a.current::after {
    transform: scaleX(1);
}

.js .reveal {
    opacity: 0;
}

.js .reveal.in {
    opacity: 1;
    animation: revealUp .8s cubic-bezier(.2, .8, .2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 80ms);
}

.js .reveal.from-left.in { animation-name: revealLeft; }
.js .reveal.from-right.in { animation-name: revealRight; }
.js .reveal.zoom.in { animation-name: revealZoom; }

@keyframes revealUp {
    from { opacity: 0; transform: translateY(34px); }
}

@keyframes revealLeft {
    from { opacity: 0; transform: translateX(-40px); }
}

@keyframes revealRight {
    from { opacity: 0; transform: translateX(40px); }
}

@keyframes revealZoom {
    from { opacity: 0; transform: scale(.94) translateY(20px); }
}

/* Section headings: the kicker's marker draws out into a rule. */
.section .kicker::after {
    content: "";
    width: 0;
    height: 1px;
    background: var(--cl-primary);
    opacity: .5;
    transition: width .9s cubic-bezier(.2, .8, .2, 1) .25s;
}

.section .section-head.in .kicker::after,
html:not(.js) .section .kicker::after {
    width: 56px;
}

/* The flow: a line runs through the five steps as they arrive. */
.flow-grid {
    position: relative;
}

@media (min-width: 1101px) {
    .flow-grid::before {
        content: "";
        position: absolute;
        left: 4%;
        right: 4%;
        top: 74px;
        height: 2px;
        background: linear-gradient(90deg, var(--cl-iris), var(--cl-destructive));
        opacity: .35;
        transform: scaleX(0);
        transform-origin: 0 50%;
        transition: transform 1.4s cubic-bezier(.2, .8, .2, 1) .2s;
    }

    .flow-grid.in::before,
    html:not(.js) .flow-grid::before {
        transform: scaleX(1);
    }
}

.flow-step {
    z-index: 1;
}

.flow-step .icon,
.feature .icon {
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.flow-step:hover .icon,
.flow-step.active .icon,
.feature:hover .icon {
    transform: translateY(-3px) rotate(-6deg) scale(1.06);
}

.feature,
.role,
.stat {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.feature:hover,
.role:hover,
.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--cl-shadow-lg);
    border-color: var(--cl-primary);
}

.stat strong {
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; }
    .js .reveal.in,
    .hero-copy > *,
    .step-body.swap > * { animation: none; }
    .machine { transition: none; }
}

/* The header spans the page and shares the hero's side margin, so the logo sits
   directly above the headline. */
@media (min-width: 1200px) {
    .landing .site-header .container {
        width: 100%;
        max-width: none;
        padding: 0 clamp(5.5rem, 5.5vw, 7rem);
    }
}

/* The "Line running" status chip is not shown. The element stays in the page
   because the scene script writes its text to it. */
.machine .status {
    display: none;
}

/* ==========================================================================
   Flow cards: a small animated scene per step (partials/flow-art.blade.php).
   Each scene is a dark glass screen with a faint grid; the loop starts once
   the card has scrolled into view and is brighter on the active card.
   ========================================================================== */
.flow-art {
    --ink: var(--cl-background);
    --glow: var(--cl-stage-highlight);
    --loop: 4.8s;
    position: relative;
    height: 124px;
    margin: .85rem 0 1rem;
    border-radius: var(--cl-radius-lg);
    overflow: hidden;
    color: var(--ink);
    background-color: var(--cl-stage);
    background-image:
        radial-gradient(90% 90% at 0% 0%, color-mix(in srgb, var(--cl-stage-accent) 55%, transparent), transparent 65%),
        radial-gradient(80% 80% at 100% 100%, color-mix(in srgb, var(--cl-destructive) 30%, transparent), transparent 65%),
        linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
    background-size: auto, auto, 16px 16px, 16px 16px;
    border: 1px solid color-mix(in srgb, var(--cl-stage) 70%, var(--ink));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent), inset 0 -30px 40px -30px rgba(0, 0, 0, .5);
    transition: box-shadow .3s ease, border-color .3s ease;
}

/* A slow light sweep across the screen. */
.flow-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--ink) 9%, transparent) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: artSheen calc(var(--loop) * 1.5) ease-in-out infinite;
    pointer-events: none;
}

@keyframes artSheen {
    0%, 55% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.flow-step:hover .flow-art,
.flow-step.active .flow-art {
    border-color: var(--glow);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 35%, transparent), 0 0 0 4px color-mix(in srgb, var(--glow) 16%, transparent), inset 0 -30px 40px -30px rgba(0, 0, 0, .5);
}

/* Nothing moves until the card has been revealed. */
.js .flow-step:not(.in) .flow-art *,
.js .flow-step:not(.in) .flow-art::after {
    animation-play-state: paused !important;
}

.flow-art * {
    animation-duration: var(--loop);
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}

.flow-art .bars {
    display: block;
    background: repeating-linear-gradient(90deg,
        #2a2740 0 2px, transparent 2px 4px, #2a2740 4px 7px, transparent 7px 9px,
        #2a2740 9px 10px, transparent 10px 13px, #2a2740 13px 16px, transparent 16px 18px,
        #2a2740 18px 19px, transparent 19px 22px);
}

.flow-title {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.flow-step .flow-title .icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    margin: 0;
    font-size: 1rem;
}

/* The line through the cards now runs behind the screens. */
@media (min-width: 1101px) {
    .flow-grid::before {
        top: 112px;
    }
}

/* ---- 01 Print: the label feeds out and the barcode is printed across it ---- */
.art-print .printer {
    position: absolute;
    left: 14%;
    right: 14%;
    top: 12px;
    height: 26px;
    z-index: 2;
    border-radius: 7px;
    background: linear-gradient(180deg, #58527a, #3b3658);
    border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .4);
}

.art-print .slot {
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 4px;
    height: 3px;
    border-radius: 2px;
    background: #17152a;
}

.art-print .led {
    position: absolute;
    right: 9px;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--glow);
    box-shadow: 0 0 8px var(--glow);
    animation-name: artBlink;
    animation-duration: .9s;
}

@keyframes artBlink {
    50% { opacity: .25; }
}

.art-print .feed {
    position: absolute;
    left: 22%;
    right: 22%;
    top: 33px;
    bottom: 0;
    overflow: hidden;
}

.art-print .label {
    padding: 9px 9px 6px;
    border-radius: 0 0 6px 6px;
    background: var(--cl-card);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
    animation-name: printFeed;
}

.art-print .label .bars {
    height: 34px;
    animation-name: printBars;
}

.art-print .code {
    display: block;
    margin-top: 5px;
    font-family: var(--cl-font-mono);
    font-size: 8.5px;
    letter-spacing: 1.2px;
    text-align: center;
    color: #575279;
    animation-name: printCode;
}

@keyframes printFeed {
    0% { transform: translateY(-104%); }
    38%, 82% { transform: translateY(0); opacity: 1; }
    94%, 100% { transform: translateY(40%); opacity: 0; }
}

@keyframes printBars {
    0%, 30% { clip-path: inset(0 100% 0 0); }
    58%, 100% { clip-path: inset(0 0 0 0); }
}

@keyframes printCode {
    0%, 56% { opacity: 0; }
    66%, 100% { opacity: 1; }
}

/* ---- 02 Assign: a room lights up and gets its room, staff member and protocol ---- */
.art-assign .building {
    position: absolute;
    left: 12px;
    top: 14px;
    bottom: 14px;
    width: 42%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--ink) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.art-assign .building > i {
    border-radius: 3px;
    background: color-mix(in srgb, var(--ink) 14%, transparent);
}

.art-assign .building > i:nth-child(3) { animation-name: roomHint; }
.art-assign .building > i:nth-child(10) { animation-name: roomHint; animation-delay: -1.6s; }

.art-assign .building > i:nth-child(6) {
    animation-name: roomPick;
}

@keyframes roomHint {
    0%, 20%, 100% { background: color-mix(in srgb, var(--ink) 14%, transparent); }
    10% { background: color-mix(in srgb, var(--cl-info) 70%, transparent); }
}

@keyframes roomPick {
    0%, 22% { background: color-mix(in srgb, var(--ink) 14%, transparent); box-shadow: none; }
    32%, 90% { background: var(--glow); box-shadow: 0 0 12px var(--glow); }
    100% { background: color-mix(in srgb, var(--ink) 14%, transparent); box-shadow: none; }
}

/* The pin drops onto the chosen room (row 2, column 2). */
.art-assign .pin {
    position: absolute;
    left: calc(6px + (100% - 12px) * .375);
    top: 50%;
    margin: -22px 0 0 -6px;
    font-size: 15px;
    color: var(--cl-card);
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5));
    animation-name: pinDrop;
}

@keyframes pinDrop {
    0%, 18% { transform: translateY(-34px); opacity: 0; }
    30% { transform: translateY(2px); opacity: 1; }
    36%, 90% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(0); opacity: 0; }
}

.art-assign .tags {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    width: 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.art-assign .tags span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
    font-family: var(--cl-font-mono);
    font-size: 9px;
    letter-spacing: .5px;
    white-space: nowrap;
    animation-name: tagIn;
}

.art-assign .tags span i {
    font-size: 8px;
    color: var(--glow);
}

.art-assign .tags span:nth-child(2) { animation-name: tagIn2; }
.art-assign .tags span:nth-child(3) { animation-name: tagIn3; }

@keyframes tagIn {
    0%, 34% { opacity: 0; transform: translateX(14px); }
    42%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}

@keyframes tagIn2 {
    0%, 44% { opacity: 0; transform: translateX(14px); }
    52%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}

@keyframes tagIn3 {
    0%, 54% { opacity: 0; transform: translateX(14px); }
    62%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}

/* ---- 03 Install: the phone scans the label, then the curtain is drawn ---- */
.art-install .phone {
    position: absolute;
    left: 14px;
    top: 16px;
    bottom: 16px;
    width: 46px;
    padding: 12px 6px;
    border-radius: 9px;
    background: #17152a;
    border: 2px solid color-mix(in srgb, var(--ink) 45%, transparent);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .4);
    overflow: hidden;
}

.art-install .phone .bars {
    height: 100%;
    border-radius: 2px;
    background-color: var(--cl-card);
}

.art-install .phone .scan {
    position: absolute;
    left: 3px;
    right: 3px;
    top: 12%;
    height: 2px;
    background: var(--cl-destructive);
    box-shadow: 0 0 8px 1px var(--cl-destructive);
    animation-name: phoneScan;
}

@keyframes phoneScan {
    0% { top: 12%; opacity: 1; }
    20% { top: 84%; }
    40% { top: 12%; opacity: 1; }
    46%, 100% { top: 12%; opacity: 0; }
}

/* The reading travels from the phone to the cubicle. */
.art-install .beam {
    position: absolute;
    left: 66px;
    right: 52%;
    top: 50%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--glow) 0 5px, transparent 5px 10px);
    background-size: 200% 100%;
    animation-name: beamFlow;
}

@keyframes beamFlow {
    0%, 34% { opacity: 0; background-position: 0 0; }
    42%, 60% { opacity: 1; }
    68%, 100% { opacity: 0; background-position: -40px 0; }
}

.art-install .cubicle {
    position: absolute;
    right: 12px;
    top: 16px;
    bottom: 12px;
    width: 46%;
}

.art-install .rail,
.art-inspect .panel::before {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #f1edf0, #8c8690);
}

.flow-art .drape {
    position: absolute;
    left: 0;
    right: 0;
    top: 4px;
    bottom: 0;
    display: flex;
    transform-origin: 0 50%;
}

.flow-art .drape i {
    flex: 1;
    border-radius: 0 0 50% 50% / 0 0 5px 5px;
    background: linear-gradient(90deg, #58456f, #8770a3 25%, #bba7d2 50%, #9781b2 70%, #503e68);
}

.flow-art .drape i:nth-child(even) {
    background: linear-gradient(90deg, #2f6f7a, #56949f 30%, #9ccfd8 52%, #56949f 72%, #2a5d68);
}

.art-install .drape {
    animation-name: drapeDraw;
}

@keyframes drapeDraw {
    0%, 46% { transform: scaleX(.22); }
    72%, 92% { transform: scaleX(1); }
    100% { transform: scaleX(.22); }
}

.art-install .ok {
    position: absolute;
    right: -4px;
    top: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cl-success);
    color: #fff;
    font-size: 9px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cl-success) 30%, transparent);
    animation-name: okPop;
}

@keyframes okPop {
    0%, 70% { transform: scale(0); }
    78% { transform: scale(1.25); }
    84%, 94% { transform: scale(1); }
    100% { transform: scale(0); }
}

/* ---- 04 Inspect: a scan bar sweeps the curtain and the verdict is chosen ---- */
.art-inspect {
    --loop: 6s;
}

.art-inspect .panel {
    position: absolute;
    left: 14px;
    top: 16px;
    bottom: 12px;
    width: 40%;
}

.art-inspect .panel::before {
    content: "";
    z-index: 1;
}

.art-inspect .sweep {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    border-radius: 2px;
    background: var(--cl-card);
    box-shadow: 0 0 10px 2px var(--glow), -14px 0 18px 2px color-mix(in srgb, var(--glow) 35%, transparent);
    animation-name: inspectSweep;
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
}

@keyframes inspectSweep {
    from { left: 0; }
    to { left: calc(100% - 3px); }
}

.art-inspect .verdicts {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    width: 44%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.art-inspect .verdicts span {
    --tone: var(--cl-info);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
    background: color-mix(in srgb, var(--ink) 8%, transparent);
    font-family: var(--cl-font-mono);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: .45;
    animation-name: verdictOn;
}

.art-inspect .verdicts span i {
    width: 10px;
    font-size: 8px;
    text-align: center;
}

.art-inspect .verdicts .soiled { --tone: var(--cl-accent); animation-delay: -4s; }
.art-inspect .verdicts .damaged { --tone: var(--cl-destructive); animation-delay: -2s; }

/* Each verdict holds the light for a third of the loop. */
@keyframes verdictOn {
    0%, 4% { opacity: .45; background: color-mix(in srgb, var(--ink) 8%, transparent); border-color: color-mix(in srgb, var(--ink) 18%, transparent); box-shadow: none; transform: none; }
    8%, 30% { opacity: 1; background: var(--tone); border-color: var(--tone); box-shadow: 0 0 14px color-mix(in srgb, var(--tone) 70%, transparent); transform: translateX(-4px); }
    34%, 100% { opacity: .45; background: color-mix(in srgb, var(--ink) 8%, transparent); border-color: color-mix(in srgb, var(--ink) 18%, transparent); box-shadow: none; transform: none; }
}

/* ---- 05 Ledger: entries land in the log, the next change is dated, staff are notified ---- */
.art-ledger .log {
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 52%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}

.art-ledger .log span {
    display: grid;
    grid-template-columns: 8px 1fr;
    grid-template-rows: auto auto;
    gap: 3px 7px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--ink) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
    animation-name: logIn;
}

.art-ledger .log span i {
    grid-row: 1 / 3;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cl-info);
    box-shadow: 0 0 8px var(--cl-info);
}

.art-ledger .log span:nth-child(2) i { background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.art-ledger .log span:nth-child(3) i { background: var(--cl-accent); box-shadow: 0 0 8px var(--cl-accent); }

.art-ledger .log b,
.art-ledger .log em {
    height: 3px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--ink) 70%, transparent);
}

.art-ledger .log em {
    width: 60%;
    background: color-mix(in srgb, var(--ink) 30%, transparent);
}

.art-ledger .log span:nth-child(2) { animation-name: logIn2; }
.art-ledger .log span:nth-child(3) { animation-name: logIn3; }

@keyframes logIn {
    0%, 4% { opacity: 0; transform: translateY(10px); }
    12%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}

@keyframes logIn2 {
    0%, 18% { opacity: 0; transform: translateY(10px); }
    26%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}

@keyframes logIn3 {
    0%, 32% { opacity: 0; transform: translateY(10px); }
    40%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}

.art-ledger .side {
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.art-ledger .calendar {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: var(--cl-card);
    color: #575279;
    text-align: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
    animation-name: calendarFlip;
    transform-origin: 50% 0;
}

.art-ledger .calendar small {
    display: block;
    padding: 2px 0;
    background: var(--cl-destructive);
    color: #fff;
    font-family: var(--cl-font-mono);
    font-size: 7px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.art-ledger .calendar strong {
    display: block;
    padding: 2px 0 3px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.1;
}

.art-ledger .calendar sub {
    bottom: 0;
    font-size: 9px;
    font-weight: 600;
}

@keyframes calendarFlip {
    0%, 44% { transform: perspective(200px) rotateX(-90deg); opacity: 0; }
    54%, 92% { transform: none; opacity: 1; }
    100% { opacity: 0; }
}

.art-ledger .bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink) 14%, transparent);
    font-size: 11px;
    color: var(--glow);
}

.art-ledger .bell i {
    animation-name: bellSwing;
    transform-origin: 50% 0;
}

.art-ledger .bell span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--glow);
    animation-name: bellPing;
}

@keyframes bellSwing {
    0%, 58%, 82%, 100% { transform: rotate(0); }
    62%, 70%, 78% { transform: rotate(16deg); }
    66%, 74% { transform: rotate(-16deg); }
}

@keyframes bellPing {
    0%, 58% { transform: scale(1); opacity: 0; }
    62% { opacity: .9; }
    90%, 100% { transform: scale(2.1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .flow-art *,
    .flow-art::after {
        animation: none !important;
    }
}
