/* Premium visual upgrades for the Gloryck homepage. */

.hero-visual::before,
.hero-visual::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.hero-visual::before {
    inset: 0 2% 10% 10%;
    background:
        radial-gradient(circle at 58% 30%, rgba(240,212,154,0.13), transparent 27%),
        radial-gradient(circle at 74% 58%, rgba(121,212,156,0.08), transparent 22%);
    filter: blur(18px);
    opacity: 0.88;
}

.hero-visual::after {
    inset: auto 10% 4% 18%;
    height: 22%;
    background: radial-gradient(ellipse at center, rgba(210,180,127,0.22), transparent 68%);
    filter: blur(24px);
    opacity: 0.42;
    transform: perspective(900px) rotateX(58deg);
}

.dashboard-frame {
    overflow: hidden;
    border-color: rgba(240,212,154,0.28);
    background:
        radial-gradient(circle at 21% 19%, rgba(255,255,255,0.1), transparent 28%),
        radial-gradient(circle at 78% 16%, rgba(210,180,127,0.14), transparent 24%),
        linear-gradient(145deg, rgba(22,23,22,0.92), rgba(5,5,5,0.76));
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.035),
        44px 48px 120px rgba(0,0,0,0.72),
        0 0 78px rgba(210,180,127,0.12),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -32px 70px rgba(0,0,0,0.26);
}

.dashboard-frame::before {
    background:
        linear-gradient(116deg, rgba(255,255,255,0.12), transparent 27%),
        linear-gradient(154deg, transparent 48%, rgba(210,180,127,0.12), transparent 70%),
        radial-gradient(circle at 88% 9%, rgba(240,212,154,0.2), transparent 19%);
    opacity: 0.78;
}

.dashboard-topline {
    letter-spacing: 0.8px;
    text-shadow: 0 0 16px rgba(255,255,255,0.12);
}

.dashboard-topline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 1px;
    background: linear-gradient(90deg, rgba(240,212,154,0.4), transparent 60%);
}

.dashboard-stat {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.065), rgba(255,255,255,0.018)),
        rgba(0,0,0,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}

.dashboard-stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,0.085), transparent);
    opacity: 0;
    transform: translateX(-70%);
    animation: statSweep 8s ease-in-out infinite;
}

.dashboard-stat:nth-child(2)::before { animation-delay: 0.9s; }
.dashboard-stat:nth-child(3)::before { animation-delay: 1.8s; }

.signal-graph {
    background:
        radial-gradient(circle at 32% 58%, rgba(240,212,154,0.08), transparent 24%),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 48px 100%,
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 100% 34px,
        rgba(0,0,0,0.12);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.025),
        inset 0 -32px 80px rgba(210,180,127,0.065);
}

.signal-graph::before,
.signal-graph::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.signal-graph::before {
    top: 0;
    bottom: 0;
    width: 24%;
    left: -30%;
    background: linear-gradient(90deg, transparent, rgba(240,212,154,0.13), transparent);
    transform: skewX(-15deg);
    animation: graphScan 7.5s ease-in-out infinite;
}

.signal-graph::after {
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 35%),
        radial-gradient(circle at 100% 0%, rgba(121,212,156,0.08), transparent 28%);
}

.chart-line-main {
    stroke-width: 2.8;
    filter: drop-shadow(0 0 7px rgba(240,212,154,0.52)) drop-shadow(0 0 18px rgba(210,180,127,0.18));
}

.verification-chip {
    border-top: 1px solid rgba(244,240,232,0.07);
    padding-top: 13px;
}

.visual-label {
    box-shadow:
        0 10px 28px rgba(0,0,0,0.38),
        0 0 0 1px rgba(240,212,154,0.04),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

.work-preview-section {
    padding: 136px 5%;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background:
        radial-gradient(circle at 82% 18%, rgba(210,180,127,0.08), transparent 28%),
        radial-gradient(circle at 18% 86%, rgba(121,212,156,0.045), transparent 24%),
        #050505;
}

.work-preview-inner {
    width: min(1420px, 100%);
    margin: 0 auto;
}

.work-preview-header {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
    gap: 48px;
    align-items: end;
    margin-bottom: 46px;
}

.work-kicker {
    color: var(--accent);
    font: 800 0.7rem var(--font-body);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.work-preview-header h2 {
    max-width: 780px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 4.85rem;
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: 0;
}

.work-preview-header p {
    color: var(--muted);
    line-height: 1.8;
    font-size: 1rem;
}

.work-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.work-card {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(244,240,232,0.1);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
        #080808;
    padding: 24px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 26px 80px rgba(0,0,0,0.32);
}

.work-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 18%, rgba(240,212,154,0.14), transparent 29%);
    pointer-events: none;
    opacity: 0.62;
}

.work-card > * {
    position: relative;
    z-index: 1;
}

.work-card-num {
    color: rgba(210,180,127,0.85);
    font: 800 0.66rem var(--font-body);
    letter-spacing: 2.8px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.work-card h3 {
    color: var(--text);
    font-size: 1.08rem;
    letter-spacing: 0;
    margin-bottom: 10px;
}

.work-card p {
    color: rgba(244,240,232,0.58);
    line-height: 1.68;
    font-size: 0.92rem;
}

.work-mock {
    margin-top: 26px;
    min-height: 190px;
    border: 1px solid rgba(244,240,232,0.09);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), transparent 32%),
        rgba(0,0,0,0.23);
    overflow: hidden;
}

.mock-topbar {
    height: 34px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(244,240,232,0.07);
}

.mock-topbar i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(240,212,154,0.58);
}

.mock-screen {
    padding: 16px;
}

.mock-hero-lines span,
.mock-list span,
.mock-code span {
    display: block;
    height: 7px;
    border-radius: 999px;
    background: rgba(244,240,232,0.12);
    margin-bottom: 10px;
}

.mock-hero-lines span:first-child {
    width: 72%;
    height: 12px;
    background: linear-gradient(90deg, rgba(240,212,154,0.7), rgba(244,240,232,0.18));
}

.mock-hero-lines span:nth-child(2) { width: 56%; }
.mock-hero-lines span:nth-child(3) { width: 38%; }

.mock-chart {
    height: 68px;
    margin-top: 20px;
    border-radius: 6px;
    background:
        linear-gradient(135deg, transparent 44%, rgba(240,212,154,0.72) 45% 48%, transparent 49%),
        linear-gradient(18deg, transparent 46%, rgba(121,212,156,0.42) 47% 49%, transparent 50%),
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px) 0 0 / 100% 22px;
}

.mock-list {
    display: grid;
    gap: 10px;
}

.mock-list span {
    height: 30px;
    margin: 0;
    border: 1px solid rgba(244,240,232,0.08);
    background:
        linear-gradient(90deg, rgba(240,212,154,0.55), rgba(240,212,154,0.12) 34%, transparent 35%),
        rgba(255,255,255,0.035);
}

.mock-code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.mock-code span {
    height: 8px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, rgba(121,212,156,0.52), rgba(240,212,154,0.2), rgba(255,255,255,0.07));
}

.mock-code span:nth-child(2) { width: 78%; }
.mock-code span:nth-child(3) { width: 62%; }
.mock-code span:nth-child(4) { width: 86%; }
.mock-code span:nth-child(5) { width: 54%; }

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.work-tags span {
    border: 1px solid rgba(210,180,127,0.22);
    border-radius: 4px;
    padding: 7px 9px;
    color: rgba(240,212,154,0.82);
    background: rgba(210,180,127,0.045);
    font: 800 0.6rem var(--font-body);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.work-demo-shell {
    display: grid;
    grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
    gap: 22px;
    align-items: stretch;
    perspective: 1400px;
}

.work-demo-tabs {
    display: grid;
    gap: 12px;
}

.work-demo-tab {
    appearance: none;
    position: relative;
    min-height: 142px;
    overflow: hidden;
    border: 1px solid rgba(244,240,232,0.1);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(244,240,232,0.048), rgba(244,240,232,0.014)),
        #080808;
    color: var(--text);
    text-align: left;
    padding: 22px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 54px rgba(0,0,0,0.22);
    transition-property: transform, border-color, background-color, box-shadow;
    transition-duration: 280ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.work-demo-tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 14% 0%, rgba(240,212,154,0.16), transparent 34%),
        linear-gradient(90deg, rgba(240,212,154,0), rgba(240,212,154,0.09), rgba(240,212,154,0));
    opacity: 0;
    transform: translateX(-28%);
    transition-property: opacity, transform;
    transition-duration: 360ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.work-demo-tab > * {
    position: relative;
    z-index: 1;
}

.work-demo-tab:hover,
.work-demo-tab:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(210,180,127,0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 22px 74px rgba(0,0,0,0.34);
}

.work-demo-tab:hover::before,
.work-demo-tab:focus-visible::before,
.work-demo-tab.is-active::before {
    opacity: 1;
    transform: translateX(0);
}

.work-demo-tab:active {
    transform: scale(0.96);
}

.work-demo-tab.is-active {
    border-color: rgba(240,212,154,0.42);
    background-color: rgba(210,180,127,0.035);
}

.work-demo-num {
    display: block;
    color: rgba(210,180,127,0.9);
    font: 800 0.64rem var(--font-body);
    letter-spacing: 2.4px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.work-demo-tab strong {
    display: block;
    color: var(--text);
    font-size: 1.05rem;
    letter-spacing: 0;
    margin-bottom: 8px;
}

.work-demo-tab em {
    display: block;
    max-width: 34ch;
    color: rgba(244,240,232,0.58);
    font-style: normal;
    font-size: 0.88rem;
    line-height: 1.55;
}

.work-demo-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
    color: rgba(240,212,154,0.92);
    font: 800 0.62rem var(--font-body);
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.work-demo-action::after {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    transform-origin: left center;
    transition-property: transform;
    transition-duration: 260ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.work-demo-tab:hover .work-demo-action::after,
.work-demo-tab.is-active .work-demo-action::after {
    transform: scaleX(1.45);
}

.work-demo-stage {
    --demo-accent: #f0d49a;
    --demo-alt: #79d49c;
    position: relative;
    min-height: 558px;
    overflow: hidden;
    border: 1px solid rgba(244,240,232,0.12);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 14%, color-mix(in srgb, var(--demo-accent) 16%, transparent), transparent 32%),
        radial-gradient(circle at 84% 18%, color-mix(in srgb, var(--demo-alt) 12%, transparent), transparent 30%),
        linear-gradient(145deg, rgba(255,255,255,0.062), rgba(255,255,255,0.018)),
        #060606;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.055),
        0 38px 120px rgba(0,0,0,0.42);
    transform: rotateX(1.3deg) rotateY(-1.1deg);
    transform-origin: center center;
    transition-property: transform, border-color, box-shadow;
    transition-duration: 420ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.work-demo-stage.demo-ops {
    --demo-accent: #79d49c;
    --demo-alt: #95a8ff;
}

.work-demo-stage.demo-api {
    --demo-accent: #8bd8ff;
    --demo-alt: #f0d49a;
}

.work-demo-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.034) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.85), transparent 92%);
    pointer-events: none;
}

.work-demo-stage::after {
    content: "";
    position: absolute;
    top: -28%;
    left: -44%;
    width: 42%;
    height: 150%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transform: rotate(18deg);
    opacity: 0;
    pointer-events: none;
}

.work-demo-stage.is-switching::after,
.work-demo-stage.is-running::after {
    animation: demoSweep 1250ms cubic-bezier(0.2, 0, 0, 1);
}

.demo-stage-top,
.demo-stage-grid {
    position: relative;
    z-index: 1;
}

.demo-stage-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(244,240,232,0.08);
}

.demo-live {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(244,240,232,0.84);
    font: 800 0.66rem var(--font-body);
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.demo-live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--demo-alt);
    box-shadow: 0 0 18px color-mix(in srgb, var(--demo-alt) 72%, transparent);
}

.demo-run {
    min-height: 40px;
    border: 1px solid color-mix(in srgb, var(--demo-accent) 42%, transparent);
    border-radius: 4px;
    background: color-mix(in srgb, var(--demo-accent) 12%, transparent);
    color: var(--text);
    padding: 0 14px;
    font: 800 0.62rem var(--font-body);
    line-height: 1.2;
    letter-spacing: 1.6px;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    cursor: pointer;
    transition-property: transform, background-color, border-color;
    transition-duration: 220ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.demo-run:hover,
.demo-run:focus-visible {
    background: color-mix(in srgb, var(--demo-accent) 18%, transparent);
    border-color: color-mix(in srgb, var(--demo-accent) 66%, transparent);
}

.demo-run:active {
    transform: scale(0.96);
}

.demo-stage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 18px;
    padding: 22px;
}

.demo-surface,
.demo-side-panel {
    border: 1px solid rgba(244,240,232,0.09);
    border-radius: 8px;
    background: rgba(0,0,0,0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.038);
}

.demo-surface {
    min-height: 474px;
    overflow: hidden;
}

.demo-browser-bar {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 15px;
    border-bottom: 1px solid rgba(244,240,232,0.07);
}

.demo-browser-bar span {
    display: inline-flex;
    gap: 7px;
}

.demo-browser-bar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(240,212,154,0.62);
}

.demo-browser-bar strong {
    color: rgba(244,240,232,0.44);
    font: 700 0.7rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-product-hero {
    padding: 34px 28px 24px;
}

.demo-kicker {
    display: block;
    color: var(--demo-accent);
    font: 800 0.66rem var(--font-body);
    letter-spacing: 2.2px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.demo-product-hero h3 {
    max-width: 520px;
    color: var(--text);
    font: 700 2.4rem/0.98 var(--font-display);
    letter-spacing: 0;
    text-wrap: balance;
}

.demo-product-hero p {
    max-width: 560px;
    color: rgba(244,240,232,0.62);
    line-height: 1.72;
    margin-top: 18px;
    text-wrap: pretty;
}

.demo-primary-metric {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    border: 1px solid rgba(244,240,232,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.035);
    padding: 14px 16px;
}

.demo-primary-metric strong {
    color: var(--text);
    font-size: 1.28rem;
    font-variant-numeric: tabular-nums;
}

.demo-primary-metric span {
    color: var(--demo-alt);
    font: 800 0.82rem var(--font-body);
    text-shadow: 0 0 18px color-mix(in srgb, var(--demo-alt) 46%, transparent);
    font-variant-numeric: tabular-nums;
}

.demo-bars {
    display: flex;
    align-items: end;
    gap: 10px;
    height: 136px;
    margin: 6px 28px 28px;
    padding: 20px;
    border: 1px solid rgba(244,240,232,0.075);
    border-radius: 8px;
    background:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 100% 34px,
    rgba(255,255,255,0.025);
}

.demo-process-preview {
    display: none;
    position: relative;
    z-index: 1;
    margin: 18px 22px 0;
    border: 1px solid color-mix(in srgb, var(--demo-accent) 28%, transparent);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--demo-accent) 16%, transparent), transparent 46%),
        rgba(0,0,0,0.28);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.045),
        0 22px 70px rgba(0,0,0,0.24);
    overflow: hidden;
}

.work-demo-stage.is-process-open .demo-process-preview {
    display: block;
    animation: processPreviewIn 520ms cubic-bezier(0.2, 0, 0, 1) both;
}

.demo-process-head {
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(244,240,232,0.08);
}

.demo-process-head span,
.demo-process-outcome span {
    display: block;
    color: var(--demo-accent);
    font: 800 0.58rem var(--font-body);
    letter-spacing: 1.7px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.demo-process-head strong {
    display: block;
    color: var(--text);
    font-size: 1.04rem;
    letter-spacing: 0;
    line-height: 1.25;
}

.demo-process-head p {
    max-width: 68ch;
    color: rgba(244,240,232,0.58);
    line-height: 1.58;
    font-size: 0.84rem;
    margin-top: 8px;
    text-wrap: pretty;
}

.demo-process-main {
    display: grid;
    grid-template-columns: minmax(220px, 0.86fr) minmax(280px, 1.14fr);
    gap: 14px;
    padding: 18px;
}

.demo-process-track {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
}

.demo-process-track::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 22px;
    bottom: 22px;
    width: 1px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--demo-accent) 68%, transparent), rgba(244,240,232,0.1));
    opacity: 0.64;
}

.demo-process-step {
    position: relative;
    min-height: auto;
    border: 1px solid rgba(244,240,232,0.075);
    border-radius: 7px;
    background: rgba(255,255,255,0.026);
    padding: 14px 14px 14px 42px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.026);
    transition-property: transform, border-color, background-color, opacity;
    transition-duration: 260ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.demo-process-step i {
    position: absolute;
    top: 18px;
    left: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(244,240,232,0.28);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.4);
    transition-property: background-color, box-shadow, transform;
    transition-duration: 260ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.demo-process-step-body span {
    display: block;
    color: rgba(240,212,154,0.62);
    font: 800 0.55rem var(--font-body);
    letter-spacing: 1.3px;
    margin-bottom: 7px;
}

.demo-process-step-body strong {
    display: block;
    color: rgba(244,240,232,0.86);
    font-size: 0.82rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.demo-process-step-body p {
    color: rgba(244,240,232,0.48);
    font-size: 0.7rem;
    line-height: 1.45;
    margin-top: 8px;
}

.demo-process-step.is-active {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--demo-accent) 58%, transparent);
    background: color-mix(in srgb, var(--demo-accent) 11%, rgba(255,255,255,0.024));
}

.demo-process-step.is-active i {
    background: var(--demo-accent);
    box-shadow:
        0 0 0 4px rgba(0,0,0,0.5),
        0 0 22px color-mix(in srgb, var(--demo-accent) 64%, transparent);
    transform: scale(1.22);
}

.demo-process-step.is-done {
    border-color: color-mix(in srgb, var(--demo-alt) 38%, transparent);
    opacity: 0.9;
}

.demo-process-step.is-done i {
    background: var(--demo-alt);
    box-shadow:
        0 0 0 4px rgba(0,0,0,0.5),
        0 0 18px color-mix(in srgb, var(--demo-alt) 52%, transparent);
}

.demo-process-outcome {
    margin: 0 18px 18px;
    border: 1px solid rgba(244,240,232,0.08);
    border-radius: 7px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--demo-alt) 9%, transparent), rgba(255,255,255,0.024));
    padding: 14px;
}

.demo-process-outcome strong {
    display: block;
    color: rgba(244,240,232,0.82);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.5;
}

.demo-code-preview {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(244,240,232,0.09);
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045), transparent 24%),
        #050505;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.038);
}

.demo-code-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(244,240,232,0.07);
}

.demo-code-dots {
    display: inline-flex;
    gap: 6px;
}

.demo-code-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(240,212,154,0.62);
}

.demo-code-top strong,
.demo-code-top em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-code-top strong {
    color: rgba(244,240,232,0.72);
    font-size: 0.7rem;
}

.demo-code-top em {
    color: var(--demo-accent);
    font-size: 0.62rem;
    font-style: normal;
}

.demo-code-lines {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 12px;
    overflow-x: auto;
}

.demo-code-lines::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px) 0 0 / 100% 28px,
        radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--demo-accent) 12%, transparent), transparent 34%);
    pointer-events: none;
}

.demo-code-line {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    min-height: 26px;
    align-items: center;
    border-radius: 5px;
    color: rgba(244,240,232,0.66);
    font: 700 0.7rem ui-monospace, SFMono-Regular, Consolas, monospace;
    transition-property: color, background-color, opacity, transform;
    transition-duration: 240ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.demo-code-num {
    color: rgba(240,212,154,0.42);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.demo-code-line code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.demo-code-line.is-active {
    color: var(--text);
    background: color-mix(in srgb, var(--demo-accent) 13%, transparent);
    transform: translateX(2px);
}

.demo-code-line.is-active .demo-code-num {
    color: var(--demo-accent);
}

.demo-code-line.is-done {
    color: rgba(121,212,156,0.78);
}

.demo-bar {
    flex: 1;
    min-width: 0;
    height: var(--bar-height);
    border-radius: 4px 4px 1px 1px;
    background: linear-gradient(180deg, var(--demo-accent), color-mix(in srgb, var(--demo-accent) 18%, transparent));
    box-shadow: 0 0 24px color-mix(in srgb, var(--demo-accent) 20%, transparent);
    transform-origin: bottom center;
    animation: demoBarIn 620ms cubic-bezier(0.2, 0, 0, 1) both;
    animation-delay: calc(var(--bar-index) * 70ms);
}

.demo-side-panel {
    padding: 16px;
}

.demo-kpi-grid {
    display: grid;
    gap: 10px;
}

.demo-kpi {
    border: 1px solid rgba(244,240,232,0.075);
    border-radius: 7px;
    background: rgba(255,255,255,0.03);
    padding: 12px;
}

.demo-kpi span {
    display: block;
    color: rgba(244,240,232,0.48);
    font: 800 0.58rem var(--font-body);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.demo-kpi strong {
    display: block;
    margin-top: 7px;
    color: var(--demo-accent);
    font-size: 1.18rem;
    font-variant-numeric: tabular-nums;
}

.demo-flow {
    position: relative;
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding: 14px;
    border-radius: 7px;
    background: rgba(255,255,255,0.025);
}

.demo-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 30px;
    color: rgba(244,240,232,0.74);
    font-size: 0.82rem;
}

.demo-step i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--demo-accent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--demo-accent) 44%, transparent);
}

.demo-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 23px;
    width: 1px;
    height: 16px;
    background: color-mix(in srgb, var(--demo-accent) 38%, transparent);
}

.demo-log {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.demo-log-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    color: rgba(244,240,232,0.58);
    font: 700 0.72rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.demo-log-row span {
    color: var(--demo-alt);
    font-variant-numeric: tabular-nums;
}

.work-demo-stage.is-switching .demo-surface,
.work-demo-stage.is-switching .demo-side-panel {
    animation: demoPanelIn 520ms cubic-bezier(0.2, 0, 0, 1) both;
}

.work-demo-stage.is-running .demo-step i,
.work-demo-stage.is-running .demo-live i {
    animation: demoPulse 780ms ease-in-out 2;
}

.work-demo-stage.is-running .demo-log-row {
    animation: demoLogFlash 960ms cubic-bezier(0.2, 0, 0, 1) both;
}

.work-demo-stage.is-running .demo-log-row:nth-child(2) { animation-delay: 120ms; }
.work-demo-stage.is-running .demo-log-row:nth-child(3) { animation-delay: 240ms; }

.legal-strip {
    background:
        linear-gradient(180deg, rgba(210,180,127,0.04), transparent 40%),
        rgba(5,5,5,0.92);
}

.legal-item {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.legal-item:hover {
    border-color: rgba(210,180,127,0.34);
    background: rgba(210,180,127,0.045);
}

@keyframes graphScan {
    0%, 24% { left: -30%; opacity: 0; }
    36% { opacity: 1; }
    68% { left: 106%; opacity: 0.32; }
    100% { left: 106%; opacity: 0; }
}

@keyframes statSweep {
    0%, 62% { opacity: 0; transform: translateX(-70%); }
    72% { opacity: 1; }
    92% { opacity: 0; transform: translateX(88%); }
    100% { opacity: 0; transform: translateX(88%); }
}

@keyframes demoSweep {
    0% { left: -44%; opacity: 0; }
    18% { opacity: 1; }
    100% { left: 116%; opacity: 0; }
}

@keyframes demoBarIn {
    0% { transform: scaleY(0.24); opacity: 0.35; }
    100% { transform: scaleY(1); opacity: 1; }
}

@keyframes demoPanelIn {
    0% { transform: translateY(10px); opacity: 0.55; filter: blur(5px); }
    100% { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes demoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.65); }
}

@keyframes demoLogFlash {
    0% { transform: translateX(-8px); opacity: 0.38; }
    46% { color: var(--text); }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes processPreviewIn {
    0% { transform: translateY(12px); opacity: 0; filter: blur(5px); }
    100% { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@media (max-width: 980px) {
    .work-preview-header,
    .work-showcase-grid,
    .work-demo-shell,
    .demo-stage-grid {
        grid-template-columns: 1fr;
    }

    .work-card {
        min-height: auto;
    }

    .work-preview-header h2 {
        font-size: 3.6rem;
    }

    .work-demo-stage {
        min-height: auto;
        transform: none;
    }

    .demo-surface {
        min-height: 430px;
    }
}

@media (max-width: 760px) {
    .work-preview-section {
        padding: 90px 5%;
    }

    .work-preview-header {
        gap: 22px;
        margin-bottom: 28px;
    }

    .work-card {
        padding: 20px;
    }

    .work-preview-header h2 {
        font-size: 2.55rem;
    }

    .work-mock {
        min-height: 172px;
    }

    .work-demo-tabs {
        gap: 10px;
    }

    .work-demo-tab {
        min-height: 132px;
        padding: 18px;
    }

    .demo-stage-top {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .demo-run {
        width: 100%;
    }

    .demo-stage-grid {
        padding: 14px;
    }

    .demo-surface {
        min-height: auto;
    }

    .demo-product-hero {
        padding: 26px 20px 20px;
    }

    .demo-product-hero h3 {
        font-size: 2rem;
    }

    .demo-primary-metric {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .demo-bars {
        height: 116px;
        margin: 0 20px 20px;
        padding: 16px;
    }

    .demo-process-preview {
        margin: 14px 14px 0;
    }

    .demo-process-main {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .demo-process-track {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0;
    }

    .demo-process-track::before {
        content: "";
        position: absolute;
        left: 21px;
        right: auto;
        top: 26px;
        bottom: 26px;
        width: 1px;
        height: auto;
        background: linear-gradient(180deg, color-mix(in srgb, var(--demo-accent) 68%, transparent), rgba(244,240,232,0.1));
    }

    .demo-process-step {
        min-height: auto;
        padding: 14px 14px 14px 38px;
    }

    .demo-process-step i {
        top: 18px;
        left: 14px;
    }

    .demo-code-top {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .demo-code-top em {
        display: none;
    }

    .demo-code-line {
        font-size: 0.66rem;
    }

    .demo-browser-bar strong {
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-stat::before,
    .signal-graph::before,
    .work-demo-stage.is-switching::after,
    .work-demo-stage.is-running::after,
    .demo-bar,
    .work-demo-stage.is-switching .demo-surface,
    .work-demo-stage.is-switching .demo-side-panel,
    .work-demo-stage.is-running .demo-step i,
    .work-demo-stage.is-running .demo-live i,
    .work-demo-stage.is-running .demo-log-row,
    .work-demo-stage.is-process-open .demo-process-preview {
        animation: none;
    }
}
