/* ============================================================
   DITRO INFOTECH — homepage "story" edition
   Dark immersive theme, intro loader, custom cursor, WebGL hero,
   pinned chapters, bento, marquees, giant CTA.
   Motion lives in assets/js/story.js (GSAP + ScrollTrigger + Lenis).
   ============================================================ */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }


/* ---------- Intro loader ---------- */
.x-loader { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; color: #8f877a; pointer-events: none; animation: loaderBail 0s 5s forwards; }
.x-loader__panel { position: absolute; left: 0; right: 0; height: 50.5%; background: #070606; z-index: -1; }
.x-loader__panel.is-top { top: 0; }
.x-loader__panel.is-bottom { bottom: 0; }
.x-loader__inner { display: grid; justify-items: center; gap: 1.1rem; }
.x-loader__inner img { height: 34px; width: auto; }
.x-loader__count { font-weight: 700; font-size: clamp(4rem, 14vw, 10rem); line-height: .9; letter-spacing: -.06em; color: #f3efe4; font-variant-numeric: tabular-nums; }
.x-loader__line { width: min(260px, 60vw); height: 2px; background: rgba(255,255,255,.1); overflow: hidden; border-radius: 2px; }
.x-loader__line i { display: block; height: 100%; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }
.x-loader.is-skip, .no-motion .x-loader { display: none; }
@keyframes loaderBail { to { opacity: 0; visibility: hidden; } }

/* ---------- 1. Hero ---------- */
.x-hero { position: relative; min-height: calc(100svh - 62px); display: flex; align-items: center; overflow: hidden; isolation: isolate; padding: 3rem 0 5rem; background: #070606; }
.x-hero__liquid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.x-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,6,6,0) 60%, var(--paper) 100%), linear-gradient(90deg, rgba(7,6,6,.7) 0%, rgba(7,6,6,.15) 55%, rgba(7,6,6,0) 100%); pointer-events: none; }
.x-hero__inner { position: relative; }
.x-hero__meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.x-clock { display: inline-flex; align-items: center; gap: .5rem; color: #a39b8d; font-size: .64rem; }
.x-title { font-weight: 700; font-size: clamp(3rem, min(8vw, 11.5svh), 8.2rem); line-height: .92; letter-spacing: -.055em; color: #f6f2e7; margin: 1.6rem 0 0; }
.x-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.x-line > span { display: inline-block; }
.x-title .x-serif { font-size: 1.08em; letter-spacing: -.02em; padding-right: .06em; }
.x-hero .lead { color: #c8c1b2; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.x-hero .hero-trust { margin: 1.4rem 0 0; }
.x-hero .ask-card { background: rgba(18,16,14,.55); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border-color: rgba(255,255,255,.1); }
.x-hero .ask-card__q { font-size: 1.2rem; margin-top: .9rem; }
.x-hero .ask-card textarea { background: rgba(0,0,0,.35); }
.s-scroll-hint { position: absolute; left: 50%; bottom: 1.2rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .45rem; color: #8a8271; text-decoration: none; }
.s-scroll-hint .font-mono { font-size: .56rem; }
.s-mouse { width: 22px; height: 34px; border: 1.5px solid rgba(255,255,255,.3); border-radius: 12px; display: grid; justify-items: center; padding-top: 6px; }
.s-mouse i { width: 3px; height: 7px; border-radius: 2px; background: var(--red); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }
/* Before JS runs the hero is fully visible; story.js adds .is-intro, then animates it in. */
.is-intro .x-scene--first .x-line > span { transform: translateY(110%); }
.is-intro [data-hero-in] { opacity: 0; transform: translateY(24px); }

/* ---------- 2. Velocity marquee ---------- */
.s-marquee { overflow: hidden; background: var(--red); color: #fff; padding: 1rem 0; transform: rotate(-1.5deg) scale(1.03); margin: 1.5rem 0; position: relative; z-index: 2; }
.s-marquee__track { display: flex; align-items: center; gap: 2rem; width: max-content; will-change: transform; }
.s-marquee__track span { font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.3rem); letter-spacing: -.03em; white-space: nowrap; }
.s-marquee__track i { font-style: normal; opacity: .6; }

/* ---------- 3. Build story ---------- */
.s-story { background: var(--paper); position: relative; }
.s-story__pin { min-height: 100svh; display: flex; align-items: center; padding: 90px 0 40px; overflow: hidden; }
.s-story__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.s-rail { display: flex; gap: .5rem; margin-bottom: 2rem; }
.s-rail li { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: var(--muted); }
.s-rail li i { display: block; height: 2px; background: var(--line); border-radius: 3px; margin-top: .4rem; position: relative; overflow: hidden; }
.s-rail li i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.s-rail li.is-active span { color: var(--red); font-weight: 700; }
.s-chapters { position: relative; min-height: 360px; }
.s-chapter { position: absolute; inset: 0 0 auto 0; }
.s-chapter__big { position: absolute; right: 0; top: -2.5rem; font-weight: 700; font-size: 9rem; line-height: 1; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.1); pointer-events: none; }
.s-chapter .h-section { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.s-stage-wrap { perspective: 1400px; }
.s-stage { position: relative; width: 100%; aspect-ratio: 6 / 4.4; max-height: 72svh; transform-style: preserve-3d; }
.s-stage > * { position: absolute; left: var(--x, 0); top: var(--y, 0); }

.mess { width: 40%; padding: .9rem 1rem; background: #f6f2ea; color: #221f1a; border-radius: .7rem; box-shadow: 0 30px 50px -24px rgba(0,0,0,.8); transform: rotate(var(--r)); display: grid; gap: .2rem; animation: bob 4s ease-in-out infinite alternate; }
.mess:nth-child(2n) { animation-delay: -1.5s; }
.mess b { font-size: .92rem; }
.mess span { font-size: .8rem; color: #756e62; }
.mess--note { background: #fff3a8; width: 30%; }
@keyframes bob { to { translate: 0 -10px; } }

.flow-lines { left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.flow-lines path { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 400; stroke-dashoffset: 400; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(215,26,33,.8)); }
.flow-node { width: 36%; display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; border-radius: .8rem; background: #1b1815; border: 1px solid rgba(255,255,255,.1); color: #f0ebdf; font-weight: 700; font-size: .95rem; box-shadow: 0 24px 40px -24px rgba(0,0,0,.8); opacity: 0; }
.flow-node svg { width: 20px; height: 20px; color: #ff5a60; }
.flow-quote { width: 88%; display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border: 1.5px dashed var(--red); border-radius: .8rem; background: rgba(215,26,33,.08); opacity: 0; }
.flow-quote .font-mono { color: #ff5a60; }
.flow-quote b { flex: 1; color: #f3efe4; }
.flow-quote svg { color: #3ec46d; }

.browser { left: 0; top: 4%; width: 86%; height: 84%; background: #fbf9f4; border-radius: .9rem; overflow: hidden; box-shadow: 0 60px 120px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08); opacity: 0; display: flex; flex-direction: column; }
.browser__bar { display: flex; align-items: center; gap: .4rem; padding: .6rem .8rem; background: #efe9dd; border-bottom: 1px solid #e3dccd; }
.browser__bar span { width: 9px; height: 9px; border-radius: 50%; background: #d8d0c0; }
.browser__bar span:first-child { background: var(--red); }
.browser__bar em { flex: 1; margin: 0 .8rem; padding: .2rem .7rem; border-radius: 999px; background: #fff; font-style: normal; font-size: .7rem; color: #8f877a; font-family: 'JetBrains Mono', monospace; }
.browser__live { font-family: 'JetBrains Mono', monospace; font-size: .66rem; color: #2f9e5a; opacity: 0; }
.browser__body { flex: 1; padding: 4% 5%; display: grid; grid-template-rows: auto 1.5fr 1fr .8fr; gap: 6%; }
.ui-nav { display: flex; align-items: center; gap: 4%; transform-origin: left; }
.ui-nav i { width: 14%; height: 12px; border-radius: 4px; background: #221f1a; }
.ui-nav span { width: 8%; height: 7px; border-radius: 4px; background: #d8d0c0; }
.ui-nav u { margin-left: auto; width: 13%; height: 16px; border-radius: 999px; background: var(--red); }
.ui-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 6%; border-radius: .6rem; padding: 4%; background: #e9e4da; transform-origin: left; }
.ui-hero div { display: grid; align-content: center; gap: 9px; }
.ui-hero i { height: 13px; border-radius: 4px; background: rgba(255,255,255,.75); }
.ui-hero i:nth-child(2) { width: 80%; }
.ui-hero i:nth-child(3) { width: 55%; height: 7px; }
.ui-hero u { width: 38%; height: 16px; border-radius: 999px; background: rgba(255,255,255,.75); margin-top: 4px; }
.ui-hero figure { margin: 0; border-radius: .5rem; background: rgba(255,255,255,.5); }
.ui-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5%; }
.ui-cards div { border-radius: .5rem; background: #e9e4da; transform-origin: bottom; }
.ui-chart { display: flex; align-items: flex-end; gap: 3%; padding: 0 2%; border-bottom: 1px solid #e3dccd; }
.ui-chart i { flex: 1; height: var(--h); background: var(--red); border-radius: 3px 3px 0 0; transform: scaleY(0); transform-origin: bottom; opacity: .85; }
.code-panel { left: auto; right: 0; top: 34%; width: 46%; margin: 0; padding: 1rem 1.1rem; border-radius: .8rem; background: #0f0d0b; border: 1px solid rgba(255,255,255,.1); color: #d7d0c4; font-family: 'JetBrains Mono', monospace; font-size: clamp(.58rem, .9vw, .74rem); line-height: 1.8; box-shadow: 0 40px 70px -35px rgba(0,0,0,.9); opacity: 0; white-space: pre; overflow: hidden; }
.c-k { color: #ff7b80; } .c-s { color: #b5d98a; } .c-f { color: #7fc4ff; } .c-c { color: #7fc99a; }
.phone { left: auto; right: 2%; top: 14%; width: 30%; aspect-ratio: 9 / 18; border-radius: 1.6rem; border: 6px solid #000; background: #f1ebdf; box-shadow: 0 50px 80px -40px rgba(0,0,0,.9); overflow: hidden; opacity: 0; display: flex; flex-direction: column; }
.phone__notch { width: 40%; height: 14px; background: #000; border-radius: 0 0 10px 10px; margin: 0 auto; }
.phone__chat { margin-top: auto; padding: .6rem; display: grid; gap: .4rem; }
.phone__chat p { margin: 0; padding: .45rem .6rem; border-radius: .7rem; font-size: clamp(.55rem, .85vw, .72rem); line-height: 1.35; background: #fff; color: #221f1a; width: 88%; }
.phone__chat p.bot { background: var(--red); color: #fff; margin-left: auto; }
.toast-pop { display: flex; align-items: center; gap: .6rem; padding: .65rem .9rem; border-radius: .7rem; background: rgba(28,25,22,.92); color: #ece6da; border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); box-shadow: 0 24px 40px -22px rgba(0,0,0,.9); font-size: .8rem; opacity: 0; white-space: nowrap; }
.toast-pop b { color: #fff; }
.toast-pop svg { width: 18px; height: 18px; color: #ff5a60; flex: none; }


/* ---------- 5. Statement ---------- */
.s-statement { padding: clamp(6rem, 16vw, 12rem) 0; background: var(--paper); }
.s-statement__text { font-weight: 700; font-size: clamp(2rem, 4.8vw, 4.4rem); line-height: 1.06; letter-spacing: -.045em; margin: 0; max-width: 1100px; color: #f6f2e7; }
.s-statement__text .w { opacity: .12; display: inline-block; }
.s-statement__text .w.is-key { color: var(--red); font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* ---------- 6. Horizontal services ---------- */
.s-hscroll { background: var(--paper-2); overflow: hidden; }
.s-hscroll__pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 90px 0 3rem; gap: 2.5rem; }
.s-hscroll__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.s-hscroll__meta { display: grid; gap: .7rem; min-width: 220px; }
.s-hscroll__bar { height: 2px; background: var(--line); border-radius: 3px; overflow: hidden; }
.s-hscroll__bar i { display: block; height: 100%; width: 100%; background: var(--red); transform: scaleX(.1); transform-origin: 0 50%; }
.s-hscroll__track { display: flex; gap: 1.5rem; padding-inline: max(1rem, calc((100vw - 1240px) / 2 + .75rem)); width: max-content; will-change: transform; }
.s-svc { width: clamp(290px, 30vw, 390px); min-height: 460px; padding: 1.9rem; display: flex; flex-direction: column; flex: none; border-radius: 1.2rem; background: linear-gradient(160deg, #1b1916, #121010) !important; }
.s-svc__num { position: absolute; right: 1.25rem; top: .2rem; font-weight: 700; font-size: 6rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.1); letter-spacing: -.06em; z-index: 0; }
.s-svc > *:not(.s-svc__num) { position: relative; z-index: 1; }
.s-svc .tag { align-self: flex-start; }
.s-svc .card-metric { color: #ff4d53; }
.s-svc__go { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); transition: background .25s, color .25s, transform .4s cubic-bezier(.22,1,.36,1); }
.s-svc:hover .s-svc__go { background: var(--red); border-color: var(--red); color: #fff; transform: rotate(45deg) scale(1.1); }

/* ---------- 7. World ---------- */
.x-world { position: relative; overflow: hidden; padding: clamp(6rem, 12vw, 10rem) 0; background: radial-gradient(ellipse at 75% 50%, rgba(215,26,33,.12), transparent 60%), var(--paper); }
.x-world__globe { position: absolute; right: -8vw; top: 50%; width: min(70vw, 900px); height: min(70vw, 900px); margin-top: calc(min(70vw, 900px) / -2); pointer-events: none; }
.x-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 2.5rem 3rem; margin-top: 3.5rem; }
.x-stat b { display: block; font-weight: 700; font-size: clamp(3rem, 6vw, 5.2rem); letter-spacing: -.06em; line-height: .9; color: #f6f2e7; }
.x-stat span { display: block; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); font-family: 'JetBrains Mono', monospace; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- 8. AI bento ---------- */
.x-bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(210px, auto); gap: 1.1rem; }
.x-bento__item { padding: 1.6rem; border-radius: 1.2rem; display: flex; flex-direction: column; background: linear-gradient(160deg, #191714, #121010) !important; }
.x-bento__item--hero { grid-column: span 2; grid-row: span 2; }
.x-bento__item:nth-child(2) { grid-column: span 2; }
.s-ai__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(215,26,33,.14); color: #ff5a60; }
.s-ai__icon svg { width: 22px; height: 22px; }
.x-demo { margin-top: auto; padding-top: 1.4rem; display: grid; gap: .55rem; min-height: 230px; align-content: end; }
.x-demo p { margin: 0; max-width: 82%; width: fit-content; padding: .65rem .85rem; border-radius: 1rem 1rem 1rem .25rem; background: #23201c; color: #ece6da; font-size: .88rem; line-height: 1.45; animation: demoIn .5s cubic-bezier(.22,1,.36,1) both; }
.x-demo p.is-user { margin-left: auto; border-radius: 1rem 1rem .25rem 1rem; background: var(--red); color: #fff; }
.x-demo p.is-typing { display: inline-flex; gap: 4px; }
.x-demo p.is-typing span { width: 6px; height: 6px; border-radius: 50%; background: #8f877a; animation: bounce 1s infinite; }
.x-demo p.is-typing span:nth-child(2) { animation-delay: .15s; }
.x-demo p.is-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes demoIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@media (max-width: 991.98px) {
  .x-bento { grid-template-columns: 1fr 1fr; }
  .x-bento__item--hero, .x-bento__item:nth-child(2) { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 575.98px) { .x-bento { grid-template-columns: 1fr; } .x-bento__item--hero, .x-bento__item:nth-child(2) { grid-column: auto; } }

/* ---------- 9. Weeks ---------- */
.s-weeks { background: #070606; color: #ece6da; position: relative; overflow: hidden; }
.s-weeks__pin { min-height: 100svh; display: flex; align-items: center; padding: 90px 0 3rem; position: relative; }
.s-weeks__bgnum { position: absolute; right: -2vw; bottom: -6vw; font-weight: 700; font-size: 42vw; line-height: .8; letter-spacing: -.07em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.07); pointer-events: none; user-select: none; }
.week-card { background: rgba(23,21,19,.85); border: 1px solid rgba(255,255,255,.08); border-radius: 1.3rem; padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: 0 60px 100px -50px rgba(0,0,0,.9); backdrop-filter: blur(8px); }
.week-card__top { display: flex; justify-content: space-between; align-items: center; color: #8a8271; }
.week-card__nav { display: flex; gap: .4rem; }
.week-card__nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: 0; color: #ece6da; display: grid; place-items: center; transition: border-color .2s, background .2s; }
.week-card__nav button:hover { border-color: var(--red); background: rgba(215,26,33,.15); }
.week-card__slides { min-height: 245px; margin-top: 1.2rem; }
.week-slide.is-in { animation: weekIn .5s cubic-bezier(.22,1,.36,1); }
@keyframes weekIn { from { opacity: 0; transform: translateY(14px); } }
.week-card__num { font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 700; letter-spacing: -.05em; color: #f6f2e7; }
.week-card__num b { color: var(--red); font-weight: 800; }
.week-card__num span { color: #6f685a; font-weight: 600; font-size: .5em; letter-spacing: -.02em; }
.week-slide p { color: #c8c1b2; font-size: .92rem; }
.week-slide .text-muted { font-size: .6rem; }
.week-dots { display: flex; gap: .35rem; margin: 1.6rem 0 0; }
.week-dots li { flex: 1; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: .6rem; color: #6f685a; }
.week-dots i { display: block; height: 3px; border-radius: 4px; background: #2a2622; margin-bottom: .45rem; transition: background .3s, box-shadow .3s; }
.week-dots li.is-done i { background: #7a1f22; }
.week-dots li.is-active i { background: var(--red); box-shadow: 0 0 14px rgba(215,26,33,.8); }
.week-dots li.is-active span { color: #fff; }

/* ---------- 11. Stacking case studies ---------- */
.s-stack { display: grid; gap: 2rem; }
.s-stack__card { position: sticky; top: calc(84px + var(--i) * 18px); min-height: min(580px, 78svh); background: #141210; border: 1px solid var(--line); border-radius: 1.4rem; overflow: hidden; box-shadow: 0 -30px 80px -40px rgba(0,0,0,.9); transform-origin: 50% 0; }
.s-stack__img { position: relative; overflow: hidden; min-height: 280px; display: block; }
.s-stack__img img { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; }
.s-stack__body { padding: clamp(1.5rem, 4vw, 3.2rem); display: flex; flex-direction: column; justify-content: center; }
.s-stack__body .card-metric { color: #ff4d53; }

/* ---------- 12. Testimonial marquee ---------- */
.x-quotes { overflow: hidden; }
.x-quotes__row { overflow: hidden; padding: .6rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.x-quotes__track { display: flex; gap: 1.2rem; width: max-content; animation: quotes 60s linear infinite; }
.x-quotes__row.is-reverse .x-quotes__track { animation-direction: reverse; animation-duration: 70s; }
.x-quotes__row:hover .x-quotes__track { animation-play-state: paused; }
@keyframes quotes { to { transform: translateX(-50%); } }
.x-quote { width: 420px; margin: 0; padding: 1.6rem; border-radius: 1.2rem; background: #151311; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 1.2rem; transition: border-color .3s, transform .3s; }
.x-quote:hover { border-color: rgba(215,26,33,.6); transform: translateY(-4px); }
.x-quote blockquote { margin: 0; font-size: 1.02rem; line-height: 1.55; color: #e6e0d4; }
@media (max-width: 575.98px) { .x-quote { width: 300px; } }

/* ---------- 13. Why ---------- */
.x-why { padding: 1.8rem 0; border-top: 1px solid var(--line); height: 100%; }
.x-why__n { font-family: var(--serif); font-style: italic; font-size: 3.2rem; line-height: 1; color: var(--red); }

/* ---------- Mobile ---------- */
@media (max-width: 991.98px) {
  .x-hero { padding-top: 2rem; }
  .x-title { font-size: clamp(2.8rem, 13vw, 4.6rem); }
  .s-scroll-hint, .x-clock { display: none; }
  .s-story__pin { padding: 80px 0 24px; align-items: flex-start; }
  .s-story__grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .s-rail { margin-bottom: 1rem; }
  .s-chapters { min-height: 215px; }
  .s-chapter__big { font-size: 5rem; top: -1rem; }
  .s-chapter .lead { font-size: .95rem; }
  .s-stage { max-height: none; aspect-ratio: 6 / 5; }
  .mess { padding: .55rem .7rem; } .mess b { font-size: .75rem; } .mess span { font-size: .66rem; }
  .flow-node { padding: .6rem .7rem; font-size: .72rem; }
  .toast-pop { font-size: .66rem; padding: .45rem .6rem; }
  .s-hscroll__pin { min-height: 0; padding: 4rem 0; }
  .s-hscroll__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; }
  .s-svc { scroll-snap-align: center; min-height: 400px; width: 82vw; }
  .x-world__globe { right: -45vw; width: 120vw; height: 120vw; margin-top: -60vw; opacity: .5; }
  .s-weeks__pin { padding: 76px 0 1.5rem; align-items: flex-start; }
  .s-weeks .row { --bs-gutter-y: 1rem; }
  .s-weeks .h-section { font-size: 1.9rem; }
  .s-weeks .lead, .s-weeks .btn-outline-dark { display: none; }
  .week-card__slides { min-height: 300px; }
}

/* ---------- Reduced motion / no GSAP ---------- */
.no-motion .s-chapter { position: static; margin-bottom: 2rem; }
.no-motion .s-chapters { min-height: 0; }
.no-motion .mess, .no-motion .flow-node, .no-motion .flow-quote, .no-motion .flow-lines { display: none; }
.no-motion .browser, .no-motion .code-panel, .no-motion .phone, .no-motion .toast-pop, .no-motion .browser__live { opacity: 1; }
.no-motion .ui-chart i { transform: none; }
.no-motion .ui-hero { background: #221f1a; }
.no-motion .s-statement__text .w { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .mess, .x-grain, .x-quotes__track, .x-cta__marquee > div, .x-badge > svg { animation: none; }
}

/* ---------- Hero scenes (pinned, WebGL world morphs on scroll) ---------- */
.x-hero__inner { position: relative; }
.x-scene--alt { position: absolute; inset: 0; display: flex; align-items: center; padding-inline: calc(var(--bs-gutter-x) * .5); visibility: hidden; opacity: 0; pointer-events: none; }
.x-scene--alt > div { max-width: 820px; pointer-events: auto; }
.x-title--scene { font-size: clamp(3rem, min(7.6vw, 12.5svh), 7.8rem); margin: 1.3rem 0 0; }
.x-scene__text { max-width: 46ch; margin-top: 1.5rem; color: #d8d1c4 !important; font-size: clamp(1rem, 1.4vw, 1.2rem); }
.x-scene__link { margin-top: 1.6rem; backdrop-filter: blur(8px); background: rgba(0,0,0,.25); }
.x-scene-nav { position: absolute; right: clamp(1rem, 3vw, 2.5rem); top: 50%; transform: translateY(-50%); display: grid; gap: 1.1rem; z-index: 3; margin: 0; }
.x-scene-nav li { display: grid; grid-template-columns: 2px auto; grid-template-rows: auto auto; column-gap: .75rem; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); transition: color .3s; }
.x-scene-nav li i { grid-row: 1 / span 2; grid-column: 1; width: 2px; height: 34px; background: rgba(255,255,255,.15); position: relative; overflow: hidden; border-radius: 2px; }
.x-scene-nav li i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleY(var(--p, 0)); transform-origin: 50% 0; }
.x-scene-nav li span { grid-column: 2; }
.x-scene-nav li b { grid-column: 2; font-weight: 500; font-size: .58rem; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s, opacity .4s; }
.x-scene-nav li.is-active { color: #fff; }
.x-scene-nav li.is-active b { max-height: 1.2em; opacity: 1; color: var(--red); }
@media (max-width: 991.98px) {
  .x-hero .ask-card { display: none; }
  .x-hero [data-hero-in]:has(.ask-card) { display: none; }
  .x-scene-nav { top: auto; bottom: 1.2rem; left: 1rem; right: auto; transform: none; grid-auto-flow: column; gap: .9rem; }
  .x-scene-nav li { grid-template-columns: auto; }
  .x-scene-nav li i { grid-row: 2; grid-column: 1; width: 34px; height: 2px; margin-top: .35rem; }
  .x-scene-nav li i::after { transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
  .x-scene-nav li span { grid-column: 1; grid-row: 1; }
  .x-scene-nav li b { display: none; }
  .x-title--scene { font-size: clamp(2.6rem, 12vw, 4.4rem); }
}

/* ---------- Hero: AI capability keywords ---------- */
.x-kw { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 .4rem; max-width: 900px; }
.x-kw button {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .85rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #e6e0d4; font-family: 'JetBrains Mono', monospace; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  animation: kwPulse 9.6s calc(var(--k) * 1.2s) infinite;
  transition: border-color .25s, background .25s, color .25s, transform .25s;
}
.x-kw button svg { width: 14px; height: 14px; color: #ff5a60; }
.x-kw button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); transform: translateX(-120%); animation: kwSweep 9.6s calc(var(--k) * 1.2s) infinite; }
.x-kw button:hover { border-color: var(--red); background: rgba(215,26,33,.18); color: #fff; transform: translateY(-2px); }
@keyframes kwPulse { 0%, 9% { border-color: rgba(255,90,96,.9); box-shadow: 0 0 22px -4px rgba(215,26,33,.75); color: #fff; } 14%, 100% { border-color: rgba(255,255,255,.14); box-shadow: none; } }
@keyframes kwSweep { 0% { transform: translateX(-120%); } 8%, 100% { transform: translateX(120%); } }

/* ---------- Hero: Agentic AI scene console ---------- */
.x-scene--alt:has(.x-agent) { justify-content: space-between; gap: 3rem; }
.x-agent { width: min(430px, 40vw); flex: none; margin-right: 4rem; pointer-events: auto; background: rgba(10,9,8,.62); border: 1px solid rgba(255,255,255,.12); border-radius: 1rem; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 50px 90px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(215,26,33,.08) inset; overflow: hidden; }
.x-agent__bar { display: flex; align-items: center; gap: .55rem; padding: .75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: #ece6da; }
.x-agent__bar em { margin-left: auto; font-style: normal; color: #8f877a; font-size: .6rem; letter-spacing: .06em; }
.x-agent ol { margin: 0; padding: 1rem 1rem .6rem; display: grid; gap: .55rem; font-family: 'JetBrains Mono', monospace; font-size: .74rem; line-height: 1.45; color: #c9c2b4; }
.x-agent li { position: relative; padding-left: 1.3rem; opacity: 0; transform: translateY(6px); }
.x-agent li::before { position: absolute; left: 0; top: 0; }
.x-agent li.is-in::before { content: "▸"; color: #7fc4ff; }
.x-agent li.is-run::before { content: "◆"; color: #ff5a60; }
.x-agent li.is-ok { color: #7fc99a; }
.x-agent li.is-ok::before { content: "✓"; color: #7fc99a; }
.x-agent.is-run li { animation: agentLine .45s calc(.35s + var(--n) * .75s) cubic-bezier(.22,1,.36,1) forwards; }
.x-agent.is-run li.is-run::after { content: ""; display: inline-block; width: 7px; height: .9em; margin-left: .3rem; vertical-align: -2px; background: #ff5a60; opacity: 0; animation: agentCaret .8s steps(1) 4 calc(.35s + var(--n) * .75s); }
@keyframes agentCaret { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes agentLine { to { opacity: 1; transform: none; } }
.x-agent__tools { display: flex; flex-wrap: wrap; gap: .35rem; padding: .7rem 1rem 1rem; border-top: 1px dashed rgba(255,255,255,.08); }
.x-agent__tools span { font-family: 'JetBrains Mono', monospace; font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; padding: .22rem .5rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); color: #a39b8d; }
.no-motion .x-agent li { opacity: 1; transform: none; }
@media (max-width: 1199.98px) { .x-agent { margin-right: 0; } }
@media (max-width: 991.98px) {
  .x-kw { gap: .35rem; margin-top: 1.1rem; }
  .x-kw li:nth-child(n+7) { display: none; }
  .x-kw button { font-size: .58rem; padding: .35rem .6rem; }
  .x-agent { display: none; }
}
@media (prefers-reduced-motion: reduce) { .x-kw button, .x-kw button::after { animation: none; } }

/* ---------- Hero fits one screen (it is pinned, so nothing may fall below the fold) ---------- */
@media (min-width: 992px) {
  .x-hero { padding: 1.6rem 0 2.6rem; }
  .x-scene--first .x-title { font-size: clamp(2.8rem, min(6.6vw, 10svh), 7rem); margin-top: 1rem; }
  .x-kw { margin: 1.1rem 0 0; }
  .x-scene--first .row { margin-top: .4rem !important; --bs-gutter-y: 1rem; }
  .x-scene--first .lead { font-size: 1.02rem; margin-bottom: 0; }
  .x-scene--first .btn-lg { padding: .8rem 1.5rem; }
  .x-scene--first .d-flex.mt-4 { margin-top: 1.1rem !important; }
  .x-hero .hero-trust { margin-top: 1rem; }
  .x-hero .ask-card { padding: 1.1rem 1.2rem; }
  .x-hero .ask-card__q { font-size: 1.05rem; margin: .6rem 0 .5rem; }
  .x-hero .ask-card__chips { margin-top: .6rem; }
  .x-hero .ask-card__chips .chip:nth-child(n+3) { display: none; }
  .x-scene-nav { right: .9rem; }
  .s-scroll-hint { display: none; }
}
@media (min-width: 992px) and (max-height: 800px) {
  .x-hero .hero-trust, .x-hero .ask-card__chips { display: none; }
  .x-kw button { padding: .38rem .75rem; }
}
@media (max-width: 991.98px) { .x-hero .hero-trust { display: none; } }

/* ---------- 11. Case studies: 3D showcase ---------- */
.x-show { position: relative; background: radial-gradient(ellipse at 72% 45%, rgba(215,26,33,.16), transparent 55%), radial-gradient(ellipse at 70% 95%, rgba(255,255,255,.04), transparent 50%), var(--paper); overflow: hidden; }
.x-show__pin { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 90px 0 3rem; }
.x-show__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.x-show__inner { position: relative; z-index: 1; pointer-events: none; }
.x-show__text { max-width: 470px; pointer-events: auto; }
.x-show__panels { position: relative; min-height: 400px; margin-top: 2rem; }
.x-show__panel { position: absolute; inset: 0 0 auto 0; }
.x-show__panel .card-metric { color: #ff4d53; font-size: clamp(2.6rem, 4.6vw, 3.8rem); }
.x-show__fallback { display: none; }
.x-show__dots { display: flex; gap: .6rem; margin-top: 1.5rem; }
.x-show__dots li { flex: 1; max-width: 90px; font-family: 'JetBrains Mono', monospace; font-size: .62rem; color: var(--muted); }
.x-show__dots li.is-active { color: #fff; }
.x-show__dots i { display: block; height: 2px; margin-top: .4rem; background: var(--line); position: relative; overflow: hidden; }
.x-show__dots i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.x-show__hint { position: absolute; right: clamp(1rem, 4vw, 3rem); bottom: 1.6rem; display: inline-flex; align-items: center; gap: .5rem; font-size: .6rem; color: var(--muted); opacity: 0; transition: opacity .6s; }
.x-show.is-3d .x-show__hint { opacity: 1; }
/* No WebGL / reduced motion: plain stacked list with images */
.x-show.no-3d .x-show__canvas, .no-motion .x-show__canvas, .x-show.no-3d .x-show__dots, .no-motion .x-show__dots { display: none; }
.x-show.no-3d .x-show__text, .no-motion .x-show__text { max-width: none; }
.x-show.no-3d .x-show__panels, .no-motion .x-show__panels { min-height: 0; display: grid; gap: 3rem; }
.x-show.no-3d .x-show__panel, .no-motion .x-show__panel { position: static; opacity: 1 !important; visibility: visible !important; transform: none !important; }
.x-show.no-3d .x-show__fallback, .no-motion .x-show__fallback { display: block; width: 100%; max-width: 640px; border-radius: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 991.98px) {
  .x-show__pin { align-items: flex-end; padding-bottom: 2rem; }
  .x-show__canvas { height: 52%; }
  .x-show__text { max-width: none; }
  .x-show__text > .h-section, .x-show__text > .eyebrow { display: none; }
  .x-show__panels { min-height: 330px; margin-top: 0; }
  .x-show__panel p, .x-show__panel .d-flex.flex-wrap { display: none !important; }
  .x-show__hint { display: none; }
}
