/* ============================================================
   BITS AI page — engineering-blueprint theme
   Scope: everything lives under .ai-page
   Color semantics:
     blue  #416FB8  = structure (what we build)
     cyan  #6ADCF0  = data in motion (every animated flow)
     gold  #F8C346  = human / decision / outcome moments
   ============================================================ */

.ai-page {
    --ai-ink: #0B1220;
    --ai-navy: #192333;
    --ai-panel: #101A2C;
    --ai-blue: #416FB8;
    --ai-blue-soft: rgba(65, 111, 184, 0.16);
    --ai-cyan: #6ADCF0;
    --ai-gold: #F8C346;
    --ai-text: #E8EEF9;
    --ai-mist: #A8B6CE;
    --ai-line: rgba(106, 220, 240, 0.14);
    --ai-hairline: rgba(168, 182, 206, 0.18);
    --ai-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;

    background-color: var(--ai-ink);
    color: var(--ai-text);
    font-family: 'Inter', system-ui, sans-serif;
    position: relative;
    /* NOTE: no overflow-x here — it would turn .ai-page into a scroll container
       and silently disable position:sticky for the sub-navigation. Elements that
       could bleed sideways (hero glow, blog rows) are constrained individually. */
}

/* faint blueprint grid over the whole page */
.ai-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(106, 220, 240, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 220, 240, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.9));
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.9));
}

.ai-page * {
    box-sizing: border-box;
}

.ai-section {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 80px 32px;
}

.ai-section-tight {
    padding-top: 52px;
    padding-bottom: 52px;
}

/* keep anchored sections clear of the fixed site header */
.ai-page section[id] {
    scroll-margin-top: 96px;
}

/* ---------- AI sub-navigation ---------- */

/* full-width bar, links aligned to the 1320px content column */
.ai-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px max(32px, calc((100% - 1320px) / 2 + 32px));
    position: sticky;
    top: 78px;
    z-index: 40;
    background: rgba(11, 18, 32, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ai-hairline);
}

/* ---------- site header (global, used on all pages) ---------- */

/* Fixed, always dark. The AI sub-navigation sticks directly beneath it, so this
   bar's height and the .ai-subnav `top` offset must stay in sync (78px). */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: rgba(11, 18, 32, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(168, 182, 206, 0.18);
    font-family: 'Inter', system-ui, sans-serif;
}

.header-bar-inner {
    max-width: 1320px;
    height: 78px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-bar-logo img {
    height: 38px;
    display: block;
}

.header-bar-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-bar-nav > a,
.header-bar-nav > .header-bar-item > a {
    color: #E8EEF9;
    font-size: 0.94rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s ease;
    white-space: nowrap;
}

.header-bar-nav a:hover {
    color: #6ADCF0;
}

.header-bar-nav a.header-bar-active {
    color: #6ADCF0;
}

/* dropdown trigger */
.header-bar-item {
    position: relative;
}

.header-bar-item > a::after {
    content: "";
    display: inline-block;
    margin-left: 7px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    transform: translateY(2px);
}

.header-bar .ai-nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s ease, visibility 0.16s ease;
}

.header-bar-item:hover .ai-nav-dropdown,
.header-bar-item:focus-within .ai-nav-dropdown {
    opacity: 1;
    visibility: visible;
}

/* primary call to action */
.header-bar-cta {
    background: #F8C346;
    color: #0B1220 !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease;
}

.header-bar-cta:hover {
    background: #6ADCF0;
    color: #0B1220 !important;
}

/* language switch */
.header-bar-lang {
    font-family: var(--ai-mono, ui-monospace, monospace);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #A8B6CE !important;
    border: 1px solid rgba(168, 182, 206, 0.28);
    border-radius: 99px;
    padding: 6px 12px;
    text-decoration: none;
}

.header-bar-lang:hover {
    color: #6ADCF0 !important;
    border-color: rgba(106, 220, 240, 0.45);
}

/* mobile */
.header-bar-burger {
    display: none;
    background: none;
    border: none;
    color: #E8EEF9;
    padding: 8px;
    cursor: pointer;
}

.header-bar-mobile {
    display: none;
    flex-direction: column;
    gap: 2px;
    background: #0B1220;
    border-bottom: 1px solid rgba(168, 182, 206, 0.18);
    padding: 12px 32px 20px;
}

.header-bar-mobile.open {
    display: flex;
}

.header-bar-mobile a {
    color: #E8EEF9;
    text-decoration: none;
    padding: 11px 0;
    font-size: 0.96rem;
}

.header-bar-mobile a:hover {
    color: #6ADCF0;
}

.header-bar-mobile .header-bar-mobile-sub {
    padding-left: 16px;
    font-size: 0.9rem;
    color: #A8B6CE;
}

@media (max-width: 1024px) {
    .header-bar-nav,
    .header-bar-actions {
        display: none;
    }

    .header-bar-burger {
        display: block;
    }

    /* Sticky rather than fixed on mobile: the bar then occupies flow space, so
       opening the menu pushes the page down instead of covering it. The closed
       bar is still 78px tall, so .ai-subnav keeps its 78px offset. */
    .header-bar {
        position: sticky;
    }

    .wrapper {
        padding-top: 0;
    }
}

/* NOTE: the offset that keeps page content clear of this fixed header lives on
   .wrapper in app.css. Keep .wrapper's padding-top equal to .header-bar's height. */

/* header dropdown listing the AI subpages */
.header-bar .ai-nav-dropdown {
    width: 240px !important;
    background: #101A2C;
    border: 1px solid rgba(168, 182, 206, 0.25);
    border-radius: 10px;
    padding: 8px 0;
}

.header-bar .ai-nav-dropdown a {
    display: block;
    color: #E8EEF9;
    padding: 9px 18px;
    font-size: 0.9rem;
    text-decoration: none;
}

.header-bar .ai-nav-dropdown a:hover {
    color: #6ADCF0;
    background: rgba(106, 220, 240, 0.08);
}

.ai-subnav a {
    font-family: var(--ai-mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ai-mist);
    border: 1px solid var(--ai-hairline);
    border-radius: 99px;
    padding: 8px 16px;
    background: rgba(16, 26, 44, 0.8);
    transition: color 0.18s ease, border-color 0.18s ease;
}

.ai-subnav a:hover {
    color: var(--ai-cyan);
    border-color: rgba(106, 220, 240, 0.45);
}

.ai-subnav a.ai-subnav-active {
    color: var(--ai-cyan);
    border-color: rgba(106, 220, 240, 0.6);
    background: rgba(106, 220, 240, 0.08);
}

/* ---------- "read more" teaser link ---------- */

.ai-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ai-mono);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--ai-cyan) !important;
    margin-top: 26px;
    border-bottom: 1px solid rgba(106, 220, 240, 0.35);
    padding-bottom: 3px;
    transition: border-color 0.18s ease;
}

.ai-more::after {
    content: "→";
}

.ai-more:hover {
    border-color: var(--ai-cyan);
}

/* ---------- compact framework strip (entry page) ---------- */

.ai-fw-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.ai-fw-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ai-text);
    border: 1px solid var(--ai-hairline);
    border-radius: 12px;
    padding: 10px 16px;
    background: linear-gradient(165deg, rgba(25, 35, 51, 0.72), rgba(11, 18, 32, 0.9));
}

.ai-fw-pill svg {
    width: 18px;
    height: 18px;
    stroke: var(--ai-blue);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai-fw-pill-own {
    border-color: rgba(248, 195, 70, 0.5);
}

.ai-fw-pill-own svg {
    stroke: var(--ai-gold);
}

/* ---------- type ---------- */

.ai-eyebrow {
    font-family: var(--ai-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ai-cyan);
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
}

.ai-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--ai-cyan);
    opacity: 0.7;
    flex: none;
}

.ai-h1 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(2.3rem, 4.6vw, 3.7rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ai-text);
    margin: 0 0 24px;
}

.ai-h1 .ai-accent {
    color: var(--ai-cyan);
}

.ai-h2 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--ai-text);
    margin: 0 0 18px;
}

.ai-h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.12rem;
    color: var(--ai-text);
    margin: 0 0 8px;
}

.ai-lead {
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    line-height: 1.65;
    color: var(--ai-mist);
    max-width: 560px;
    margin: 0 0 34px;
}

.ai-body {
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--ai-mist);
    margin: 0;
}

.ai-page a {
    color: var(--ai-cyan);
    text-decoration: none;
}

/* ---------- buttons ---------- */

.ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 13px 22px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.ai-btn-primary {
    background: var(--ai-gold);
    color: #1A1405 !important;
}

.ai-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(248, 195, 70, 0.28);
    color: #1A1405;
}

.ai-btn-ghost {
    background: transparent;
    border-color: rgba(106, 220, 240, 0.45);
    color: var(--ai-cyan) !important;
}

.ai-btn-ghost:hover {
    background: rgba(106, 220, 240, 0.08);
    transform: translateY(-2px);
    color: var(--ai-cyan);
}

/* ---------- hero ---------- */

.ai-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding-top: 88px;
    padding-bottom: 64px;
}

.ai-hero-glow {
    position: absolute;
    top: -120px;
    right: 0;
    width: 640px;
    height: 640px;
    max-width: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(65, 111, 184, 0.28) 0%, rgba(65, 111, 184, 0) 62%);
    pointer-events: none;
}

.ai-hero-sub {
    font-family: var(--ai-mono);
    font-size: 0.82rem;
    color: var(--ai-mist);
    letter-spacing: 0.04em;
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.ai-hero-sub span::before {
    content: "▸ ";
    color: var(--ai-cyan);
}

/* ---------- 3D backdrop (hidden background graphs) ---------- */

.ai-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.45;
}

.ai-backdrop svg {
    width: 100%;
    height: 100%;
}

.ai-bd-plane {
    fill: rgba(65, 111, 184, 0.04);
    stroke: rgba(106, 220, 240, 0.14);
    stroke-width: 1;
}

.ai-bd-links path {
    fill: none;
    stroke: rgba(106, 220, 240, 0.12);
    stroke-width: 1;
}

.ai-bd-edges path {
    fill: none;
    stroke: rgba(106, 220, 240, 0.10);
    stroke-width: 1;
    stroke-dasharray: 2 6;
}

.ai-bd-nodes circle {
    fill: rgba(106, 220, 240, 0.45);
}

.ai-bd-layer {
    animation: ai-drift 14s ease-in-out infinite;
}

.ai-bd-layer-2 {
    animation-duration: 18s;
    animation-delay: -6s;
}

.ai-bd-layer-3 {
    animation-duration: 22s;
    animation-delay: -11s;
}

@keyframes ai-drift {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* subtle 3D tilt for featured diagram panels */
.ai-panel-3d {
    transform: perspective(1500px) rotateX(4deg) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.ai-panel-3d:hover {
    transform: perspective(1500px) rotateX(0deg) rotateY(0deg);
}

/* ---------- diagram panels ---------- */

.ai-diagram-panel {
    position: relative;
    border: 1px solid var(--ai-hairline);
    border-radius: 18px;
    background:
        linear-gradient(rgba(106, 220, 240, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 220, 240, 0.045) 1px, transparent 1px),
        linear-gradient(160deg, rgba(16, 26, 44, 0.92), rgba(11, 18, 32, 0.96));
    background-size: 32px 32px, 32px 32px, cover;
    padding: 26px;
    box-shadow: 0 24px 70px rgba(4, 8, 18, 0.55);
}

.ai-diagram-panel svg {
    display: block;
    width: 100%;
    height: auto;
}

.ai-diagram-caption {
    font-family: var(--ai-mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: rgba(168, 182, 206, 0.75);
    margin: 18px 4px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* SVG vocabulary — shared by every diagram on the page */

.ai-node {
    fill: rgba(16, 26, 44, 0.9);
    stroke: var(--ai-blue);
    stroke-width: 1.3;
}

.ai-node-soft {
    fill: var(--ai-blue-soft);
    stroke: rgba(65, 111, 184, 0.75);
    stroke-width: 1.1;
}

.ai-node-gold {
    fill: rgba(248, 195, 70, 0.10);
    stroke: var(--ai-gold);
    stroke-width: 1.3;
}

.ai-node-cyan {
    fill: rgba(106, 220, 240, 0.08);
    stroke: var(--ai-cyan);
    stroke-width: 1.2;
}

.ai-edge {
    fill: none;
    stroke: rgba(168, 182, 206, 0.4);
    stroke-width: 1.2;
}

.ai-edge-flow {
    fill: none;
    stroke: var(--ai-cyan);
    stroke-width: 1.4;
    stroke-dasharray: 5 9;
    opacity: 0.75;
    animation: ai-flow 1.6s linear infinite;
}

.ai-edge-flow-slow {
    animation-duration: 2.6s;
}

.ai-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 13px;
    fill: var(--ai-text);
}

.ai-label-strong {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 14.5px;
    fill: var(--ai-text);
}

.ai-micro {
    font-family: var(--ai-mono);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    fill: rgba(168, 182, 206, 0.85);
}

.ai-micro-cyan {
    fill: var(--ai-cyan);
}

.ai-micro-gold {
    fill: var(--ai-gold);
}

.ai-packet {
    fill: var(--ai-cyan);
    filter: drop-shadow(0 0 4px rgba(106, 220, 240, 0.9));
}

.ai-packet-gold {
    fill: var(--ai-gold);
    filter: drop-shadow(0 0 4px rgba(248, 195, 70, 0.9));
}

.ai-pulse {
    animation: ai-pulse 2.4s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes ai-flow {
    to {
        stroke-dashoffset: -28;
    }
}

@keyframes ai-pulse {

    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }
}

/* ---------- spectrum rail ---------- */

.ai-rail-wrap {
    position: relative;
}

/* the rail connects the step dots, so it ends at the last dot — not at the edge.
   4 columns with a 22px gap: the last dot centre sits at 25% of the wrap minus
   ~28px, measured from the right edge. */
.ai-rail-line {
    position: absolute;
    top: 27px;
    left: 12px;
    right: calc(25% - 28px);
    height: 2px;
    background: repeating-linear-gradient(90deg,
            rgba(106, 220, 240, 0.55) 0 7px,
            transparent 7px 16px);
    background-size: 32px 2px;
    animation: ai-rail-flow 1.4s linear infinite;
}

@keyframes ai-rail-flow {
    to {
        background-position: 32px 0;
    }
}

.ai-rail {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: 36px;
}

.ai-rail-step {
    position: relative;
    padding-top: 58px;
}

.ai-rail-dot {
    position: absolute;
    top: 16px;
    left: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--ai-cyan);
    background: var(--ai-ink);
}

.ai-rail-dot::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--ai-cyan);
    animation: ai-pulse 2.4s ease-in-out infinite;
}

.ai-rail-step:last-child .ai-rail-dot {
    border-color: var(--ai-gold);
}

.ai-rail-step:last-child .ai-rail-dot::after {
    background: var(--ai-gold);
}

.ai-rail-index {
    font-family: var(--ai-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    color: var(--ai-cyan);
    display: block;
    margin-bottom: 8px;
}

/* ---------- generic cards ---------- */

.ai-card {
    border: 1px solid var(--ai-hairline);
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(25, 35, 51, 0.72), rgba(11, 18, 32, 0.9));
    padding: 26px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-card:hover {
    transform: translateY(-4px);
    border-color: rgba(106, 220, 240, 0.45);
    box-shadow: 0 18px 44px rgba(4, 8, 18, 0.5);
}

/* cards that are themselves links: keep the call to action on one baseline
   regardless of how much copy each card carries */
a.ai-card {
    display: flex;
    flex-direction: column;
}

a.ai-card .ai-more {
    margin-top: auto;
    padding-top: 26px;
    align-self: flex-start;
}

/* ---------- split layout (text + diagram) ---------- */

.ai-split {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: center;
}

.ai-split-reverse {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.ai-checklist {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.ai-checklist li {
    position: relative;
    padding-left: 30px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ai-mist);
}

.ai-checklist li strong {
    color: var(--ai-text);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-weight: normal;
}

.ai-checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--ai-cyan);
    border-radius: 4px;
    background: rgba(106, 220, 240, 0.12);
}

/* ---------- framework grid ---------- */

.ai-fw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 36px;
}

.ai-fw-card {
    position: relative;
    border: 1px solid var(--ai-hairline);
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(25, 35, 51, 0.72), rgba(11, 18, 32, 0.9));
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.ai-fw-card:hover {
    transform: translateY(-4px);
    border-color: rgba(106, 220, 240, 0.5);
}

.ai-fw-card:hover .ai-fw-mark svg {
    stroke: var(--ai-cyan);
}

.ai-fw-mark {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--ai-hairline);
    background: rgba(65, 111, 184, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.ai-fw-mark svg {
    width: 24px;
    height: 24px;
    stroke: var(--ai-blue);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s ease;
}

.ai-fw-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: var(--ai-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(168, 182, 206, 0.7);
    border: 1px solid var(--ai-hairline);
    border-radius: 99px;
    padding: 4px 10px;
}

/* outlook cards have no icon, so the tag flows above the heading instead of
   floating over it */
.ai-outlook-card .ai-fw-tag {
    position: static;
    display: inline-block;
    margin-bottom: 14px;
}

.ai-fw-own {
    border-color: rgba(248, 195, 70, 0.5);
}

.ai-fw-own .ai-fw-tag {
    color: var(--ai-gold);
    border-color: rgba(248, 195, 70, 0.5);
}

.ai-fw-own .ai-fw-mark {
    border-color: rgba(248, 195, 70, 0.5);
    background: rgba(248, 195, 70, 0.08);
}

.ai-fw-own .ai-fw-mark svg {
    stroke: var(--ai-gold);
}

/* ---------- quality promise ---------- */

.ai-promise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: 36px;
}

/* three-up variant — as a class, never an inline style, so the breakpoints below
   can still collapse it */
.ai-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ai-promise-word {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    color: var(--ai-text);
    display: block;
    margin-bottom: 10px;
}

.ai-promise-word::after {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    margin-top: 10px;
    background: var(--ai-cyan);
}

.ai-card:last-child .ai-promise-word::after {
    background: var(--ai-gold);
}

/* 3D depth slab behind peer cards (their private background graph) */
.ai-depth-card {
    fill: rgba(65, 111, 184, 0.07);
    stroke: rgba(106, 220, 240, 0.25);
    stroke-width: 1;
    stroke-dasharray: 3 5;
}

.ai-depth-edge {
    stroke: rgba(106, 220, 240, 0.25);
    stroke-width: 1;
}

/* mini private-graph glyph inside peer nodes */
.ai-pd-mini circle {
    fill: rgba(106, 220, 240, 0.55);
}

.ai-pd-mini path {
    fill: none;
    stroke: rgba(106, 220, 240, 0.35);
    stroke-width: 0.8;
}

/* ---------- use cases ---------- */

.ai-case {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    border: 1px solid var(--ai-hairline);
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(25, 35, 51, 0.72), rgba(11, 18, 32, 0.9));
    padding: 32px;
    margin-top: 24px;
    transition: border-color 0.2s ease;
}

.ai-case:hover {
    border-color: rgba(106, 220, 240, 0.4);
}

.ai-case-index {
    font-family: var(--ai-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ai-cyan);
    display: block;
    margin-bottom: 14px;
}

.ai-case .ai-h3 {
    font-size: 1.3rem;
}

.ai-case-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.ai-chip {
    font-family: var(--ai-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--ai-mist);
    border: 1px solid var(--ai-hairline);
    border-radius: 99px;
    padding: 6px 14px;
    background: rgba(16, 26, 44, 0.8);
}

.ai-chip-gold {
    color: var(--ai-gold);
    border-color: rgba(248, 195, 70, 0.5);
}

.ai-chip-cyan {
    color: var(--ai-cyan);
    border-color: rgba(106, 220, 240, 0.5);
}

.ai-case-diagram {
    border: 1px solid var(--ai-hairline);
    border-radius: 14px;
    background:
        linear-gradient(rgba(106, 220, 240, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 220, 240, 0.04) 1px, transparent 1px),
        rgba(11, 18, 32, 0.6);
    background-size: 26px 26px, 26px 26px, cover;
    padding: 18px;
}

.ai-case-diagram svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- decision trees ---------- */

.ai-tree-block {
    margin-top: 44px;
}

.ai-tree-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--ai-text);
    margin: 0 0 6px;
}

.ai-tree-sub {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ai-mist);
    margin: 0 0 22px;
    max-width: 720px;
}

.ai-tree-notes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 28px;
    margin-top: 24px;
}

.ai-tree-notes .ai-body strong {
    color: var(--ai-text);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-weight: normal;
}

/* ---------- standards strip ---------- */

.ai-standards {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.ai-standard {
    font-family: var(--ai-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--ai-text);
    border: 1px solid var(--ai-hairline);
    border-radius: 99px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 26, 44, 0.8);
}

.ai-standard i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ai-cyan);
    animation: ai-pulse 2.4s ease-in-out infinite;
}

/* ---------- process ---------- */

.ai-process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: 36px;
    counter-reset: ai-step;
}

.ai-process-step {
    position: relative;
    border-top: 1px solid var(--ai-hairline);
    padding-top: 22px;
}

.ai-process-step::before {
    counter-increment: ai-step;
    content: "0" counter(ai-step);
    font-family: var(--ai-mono);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    color: var(--ai-gold);
    display: block;
    margin-bottom: 12px;
}

/* ---------- CTA band ---------- */

.ai-cta-band {
    position: relative;
    border: 1px solid rgba(248, 195, 70, 0.35);
    border-radius: 20px;
    padding: 64px 48px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% -30%, rgba(248, 195, 70, 0.14), transparent 55%),
        linear-gradient(165deg, rgba(25, 35, 51, 0.85), rgba(11, 18, 32, 0.95));
    overflow: hidden;
}

.ai-cta-band .ai-lead {
    margin-left: auto;
    margin-right: auto;
}

.ai-cta-band .ai-actions {
    justify-content: center;
}

/* ---------- blog explainer animation (step-through board) ---------- */

.blog-anim {
    margin: 28px 0;
}

.blog-anim .ai-diagram-panel {
    padding: 18px;
}

.blog-anim .bsx {
    opacity: 0.22;
    transition: opacity 0.45s ease;
}

.blog-anim.step-0 .s0,
.blog-anim.step-1 .s1,
.blog-anim.step-2 .s2,
.blog-anim.step-3 .s3 {
    opacity: 1;
}

.blog-anim-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    font-family: var(--ai-mono, ui-monospace, monospace);
}

.blog-anim-bar button {
    background: rgba(16, 26, 44, 0.9);
    border: 1px solid rgba(168, 182, 206, 0.25);
    color: #6ADCF0;
    border-radius: 8px;
    min-width: 34px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.blog-anim-bar button:disabled {
    opacity: 0.35;
    cursor: default;
}

.blog-anim-caption {
    color: #A8B6CE !important;
    font-size: 0.84rem;
    flex: 1;
    margin: 0 !important;
}

.blog-anim-count {
    color: rgba(168, 182, 206, 0.6);
    font-size: 0.75rem;
    white-space: nowrap;
}

/* ---------- footer (global, used on all pages) ---------- */

.ai-footer {
    background: #0B1220;
    border-top: 1px solid rgba(168, 182, 206, 0.18);
    color: #A8B6CE;
    font-family: 'Inter', system-ui, sans-serif;
}

.ai-footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 44px 32px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 28px 56px;
    align-items: flex-start;
    justify-content: space-between;
}

.ai-footer-brand img {
    height: 40px;
    margin-bottom: 12px;
}

.ai-footer-brand p {
    font-size: 0.88rem;
    margin: 0;
    max-width: 320px;
    color: #A8B6CE;
    font-weight: normal !important;
}

.ai-footer-links,
.ai-footer-legal {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-footer-links strong,
.ai-footer-legal strong {
    font-family: var(--ai-mono, ui-monospace, monospace);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6ADCF0;
    font-weight: 500;
    margin-bottom: 2px;
}

.ai-footer-links span {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #A8B6CE;
}

.ai-footer a {
    color: #E8EEF9;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.18s ease;
}

.ai-footer a:hover {
    color: #6ADCF0;
}

.ai-footer-legal a {
    color: #A8B6CE;
}

.ai-footer-bottom {
    border-top: 1px solid rgba(168, 182, 206, 0.12);
    text-align: center;
    padding: 16px 32px;
    font-size: 0.8rem;
    color: rgba(168, 182, 206, 0.7);
}

/* ---------- error page ---------- */

.ai-error-code {
    font-family: var(--ai-mono);
    font-size: clamp(4rem, 14vw, 8rem);
    line-height: 1;
    color: rgba(106, 220, 240, 0.22);
    margin: 0 0 8px;
}

/* ---------- legal pages ---------- */

/* Imprint, privacy and tenant privacy keep their original markup — the wording is
   legally reviewed and must not be edited to change colours. These rules restyle
   the light Tailwind utilities in place; utility classes carry a single-class
   specificity, so scoping under .ai-legal is enough to win. */

.ai-legal {
    background: var(--ai-ink);
    color: var(--ai-text);
}

.ai-legal section {
    background: transparent !important;
}

.ai-legal h1,
.ai-legal h2,
.ai-legal h3,
.ai-legal h4 {
    color: var(--ai-text) !important;
}

.ai-legal p,
.ai-legal li,
.ai-legal td,
.ai-legal th,
.ai-legal span {
    color: var(--ai-mist) !important;
}

.ai-legal strong,
.ai-legal .font-semibold,
.ai-legal .font-bold {
    color: var(--ai-text) !important;
}

/* content boxes */
.ai-legal .bg-gray-100,
.ai-legal .bg-white,
.ai-legal .bg-gray-50 {
    background: var(--ai-panel) !important;
    border: 1px solid var(--ai-hairline);
}

/* language-switch / info callouts */
.ai-legal .bg-blue-50 {
    background: rgba(65, 111, 184, 0.14) !important;
    border-color: rgba(106, 220, 240, 0.35) !important;
}

/* "your rights" style highlights */
.ai-legal .bg-green-50 {
    background: rgba(106, 220, 240, 0.08) !important;
    border-color: rgba(106, 220, 240, 0.32) !important;
}

.ai-legal .border-gray-200,
.ai-legal .border-gray-100,
.ai-legal .border-blue-200,
.ai-legal .border-green-200 {
    border-color: var(--ai-hairline) !important;
}

.ai-legal a {
    color: var(--ai-cyan) !important;
}

.ai-legal a:hover {
    color: #A6E9F7 !important;
}

.ai-legal .border-l-4 {
    border-left-color: var(--ai-blue) !important;
}

/* ---------- reveal on scroll ---------- */
/* Hidden state only applies when ai.js has run (it adds .ai-js to <html>),
   so no-JS visitors and crawlers always see the content. */

.ai-js .ai-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.ai-js .ai-reveal.in-view {
    opacity: 1;
    transform: none;
}

.ai-reveal-d1 {
    transition-delay: 0.08s;
}

.ai-reveal-d2 {
    transition-delay: 0.16s;
}

.ai-reveal-d3 {
    transition-delay: 0.24s;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {

    .ai-hero,
    .ai-split,
    .ai-split-reverse,
    .ai-case {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .ai-case {
        gap: 28px;
    }

    .ai-tree-notes {
        grid-template-columns: 1fr;
    }

    .ai-fw-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-process,
    .ai-rail {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-promise-grid,
    .ai-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-rail-line {
        display: none;
    }
}

@media (max-width: 600px) {
    .ai-section {
        padding: 72px 20px;
    }

    .ai-hero {
        padding-top: 80px;
    }

    .ai-fw-grid,
    .ai-process,
    .ai-rail,
    .ai-promise-grid,
    .ai-grid-3 {
        grid-template-columns: 1fr;
    }

    .ai-cta-band {
        padding: 48px 24px;
    }

    .ai-diagram-panel {
        padding: 16px;
    }

    /* one scrollable row instead of four stacked rows eating the screen */
    .ai-subnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 8px 20px;
    }

    .ai-subnav::-webkit-scrollbar {
        display: none;
    }

    .ai-subnav a {
        white-space: nowrap;
        flex: none;
    }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

    .ai-page .ai-edge-flow,
    .ai-page .ai-rail-line,
    .ai-page .ai-pulse,
    .ai-page .ai-rail-dot::after,
    .ai-page .ai-standard i,
    .ai-page .ai-bd-layer {
        animation: none;
    }

    .ai-panel-3d {
        transition: none;
    }

    .ai-page .ai-packet,
    .ai-page .ai-packet-gold {
        display: none;
    }

    .ai-js .ai-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .ai-btn,
    .ai-card,
    .ai-fw-card {
        transition: none;
    }
}

/* ---------- blog: listing ---------- */

.ai-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ai-post-card {
    display: block;
    border: 1px solid var(--ai-hairline);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(25, 35, 51, 0.72), rgba(11, 18, 32, 0.9));
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ai-post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(106, 220, 240, 0.45);
}

.ai-post-card img {
    display: block;
    width: 100%;
    aspect-ratio: 8 / 5;
    object-fit: cover;
    border-bottom: 1px solid var(--ai-hairline);
}

.ai-post-body {
    padding: 20px 22px 24px;
}

.ai-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-family: var(--ai-mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: rgba(168, 182, 206, 0.8);
    margin: 0 0 10px;
}

.ai-post-meta span:nth-child(2) {
    color: var(--ai-gold);
    text-transform: uppercase;
}

.ai-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
    font-family: var(--ai-mono);
    font-size: 0.72rem;
    color: var(--ai-cyan);
}

.ai-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 42px;
}

.ai-pager a {
    min-width: 38px;
    text-align: center;
    padding: 8px 12px;
    border: 1px solid var(--ai-hairline);
    border-radius: 8px;
    font-family: var(--ai-mono);
    font-size: 0.82rem;
    color: var(--ai-mist) !important;
    text-decoration: none;
}

.ai-pager a:hover {
    color: var(--ai-cyan) !important;
    border-color: rgba(106, 220, 240, 0.45);
}

.ai-pager a.ai-pager-active {
    color: var(--ai-cyan) !important;
    border-color: rgba(106, 220, 240, 0.6);
    background: rgba(106, 220, 240, 0.08);
}

/* ---------- blog: article ---------- */

.ai-article {
    max-width: 820px;
}

.ai-back {
    display: inline-block;
    font-family: var(--ai-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--ai-cyan) !important;
    margin-bottom: 22px;
    text-decoration: none;
}

.ai-back::before {
    content: "← ";
}

.ai-article .ai-h3 {
    font-size: 1.32rem;
    margin: 40px 0 12px !important;
}

.ai-article .ai-body {
    margin-bottom: 16px;
}

.ai-article .ai-lead {
    max-width: none;
}

.ai-sources {
    margin: 0;
    padding-left: 20px;
    color: var(--ai-mist);
    font-size: 0.92rem;
    line-height: 1.8;
}

.ai-sources a {
    color: var(--ai-cyan) !important;
}

.ai-table-wrap {
    overflow-x: auto;
    margin: 20px 0;
}

.ai-table {
    border-collapse: collapse;
    width: auto;
    min-width: 100%;
    font-size: 0.92rem;
}

.ai-table th,
.ai-table td {
    border: 1px solid var(--ai-hairline);
    padding: 9px 14px;
    text-align: left;
}

.ai-table th {
    background: rgba(16, 26, 44, 0.9);
    color: var(--ai-text);
}

.ai-table td {
    color: var(--ai-mist);
}

@media (max-width: 1024px) {
    .ai-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ai-post-grid {
        grid-template-columns: 1fr;
    }
}

/* gleiche Kartenhöhe: Teaser nach 5 Zeilen abschneiden */
.ai-post-body .ai-body {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
