/* ===== Hero ===== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 1.5rem 3rem;
    text-align: center;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(99,102,241,.08), transparent 60%),
        radial-gradient(ellipse 55% 45% at 15% 85%, rgba(56,189,248,.06), transparent 55%),
        radial-gradient(ellipse 50% 40% at 85% 80%, rgba(236,72,153,.04), transparent 55%),
        linear-gradient(180deg, #f4f7fd 0%, #eef2ff 100%);
    z-index: -1;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(15,23,42,.05) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 10%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* ── Hero load-in animations ── */
@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes hero-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes hero-scale-up {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.eyebrow {
    animation: hero-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-title {
    animation: hero-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.hero-sub {
    animation: hero-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.hero-cta {
    animation: hero-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.iso-scene {
    animation: hero-scale-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

/* ── Copy ── */
.hero-inner {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    z-index: 30;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 500;
    color: #475569;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
    margin-bottom: 1.75rem;
}

.eyebrow-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}

.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #0b1020;
    margin-bottom: 1.5rem;
}

.grad { color: #00A896; }

.hero-sub {
    font-size: 1.1rem;
    color: #475569;
    max-width: 620px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
}

.hero-sub strong { color: #0b1020; font-weight: 600; }

.hero-cta {
    display: flex;
    gap: .85rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .95rem 1.7rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: .98rem;
    transition: transform .15s, box-shadow .15s, background .15s;
}

.btn-primary { background: #0b1020; color: #fff; box-shadow: 0 8px 24px rgba(11,16,32,.18); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(11,16,32,.25); background: #1e293b; }
.btn-ghost { color: #0b1020; background: #fff; border: 1px solid rgba(15,23,42,.10); }
.btn-ghost:hover { background: #f1f5f9; }

/* ══ Isometric scene ══ */
.iso-scene {
    position: relative;
    width: 100%;
    overflow: visible;
    margin-top: 0;
    perspective: 1800px;
}

/* Fade overlays — sit inside .hero which has overflow:hidden so they clip cleanly */
.iso-fade {
    position: absolute;
    top: 0; bottom: 0;
    width: 0px;
    z-index: 20;
    pointer-events: none;
}

.iso-fade--left  { left: 0;  background: linear-gradient(to right, #f4f7fd 0%, transparent 100%); }
.iso-fade--right { right: 0; background: linear-gradient(to left,  #f4f7fd 0%, transparent 100%); }

.iso-graphic {
    position: relative;
    width: 100%;
    height: 540px;
    transform: rotateX(12deg);
    transform-style: preserve-3d;
}

.iso-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.fl {
    animation: flow 2.8s linear infinite;
    animation-delay: var(--fd, 0s);
}

@keyframes flow {
    from { stroke-dashoffset: 50; }
    to   { stroke-dashoffset: 0; }
}

/* ══ Central 3D Hub ══ */
.iso-hub {
    position: absolute;
    top: 156px;
    left: calc(50% - 105px);
    width: 210px;
    height: 105px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 40% 30%, #e8f4ff 0%, #93c5fd 38%, #1d4ed8 100%);
    box-shadow:
        0  4px 0 #1d4ed8,
        0  8px 0 #1e40af,
        0 12px 0 #1e3a8a,
        0 16px 0 #1e3a8a,
        0 20px 0 #172554,
        0 24px 0 #172554,
        0 28px 0 #172554,
        0 32px 0 #172554,
        0 36px 0 #172554,
        0 48px 62px rgba(29,78,216,.45);
    z-index: 10;
}

.hub-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,.5);
}

.hr1 { width: 160px; height: 80px; }
.hr2 { width: 104px; height: 52px; border-color: rgba(255,255,255,.72); }

.hub-core {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 24px; height: 12px;
    background: rgba(255,255,255,.92);
    border-radius: 50%;
}

/* ══ Tool tiles ══ */
.tool-tile {
    position: absolute;
    width: 64px;
    background: #fff;
    border-radius: 14px;
    padding: 9px 8px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    z-index: 5;
    border: 1px solid rgba(15,23,42,.06);
    box-shadow:
        0 2px 0 #dbeafe,
        0 4px 0 #93c5fd,
        0 6px 0 #60a5fa,
        0 8px 0 #3b82f6,
        0 20px 28px rgba(0,0,0,.10);
    animation: bob 5s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}

.tt-lg { width: 72px; border-radius: 16px; padding: 11px 10px 9px; }
.tt-sm { width: 54px; border-radius: 12px; padding: 7px 6px 5px; }
.tt-xs { width: 46px; border-radius: 10px; padding: 6px 5px 4px; }

.tt-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.tt-icon svg { width: 22px; height: 22px; }
.tt-lg .tt-icon { width: 44px; height: 44px; border-radius: 12px; }
.tt-lg .tt-icon svg { width: 26px; height: 26px; }
.tt-sm .tt-icon { width: 30px; height: 30px; border-radius: 8px; }
.tt-sm .tt-icon svg { width: 17px; height: 17px; }
.tt-xs .tt-icon { width: 26px; height: 26px; border-radius: 7px; }
.tt-xs .tt-icon svg { width: 14px; height: 14px; }

.tool-tile span {
    font-size: .62rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: .02em;
}

.tt-sm span, .tt-xs span { font-size: .56rem; }

/* ══ Dashboard panels ══ */
.dash-panel {
    position: absolute;
    width: 168px;
    height: 172px;
    border-radius: 14px;
    padding: 10px 13px 13px;
    overflow: hidden;
    animation: bob 5s ease-in-out infinite;
    animation-delay: var(--d, 0s);
    transform: rotate(-26deg) skewY(5deg);
    transform-origin: top right;
}

.panel-blue {
    background: #2563eb;
    box-shadow:
        0  3px 0 #1d4ed8,
        0  6px 0 #1e40af,
        0  9px 0 #1e3a8a,
        0 12px 0 #1e3a8a,
        0 15px 0 #172554,
        0 30px 40px rgba(29,78,216,.40);
}

.panel-white {
    background: #fff;
    border: 1px solid rgba(15,23,42,.07);
    box-shadow:
        0  3px 0 #dbeafe,
        0  6px 0 #93c5fd,
        0  9px 0 #3b82f6,
        0 12px 0 #1d4ed8,
        0 30px 40px rgba(0,0,0,.10);
}

.panel-dark {
    background: #0b1020;
    box-shadow:
        0  3px 0 #1e293b,
        0  6px 0 #334155,
        0  9px 0 #1e293b,
        0 12px 0 #0f172a,
        0 30px 40px rgba(0,0,0,.22);
}

.panel-dark .dash-title { color: #f8fafc; }

/* Agent activity rows */
.agent-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.ag-dot {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .58rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.ag-text {
    flex: 1;
    font-size: .62rem;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-time {
    font-size: .58rem;
    color: rgba(255,255,255,.35);
    flex-shrink: 0;
}

.dash-topbar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.dash-dot { width: 8px; height: 8px; border-radius: 50%; display: block; }

/* Icon grid (white panel) */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 28px);
    gap: 4px;
    margin-bottom: 8px;
}

.icon-grid span {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: block;
    opacity: .88;
}

.dash-title {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .01em;
    margin-bottom: 8px;
}

.panel-blue  .dash-title { color: #fff; }
.panel-white .dash-title { color: #0b1020; }

/* Blue panel rows */
.dash-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .64rem;
    color: rgba(255,255,255,.85);
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.dash-row:last-of-type { border: none; }
.dash-check { color: #86efac; font-size: .68rem; flex-shrink: 0; }
.in-prog { color: rgba(255,255,255,.5); }

.dash-spin {
    display: inline-block;
    animation: spin 1.5s linear infinite;
    font-size: .68rem;
}

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

/* Progress bar (blue panel) */
.dash-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.dp-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
    overflow: hidden;
}

.dp-fill {
    height: 100%;
    background: #86efac;
    border-radius: 2px;
}

.dp-pct {
    font-size: .6rem;
    font-weight: 700;
    color: rgba(255,255,255,.8);
}

/* White panel metrics */
.dash-metric {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
}

.dash-metric:last-child { margin-bottom: 0; }

.metric-label {
    font-size: .58rem;
    color: #64748b;
    width: 48px;
    flex-shrink: 0;
    line-height: 1.2;
}

.metric-bar {
    flex: 1;
    height: 5px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.metric-fill { height: 100%; border-radius: 3px; }

.metric-val {
    font-size: .62rem;
    font-weight: 700;
    color: #0b1020;
    width: 18px;
    text-align: right;
}

@keyframes bob {
    0%, 100% { translate: 0 0; }
    50%       { translate: 0 -10px; }
}

/* ══ Stats ══ */
.hero-stats-wrap {
    position: relative;
    z-index: 3;
    padding-top: 1rem;
}

.hero-stats {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.75rem 0;
    border-top: 1px solid rgba(15,23,42,.08);
    max-width: 600px;
    margin: 0 auto;
}

.hero-stats li { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-size: 1.7rem; font-weight: 700; color: #0b1020; letter-spacing: -.02em; }
.hero-stats span { font-size: .82rem; color: #64748b; margin-top: .15rem; }

/* ══ Toggle Switch ══ */
.switch {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 3.5em;
    height: 2em;
    transform-style: preserve-3d;
    perspective: 500px;
    animation: toggle__animation 3s infinite;
    vertical-align: middle;
    margin: 0 .35em;
    cursor: pointer;
}

.switch::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    filter: blur(20px);
    z-index: -1;
    border-radius: 50px;
    background-color: #d8ff99;
    background-image:
        radial-gradient(at 21% 46%, hsla(183,65%,60%,1) 0px, transparent 50%),
        radial-gradient(at 23% 25%, hsla(359,74%,70%,1) 0px, transparent 50%),
        radial-gradient(at 20%  1%, hsla(267,83%,75%,1) 0px, transparent 50%),
        radial-gradient(at 86% 87%, hsla(204,69%,68%,1) 0px, transparent 50%),
        radial-gradient(at 99% 41%, hsla(171,72%,77%,1) 0px, transparent 50%),
        radial-gradient(at 55% 24%, hsla(138,60%,62%,1) 0px, transparent 50%);
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #fdfefedc;
    transition: .4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    left: 0.3em;
    bottom: 0.35em;
    transition: .4s;
    border-radius: 50%;
    box-shadow: rgba(0,0,0,.17) 0px -10px 10px 0px inset, rgba(0,0,0,.09) 0px -1px 15px -8px;
    background-color: #ff99fd;
    background-image:
        radial-gradient(at 81% 39%, hsla(327,79%,79%,1) 0px, transparent 50%),
        radial-gradient(at 11% 72%, hsla(264,64%,79%,1) 0px, transparent 50%),
        radial-gradient(at 23% 20%, hsla(75,98%,71%,1) 0px, transparent 50%);
}

.input__check:checked + .slider { background-color: #17202A; }
.input__check:checked + .slider:before { transform: translateX(1.5em); }

@keyframes toggle__animation {
    0%, 100% { transform: translateY(-10px) rotateX(15deg) rotateY(-20deg); }
    50%       { transform: translateY(0px)  rotateX(15deg) rotateY(-20deg); }
}

/* ══ Diagram Active State (toggle ON) ══ */
.fl {
    transition: stroke .35s ease, stroke-width .35s ease, filter .35s ease;
}

.fl.lit {
    stroke: #6366f1;
    stroke-width: 2.4;
    stroke-dasharray: 6 4;
    filter: drop-shadow(0 0 5px rgba(99,102,241,.75));
}

.dash-panel {
    transition: box-shadow .4s ease, outline .4s ease;
}

.dash-panel.card-lit {
    outline: 1.5px solid rgba(34,211,238,.7);
    box-shadow:
        0 0 0 3px rgba(34,211,238,.15),
        0 0 18px 4px rgba(34,211,238,.25);
    animation: bob 5s ease-in-out infinite, card-glow 2s ease-in-out infinite;
    animation-delay: var(--d, 0s), 0s;
}


@keyframes card-glow {
    0%, 100% { outline-color: rgba(34,211,238,.4); box-shadow: 0 0 0 3px rgba(34,211,238,.1), 0 0 18px 4px rgba(34,211,238,.2); }
    50%       { outline-color: rgba(34,211,238,.9); box-shadow: 0 0 0 5px rgba(34,211,238,.2), 0 0 28px 8px rgba(34,211,238,.4); }
}

.iso-scene.diagram-active .iso-hub {
    animation: hub-pulse 2s ease-in-out infinite;
}

@keyframes hub-pulse {
    0%, 100% { box-shadow:
        0  4px 0 #1d4ed8, 0  8px 0 #1e40af, 0 12px 0 #1e3a8a,
        0 16px 0 #1e3a8a, 0 20px 0 #172554, 0 24px 0 #172554,
        0 28px 0 #172554, 0 32px 0 #172554, 0 36px 0 #172554,
        0 48px 62px rgba(29,78,216,.45),
        0 0 0 0 rgba(99,102,241,0); }
    50% { box-shadow:
        0  4px 0 #1d4ed8, 0  8px 0 #1e40af, 0 12px 0 #1e3a8a,
        0 16px 0 #1e3a8a, 0 20px 0 #172554, 0 24px 0 #172554,
        0 28px 0 #172554, 0 32px 0 #172554, 0 36px 0 #172554,
        0 48px 62px rgba(29,78,216,.45),
        0 0 0 28px rgba(99,102,241,.18); }
}

/* ══ Responsive ══ */
@media (max-width: 1024px) {
    .iso-scene { display: none; }
}

@media (max-width: 768px) {
    .hero { padding: 0.75rem 1rem 2rem; }
    .eyebrow { margin-bottom: 1rem; }
}
