/* Matechi staging v3b (17 Nov 13:40-14:00), loaded after site3.css */

/* hero: the agents fill the screen; the text lives in the empty lower-left area */
.hero3b .pin { display: block; }
.hero3b .hero-film { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; overflow: hidden; -webkit-mask-image: none; mask-image: none; }
.hero3b .hero-film video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 46% 0; }
.hero3b .void { position: absolute; left: 0; bottom: 0; z-index: 2; box-sizing: border-box; width: min(36vw, 560px); padding: 0 var(--edge-r) calc(clamp(26px, 5vh, 56px) + var(--sbh, 0px) + env(safe-area-inset-bottom, 0px)) var(--edge); display: grid; gap: 18px; }
.hero3b .void::before { content: ""; position: absolute; left: 0; bottom: 0; width: 140%; height: 150%; z-index: -1; pointer-events: none;
  background: radial-gradient(100% 100% at 0% 100%, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.6) 42%, rgba(0, 0, 0, 0) 74%); }
.hero3b .vtext { display: grid; }
/* the film's side panel would show as a cut sliver at the left edge: a soft fade hides it */
.hero3b .pin::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 12%; z-index: 1; pointer-events: none; background: linear-gradient(to right, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0)); }
@media (max-width: 760px) { .hero3b .pin::after { display: none; } }
.hero3b .vp { grid-area: 1 / 1; align-self: end; margin: 0; color: #fff; }
.hero3b .v1 { font-size: clamp(40px, 4.6vw, 80px); line-height: 1; font-weight: 500; letter-spacing: -0.01em; max-width: 9em; }
.hero3b .v2, .hero3b .v3 { font-size: clamp(20px, 1.7vw, 29px); line-height: 1.25; opacity: 0; }
.hero3b .vp .w { color: rgba(255, 255, 255, 0.28); transition: color 0.25s ease; }
.hero3b .vp .w.on { color: #fff; }
.hero3b .vroutes { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.hero3b .vlink { color: #fff; text-decoration: none; font-size: 18px; border-bottom: 1.6px solid rgba(255, 255, 255, 0.5); padding-bottom: 2px; }
.hero3b .void .scrollcue { position: static; }
@media (max-width: 760px) {
  .hero3b .pin { display: block; }
  .hero3b .hero-film { grid-area: auto; width: 100%; aspect-ratio: auto; }
  .hero3b .hero-film video { aspect-ratio: auto; height: 100%; }
  .hero3b .void { width: 100%; gap: 14px; }
  .hero3b .void::before { width: 100%; height: 140%; background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 55%, rgba(0, 0, 0, 0) 100%); }
  .hero3b .v1 { font-size: 40px; }
  .hero3b .v2, .hero3b .v3 { font-size: 20px; }
}

/* the tools grid */
.tgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .tgrid { gap: 10px; } }
.tile { display: grid; gap: 10px; align-content: start; grid-template-rows: auto auto 1fr auto; padding: clamp(16px, 2vw, 28px); border-radius: 14px; background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; min-height: clamp(170px, 16vw, 230px); transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.tile:hover { background: #1f1f1f; border-color: rgba(255, 255, 255, 0.28); transform: translateY(-2px); }
.tile .ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(94, 224, 181, 0.12); color: var(--accent); }
.tile .ico svg { width: 26px; height: 26px; }
.tile b { font-size: clamp(18px, 1.5vw, 24px); font-weight: 500; line-height: 1.15; }
.tile .tl { color: var(--w60); font-size: clamp(14px, 1.1vw, 16px); line-height: 1.35; }
.tile i { font-style: normal; color: var(--w80); font-size: 15px; }

/* use our agents / build your AI capability */
.enable .ecols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
@media (max-width: 760px) { .enable .ecols { grid-template-columns: minmax(0, 1fr); } }
.ecol { display: grid; gap: 14px; align-content: start; padding: clamp(22px, 2.6vw, 40px); border-radius: 16px; background: #fff; border: 1px solid var(--kline); }
.ecol-b { background: var(--ink); color: #fff; border-color: var(--ink); }
.ecol .k { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.ecol-b .k { color: var(--accent); }
.ecol .h-m { margin: 0; }
.ecol ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: clamp(16px, 1.3vw, 19px); }
.ecol-b .textlink { color: #fff; }
.seq3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-top: 1.6px solid var(--kline); padding-top: 22px; }
.seq3 div { display: grid; gap: 6px; align-content: start; }
.seq3 .n { font: 500 14px ui-monospace, Consolas, monospace; color: var(--ink-2); }
.seq3 b { font-weight: 500; font-size: clamp(18px, 1.5vw, 21px); }
.seq3 span:last-child { color: var(--ink-2); }
.seq3-dark { border-top-color: rgba(255, 255, 255, 0.2); }
.seq3-dark .n, .seq3-dark span:last-child { color: var(--w60); }
@media (max-width: 760px) { .seq3 { grid-template-columns: minmax(0, 1fr); } }

/* the big step caption: which step, its name and one line */
.cap { display: grid; gap: 10px; align-content: start; }
.cap .kick { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--w60); }
.cap .capnum { margin: 0; font: 500 15px ui-monospace, Consolas, monospace; color: var(--accent); }
.cap .steptitle { margin: 0; font-size: clamp(30px, 3.4vw, 56px); line-height: 1.04; font-weight: 500; color: #fff; letter-spacing: -0.01em; }
.cap .stepcopy { margin: 0; font-size: clamp(18px, 1.6vw, 25px); line-height: 1.32; color: var(--w80); max-width: 36ch; }
.cap .steps-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.cap .steps-list li { font-size: 0; line-height: 0; padding-top: 0; height: 0; border-top-width: 3px; }
.cap .steps-list li::before { top: -3px; height: 3px; }
.cap .learn { justify-self: start; color: #fff; text-decoration: none; font-size: 18px; border-bottom: 1.6px solid currentColor; padding-bottom: 2px; margin-top: 4px; }
.framed .cap .kick { color: var(--ink-2); }
.framed .cap .steptitle { color: var(--ink); }
.framed .cap .stepcopy { color: var(--ink-2); }
.framed .cap .learn { color: var(--ink); }
.framed .cap .capnum { color: #0f8a66; }
.show-full .panel { background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0) 100%); }
.show-full .panel .cap { max-width: 760px; }
@media (max-width: 760px) { .show-full .panel { background: none; } }

/* version A: the film beside its caption */
.splitshow { position: relative; background: var(--black); color: var(--white); }
.splitshow .pin { position: sticky; top: 0; height: 100vh; height: 100svh; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px); align-items: center; padding: clamp(72px, 6vw, 84px) var(--edge-r) clamp(24px, 3vw, 40px) var(--edge); }
.splitshow .card { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.splitshow .card video { width: 100%; height: 100%; object-fit: cover; }
.splitshow .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.2); z-index: 3; }
.splitshow .bar i { display: block; height: 100%; width: 0; background: var(--white); }
.splitshow .side { display: grid; gap: 16px; }
.splitshow .ctx { margin: 0; color: var(--accent); font-size: clamp(16px, 1.3vw, 20px); line-height: 1.35; max-width: 40ch; }
@media (max-width: 760px) {
  .splitshow .pin { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; padding-top: 76px; gap: 16px; }
  .splitshow .card { aspect-ratio: 1.21 / 1; }
  .splitshow .ctx { display: none; }
}

/* Model / Real: a switch everywhere; a wipe on wide screens for a frame-aligned film */
.mr { position: absolute; top: 12px; right: 12px; z-index: 4; display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.show-full > .pin > .mr { top: 84px; }
.mr button { border: 0; background: transparent; color: rgba(255, 255, 255, 0.78); font: 500 14px var(--font); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.mr button[aria-pressed="true"] { background: #fff; color: #000; }
.v-model, .v-real { transition: opacity 0.45s ease; }
.media .v-model, .card .v-model { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media .v-real, .card .v-real { position: relative; z-index: 1; }
.is-framed .v-real { position: absolute; }
.show-model .v-real { opacity: 0; }
.has-wipe .card .v-real { clip-path: inset(0 0 0 var(--wipe, 0%)); transition: none; }
.has-wipe.show-model .card .v-real { opacity: 1; }
.wipe { position: absolute; inset: 0; z-index: 3; cursor: ew-resize; touch-action: pan-y; }
.wipe .handle { position: absolute; top: 0; bottom: 0; left: var(--wipe, 100%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.wipe .handle::after { content: "\2194"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: #000; display: grid; place-items: center; font-size: 18px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.wipe .wl, .wipe .wr { position: absolute; bottom: 14px; font: 500 13px var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: #fff;
  background: rgba(0, 0, 0, 0.5); padding: 4px 8px; border-radius: 6px; }
.wipe .wl { left: 14px; }
.wipe .wr { right: 14px; }
@media (max-width: 760px) {
  .wipe { display: none; }
  .has-wipe .card .v-real { clip-path: none; transition: opacity 0.45s ease; }
  .has-wipe.show-model .card .v-real { opacity: 0; }
}

/* tool pages: put it to work */
.ebox { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; padding: clamp(18px, 2vw, 28px);
  border: 1.6px solid var(--kline); border-radius: 14px; background: #fff; }
.ebox div { display: grid; gap: 4px; }
.ebox b { font-weight: 500; font-size: clamp(18px, 1.5vw, 21px); }
.ebox span { color: var(--ink-2); }

/* Follow one project: one stage, the tool frame swaps beside it */
.jstage { position: relative; background: var(--black); color: #fff; }
.jstage .pin { position: sticky; top: 0; height: 100vh; height: 100svh; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px); align-items: center; padding: clamp(72px, 6vw, 84px) var(--edge-r) clamp(24px, 3vw, 40px) var(--edge); }
.jmain { position: relative; display: grid; gap: 14px; }
.jslide { display: contents; }
.jmain .jv { grid-area: 1 / 1; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: #000; opacity: 0; transition: opacity 0.5s ease; }
.jmain .jv.on { opacity: 1; }
.jchips { grid-area: 2 / 1; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.jchips li { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); color: var(--w60); }
.jchips li.is-done { color: var(--w80); border-color: rgba(255, 255, 255, 0.4); }
.jchips li.is-current { background: #fff; color: #000; border-color: #fff; }
.jside { display: grid; }
.jcard { grid-area: 1 / 1; display: grid; gap: 14px; align-content: start; opacity: 0; transform: translateY(12px); transition: opacity 0.45s, transform 0.45s; pointer-events: none; }
.jcard.on { opacity: 1; transform: none; pointer-events: auto; }
.jcard .kick { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--w60); }
.jcard .h-l { margin: 0; }
.jcard .beat { margin: 0; font-size: clamp(19px, 1.7vw, 26px); line-height: 1.32; color: rgba(255, 255, 255, 0.3); transition: color 0.35s; }
.jcard .beat.on { color: #fff; }
.jcard .beat.fig { color: rgba(94, 224, 181, 0.35); }
.jcard .beat.fig.on { color: var(--accent); }
.jcard .learn { justify-self: start; color: #fff; text-decoration: none; font-size: 18px; border-bottom: 1.6px solid currentColor; padding-bottom: 2px; }
.jstage .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.15); }
.jstage .bar i { display: block; height: 100%; width: 0; background: #fff; }
@media (max-width: 760px) {
  .jstage .pin { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; padding-top: 76px; gap: 16px; }
  .jmain .jv { aspect-ratio: 1.21 / 1; }
  .jchips li { font-size: 12px; padding: 3px 8px; }
  .jcard .beat { font-size: 18px; }
}

/* the menu: Tools lists each tool */
.menu .msub { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 2px 0 12px; }
.menu .msub a { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.5; color: var(--w60); text-decoration: none; }
.menu .msub a:hover, .menu .msub a[aria-current="page"] { color: #fff; }
