/* Homepage: cinematic hero + tabbed services, on top of /assets/site.css. */

/* Header: pill buttons like the rest of the new look */
.topbar .btn { border-radius: 999px; }

/* ── Cinematic hero ─────────────────────────────────────── */
.xhero { position: relative; height: clamp(620px, calc(100vh - 72px), 900px); overflow: hidden; background: #050816; color: #fff; isolation: isolate; }
.xhero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.xhero-inner { position: relative; text-align: center; padding-top: clamp(3.5rem, 10vh, 7rem); }
.xhero h1 { color: #fff; font-size: clamp(3rem, 8.4vw, 7.4rem); font-weight: 800; line-height: .98; letter-spacing: -.045em; text-shadow: 0 6px 40px rgba(5, 8, 22, .55); }
.xhero p { margin: 1.4rem auto 0; max-width: 640px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: rgba(255, 255, 255, .86); text-shadow: 0 2px 18px rgba(5, 8, 22, .7); }
.xhero .pill { display: inline-flex; align-items: center; gap: .6rem; margin-top: 2rem; padding: .95rem 1.6rem; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 34px rgba(16, 118, 251, .45); transition: background .2s, transform .2s; }
.xhero .pill:hover { background: var(--blue-600); transform: translateY(-1px); }
.xhero .pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.xhero .pill:hover svg { transform: translateX(3px); }
.xhero-scroll { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, .45); border-radius: 14px; }
.xhero-scroll::after { content: ''; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ── Services as tabs + flow diagram ───────────────────── */
.build { padding: 6.5rem 0 5.5rem; }
.build-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.build-head h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; max-width: 14ch; }
.build-head p { max-width: 460px; font-size: 1.08rem; }
.build-grid { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start; }
.tabs { list-style: none; background: #0E1222; border-radius: 4px; overflow: hidden; }
.tabs button { width: 100%; display: flex; align-items: center; gap: .9rem; padding: 1.35rem 1.4rem; background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; font: 600 1.06rem 'Plus Jakarta Sans', system-ui, sans-serif; text-align: left; cursor: pointer; transition: background .25s; }
.tabs li:last-child button { border-bottom: 0; }
.tabs button:hover { background: rgba(255, 255, 255, .05); }
.tabs button[aria-selected="true"] { background: var(--blue); }
.tabs button svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-selected="true"] svg { stroke: #fff; }
.tabs button .chev { margin-left: auto; width: 16px; height: 16px; }
.tabs button .bar { position: absolute; }

.stage { min-width: 0; }
.flow { position: relative; aspect-ratio: 800 / 400; border-radius: 22px; overflow: hidden; color: #fff;
  background: radial-gradient(60% 80% at 52% 50%, rgba(108, 59, 228, .28), transparent 70%), radial-gradient(40% 60% at 90% 50%, rgba(240, 56, 79, .14), transparent 70%), #0B0F1E; }
.flow svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow .wire { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1.2; }
.flow .spark { fill: #8FB8FF; filter: drop-shadow(0 0 4px #8FB8FF); }
.flow-label { position: absolute; left: 3%; top: 5.5%; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.in { position: absolute; left: 3%; width: 31%; transform: translateY(-50%); display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: rgba(255, 255, 255, .03); font-size: clamp(.62rem, 1.05vw, .82rem); font-weight: 600; white-space: nowrap; overflow: hidden; animation: inIn .5s ease both; }
.in::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); flex-shrink: 0; }
.in small { font-weight: 500; color: rgba(255, 255, 255, .45); font-size: .85em; overflow: hidden; text-overflow: ellipsis; }
.in:nth-of-type(odd) { border-style: dashed; }
.node { position: absolute; left: 47%; top: 50%; width: 13.5%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; text-align: center; border-radius: 22%; background: linear-gradient(160deg, #1A2140, #0E1222); border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 0 0 10px rgba(108, 59, 228, .12), 0 0 60px rgba(108, 59, 228, .55); font-weight: 800; font-size: clamp(.7rem, 1.4vw, 1.05rem); line-height: 1.15; padding: .4rem; }
.node svg { width: 42%; height: 42%; margin: 0 auto .25rem; color: #fff; }
.node-cap { position: absolute; left: 47%; top: 69%; transform: translateX(-50%); text-align: center; font-size: clamp(.58rem, .9vw, .72rem); color: rgba(255, 255, 255, .55); white-space: nowrap; }
.node-cap b { display: block; color: #fff; font-weight: 600; }
.arrow { position: absolute; left: 55.5%; top: 50%; width: 3.5%; height: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, .2), #FF9E7A); }
.arrow::after { content: ''; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid #FF9E7A; border-right: 0; }
.out { position: absolute; right: 3%; top: 50%; width: 36%; transform: translateY(-50%); border-radius: 16px; padding: 3.2% 3%; background: linear-gradient(160deg, rgba(240, 56, 79, .16), rgba(108, 59, 228, .1)); border: 1px solid rgba(255, 158, 122, .4); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); animation: outIn .6s .25s ease both; }
.out-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .7rem; }
.out-head b { font-size: clamp(.78rem, 1.35vw, 1.05rem); color: #FFD3C2; }
.out-head small { font-size: clamp(.55rem, .85vw, .68rem); color: rgba(255, 255, 255, .5); white-space: nowrap; }
.row { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; margin-top: .45rem; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.row i { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; display: grid; place-items: center; background: rgba(255, 158, 122, .2); color: #FF9E7A; font-style: normal; font-size: .7rem; font-weight: 800; }
.row span { flex: 1; min-width: 0; font-size: clamp(.6rem, 1vw, .8rem); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row em { font-style: normal; font-size: clamp(.55rem, .85vw, .68rem); font-weight: 700; color: #FFD3C2; background: rgba(255, 158, 122, .16); padding: .15rem .45rem; border-radius: 999px; white-space: nowrap; }
@keyframes inIn { from { opacity: 0; transform: translate(-10px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
@keyframes outIn { from { opacity: 0; transform: translate(10px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }

.stage-copy { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: start; margin-top: 1.8rem; }
.stage-copy h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; grid-column: 1 / -1; }
.stage-copy p { max-width: 62ch; }
.stage-copy .tags { margin-top: .4rem; }
.stage-copy a { align-self: end; color: var(--blue); font-weight: 700; text-decoration: none; white-space: nowrap; }
.stage-copy a:hover { text-decoration: underline; }

@media (max-width: 1020px) {
  .build-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .tabs { display: flex; overflow-x: auto; border-radius: 12px; scrollbar-width: none; }
  .tabs li { flex: 0 0 auto; }
  .tabs button { border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .08); padding: 1rem 1.1rem; font-size: .95rem; white-space: nowrap; }
  .tabs button .chev { display: none; }
}
@media (max-width: 680px) {
  .flow { aspect-ratio: auto; padding: 3.2rem 1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
  .flow svg.wires, .arrow, .node-cap { display: none; }
  .flow-label { top: 1.2rem; left: 1rem; }
  .in, .out, .node { position: relative; left: auto; right: auto; top: auto !important; width: 100%; transform: none; animation: none; }
  .node { width: 96px; margin: .8rem auto; font-size: .78rem; }
  .out { padding: 1rem; margin-top: .4rem; }
  .in { font-size: .8rem; }
  .row span { font-size: .8rem; } .row em { font-size: .66rem; } .out-head b { font-size: .95rem; } .out-head small { font-size: .66rem; }
  .stage-copy { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .in, .out { animation: none; } .xhero-scroll::after { animation: none; } }
